Skip to content

Commit

Permalink
Merge pull request #6888 from ORCID/NonPlannedStage
Browse files Browse the repository at this point in the history
Stage name is NONE_PLANNED
  • Loading branch information
leomendoza123 authored Sep 4, 2023
2 parents 37818e0 + 200ccb3 commit 21e6d44
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
@Component
public class SalesforceManagerImpl implements SalesforceManager {

private static final List<String> visibleStatuses = List.of("In Development", "Complete", "Certified Service Provider", "None Planned");
private static final List<String> visibleStatuses = List.of("In Development", "Complete", "Certified Service Provider", "NONE_PLANNED");

@Resource
private SalesForceAdapter salesForceAdapter;
Expand Down Expand Up @@ -75,7 +75,17 @@ public MemberDetails retrieveMemberDetails(String memberId) {
if (integrations != null && integrations.length() > 0) {
List<Integration> integrationList = salesForceAdapter.createIntegrationsList(integrations);
// Filter by integration status
List<Integration> filteredIntegrationList = integrationList.stream().filter(x -> visibleStatuses.contains(x.getStage())).collect(Collectors.toList());
List<Integration> filteredIntegrationList = integrationList.stream()
.filter(x -> {
if(visibleStatuses.contains(x.getStage())) {
// NONE_PLANNED should be displayed as "None Planned"
if(x.getStage().equals("NONE_PLANNED")) {
x.setStage("None Planned");
}
return true;
}
return false;
}).collect(Collectors.toList());
details.setIntegrations(filteredIntegrationList);
} else {
details.setIntegrations(List.of());
Expand Down

0 comments on commit 21e6d44

Please sign in to comment.