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

DFPL-1483: Align caseData.court with caseData.caseManagementLocation #4453

Merged
merged 2 commits into from
Jun 7, 2023
Merged
Show file tree
Hide file tree
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 @@ -53,7 +53,7 @@
"orderType": [
"OTHER"
],
"court": "22"
"court": "117"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ private void removeSecureAccommodationOrderFields(Map<String, Object> data, Stri
}

private Court getCourtSelection(String courtID) {
return courtLookup.getCourtByCode(courtID).orElse(null);
// This needs to get the court out of the NEW list of courts, the old onboarding way might not have all courts
// especially in the lower environments, we should also match the 'Family Court sitting at XYZ' pattern.
Optional<Court> court = Optional.ofNullable(courtLookUpService.getCourtByCode(courtID).orElse(null));
return court.map(c -> c.toBuilder()
.name("Family Court sitting at " + c.getName())
.build()).orElse(null);
}
}