From 57ee256923a3f4621eddd6fb4632f971dfca1136 Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Wed, 11 Dec 2024 16:42:56 +0000 Subject: [PATCH 1/3] DTSSTCI-1228: Add Create Due Date work allocation task configuration --- ...on-st_cic-criminalinjuriescompensation.dmn | 11 +++++++ ...on-st_cic-criminalinjuriescompensation.dmn | 12 +++---- ...on-st_cic-criminalinjuriescompensation.dmn | 32 +++++++++++++++++++ ...ns-st_cic-criminalinjuriescompensation.dmn | 4 +-- ...es-st_cic-criminalinjuriescompensation.dmn | 11 +++++++ .../dmn/CamundaTaskCompletionTest.java | 7 +++- .../sptribs/dmn/CamundaTaskTypesTest.java | 7 +++- .../dmn/CamundaTaskWaConfigurationTest.java | 18 +++++++++++ .../dmn/CamundaTaskWaInitiationTest.java | 18 ++++++++++- .../dmn/CamundaTaskWaPermissionTest.java | 10 ++++++ .../dmnutils/CamundaTaskConstants.java | 2 ++ 11 files changed, 121 insertions(+), 11 deletions(-) diff --git a/src/main/resources/dmn/wa-task-completion-st_cic-criminalinjuriescompensation.dmn b/src/main/resources/dmn/wa-task-completion-st_cic-criminalinjuriescompensation.dmn index f9c97a8b2f..bfa54fbaec 100644 --- a/src/main/resources/dmn/wa-task-completion-st_cic-criminalinjuriescompensation.dmn +++ b/src/main/resources/dmn/wa-task-completion-st_cic-criminalinjuriescompensation.dmn @@ -559,6 +559,17 @@ "Auto" + + + "create-draft-order" + + + "createDueDate" + + + "Auto" + + "edit-case","caseworker-case-built","refer-to-judge","refer-to-legal-officer","caseworker-document-management","caseworker-amend-document","create-hearing-summary","contact-parties","createBundle","caseworker-amend-due-date","create-draft-order" diff --git a/src/main/resources/dmn/wa-task-configuration-st_cic-criminalinjuriescompensation.dmn b/src/main/resources/dmn/wa-task-configuration-st_cic-criminalinjuriescompensation.dmn index 248584e711..149c21e2a2 100644 --- a/src/main/resources/dmn/wa-task-configuration-st_cic-criminalinjuriescompensation.dmn +++ b/src/main/resources/dmn/wa-task-configuration-st_cic-criminalinjuriescompensation.dmn @@ -114,7 +114,7 @@ Short name - "processCaseWithdrawalDirections","processRule27Decision","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processPostponementDirections","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","reviewNewCaseAndProvideDirectionsLO","reviewTimeExtensionRequestLO","reviewStrikeOutRequestLO","reviewStayRequestLO","reviewListingDirectionsLO","reviewWithdrawalRequestLO","reviewRule27RequestLO","reviewListCaseLO","vetNewCaseDocuments","reviewOtherRequestLO","reviewListCaseWithin5DaysLO","reviewPostponementRequestLO","reviewReinstatementRequestLO","reviewListCaseWithin5DaysJudge","reviewPostponementRequestJudge","reviewCorrectionsRequest","reviewWrittenReasonsRequest","reviewReinstatementRequestJudge","reviewSetAsideRequest","reviewStayRequestJudge","reviewNewCaseAndProvideDirectionsJudge","reviewOtherRequestJudge","reviewWithdrawalRequestJudge","reviewRule27RequestJudge","reviewListingDirectionsJudge","reviewListCaseJudge","reviewStrikeOutRequestJudge","reviewTimeExtensionRequestJudge","reviewSpecificAccessRequestJudiciary","reviewSpecificAccessRequestLegalOps","reviewSpecificAccessRequestAdmin","reviewSpecificAccessRequestCTSC","followUpNoncomplianceOfDirections","registerNewCase","processFurtherEvidence","stitchCollateHearingBundle" + "processCaseWithdrawalDirections","processRule27Decision","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processPostponementDirections","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","reviewNewCaseAndProvideDirectionsLO","reviewTimeExtensionRequestLO","reviewStrikeOutRequestLO","reviewStayRequestLO","reviewListingDirectionsLO","reviewWithdrawalRequestLO","reviewRule27RequestLO","reviewListCaseLO","vetNewCaseDocuments","reviewOtherRequestLO","reviewListCaseWithin5DaysLO","reviewPostponementRequestLO","reviewReinstatementRequestLO","reviewListCaseWithin5DaysJudge","reviewPostponementRequestJudge","reviewCorrectionsRequest","reviewWrittenReasonsRequest","reviewReinstatementRequestJudge","reviewSetAsideRequest","reviewStayRequestJudge","reviewNewCaseAndProvideDirectionsJudge","reviewOtherRequestJudge","reviewWithdrawalRequestJudge","reviewRule27RequestJudge","reviewListingDirectionsJudge","reviewListCaseJudge","reviewStrikeOutRequestJudge","reviewTimeExtensionRequestJudge","reviewSpecificAccessRequestJudiciary","reviewSpecificAccessRequestLegalOps","reviewSpecificAccessRequestAdmin","reviewSpecificAccessRequestCTSC","followUpNoncomplianceOfDirections","registerNewCase","processFurtherEvidence","stitchCollateHearingBundle", "createDueDate" "majorPriority" @@ -133,7 +133,7 @@ else 5000 - "processCaseWithdrawalDirections","processRule27Decision","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processPostponementDirections","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","reviewNewCaseAndProvideDirectionsLO","reviewTimeExtensionRequestLO","reviewStrikeOutRequestLO","reviewStayRequestLO","reviewListingDirectionsLO","reviewWithdrawalRequestLO","reviewRule27RequestLO","reviewListCaseLO","vetNewCaseDocuments","reviewOtherRequestLO","reviewListCaseWithin5DaysLO","reviewPostponementRequestLO","reviewReinstatementRequestLO","reviewListCaseWithin5DaysJudge","reviewPostponementRequestJudge","reviewCorrectionsRequest","reviewWrittenReasonsRequest","reviewReinstatementRequestJudge","reviewSetAsideRequest","reviewStayRequestJudge","reviewNewCaseAndProvideDirectionsJudge","reviewOtherRequestJudge","reviewWithdrawalRequestJudge","reviewRule27RequestJudge","reviewListingDirectionsJudge","reviewListCaseJudge","reviewStrikeOutRequestJudge","reviewTimeExtensionRequestJudge","reviewSpecificAccessRequestJudiciary","reviewSpecificAccessRequestLegalOps","reviewSpecificAccessRequestAdmin","reviewSpecificAccessRequestCTSC","followUpNoncomplianceOfDirections","registerNewCase","processFurtherEvidence","stitchCollateHearingBundle" + "processCaseWithdrawalDirections","processRule27Decision","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processPostponementDirections","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","reviewNewCaseAndProvideDirectionsLO","reviewTimeExtensionRequestLO","reviewStrikeOutRequestLO","reviewStayRequestLO","reviewListingDirectionsLO","reviewWithdrawalRequestLO","reviewRule27RequestLO","reviewListCaseLO","vetNewCaseDocuments","reviewOtherRequestLO","reviewListCaseWithin5DaysLO","reviewPostponementRequestLO","reviewReinstatementRequestLO","reviewListCaseWithin5DaysJudge","reviewPostponementRequestJudge","reviewCorrectionsRequest","reviewWrittenReasonsRequest","reviewReinstatementRequestJudge","reviewSetAsideRequest","reviewStayRequestJudge","reviewNewCaseAndProvideDirectionsJudge","reviewOtherRequestJudge","reviewWithdrawalRequestJudge","reviewRule27RequestJudge","reviewListingDirectionsJudge","reviewListCaseJudge","reviewStrikeOutRequestJudge","reviewTimeExtensionRequestJudge","reviewSpecificAccessRequestJudiciary","reviewSpecificAccessRequestLegalOps","reviewSpecificAccessRequestAdmin","reviewSpecificAccessRequestCTSC","followUpNoncomplianceOfDirections","registerNewCase","processFurtherEvidence","stitchCollateHearingBundle","createDueDate" "minorPriority" @@ -184,7 +184,7 @@ else 5000 - "processOtherDirectionsReturned","processRule27Decision","processCaseWithdrawalDirections","processListingDirections","processDirectionsReListedCase","processStrikeOutDirectionsReturned","processStayDirections","issueCaseToRespondent","followUpNoncomplianceOfDirections","processFurtherEvidence","processSetAsideDirections","processDirectionsReturned","processPostponementDirections","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processWrittenReasons" + "processOtherDirectionsReturned","processRule27Decision","processCaseWithdrawalDirections","processListingDirections","processDirectionsReListedCase","processStrikeOutDirectionsReturned","processStayDirections","issueCaseToRespondent","followUpNoncomplianceOfDirections","processFurtherEvidence","processSetAsideDirections","processDirectionsReturned","processPostponementDirections","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processWrittenReasons","createDueDate" "workType" @@ -286,7 +286,7 @@ else 5000 - "processRule27Decision","processCaseWithdrawalDirections","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processPostponementDirections","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","vetNewCaseDocuments","reviewSpecificAccessRequestAdmin","followUpNoncomplianceOfDirections","registerNewCase","processFurtherEvidence","stitchCollateHearingBundle" + "processRule27Decision","processCaseWithdrawalDirections","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processPostponementDirections","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","vetNewCaseDocuments","reviewSpecificAccessRequestAdmin","followUpNoncomplianceOfDirections","registerNewCase","processFurtherEvidence","stitchCollateHearingBundle","createDueDate" "roleCategory" @@ -371,7 +371,7 @@ else 5000 - "issueCaseToRespondent","reviewSetAsideRequest","reviewTimeExtensionRequestJudge","reviewSpecificAccessRequestJudiciary","reviewSpecificAccessRequestLegalOps","reviewSpecificAccessRequestAdmin","reviewSpecificAccessRequestCTSC" + "issueCaseToRespondent","reviewSetAsideRequest","reviewTimeExtensionRequestJudge","reviewSpecificAccessRequestJudiciary","reviewSpecificAccessRequestLegalOps","reviewSpecificAccessRequestAdmin","reviewSpecificAccessRequestCTSC","createDueDate" "dueDateIntervalDays" @@ -541,7 +541,7 @@ else 5000 - "reviewNewCaseAndProvideDirectionsLO","reviewTimeExtensionRequestLO","reviewStrikeOutRequestLO","reviewStayRequestLO","reviewListingDirectionsLO","reviewWithdrawalRequestLO","reviewRule27RequestLO","reviewListCaseLO","reviewOtherRequestLO","reviewListCaseWithin5DaysLO","reviewPostponementRequestLO","reviewReinstatementRequestLO","reviewListCaseWithin5DaysJudge","reviewPostponementRequestJudge","reviewCorrectionsRequest","reviewWrittenReasonsRequest","reviewReinstatementRequestJudge","reviewSetAsideRequest","reviewStayRequestJudge","reviewNewCaseAndProvideDirectionsJudge","reviewOtherRequestJudge","reviewWithdrawalRequestJudge","reviewRule27RequestJudge","reviewListingDirectionsJudge","reviewListCaseJudge","reviewStrikeOutRequestJudge","reviewTimeExtensionRequestJudge" + "reviewNewCaseAndProvideDirectionsLO","reviewTimeExtensionRequestLO","reviewStrikeOutRequestLO","reviewStayRequestLO","reviewListingDirectionsLO","reviewWithdrawalRequestLO","reviewRule27RequestLO","reviewListCaseLO","reviewOtherRequestLO","reviewListCaseWithin5DaysLO","reviewPostponementRequestLO","reviewReinstatementRequestLO","reviewListCaseWithin5DaysJudge","reviewPostponementRequestJudge","reviewCorrectionsRequest","reviewWrittenReasonsRequest","reviewReinstatementRequestJudge","reviewSetAsideRequest","reviewStayRequestJudge","reviewNewCaseAndProvideDirectionsJudge","reviewOtherRequestJudge","reviewWithdrawalRequestJudge","reviewRule27RequestJudge","reviewListingDirectionsJudge","reviewListCaseJudge","reviewStrikeOutRequestJudge","reviewTimeExtensionRequestJudge","createDueDate" "description" diff --git a/src/main/resources/dmn/wa-task-initiation-st_cic-criminalinjuriescompensation.dmn b/src/main/resources/dmn/wa-task-initiation-st_cic-criminalinjuriescompensation.dmn index 3c94ce39b9..ce22f77948 100644 --- a/src/main/resources/dmn/wa-task-initiation-st_cic-criminalinjuriescompensation.dmn +++ b/src/main/resources/dmn/wa-task-initiation-st_cic-criminalinjuriescompensation.dmn @@ -1628,6 +1628,38 @@ "ADMIN" + + + "caseworker-issue-case" + + + "CaseManagement" + + + + + + "createDueDate" + + + "Create Due Date" + + + + + + 2 + + + "IssueCase" + + + "routine_work" + + + "ADMIN" + + diff --git a/src/main/resources/dmn/wa-task-permissions-st_cic-criminalinjuriescompensation.dmn b/src/main/resources/dmn/wa-task-permissions-st_cic-criminalinjuriescompensation.dmn index b17f60b8e4..a3597c33a6 100644 --- a/src/main/resources/dmn/wa-task-permissions-st_cic-criminalinjuriescompensation.dmn +++ b/src/main/resources/dmn/wa-task-permissions-st_cic-criminalinjuriescompensation.dmn @@ -55,7 +55,7 @@ - "processCaseWithdrawalDirections","processRule27Decision","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","vetNewCaseDocuments","followUpNoncomplianceOfDirections","registerNewCase","stitchCollateHearingBundle","processPostponementDirections","processFurtherEvidence" + "processCaseWithdrawalDirections","processRule27Decision","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","vetNewCaseDocuments","followUpNoncomplianceOfDirections","registerNewCase","stitchCollateHearingBundle","processPostponementDirections","processFurtherEvidence","createDueDate" @@ -407,7 +407,7 @@ - "processCaseWithdrawalDirections","processRule27Decision","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","vetNewCaseDocuments","followUpNoncomplianceOfDirections","registerNewCase","stitchCollateHearingBundle","processPostponementDirections","processFurtherEvidence" + "processCaseWithdrawalDirections","processRule27Decision","processListingDirections","processDirectionsReListedCase","processDirectionsReListedCaseWithin5Days","processSetAsideDirections","processCorrections","processDirectionsReturned","processTimeExtensionDirectionsReturned","processReinstatementDecisionNotice","processOtherDirectionsReturned","processWrittenReasons","processStrikeOutDirectionsReturned","processStayDirections","issueDecisionNotice","completeHearingOutcome","issueCaseToRespondent","vetNewCaseDocuments","followUpNoncomplianceOfDirections","registerNewCase","stitchCollateHearingBundle","processPostponementDirections","processFurtherEvidence","createDueDate" diff --git a/src/main/resources/dmn/wa-task-types-st_cic-criminalinjuriescompensation.dmn b/src/main/resources/dmn/wa-task-types-st_cic-criminalinjuriescompensation.dmn index 88b097d3a3..0eba05ef27 100644 --- a/src/main/resources/dmn/wa-task-types-st_cic-criminalinjuriescompensation.dmn +++ b/src/main/resources/dmn/wa-task-types-st_cic-criminalinjuriescompensation.dmn @@ -603,6 +603,17 @@ "Review Specific Access Request CTSC" + + + + + + "createDueDate" + + + "Create Due Date" + + diff --git a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskCompletionTest.java b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskCompletionTest.java index 6a226bec97..e7ad79c12e 100644 --- a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskCompletionTest.java +++ b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskCompletionTest.java @@ -22,6 +22,7 @@ import static uk.gov.hmcts.sptribs.DmnDecisionTable.WA_TASK_COMPLETION_ST_CIC_CRIMINALINJURIESCOMPENSATION; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.AUTO_COMPLETE_MODE; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.COMPLETE_HEARING_OUTCOME_TASK; +import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.CREATE_DUE_DATE; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.FOLLOW_UP_NONCOMPLIANCE_OF_DIR_TASK; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.ISSUE_CASE_TO_RESPONDENT_TASK; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.ISSUE_DECISION_NOTICE_TASK; @@ -332,6 +333,10 @@ static Stream scenarioProvider() { "taskType", REVIEW_TIME_EXT_REQ_JUDGE_TASK, "completionMode", AUTO_COMPLETE_MODE ), + Map.of( + "taskType", CREATE_DUE_DATE, + "completionMode", AUTO_COMPLETE_MODE + ), Collections.emptyMap() ) ), @@ -412,7 +417,7 @@ void if_this_test_fails_needs_updating_with_your_changes() { DmnDecisionTableImpl logic = (DmnDecisionTableImpl) decision.getDecisionLogic(); assertThat(logic.getInputs().size(), is(1)); assertThat(logic.getOutputs().size(), is(2)); - assertThat(logic.getRules().size(), is(51)); + assertThat(logic.getRules().size(), is(52)); } @ParameterizedTest(name = "event id: {0}") diff --git a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskTypesTest.java b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskTypesTest.java index 726ae3b106..9bede5340e 100644 --- a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskTypesTest.java +++ b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskTypesTest.java @@ -20,6 +20,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static uk.gov.hmcts.sptribs.DmnDecisionTable.WA_TASK_TYPES_ST_CIC_CRIMINALINJURIESCOMPENSATION; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.COMPLETE_HEARING_OUTCOME_TASK; +import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.CREATE_DUE_DATE; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.FOLLOW_UP_NONCOMPLIANCE_OF_DIR_TASK; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.ISSUE_CASE_TO_RESPONDENT_TASK; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.ISSUE_DECISION_NOTICE_TASK; @@ -298,6 +299,10 @@ static Stream scenarioProvider() { Map.of( "taskTypeId", REVIEW_SPECIFIC_ACCESS_REQ_CTSC_TASK, "taskTypeName", "Review Specific Access Request CTSC" + ), + Map.of( + "taskTypeId", CREATE_DUE_DATE, + "taskTypeName", "Create Due Date" ) ); return Stream.of( @@ -313,7 +318,7 @@ void check_dmn_changed() { DmnDecisionTableImpl logic = (DmnDecisionTableImpl) decision.getDecisionLogic(); assertThat(logic.getInputs().size(), is(1)); assertThat(logic.getOutputs().size(), is(2)); - assertThat(logic.getRules().size(), is(54)); + assertThat(logic.getRules().size(), is(55)); } @ParameterizedTest(name = "retrieve all task type data") diff --git a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaConfigurationTest.java b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaConfigurationTest.java index 9a5c795e17..4eea48346d 100644 --- a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaConfigurationTest.java +++ b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaConfigurationTest.java @@ -32,6 +32,7 @@ import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.CASE_MANAGEMENT_CATEGORY; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.CASE_NAME; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.COMPLETE_HEARING_OUTCOME_TASK; +import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.CREATE_DUE_DATE; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.DECISION_WORK_TYPE; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.DEFAULT_MAJOR_PRIORITY; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.DEFAULT_MINOR_PRIORITY; @@ -1112,6 +1113,23 @@ static Stream scenarioProvider() throws IOException { ) .expectedValue(ADDITIONAL_PROPERTIES_ROLE_ASSIGNMENT_ID, roleAssignmentId, false) .build() + ), + Arguments.of( + CREATE_DUE_DATE, + CaseDataBuilder.defaultCase().build(), + ConfigurationExpectationBuilder.defaultExpectations() + .expectedValue(MINOR_PRIORITY, DEFAULT_MINOR_PRIORITY, true) + .expectedValue(MAJOR_PRIORITY, DEFAULT_MAJOR_PRIORITY, true) + .expectedValue(WORK_TYPE, ROUTINE_WORK_TYPE, true) + .expectedValue(ROLE_CATEGORY, ROLE_CATEGORY_ADMIN, true) + .expectedValue(DUE_DATE_INTERVAL_DAYS, "2", true) + .expectedValue( + DESCRIPTION, + "[Orders: Create draft](/cases/case-details/${[CASE_REFERENCE]}/trigger" + + "/create-draft-order)", + true + ) + .build() ) ); } diff --git a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaInitiationTest.java b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaInitiationTest.java index ee2fd2d087..539561531c 100644 --- a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaInitiationTest.java +++ b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaInitiationTest.java @@ -20,6 +20,7 @@ import static uk.gov.hmcts.sptribs.DmnDecisionTable.WA_TASK_INITIATION_ST_CIC_CRIMINALINJURIESCOMPENSATION; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.APPLICATION_WORK_TYPE; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.COMPLETE_HEARING_OUTCOME_TASK; +import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.CREATE_DUE_DATE; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.DECISION_WORK_TYPE; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.FOLLOW_UP_NONCOMPLIANCE_OF_DIR_TASK; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.HEARING_WORK_TYPE; @@ -870,6 +871,21 @@ static Stream scenarioProvider() { "roleCategory", ROLE_CATEGORY_ADMIN ) ) + ), + Arguments.of( + "caseworker-issue-case", + "CaseManagement", + null, + List.of( + Map.of( + "taskId", CREATE_DUE_DATE, + "name", "Create Due Date", + "workingDaysAllowed", 2, + "processCategories", PROCESS_CATEGORY_ISSUE_CASE, + "workType", ROUTINE_WORK_TYPE, + "roleCategory", ROLE_CATEGORY_ADMIN + ) + ) ) ); } @@ -880,7 +896,7 @@ void if_this_test_fails_needs_updating_with_your_changes() { DmnDecisionTableImpl logic = (DmnDecisionTableImpl) decision.getDecisionLogic(); assertThat(logic.getInputs().size(), is(3)); assertThat(logic.getOutputs().size(), is(7)); - assertThat(logic.getRules().size(), is(50)); + assertThat(logic.getRules().size(), is(51)); } @ParameterizedTest(name = "event id: {0} post event state: {1} appeal type: {2}") diff --git a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaPermissionTest.java b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaPermissionTest.java index ce3b43ffbf..58c2f098f0 100644 --- a/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaPermissionTest.java +++ b/src/test/java/uk/gov/hmcts/sptribs/dmn/CamundaTaskWaPermissionTest.java @@ -24,6 +24,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static uk.gov.hmcts.sptribs.DmnDecisionTable.WA_TASK_PERMISSIONS_ST_CIC_CRIMINALINJURIESCOMPENSATION; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.COMPLETE_HEARING_OUTCOME_TASK; +import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.CREATE_DUE_DATE; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.FOLLOW_UP_NONCOMPLIANCE_OF_DIR_TASK; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.ISSUE_CASE_TO_RESPONDENT_TASK; import static uk.gov.hmcts.sptribs.dmnutils.CamundaTaskConstants.ISSUE_DECISION_NOTICE_TASK; @@ -362,6 +363,15 @@ static Stream scenarioProvider() { STITCH_COLLATE_HEARING_BUNDLE_TASK, DUMMY_CASE_DATA, defaultAdminAndCtscTaskPermissions() + ), + Arguments.of( + CREATE_DUE_DATE, + DUMMY_CASE_DATA, + List.of( + taskSupervisorPermissions(), + regionalCentreAdminPermissions(), + ctscPermissions() + ) ) ); } diff --git a/src/test/java/uk/gov/hmcts/sptribs/dmnutils/CamundaTaskConstants.java b/src/test/java/uk/gov/hmcts/sptribs/dmnutils/CamundaTaskConstants.java index 5a20c0b233..ed93981fc1 100644 --- a/src/test/java/uk/gov/hmcts/sptribs/dmnutils/CamundaTaskConstants.java +++ b/src/test/java/uk/gov/hmcts/sptribs/dmnutils/CamundaTaskConstants.java @@ -101,6 +101,8 @@ private CamundaTaskConstants() { public static final String REVIEW_SPECIFIC_ACCESS_REQ_ADMIN_TASK = "reviewSpecificAccessRequestAdmin"; public static final String REVIEW_SPECIFIC_ACCESS_REQ_CTSC_TASK = "reviewSpecificAccessRequestCTSC"; + public static final String CREATE_DUE_DATE = "createDueDate"; + public static final String AUTO_COMPLETE_MODE = "Auto"; public static final String DEFAULT_NONE_COMPLETE_MODE = "defaultNone"; From 92ccfefd90d2af0aef86ac60d402b24d306be8c0 Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Thu, 12 Dec 2024 10:16:01 +0000 Subject: [PATCH 2/3] DTSSTCI-1228: Enable wa ft if the label used --- Jenkinsfile_CNP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index fb43bd3c2a..1fb61fabb7 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -236,7 +236,7 @@ withPipeline(type, product, component) { env.TASK_MANAGEMENT_API_URL = "https://wa-task-management-api-sptribs-case-api-pr-${CHANGE_ID}.preview.platform.hmcts.net" env.ROLE_ASSIGNMENT_API_URL = "https://am-org-role-mapping-service-sptribs-case-api-pr-${CHANGE_ID}.preview.platform.hmcts.net" - for (label in githubApi.getLabelsbyPattern(env.BRANCH_NAME, "pr-values:wa") ) { + for (label in githubApi.getLabelsbyPattern(env.BRANCH_NAME, "pr-values:wa-ft-tests") ) { env.WA_FUNCTIONAL_TESTS_ENABLED = true } From 567565fcd63ce451d10be568608ad0c53f1eecdd Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Thu, 12 Dec 2024 10:16:31 +0000 Subject: [PATCH 3/3] DTSSTCI-1228: revert label change in jenkins file --- Jenkinsfile_CNP | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile_CNP b/Jenkinsfile_CNP index 1fb61fabb7..fb43bd3c2a 100644 --- a/Jenkinsfile_CNP +++ b/Jenkinsfile_CNP @@ -236,7 +236,7 @@ withPipeline(type, product, component) { env.TASK_MANAGEMENT_API_URL = "https://wa-task-management-api-sptribs-case-api-pr-${CHANGE_ID}.preview.platform.hmcts.net" env.ROLE_ASSIGNMENT_API_URL = "https://am-org-role-mapping-service-sptribs-case-api-pr-${CHANGE_ID}.preview.platform.hmcts.net" - for (label in githubApi.getLabelsbyPattern(env.BRANCH_NAME, "pr-values:wa-ft-tests") ) { + for (label in githubApi.getLabelsbyPattern(env.BRANCH_NAME, "pr-values:wa") ) { env.WA_FUNCTIONAL_TESTS_ENABLED = true }