Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage name is NONE_PLANNED #6888

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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