Skip to content

Commit

Permalink
EPMRPP-89198 organizations routing refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx committed Feb 15, 2024
1 parent e94e598 commit e56c48f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public static class AssignedProject {
private String projectRole;
private String entryType;
private String projectKey;
private String projectSlug;
private Long organizationId;

}

Expand All @@ -88,9 +90,10 @@ public static class AssignedProject {
@ToString
public static class AssignedOrganization {

private Long organizationId;
private String organizationRole;
private String organizationName;
private String organizationSlug;
private String organizationName;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ private ProjectSettingsConverter() {
resource.setLaunchesQuantity(project.getLaunchesQuantity());
resource.setProjectId(project.getId());
resource.setProjectName(project.getName());
resource.setProjectKey(project.getProjectKey());
resource.setProjectSlug(project.getProjectSlug());
resource.setCreationDate(EntityUtils.TO_DATE.apply(project.getCreationDate()));
resource.setLastRun(ofNullable(project.getLastRun()).map(EntityUtils.TO_DATE).orElse(null));
resource.setEntryType(project.getProjectType());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ private UserConverter() {
assignedProject.setEntryType(p.getProject().getProjectType().name());
assignedProject.setProjectRole(p.getProjectRole().toString());
assignedProject.setProjectKey(p.getProject().getKey());
assignedProject.setProjectKey(p.getProject().getOrganization().getSlug());
assignedProject.setProjectSlug(p.getProject().getSlug());
assignedProject.setOrganizationId(p.getProject().getOrganization().getId());
return assignedProject;
}));
resource.setAssignedProjects(userProjects);
Expand All @@ -78,6 +79,7 @@ private UserConverter() {
.collect(Collectors.toMap(orgUser -> orgUser.getOrganization().getSlug(),
orgUser -> {
UserResource.AssignedOrganization assignedOrganization = new UserResource.AssignedOrganization();
assignedOrganization.setOrganizationId(orgUser.getOrganization().getId());
assignedOrganization.setOrganizationSlug(orgUser.getOrganization().getSlug());
assignedOrganization.setOrganizationName(orgUser.getOrganization().getName());
assignedOrganization.setOrganizationRole(orgUser.getOrganizationRole().name());
Expand Down

0 comments on commit e56c48f

Please sign in to comment.