diff --git a/src/main/resources/validationrules/civil/civil-judicial-office-holder-mapping.drl b/src/main/resources/validationrules/civil/civil-judicial-office-holder-mapping.drl index fa571d50e..5bc74ca43 100644 --- a/src/main/resources/validationrules/civil/civil-judicial-office-holder-mapping.drl +++ b/src/main/resources/validationrules/civil/civil-judicial-office-holder-mapping.drl @@ -354,12 +354,12 @@ 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"))) @@ -367,7 +367,7 @@ 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()) diff --git a/src/main/resources/validationrules/civil/civil-judicial-org-role-mapping.drl b/src/main/resources/validationrules/civil/civil-judicial-org-role-mapping.drl index e77f5a3c0..2df09a085 100644 --- a/src/main/resources/validationrules/civil/civil-judicial-org-role-mapping.drl +++ b/src/main/resources/validationrules/civil/civil-judicial-org-role-mapping.drl @@ -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 attribute = new HashMap<>(); attribute.put("contractType", JacksonUtils.convertObjectIntoJsonNode("Fee-Paid")); @@ -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 attribute = new HashMap<>(); if($joh.getOffice().contains("Fee-Paid")) { @@ -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 attribute = new HashMap<>(); diff --git a/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolCivilHearingJudicialRoleMappingTest.java b/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolCivilHearingJudicialRoleMappingTest.java index 8cd4f541c..e2a7391cd 100644 --- a/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolCivilHearingJudicialRoleMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolCivilHearingJudicialRoleMappingTest.java @@ -93,11 +93,11 @@ static Stream 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")) ); } diff --git a/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolCivilJudicialRoleMappingTest.java b/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolCivilJudicialRoleMappingTest.java index 306cc9825..9f05e5ecc 100644 --- a/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolCivilJudicialRoleMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/orgrolemapping/domain/service/DroolCivilJudicialRoleMappingTest.java @@ -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 {