Skip to content

Commit

Permalink
Merge pull request #1623 from hmcts/COT-484_Civil_DJ_SiR_correct_appt…
Browse files Browse the repository at this point in the history
…_name

COT-484 update civil appt name
  • Loading branch information
mikebrownccd authored Nov 7, 2023
2 parents 21406f1 + 6487274 commit d05d4f3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
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

0 comments on commit d05d4f3

Please sign in to comment.