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

COT-484 update civil appt name #1623

Merged
merged 4 commits into from
Nov 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 @@ -354,20 +354,20 @@ then
end;

/*
* "CIVIL District Judge- Sitting in Retirement" business role business role mapping to JOH.
* "CIVIL District Judge (sitting in retirement)" business role business role mapping to JOH.
*/
rule "civil_district_judge_sitting_in_retirement_fee_paid_joh"
when
$f: FeatureFlag(status && flagName == FeatureFlagEnum.CIVIL_WA_1_2.getValue())
$jap: JudicialAccessProfile(appointment == "District Judge- Sitting in Retirement",
$jap: JudicialAccessProfile(appointment == "District Judge (sitting in retirement)",
appointmentType == "Fee Paid",
(endTime == null || endTime.compareTo(ZonedDateTime.now()) >= 0),
(validateAuthorisation(authorisations, "AAA6") || validateAuthorisation(authorisations, "AAA7")))
then
insert(
JudicialOfficeHolder.builder()
.userId($jap.getUserId())
.office("CIVIL District Judge- Sitting in Retirement-Fee-Paid")
.office("CIVIL District Judge (sitting in retirement)-Fee-Paid")
.jurisdiction("CIVIL")
.ticketCodes($jap.getTicketCodes())
.beginTime($jap.getBeginTime())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ when
"CIVIL Deputy District Judge-Fee-Paid",
"CIVIL Deputy District Judge - Sitting in Retirement-Fee-Paid",
"CIVIL Recorder-Fee-Paid",
"CIVIL District Judge- Sitting in Retirement-Fee-Paid"))
"CIVIL District Judge (sitting in retirement)-Fee-Paid"))
then
Map<String,JsonNode> attribute = new HashMap<>();
attribute.put("contractType", JacksonUtils.convertObjectIntoJsonNode("Fee-Paid"));
Expand Down Expand Up @@ -273,7 +273,7 @@ $joh: JudicialOfficeHolder(office in ( "CIVIL District Judge-Salaried", "CIVIL P
"CIVIL Senior Circuit Judge-Salaried", "CIVIL High Court Judge-Salaried",
"CIVIL Deputy Circuit Judge-Fee-Paid", "CIVIL Deputy District Judge-Fee-Paid",
"CIVIL Deputy District Judge - Sitting in Retirement-Fee-Paid",
"CIVIL Recorder-Fee-Paid", "CIVIL District Judge- Sitting in Retirement-Fee-Paid"))
"CIVIL Recorder-Fee-Paid", "CIVIL District Judge (sitting in retirement)-Fee-Paid"))
then
Map<String,JsonNode> attribute = new HashMap<>();
if($joh.getOffice().contains("Fee-Paid")) {
Expand Down Expand Up @@ -379,7 +379,7 @@ when
$f: FeatureFlag(status && flagName == FeatureFlagEnum.CIVIL_WA_1_0.getValue())
$joh: JudicialOfficeHolder(office in ("CIVIL Deputy District Judge-Fee-Paid", "CIVIL Recorder-Fee-Paid",
"CIVIL Deputy District Judge - Sitting in Retirement-Fee-Paid",
"CIVIL District Judge- Sitting in Retirement-Fee-Paid"))
"CIVIL District Judge (sitting in retirement)-Fee-Paid"))
$bk: JudicialBooking(userId == $joh.userId)
then
Map<String,JsonNode> attribute = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ static Stream<Arguments> endToEndData() {
List.of("Recorder - Fee Paid"),
List.of("fee-paid-judge","hmcts-judiciary",
"hearing-viewer")),
Arguments.of("District Judge- Sitting in Retirement",
Arguments.of("District Judge (sitting in retirement)",
"Fee Paid",
true,
true,
List.of("District Judge- Sitting in Retirement"),
List.of("District Judge (sitting in retirement)"),
List.of("judge", "fee-paid-judge", "hmcts-judiciary", "hearing-viewer"))
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void shouldReturnSalariedRoles(String setOffice, String roleNameOutput) {
"CIVIL Deputy District Judge-Fee-Paid,fee-paid-judge",
"CIVIL Deputy District Judge - Sitting in Retirement-Fee-Paid,fee-paid-judge",
"CIVIL Recorder-Fee-Paid,fee-paid-judge",
"CIVIL District Judge- Sitting in Retirement-Fee-Paid,fee-paid-judge"
"CIVIL District Judge (sitting in retirement)-Fee-Paid,fee-paid-judge"
})
void shouldReturnFeePaidRoles(String setOffice, String roleNameOutput) throws IOException {

Expand Down