From bf412937ee07ead98ffd4e0c934646239dc2ddf5 Mon Sep 17 00:00:00 2001 From: nilay Date: Wed, 15 Jan 2025 13:59:44 +0000 Subject: [PATCH 01/17] moving directionIssued eventToFields to own file --- .../CaseEventToFields-directionIssued.json | 372 ++++++++++++++++++ .../CaseEventToFields/CaseEventToFields.json | 370 ----------------- 2 files changed, 372 insertions(+), 370 deletions(-) create mode 100644 definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json new file mode 100644 index 00000000000..ab82a070ecf --- /dev/null +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json @@ -0,0 +1,372 @@ +[ + { + "CaseEventID": "directionIssued", + "CaseFieldID": "prePostHearing", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 1, + "PageID": "1.0", + "PageLabel": "Issue direction", + "ShowSummaryChangeOption": "Y" + }, + { + "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", + "CaseEventID": "directionIssued", + "CaseFieldID": "directionTypeDl", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 2, + "PageID": "1.0", + "PageLabel": "Issue direction", + "ShowSummaryChangeOption": "Y" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "confidentialityType", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 3, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "LiveFrom": "06/10/2022", + "CaseEventID": "directionIssued", + "CaseFieldID": "hearingRoute", + "CaseTypeID": "Benefit", + "DisplayContext": "READONLY", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasRepresentative", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasOtherPartyRep", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasOtherPartyAppointee", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasOtherParties", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "hasJointParty", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 99, + "PageID": "1.0", + "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "selectPartiesDirectionsNotice", + "CaseTypeID": "Benefit", + "DisplayContext": "READONLY", + "FieldShowCondition": "confidentialityType=\"confidential\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 3, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToFTA", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 4, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToRepresentative", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasRepresentative = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 5, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToOtherPartyRep", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherPartyRep = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 6, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToOtherPartyAppointee", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherPartyAppointee = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 7, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToOtherParty", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherParties = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 8, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToJointParty", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\" AND hasJointParty = \"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 9, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "sendDirectionNoticeToAppellantOrAppointee", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "confidentialityType=\"confidential\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 10, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "directionDueDate", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "directionTypeDl!=\"refuseExtension\" AND directionTypeDl!=\"refuseHearingRecordingRequest\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 11, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "LiveFrom": "06/10/2022", + "CaseEventID": "directionIssued", + "CaseFieldID": "tribunalDirectPoToAttend", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "hearingRoute=\"listAssist\"", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 12, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "reservedToJudgeInterloc", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 13, + "PageID": "1.0", + "PageLabel": "Issue direction", + "ShowSummaryChangeOption": "Y" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "createdInGapsFrom", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "bodyContent=\"doNotUse\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 14, + "PageID": "1.0", + "PageLabel": "Issue direction", + "RetainHiddenValue": "Yes" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "documentSentToDwp", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "createdInGapsFrom!=\"readyToList\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 15, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "extensionNextEventDl", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "directionTypeDl=\"refuseExtension\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 16, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "generateNotice", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 17, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", + "CaseEventID": "directionIssued", + "CaseFieldID": "sscsInterlocDirectionDocument", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "generateNotice=\"No\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 18, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "bodyContent", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "generateNotice=\"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 19, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "signedBy", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "generateNotice=\"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 20, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "signedRole", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "FieldShowCondition": "generateNotice=\"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 21, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", + "CaseEventID": "directionIssued", + "CaseFieldID": "dateAdded", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "FieldShowCondition": "generateNotice=\"Yes\"", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 22, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "previewDocument", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 2, + "PageFieldDisplayOrder": 23, + "PageID": "2.0", + "PageLabel": "Issue direction", + "PageShowCondition": "generateNotice=\"Yes\"" + } +] diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields.json index c8db80c9e21..f6c0a809397 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields.json @@ -1685,376 +1685,6 @@ "PageID": "previewDecisionNotice", "PageLabel": "Preview Decision Notice" }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "prePostHearing", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 1, - "PageID": "1.0", - "PageLabel": "Issue direction", - "ShowSummaryChangeOption": "Y" - }, - { - "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", - "CaseEventID": "directionIssued", - "CaseFieldID": "directionTypeDl", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 2, - "PageID": "1.0", - "PageLabel": "Issue direction", - "ShowSummaryChangeOption": "Y" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "confidentialityType", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 3, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "LiveFrom": "06/10/2022", - "CaseEventID": "directionIssued", - "CaseFieldID": "hearingRoute", - "CaseTypeID": "Benefit", - "DisplayContext": "READONLY", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasRepresentative", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasOtherPartyRep", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasOtherPartyAppointee", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasOtherParties", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "hasJointParty", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 99, - "PageID": "1.0", - "FieldShowCondition": "confidentialityType=\"DUMMY_VALUE_TO_HIDE_FIELD\"", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "selectPartiesDirectionsNotice", - "CaseTypeID": "Benefit", - "DisplayContext": "READONLY", - "FieldShowCondition": "confidentialityType=\"confidential\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 3, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToFTA", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 4, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToRepresentative", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasRepresentative = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 5, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToOtherPartyRep", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherPartyRep = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 6, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToOtherPartyAppointee", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherPartyAppointee = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 7, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToOtherParty", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasOtherParties = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 8, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToJointParty", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\" AND hasJointParty = \"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 9, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "sendDirectionNoticeToAppellantOrAppointee", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "confidentialityType=\"confidential\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 10, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "directionDueDate", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "directionTypeDl!=\"refuseExtension\" AND directionTypeDl!=\"refuseHearingRecordingRequest\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 11, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "LiveFrom": "06/10/2022", - "CaseEventID": "directionIssued", - "CaseFieldID": "tribunalDirectPoToAttend", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "hearingRoute=\"listAssist\"", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 12, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "reservedToJudgeInterloc", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 13, - "PageID": "1.0", - "PageLabel": "Issue direction", - "ShowSummaryChangeOption": "Y" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "createdInGapsFrom", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "bodyContent=\"doNotUse\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 14, - "PageID": "1.0", - "PageLabel": "Issue direction", - "RetainHiddenValue": "Yes" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "documentSentToDwp", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "createdInGapsFrom!=\"readyToList\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 15, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "extensionNextEventDl", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "directionTypeDl=\"refuseExtension\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 16, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "generateNotice", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 17, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", - "CaseEventID": "directionIssued", - "CaseFieldID": "sscsInterlocDirectionDocument", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "generateNotice=\"No\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 18, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "bodyContent", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "generateNotice=\"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 19, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "signedBy", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "generateNotice=\"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 20, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "signedRole", - "CaseTypeID": "Benefit", - "DisplayContext": "MANDATORY", - "FieldShowCondition": "generateNotice=\"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 21, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", - "CaseEventID": "directionIssued", - "CaseFieldID": "dateAdded", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "FieldShowCondition": "generateNotice=\"Yes\"", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 1, - "PageFieldDisplayOrder": 22, - "PageID": "1.0", - "PageLabel": "Issue direction" - }, - { - "CaseEventID": "directionIssued", - "CaseFieldID": "previewDocument", - "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", - "LiveFrom": "01/01/2018", - "PageDisplayOrder": 2, - "PageFieldDisplayOrder": 23, - "PageID": "2.0", - "PageLabel": "Issue direction", - "PageShowCondition": "generateNotice=\"Yes\"" - }, { "CallBackURLMidEvent": "${CCD_DEF_TRIBUNALS_API_URL}/ccdMidEvent", "CaseEventID": "decisionIssued", From db7c54a5e92666f8b30e97fb4332454bf7e72942 Mon Sep 17 00:00:00 2001 From: nilay Date: Wed, 15 Jan 2025 15:11:10 +0000 Subject: [PATCH 02/17] adding new fields for choosing substantive or direction hearing and preparing mapping them to hmrc HearingType --- build.gradle | 2 +- .../AuthorisationCaseField.json | 26 ++++++++++++++++- .../CaseEventToFields-directionIssued.json | 29 +++++++++++++++++-- .../benefit/sheets/CaseField/CaseField.json | 5 +++- .../sheets/CaseTypeTab/CaseTypeTab.json | 6 ++++ .../benefit/sheets/FixedLists/FixedLists.json | 4 ++- .../DirectionIssuedAboutToStartHandler.java | 10 ++++++- .../DirectionIssuedAboutToSubmitHandler.java | 6 +++- .../mapping/HearingsDetailsMapping.java | 9 ++++-- .../mapping/ServiceHearingValuesMapping.java | 2 +- .../sscs/model/hmc/reference/HearingType.java | 9 ++++++ .../mapping/HearingsDetailsMappingTest.java | 25 ++++++++++++++-- 12 files changed, 117 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index d6c39546977..e117784742b 100644 --- a/build.gradle +++ b/build.gradle @@ -365,7 +365,7 @@ dependencies { implementation group: 'com.mchange', name: 'c3p0', version: '0.10.1' implementation group: 'org.flywaydb', name: 'flyway-core', version: '9.22.3' - implementation group: 'com.github.hmcts', name: 'sscs-common', version: '5.12.27' + implementation group: 'com.github.hmcts', name: 'sscs-common', version: 'SSCSCI-1456-SNAPSHOT' implementation group: 'com.github.hmcts', name: 'sscs-pdf-email-common', version: '5.2.23' implementation group: 'com.azure', name: 'azure-core', version: '1.46.0' diff --git a/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json b/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json index 479df49094f..7ce0bced12c 100644 --- a/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json +++ b/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json @@ -1661,5 +1661,29 @@ {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomes", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs", "CRUD": "CRUD"}, - {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"} + {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, + {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, + {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, + {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"} ] diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json index ab82a070ecf..da8652c54e5 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json @@ -359,14 +359,37 @@ }, { "CaseEventID": "directionIssued", - "CaseFieldID": "previewDocument", + "CaseFieldID": "selectNextTypeOfHearing", "CaseTypeID": "Benefit", - "DisplayContext": "OPTIONAL", + "DisplayContext": "MANDATORY", "LiveFrom": "01/01/2018", - "PageDisplayOrder": 2, + "PageDisplayOrder": 1, "PageFieldDisplayOrder": 23, + "PageID": "1.0", + "PageLabel": "Issue direction" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "typeOfHearing", + "CaseTypeID": "Benefit", + "DisplayContext": "MANDATORY", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 2, + "PageFieldDisplayOrder": 24, "PageID": "2.0", "PageLabel": "Issue direction", + "PageShowCondition": "selectNextTypeOfHearing=\"Yes\"" + }, + { + "CaseEventID": "directionIssued", + "CaseFieldID": "previewDocument", + "CaseTypeID": "Benefit", + "DisplayContext": "OPTIONAL", + "LiveFrom": "01/01/2018", + "PageDisplayOrder": 3, + "PageFieldDisplayOrder": 25, + "PageID": "3.0", + "PageLabel": "Issue direction", "PageShowCondition": "generateNotice=\"Yes\"" } ] diff --git a/definitions/benefit/sheets/CaseField/CaseField.json b/definitions/benefit/sheets/CaseField/CaseField.json index 8c53ffc615d..32998f42d45 100644 --- a/definitions/benefit/sheets/CaseField/CaseField.json +++ b/definitions/benefit/sheets/CaseField/CaseField.json @@ -521,5 +521,8 @@ {"LiveFrom": "06/02/2024", "CaseTypeID": "Benefit", "ID": "preWorkAllocation", "Label": "Case created before WA went Live", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "ignoreCallbackWarnings", "Label": "Ignore callback warnings", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomes", "Label": "Hearing Outcomes", "FieldType": "Collection", "FieldTypeParameter": "hearingOutcomeDetails", "SecurityClassification": "PUBLIC"}, - {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomeValue", "Label": "Hearing Outcome", "FieldType": "hearingOutcomeValue", "SecurityClassification": "PUBLIC"} + {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomeValue", "Label": "Hearing Outcome", "FieldType": "hearingOutcomeValue", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "selectNextTypeOfHearing", "Label": "Do you want to select next hearing type i.e. Substantive or Directions hearing", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "ID": "typeOfHearing", "Label": "Hearing Type", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_typeOfHearing", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "20/08/2019", "CaseTypeID": "Benefit", "ID": "appealHearingOptions", "Label": "**Hearing Options** \r\n${appeal.hearingOptions} ", "FieldType": "Label", "SecurityClassification": "PUBLIC"} ] diff --git a/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json b/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json index 8f7c41b841b..21fc6f46a6e 100644 --- a/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json +++ b/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json @@ -115,6 +115,8 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "caseInfo_sscs", "TabLabel": "Appeal Details", "TabDisplayOrder": 4, "CaseFieldID": "isMedicalMemberRequired", "TabFieldDisplayOrder": 42, "FieldShowCondition": "isMedicalMemberRequired!=\"\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "caseInfo_sscs", "TabLabel": "Appeal Details", "TabDisplayOrder": 4, "CaseFieldID": "SearchCriteria", "TabFieldDisplayOrder": 43}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "caseInfo_sscs", "TabLabel": "Appeal Details", "TabDisplayOrder": 4, "CaseFieldID": "caseManagementLocation", "TabFieldDisplayOrder": 44}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "caseInfo_sscs", "TabLabel": "Appeal Details", "TabDisplayOrder": 4, "CaseFieldID": "appealHearingOptions", "TabFieldDisplayOrder": 45, "FieldShowCondition": "appealHearingOptions=\"*\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "events_sscs", "TabLabel": "Case Progression", "TabDisplayOrder": 5, "CaseFieldID": "isConfidentialCaseLabel", "TabShowCondition": "events=\"*\"", "TabFieldDisplayOrder": 1, "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs", "TabID": "events_sscs", "TabLabel": "Case Progression", "TabDisplayOrder": 5, "CaseFieldID": "events", "TabFieldDisplayOrder": 2}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs", "TabID": "evidence_sscs", "TabLabel": "GAPS 2 Evidence", "TabDisplayOrder": 6, "CaseFieldID": "evidence", "TabFieldDisplayOrder": 2}, @@ -286,6 +288,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 13}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 14}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 15, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "typeOfHearing", "TabFieldDisplayOrder": 16, "FieldShowCondition": "typeOfHearing=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "TabShowCondition": "regionalProcessingCenter.hearingRoute=\"listAssist\" OR regionalProcessingCenter.hearingRoute=\"gaps\"", "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs-clerk", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "defaultListingValues", "TabFieldDisplayOrder": 1}, @@ -304,6 +307,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 14}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 15}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 16, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "typeOfHearing", "TabFieldDisplayOrder": 17, "FieldShowCondition": "typeOfHearing=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "TabShowCondition": "regionalProcessingCenter.hearingRoute=\"listAssist\" OR regionalProcessingCenter.hearingRoute=\"gaps\"", "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs-registrar", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "defaultListingValues", "TabFieldDisplayOrder": 1}, @@ -321,6 +325,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 13}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 14}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 15, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "typeOfHearing", "TabFieldDisplayOrder": 16, "FieldShowCondition": "typeOfHearing=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "TabShowCondition": "regionalProcessingCenter.hearingRoute=\"listAssist\" OR regionalProcessingCenter.hearingRoute=\"gaps\"", "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs-superuser", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "defaultListingValues", "TabFieldDisplayOrder": 2}, @@ -339,6 +344,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 15}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 16}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 17, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "typeOfHearing", "TabFieldDisplayOrder": 18, "FieldShowCondition": "typeOfHearing=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "language_sscs", "TabLabel": "Welsh", "TabDisplayOrder": 25, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "language_sscs", "TabLabel": "Welsh", "TabDisplayOrder": 25, "CaseFieldID": "languagePreferenceWelsh", "TabFieldDisplayOrder": 1, "TabShowCondition": "languagePreferenceWelsh=\"Yes\""}, diff --git a/definitions/benefit/sheets/FixedLists/FixedLists.json b/definitions/benefit/sheets/FixedLists/FixedLists.json index 1f4658f493e..7941e281b09 100644 --- a/definitions/benefit/sheets/FixedLists/FixedLists.json +++ b/definitions/benefit/sheets/FixedLists/FixedLists.json @@ -916,5 +916,7 @@ {"LiveFrom": "05/05/2023", "ID": "FL_dwpStates", "ListElementCode": "decisionRemade", "ListElement": "Review Decision"}, {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remade", "ListElement": "Remade"}, {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "refused", "ListElement": "Refused"}, - {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remitted", "ListElement": "Remit from UT"} + {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remitted", "ListElement": "Remit from UT"}, + {"LiveFrom": "01/09/2021", "ID": "FL_typeOfHearing", "ListElementCode": "substantive", "ListElement": "Substantive"}, + {"LiveFrom": "01/09/2021", "ID": "FL_typeOfHearing", "ListElementCode": "direction", "ListElement": "Direction"} ] diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java index b8bb708c07b..e7fa9bccded 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java @@ -49,13 +49,21 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, setDirectionTypeDropDown(sscsCaseData); setExtensionNextEventDropdown(callback.getCaseDetails().getState(), sscsCaseData); - if (isPostHearingsEnabled) { sscsCaseData.setPrePostHearing(null); } clearFields(sscsCaseData); setPartiesToSendLetter(sscsCaseData); + YesNo selectNextTypeOfHearing = sscsCaseData.getSelectNextTypeOfHearing(); + sscsCaseData.setSelectNextTypeOfHearing(sscsCaseData.getSelectNextTypeOfHearing() != null + ? sscsCaseData.getSelectNextTypeOfHearing() : NO); + if (isYes(selectNextTypeOfHearing)) { + TypeOfHearing typeOfHearing = sscsCaseData.getTypeOfHearing(); + if (typeOfHearing != null) { + sscsCaseData.setTypeOfHearing(typeOfHearing); + } + } return new PreSubmitCallbackResponse<>(sscsCaseData); } diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java index d9b2dd03790..db8a4c8b9e4 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java @@ -7,6 +7,7 @@ import static uk.gov.hmcts.reform.sscs.ccd.domain.InterlocReviewState.*; import static uk.gov.hmcts.reform.sscs.ccd.domain.State.READY_TO_LIST; import static uk.gov.hmcts.reform.sscs.ccd.domain.State.VALID_APPEAL; +import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.isNoOrNull; import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.isYes; import static uk.gov.hmcts.reform.sscs.helper.SscsHelper.getPreValidStates; import static uk.gov.hmcts.reform.sscs.util.DocumentUtil.isFileAPdf; @@ -73,7 +74,10 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, SscsDocumentTranslationStatus documentTranslationStatus = caseData.isLanguagePreferenceWelsh() && callback.getEvent() == EventType.DIRECTION_ISSUED ? SscsDocumentTranslationStatus.TRANSLATION_REQUIRED : null; log.info("DocumentTranslationStatus is {}, for case id : {}", documentTranslationStatus, caseData.getCcdCaseId()); - + YesNo selectNextTypeOfHearing = caseData.getSelectNextTypeOfHearing(); + if (isNoOrNull(selectNextTypeOfHearing)) { + caseData.setTypeOfHearing(null); + } return validateDirectionType(caseData) .or(() -> validateDirectionDueDate(caseData)) .orElseGet(() -> validateForPdfAndCreateCallbackResponse(callback, caseDetails, caseData, documentTranslationStatus)); diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java index 27108e6677d..ed66ee5b198 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java @@ -22,6 +22,7 @@ import uk.gov.hmcts.reform.sscs.ccd.domain.OtherParty; import uk.gov.hmcts.reform.sscs.ccd.domain.Party; import uk.gov.hmcts.reform.sscs.ccd.domain.SscsCaseData; +import uk.gov.hmcts.reform.sscs.ccd.domain.TypeOfHearing; import uk.gov.hmcts.reform.sscs.exception.ListingException; import uk.gov.hmcts.reform.sscs.model.HearingLocation; import uk.gov.hmcts.reform.sscs.model.HearingWrapper; @@ -57,7 +58,7 @@ public static HearingDetails buildHearingDetails(HearingWrapper wrapper, Referen // build hearing details to be used in payload for hmc create / update hearing requests return HearingDetails.builder() .autolistFlag(autoListed) - .hearingType(getHearingType()) + .hearingType(getHearingType(caseData)) .hearingWindow(window) .duration(duration) .nonStandardHearingDurationReasons(nonStandardDurationReasons) @@ -77,8 +78,10 @@ public static HearingDetails buildHearingDetails(HearingWrapper wrapper, Referen .build(); } - public static HearingType getHearingType() { - return SUBSTANTIVE; + public static HearingType getHearingType(SscsCaseData sscsCaseData) { + TypeOfHearing typeOfHearing = sscsCaseData.getTypeOfHearing() != null ? + sscsCaseData.getTypeOfHearing() : TypeOfHearing.SUBSTANTIVE; + return HearingType.getFromTypeOfHearing(typeOfHearing); } public static boolean isCaseUrgent(@Valid SscsCaseData caseData) { diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMapping.java b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMapping.java index 9a48fdee9ad..82554fa11db 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMapping.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMapping.java @@ -35,7 +35,7 @@ public static ServiceHearingValues mapServiceHearingValues(@Valid SscsCaseData c .caseSlaStartDate(HearingsCaseMapping.getCaseCreated(caseData)) .hmctsInternalCaseName(HearingsCaseMapping.getInternalCaseName(caseData)) .autoListFlag(shouldBeAutoListed) - .hearingType(HearingsDetailsMapping.getHearingType()) + .hearingType(HearingsDetailsMapping.getHearingType(caseData)) .caseType(BENEFIT) .caseCategories(HearingsCaseMapping.buildCaseCategories(caseData, refData)) .hearingWindow(HearingsWindowMapping.buildHearingWindow(caseData, refData)) diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java b/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java index 17be081ab41..ebdc7635180 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java @@ -3,6 +3,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import lombok.Getter; import lombok.RequiredArgsConstructor; +import uk.gov.hmcts.reform.sscs.ccd.domain.TypeOfHearing; @Getter @RequiredArgsConstructor @@ -15,4 +16,12 @@ public enum HearingType { private final String hmcReference; private final String valueEn; private final String valueCy; + + public static HearingType getFromTypeOfHearing(TypeOfHearing typeOfHearing) { + return switch (typeOfHearing) { + case SUBSTANTIVE -> SUBSTANTIVE; + case DIRECTION_HEARINGS -> DIRECTION_HEARINGS; + case CHAMBERS_OUTCOME -> CHAMBERS_OUTCOME; + }; + } } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java index 3a4d17d96a3..1b10e4f43d6 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java @@ -15,6 +15,7 @@ import static org.mockito.BDDMockito.given; import static uk.gov.hmcts.reform.sscs.ccd.domain.AdjournCaseNextHearingVenue.SAME_VENUE; import static uk.gov.hmcts.reform.sscs.ccd.domain.AdjournCaseNextHearingVenue.SOMEWHERE_ELSE; +import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.DIRECTION_HEARINGS; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.SUBSTANTIVE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.LocationType.COURT; @@ -223,14 +224,32 @@ void testIsCaseLinkedNull() { assertThat(result).isFalse(); } - @DisplayName("Hearing type should be substantive.") + @DisplayName("Hearing type should be substantive if typeOfHearing is null.") @Test - void getHearingType() { - HearingType result = HearingsDetailsMapping.getHearingType(); + void getHearingTypeNull() { + HearingType result = HearingsDetailsMapping.getHearingType(caseData); assertThat(result).isEqualTo(SUBSTANTIVE); } + @DisplayName("Hearing type should be substantive if typeOfHearing is substantive.") + @Test + void getHearingTypeSubstantive() { + caseData.setTypeOfHearing(TypeOfHearing.SUBSTANTIVE); + HearingType result = HearingsDetailsMapping.getHearingType(caseData); + + assertThat(result).isEqualTo(SUBSTANTIVE); + } + + @DisplayName("Hearing type should be direction if typeOfHearing is direction.") + @Test + void getHearingTypeDirection() { + caseData.setTypeOfHearing(TypeOfHearing.DIRECTION_HEARINGS); + HearingType result = HearingsDetailsMapping.getHearingType(caseData); + + assertThat(result).isEqualTo(DIRECTION_HEARINGS); + } + @DisplayName("When urgentCase is yes, isCaseUrgent return True") @Test void testIsCaseUrgent() { From ecab2d7a31c2268b15dafee707730c37c9c2d7e1 Mon Sep 17 00:00:00 2001 From: nilay Date: Wed, 15 Jan 2025 16:27:53 +0000 Subject: [PATCH 03/17] checkstyle fix --- .../reform/sscs/helper/mapping/HearingsDetailsMapping.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java index ed66ee5b198..af9db12ac96 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java @@ -4,7 +4,6 @@ import static org.apache.commons.lang3.ObjectUtils.isNotEmpty; import static org.apache.commons.lang3.StringUtils.isNotBlank; import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.isYes; -import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.SUBSTANTIVE; import static uk.gov.hmcts.reform.sscs.reference.data.model.HearingPriority.STANDARD; import static uk.gov.hmcts.reform.sscs.reference.data.model.HearingPriority.URGENT; @@ -79,8 +78,8 @@ public static HearingDetails buildHearingDetails(HearingWrapper wrapper, Referen } public static HearingType getHearingType(SscsCaseData sscsCaseData) { - TypeOfHearing typeOfHearing = sscsCaseData.getTypeOfHearing() != null ? - sscsCaseData.getTypeOfHearing() : TypeOfHearing.SUBSTANTIVE; + TypeOfHearing typeOfHearing = sscsCaseData.getTypeOfHearing() != null + ? sscsCaseData.getTypeOfHearing() : TypeOfHearing.SUBSTANTIVE; return HearingType.getFromTypeOfHearing(typeOfHearing); } From 00c8d65590d21febcda76b9dbc0615dc00847ef1 Mon Sep 17 00:00:00 2001 From: nilay Date: Wed, 15 Jan 2025 17:22:02 +0000 Subject: [PATCH 04/17] fix --- .../DirectionIssuedAboutToStartHandler.java | 19 +++-- ...irectionIssuedAboutToStartHandlerTest.java | 82 +++++++++++++++++++ ...rectionIssuedAboutToSubmitHandlerTest.java | 20 +++++ 3 files changed, 113 insertions(+), 8 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java index e7fa9bccded..4e9e2774e5d 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java @@ -45,8 +45,9 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, } final CaseDetails caseDetails = callback.getCaseDetails(); + final CaseDetails caseDetailsBefore = callback.getCaseDetailsBefore().orElse(null); final SscsCaseData sscsCaseData = caseDetails.getCaseData(); - + final SscsCaseData sscsCaseDataBefore = caseDetailsBefore != null ? caseDetailsBefore.getCaseData() : null; setDirectionTypeDropDown(sscsCaseData); setExtensionNextEventDropdown(callback.getCaseDetails().getState(), sscsCaseData); if (isPostHearingsEnabled) { @@ -55,13 +56,15 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, clearFields(sscsCaseData); setPartiesToSendLetter(sscsCaseData); - YesNo selectNextTypeOfHearing = sscsCaseData.getSelectNextTypeOfHearing(); - sscsCaseData.setSelectNextTypeOfHearing(sscsCaseData.getSelectNextTypeOfHearing() != null - ? sscsCaseData.getSelectNextTypeOfHearing() : NO); - if (isYes(selectNextTypeOfHearing)) { - TypeOfHearing typeOfHearing = sscsCaseData.getTypeOfHearing(); - if (typeOfHearing != null) { - sscsCaseData.setTypeOfHearing(typeOfHearing); + if (sscsCaseDataBefore != null) { + YesNo selectNextTypeOfHearing = sscsCaseDataBefore.getSelectNextTypeOfHearing(); + sscsCaseData.setSelectNextTypeOfHearing(sscsCaseDataBefore.getSelectNextTypeOfHearing() != null + ? sscsCaseDataBefore.getSelectNextTypeOfHearing() : NO); + if (isYes(selectNextTypeOfHearing)) { + TypeOfHearing typeOfHearing = sscsCaseDataBefore.getTypeOfHearing(); + if (typeOfHearing != null) { + sscsCaseData.setTypeOfHearing(typeOfHearing); + } } } return new PreSubmitCallbackResponse<>(sscsCaseData); diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java index bce7fe78b00..d2a39860d28 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java @@ -14,6 +14,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.Optional; import junitparams.JUnitParamsRunner; import junitparams.Parameters; import org.junit.Before; @@ -39,6 +40,12 @@ public class DirectionIssuedAboutToStartHandlerTest { @Mock private CaseDetails caseDetails; + @Mock + private CaseDetails caseDetailsBefore; + + @Mock + private SscsCaseData sscsCaseDataBefore; + private SscsCaseData sscsCaseData; @Before @@ -73,6 +80,8 @@ public void givenAValidCallbackType_thenReturnTrue(CallbackType callbackType) { @Test public void givenValidAppeal_populateExtensionNextEventDropdown() { + when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); + when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); @@ -83,6 +92,8 @@ public void givenValidAppeal_populateExtensionNextEventDropdown() { DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); assertEquals(expected, response.getData().getExtensionNextEventDl()); assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertNull(response.getData().getTypeOfHearing()); + assertEquals(NO, response.getData().getSelectNextTypeOfHearing()); } @Test @@ -395,4 +406,75 @@ public void givenAValidCallbackType_NoAdditionalPartiesForOtherParty() { assertEquals(YES, sscsCaseData.getHasOtherParties()); assertEquals(NO, sscsCaseData.getHasJointParty()); } + + @Test + public void givenSelectTypeOfHearingNo_shouldNotSetTypeOfHearing() { + when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); + when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); + when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); + when(sscsCaseDataBefore.getSelectNextTypeOfHearing()).thenReturn(NO); + PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); + List listOptions = new ArrayList<>(); + listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); + listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); + DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); + assertEquals(expected, response.getData().getExtensionNextEventDl()); + assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertNull(response.getData().getTypeOfHearing()); + assertEquals(NO, response.getData().getSelectNextTypeOfHearing()); + } + + @Test + public void givenSelectTypeOfHearingYesAndNullTypeOfHearing_shouldNotSetTypeOfHearing() { + when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); + when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); + when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); + when(sscsCaseDataBefore.getSelectNextTypeOfHearing()).thenReturn(YES); + when(sscsCaseDataBefore.getTypeOfHearing()).thenReturn(null); + PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); + List listOptions = new ArrayList<>(); + listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); + listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); + DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); + assertEquals(expected, response.getData().getExtensionNextEventDl()); + assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertNull(response.getData().getTypeOfHearing()); + assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); + } + + @Test + public void givenSelectTypeOfHearingYesAndSubstantiveTypeOfHearing_shouldSetTypeOfHearing() { + when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); + when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); + when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); + when(sscsCaseDataBefore.getSelectNextTypeOfHearing()).thenReturn(YES); + when(sscsCaseDataBefore.getTypeOfHearing()).thenReturn(TypeOfHearing.SUBSTANTIVE); + PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); + List listOptions = new ArrayList<>(); + listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); + listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); + DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); + assertEquals(expected, response.getData().getExtensionNextEventDl()); + assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertEquals(TypeOfHearing.SUBSTANTIVE, response.getData().getTypeOfHearing()); + assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); + } + + @Test + public void givenSelectTypeOfHearingYesAndDirectionTypeOfHearing_shouldSetTypeOfHearing() { + when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); + when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); + when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); + when(sscsCaseDataBefore.getSelectNextTypeOfHearing()).thenReturn(YES); + when(sscsCaseDataBefore.getTypeOfHearing()).thenReturn(TypeOfHearing.DIRECTION_HEARINGS); + PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); + List listOptions = new ArrayList<>(); + listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); + listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); + DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); + assertEquals(expected, response.getData().getExtensionNextEventDl()); + assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertEquals(TypeOfHearing.DIRECTION_HEARINGS, response.getData().getTypeOfHearing()); + assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); + } } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java index aad2f3210f4..3f91e22b23a 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java @@ -781,4 +781,24 @@ public void givenGenerateNoticeIsSetToYesAndInterlocDocIsNotNull_thenReturnNull( assertNull(response.getData().getSscsInterlocDirectionDocument()); } + + @Test + public void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNull() { + when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); + sscsCaseData.setSelectNextTypeOfHearing(null); + sscsCaseData.setTypeOfHearing(TypeOfHearing.SUBSTANTIVE); + final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); + assertNull(response.getData().getSelectNextTypeOfHearing()); + assertNull(response.getData().getTypeOfHearing()); + } + + @Test + public void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNo() { + when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); + sscsCaseData.setSelectNextTypeOfHearing(NO); + sscsCaseData.setTypeOfHearing(TypeOfHearing.SUBSTANTIVE); + final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); + assertEquals(NO, response.getData().getSelectNextTypeOfHearing()); + assertNull(response.getData().getTypeOfHearing()); + } } From 66593cbaf637a8cb24a033c6220f047688074cc2 Mon Sep 17 00:00:00 2001 From: nilay Date: Wed, 15 Jan 2025 17:26:18 +0000 Subject: [PATCH 05/17] potential simplification of code --- .../DirectionIssuedAboutToStartHandler.java | 14 +--- ...irectionIssuedAboutToStartHandlerTest.java | 70 +------------------ 2 files changed, 4 insertions(+), 80 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java index 4e9e2774e5d..a85d1afe855 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java @@ -45,9 +45,7 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, } final CaseDetails caseDetails = callback.getCaseDetails(); - final CaseDetails caseDetailsBefore = callback.getCaseDetailsBefore().orElse(null); final SscsCaseData sscsCaseData = caseDetails.getCaseData(); - final SscsCaseData sscsCaseDataBefore = caseDetailsBefore != null ? caseDetailsBefore.getCaseData() : null; setDirectionTypeDropDown(sscsCaseData); setExtensionNextEventDropdown(callback.getCaseDetails().getState(), sscsCaseData); if (isPostHearingsEnabled) { @@ -56,16 +54,8 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, clearFields(sscsCaseData); setPartiesToSendLetter(sscsCaseData); - if (sscsCaseDataBefore != null) { - YesNo selectNextTypeOfHearing = sscsCaseDataBefore.getSelectNextTypeOfHearing(); - sscsCaseData.setSelectNextTypeOfHearing(sscsCaseDataBefore.getSelectNextTypeOfHearing() != null - ? sscsCaseDataBefore.getSelectNextTypeOfHearing() : NO); - if (isYes(selectNextTypeOfHearing)) { - TypeOfHearing typeOfHearing = sscsCaseDataBefore.getTypeOfHearing(); - if (typeOfHearing != null) { - sscsCaseData.setTypeOfHearing(typeOfHearing); - } - } + if (sscsCaseData.getSelectNextTypeOfHearing() == null) { + sscsCaseData.setSelectNextTypeOfHearing(NO); } return new PreSubmitCallbackResponse<>(sscsCaseData); } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java index d2a39860d28..c16d3f058c4 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java @@ -14,7 +14,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import java.util.Optional; import junitparams.JUnitParamsRunner; import junitparams.Parameters; import org.junit.Before; @@ -40,12 +39,6 @@ public class DirectionIssuedAboutToStartHandlerTest { @Mock private CaseDetails caseDetails; - @Mock - private CaseDetails caseDetailsBefore; - - @Mock - private SscsCaseData sscsCaseDataBefore; - private SscsCaseData sscsCaseData; @Before @@ -80,8 +73,6 @@ public void givenAValidCallbackType_thenReturnTrue(CallbackType callbackType) { @Test public void givenValidAppeal_populateExtensionNextEventDropdown() { - when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); - when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); @@ -408,65 +399,9 @@ public void givenAValidCallbackType_NoAdditionalPartiesForOtherParty() { } @Test - public void givenSelectTypeOfHearingNo_shouldNotSetTypeOfHearing() { - when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); - when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); - when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); - when(sscsCaseDataBefore.getSelectNextTypeOfHearing()).thenReturn(NO); - PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); - List listOptions = new ArrayList<>(); - listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); - listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); - DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); - assertEquals(expected, response.getData().getExtensionNextEventDl()); - assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); - assertNull(response.getData().getTypeOfHearing()); - assertEquals(NO, response.getData().getSelectNextTypeOfHearing()); - } - - @Test - public void givenSelectTypeOfHearingYesAndNullTypeOfHearing_shouldNotSetTypeOfHearing() { - when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); - when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); - when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); - when(sscsCaseDataBefore.getSelectNextTypeOfHearing()).thenReturn(YES); - when(sscsCaseDataBefore.getTypeOfHearing()).thenReturn(null); - PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); - List listOptions = new ArrayList<>(); - listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); - listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); - DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); - assertEquals(expected, response.getData().getExtensionNextEventDl()); - assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); - assertNull(response.getData().getTypeOfHearing()); - assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); - } - - @Test - public void givenSelectTypeOfHearingYesAndSubstantiveTypeOfHearing_shouldSetTypeOfHearing() { - when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); - when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); - when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); - when(sscsCaseDataBefore.getSelectNextTypeOfHearing()).thenReturn(YES); - when(sscsCaseDataBefore.getTypeOfHearing()).thenReturn(TypeOfHearing.SUBSTANTIVE); - PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); - List listOptions = new ArrayList<>(); - listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); - listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); - DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); - assertEquals(expected, response.getData().getExtensionNextEventDl()); - assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); - assertEquals(TypeOfHearing.SUBSTANTIVE, response.getData().getTypeOfHearing()); - assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); - } - - @Test - public void givenSelectTypeOfHearingYesAndDirectionTypeOfHearing_shouldSetTypeOfHearing() { - when(callback.getCaseDetailsBefore()).thenReturn(Optional.of(caseDetailsBefore)); - when(caseDetailsBefore.getCaseData()).thenReturn(sscsCaseDataBefore); + public void givenNotDefaultSelectTypeOfHearingNo_whenValue() { when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); - when(sscsCaseDataBefore.getSelectNextTypeOfHearing()).thenReturn(YES); - when(sscsCaseDataBefore.getTypeOfHearing()).thenReturn(TypeOfHearing.DIRECTION_HEARINGS); + sscsCaseData.setSelectNextTypeOfHearing(YES); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); List listOptions = new ArrayList<>(); listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); @@ -474,7 +409,6 @@ public void givenSelectTypeOfHearingYesAndDirectionTypeOfHearing_shouldSetTypeOf DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); assertEquals(expected, response.getData().getExtensionNextEventDl()); assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); - assertEquals(TypeOfHearing.DIRECTION_HEARINGS, response.getData().getTypeOfHearing()); assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); } } From f26535b1dcd1443fa5e1a9a51aefc46db676412c Mon Sep 17 00:00:00 2001 From: nilay Date: Wed, 15 Jan 2025 17:46:35 +0000 Subject: [PATCH 06/17] fix --- definitions/benefit/sheets/CaseField/CaseField.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/benefit/sheets/CaseField/CaseField.json b/definitions/benefit/sheets/CaseField/CaseField.json index 32998f42d45..8b27a39d838 100644 --- a/definitions/benefit/sheets/CaseField/CaseField.json +++ b/definitions/benefit/sheets/CaseField/CaseField.json @@ -524,5 +524,5 @@ {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomeValue", "Label": "Hearing Outcome", "FieldType": "hearingOutcomeValue", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "selectNextTypeOfHearing", "Label": "Do you want to select next hearing type i.e. Substantive or Directions hearing", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "ID": "typeOfHearing", "Label": "Hearing Type", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_typeOfHearing", "SecurityClassification": "PUBLIC"}, - {"LiveFrom": "20/08/2019", "CaseTypeID": "Benefit", "ID": "appealHearingOptions", "Label": "**Hearing Options** \r\n${appeal.hearingOptions} ", "FieldType": "Label", "SecurityClassification": "PUBLIC"} + {"LiveFrom": "20/08/2019", "CaseTypeID": "Benefit", "ID": "appealHearingOptions", "Label": "Hearing Options", "FieldType": "hearingOptions", "SecurityClassification": "PUBLIC"} ] From f9919586fee563285558e8f12440bdca584986c3 Mon Sep 17 00:00:00 2001 From: nilay Date: Thu, 16 Jan 2025 10:17:17 +0000 Subject: [PATCH 07/17] adding new type of hearing to hearing options on aboutToSubmit --- .../AuthorisationCaseField.json | 10 +- .../CaseEventToFields-directionIssued.json | 6 +- .../benefit/sheets/CaseField/CaseField.json | 3 +- .../sheets/CaseTypeTab/CaseTypeTab.json | 2 - .../sheets/ComplexTypes/ComplexTypes.json | 1 + .../DirectionIssuedAboutToSubmitHandler.java | 6 + ...rectionIssuedAboutToSubmitHandlerTest.java | 113 +++++++++++------- .../mapping/HearingsWindowMappingTest.java | 2 +- 8 files changed, 86 insertions(+), 57 deletions(-) diff --git a/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json b/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json index 7ce0bced12c..440e567d3f2 100644 --- a/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json +++ b/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json @@ -1677,13 +1677,5 @@ {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, - {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "appealHearingOptions", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"} + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"} ] diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json index da8652c54e5..388a77ff78b 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json @@ -366,7 +366,8 @@ "PageDisplayOrder": 1, "PageFieldDisplayOrder": 23, "PageID": "1.0", - "PageLabel": "Issue direction" + "PageLabel": "Issue direction", + "ShowSummaryChangeOption": "Y" }, { "CaseEventID": "directionIssued", @@ -378,7 +379,8 @@ "PageFieldDisplayOrder": 24, "PageID": "2.0", "PageLabel": "Issue direction", - "PageShowCondition": "selectNextTypeOfHearing=\"Yes\"" + "PageShowCondition": "selectNextTypeOfHearing=\"Yes\"", + "ShowSummaryChangeOption": "Y" }, { "CaseEventID": "directionIssued", diff --git a/definitions/benefit/sheets/CaseField/CaseField.json b/definitions/benefit/sheets/CaseField/CaseField.json index 8b27a39d838..fe3c15f3659 100644 --- a/definitions/benefit/sheets/CaseField/CaseField.json +++ b/definitions/benefit/sheets/CaseField/CaseField.json @@ -523,6 +523,5 @@ {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomes", "Label": "Hearing Outcomes", "FieldType": "Collection", "FieldTypeParameter": "hearingOutcomeDetails", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomeValue", "Label": "Hearing Outcome", "FieldType": "hearingOutcomeValue", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "selectNextTypeOfHearing", "Label": "Do you want to select next hearing type i.e. Substantive or Directions hearing", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "ID": "typeOfHearing", "Label": "Hearing Type", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_typeOfHearing", "SecurityClassification": "PUBLIC"}, - {"LiveFrom": "20/08/2019", "CaseTypeID": "Benefit", "ID": "appealHearingOptions", "Label": "Hearing Options", "FieldType": "hearingOptions", "SecurityClassification": "PUBLIC"} + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "ID": "typeOfHearing", "Label": "Hearing Type", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_typeOfHearing", "SecurityClassification": "PUBLIC"} ] diff --git a/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json b/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json index 21fc6f46a6e..f7cd9d95dab 100644 --- a/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json +++ b/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json @@ -115,8 +115,6 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "caseInfo_sscs", "TabLabel": "Appeal Details", "TabDisplayOrder": 4, "CaseFieldID": "isMedicalMemberRequired", "TabFieldDisplayOrder": 42, "FieldShowCondition": "isMedicalMemberRequired!=\"\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "caseInfo_sscs", "TabLabel": "Appeal Details", "TabDisplayOrder": 4, "CaseFieldID": "SearchCriteria", "TabFieldDisplayOrder": 43}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "caseInfo_sscs", "TabLabel": "Appeal Details", "TabDisplayOrder": 4, "CaseFieldID": "caseManagementLocation", "TabFieldDisplayOrder": 44}, - {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "caseInfo_sscs", "TabLabel": "Appeal Details", "TabDisplayOrder": 4, "CaseFieldID": "appealHearingOptions", "TabFieldDisplayOrder": 45, "FieldShowCondition": "appealHearingOptions=\"*\""}, - {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "events_sscs", "TabLabel": "Case Progression", "TabDisplayOrder": 5, "CaseFieldID": "isConfidentialCaseLabel", "TabShowCondition": "events=\"*\"", "TabFieldDisplayOrder": 1, "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs", "TabID": "events_sscs", "TabLabel": "Case Progression", "TabDisplayOrder": 5, "CaseFieldID": "events", "TabFieldDisplayOrder": 2}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs", "TabID": "evidence_sscs", "TabLabel": "GAPS 2 Evidence", "TabDisplayOrder": 6, "CaseFieldID": "evidence", "TabFieldDisplayOrder": 2}, diff --git a/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json b/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json index a0ad9c76e2a..921938e2ff5 100644 --- a/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json +++ b/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json @@ -15,6 +15,7 @@ {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "signLanguageType", "FieldType": "Text", "ElementLabel": "Sign languages", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "hearingRoute", "FieldType": "FixedList", "FieldTypeParameter": "FL_hearingRoute", "ElementLabel": "Hearing Route", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "agreeLessNotice", "FieldType": "YesOrNo", "ElementLabel": "Agree less notice of hearing availability", "FieldShowCondition": "wantsToAttend=\"Yes\"", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "typeOfHearing", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_typeOfHearing", "ElementLabel": "Hearing Type", "FieldShowCondition": "typeOfHearing=\"*\"", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingSubtype", "ListElementCode": "wantsHearingTypeTelephone", "FieldType": "YesOrNo", "ElementLabel": "Wants hearing type telephone", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingSubtype", "ListElementCode": "hearingTelephoneNumber", "FieldType": "Text", "ElementLabel": "Hearing telephone number", "FieldShowCondition": "wantsHearingTypeTelephone=\"Yes\"", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingSubtype", "ListElementCode": "wantsHearingTypeVideo", "FieldType": "YesOrNo", "ElementLabel": "Wants hearing type video", "SecurityClassification": "PUBLIC"}, diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java index db8a4c8b9e4..a719de4bdf3 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java @@ -77,6 +77,12 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, YesNo selectNextTypeOfHearing = caseData.getSelectNextTypeOfHearing(); if (isNoOrNull(selectNextTypeOfHearing)) { caseData.setTypeOfHearing(null); + } else { + HearingOptions.HearingOptionsBuilder builder = caseData.getAppeal().getHearingOptions() != null + ? caseData.getAppeal().getHearingOptions().toBuilder() : HearingOptions.builder(); + caseData.getAppeal() + .setHearingOptions(builder.typeOfHearing(caseData.getTypeOfHearing()) + .build()); } return validateDirectionType(caseData) .or(() -> validateDirectionDueDate(caseData)) diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java index 3f91e22b23a..fc6d3c8cdba 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java @@ -4,9 +4,14 @@ import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.*; import static org.mockito.Mockito.*; +import static org.mockito.MockitoAnnotations.openMocks; import static uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType.ABOUT_TO_SUBMIT; import static uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType.MID_EVENT; import static uk.gov.hmcts.reform.sscs.ccd.domain.DwpState.DIRECTION_ACTION_REQUIRED; @@ -22,15 +27,14 @@ import java.util.List; import java.util.Optional; import java.util.Set; -import junitparams.JUnitParamsRunner; -import junitparams.Parameters; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; +import org.junit.jupiter.params.provider.EnumSource; +import org.junit.jupiter.params.provider.MethodSource; +import org.junit.jupiter.params.provider.ValueSource; import org.mockito.Mock; -import org.mockito.junit.MockitoJUnit; -import org.mockito.junit.MockitoRule; import uk.gov.hmcts.reform.sscs.ccd.callback.Callback; import uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType; import uk.gov.hmcts.reform.sscs.ccd.callback.DocumentType; @@ -43,16 +47,12 @@ import uk.gov.hmcts.reform.sscs.service.FooterService; import uk.gov.hmcts.reform.sscs.service.ServiceRequestExecutor; -@RunWith(JUnitParamsRunner.class) public class DirectionIssuedAboutToSubmitHandlerTest { private static final String USER_AUTHORISATION = "Bearer token"; private static final String DOCUMENT_URL = "dm-store/documents/123"; private static final String DOCUMENT_URL2 = "dm-store/documents/456"; private static final String DUMMY_REGIONAL_CENTER = "dummyRegionalCenter"; - @Rule - public MockitoRule rule = MockitoJUnit.rule(); - @Mock private FooterService footerService; @@ -82,8 +82,9 @@ public class DirectionIssuedAboutToSubmitHandlerTest { @Mock private PreSubmitCallbackResponse mockedResponse; - @Before + @BeforeEach public void setUp() { + openMocks(this); handler = new DirectionIssuedAboutToSubmitHandler(footerService, dwpAddressLookupService, 35, 42, false); when(callback.getEvent()).thenReturn(EventType.DIRECTION_ISSUED); @@ -135,22 +136,22 @@ public void setUp() { when(dwpAddressLookupService.getDefaultDwpMappingByBenefitType(anyString())).thenReturn(Optional.of(OfficeMapping.builder().isDefault(true).mapping(Mapping.builder().ccd("DWP PIP (1)").build()).build())); } - @Test - @Parameters({"APPEAL_RECEIVED", "ACTION_FURTHER_EVIDENCE"}) + @ParameterizedTest + @EnumSource(value = EventType.class, names = {"APPEAL_RECEIVED", "ACTION_FURTHER_EVIDENCE"}) public void givenANonHandleEvidenceEvent_thenReturnFalse(EventType eventType) { when(callback.getEvent()).thenReturn(eventType); assertFalse(handler.canHandle(MID_EVENT, callback)); } - @Test - @Parameters({"DIRECTION_ISSUED", "DIRECTION_ISSUED_WELSH"}) + @ParameterizedTest + @EnumSource(value = EventType.class, names = {"DIRECTION_ISSUED", "DIRECTION_ISSUED_WELSH"}) public void givenAValidHandleAndEventType_thenReturnTrue(EventType eventType) { when(callback.getEvent()).thenReturn(eventType); assertTrue(handler.canHandle(ABOUT_TO_SUBMIT, callback)); } - @Test - @Parameters({"ABOUT_TO_START", "MID_EVENT", "SUBMITTED"}) + @ParameterizedTest + @EnumSource(value = CallbackType.class, names = {"ABOUT_TO_START", "MID_EVENT", "SUBMITTED"}) public void givenANonCallbackType_thenReturnFalse(CallbackType callbackType) { assertFalse(handler.canHandle(callbackType, callback)); } @@ -220,7 +221,7 @@ public void givenDirectionTypeIsNull_displayAnError() { } @SuppressWarnings({"Indentation", "unused"}) - private Object[] getDirectionNoticeConfidentialMembers() { + private static Object[] getDirectionNoticeConfidentialMembers() { return new Object[]{ new Object[]{ConfidentialityType.GENERAL.getCode(), false, DIRECTION_ACTION_REQUIRED}, new Object[]{ConfidentialityType.CONFIDENTIAL.getCode(), true, DIRECTION_ACTION_REQUIRED}, @@ -231,8 +232,8 @@ private Object[] getDirectionNoticeConfidentialMembers() { }; } - @Test - @Parameters(method = "getDirectionNoticeConfidentialMembers") + @ParameterizedTest + @MethodSource("getDirectionNoticeConfidentialMembers") public void givenDirectionNoticeCheckFtaStateBasedOnConfidentiality(String confidentialityType, boolean isFtaChosen, DwpState newFtaState) { SscsCaseData caseData = callback.getCaseDetails().getCaseData(); caseData.setConfidentialityType(confidentialityType); @@ -288,8 +289,8 @@ public void givenDirectionTypeOfAppealToProceedAndCaseIsPostValidInterloc_setInt assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) public void givenDirectionTypeOfAppealToProceed_shouldSetDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -307,8 +308,8 @@ public void givenDirectionTypeOfAppealToProceed_shouldSetDwpRegionalCentre(Strin assertEquals(DUMMY_REGIONAL_CENTER, response.getData().getDwpRegionalCentre()); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsNull_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -316,8 +317,8 @@ public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsNull_should assertDefaultRegionalCentre(expectedResponseDays); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsEmpty_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -325,8 +326,8 @@ public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsEmpty_shoul assertDefaultRegionalCentre(expectedResponseDays); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) public void givenDirectionTypeOfAppealToProceedWhenNoMrnDetails_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -357,8 +358,8 @@ public void givenDirectionTypeOfGrantExtension_setDwpStateAndDirectionTypeIsNotS assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); @@ -371,8 +372,8 @@ public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToList assertValues(response, AWAITING_ADMIN_ACTION, DIRECTION_ACTION_REQUIRED, State.RESPONSE_RECEIVED, expectedResponseDays); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_VALID_APPEAL.toString())); @@ -549,8 +550,8 @@ public void givenDirectionTypeOfIssueAndSendToAdmin_setInterlocReviewStateOnly() assertEquals(DIRECTION_ACTION_REQUIRED, res.getData().getDwpState()); } - @Test - @Parameters({"file.png", "file.jpg", "file.doc"}) + @ParameterizedTest + @ValueSource(strings = {"file.png", "file.jpg", "file.doc"}) public void givenManuallyUploadedFileIsNotAPdf_thenAddAnErrorToResponse(String filename) { sscsCaseData.getDocumentStaging().setPreviewDocument(null); @@ -642,8 +643,8 @@ public void givenDecisionIssuedWelshEvent_SetFieldsAndCallServicesCorrectly() { verifyNoInteractions(footerService); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_LISTING.toString())); @@ -657,8 +658,8 @@ public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendT assertValues(response, AWAITING_ADMIN_ACTION, DIRECTION_ACTION_REQUIRED, State.RESPONSE_RECEIVED, expectedResponseDays); } - @Test - @Parameters({"pip, 35", "childSupport, 42"}) + @ParameterizedTest + @CsvSource({"pip, 35", "childSupport, 42"}) public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_VALID_APPEAL.toString())); @@ -763,6 +764,7 @@ public void givenGenerateNoticeIsSetToNoAndInterlocDocIsNotNull_thenReturnReleva assertEquals(interlocDoc.getDocumentLink(), response.getData().getSscsInterlocDirectionDocument().getDocumentLink()); } + @Test public void givenGenerateNoticeIsSetToYesAndInterlocDocIsNotNull_thenReturnNull() { assertTrue(sscsCaseData.getDocumentGeneration().getGenerateNotice().toBoolean()); @@ -801,4 +803,33 @@ public void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNo() { assertEquals(NO, response.getData().getSelectNextTypeOfHearing()); assertNull(response.getData().getTypeOfHearing()); } + + @ParameterizedTest + @EnumSource(value = TypeOfHearing.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) + public void willSetTypeOfHearingInHearingOptionsNullIfSelectNextTypeOfHearingIsYes(TypeOfHearing typeOfHearing) { + when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); + sscsCaseData.setSelectNextTypeOfHearing(YES); + sscsCaseData.setTypeOfHearing(typeOfHearing); + sscsCaseData.getAppeal().setHearingOptions(null); + final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); + assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); + assertEquals(typeOfHearing, response.getData().getTypeOfHearing()); + assertEquals(typeOfHearing, response.getData().getAppeal().getHearingOptions().getTypeOfHearing()); + assertEquals(HearingOptions.builder().typeOfHearing(typeOfHearing).build(), response.getData().getAppeal().getHearingOptions()); + } + + @ParameterizedTest + @EnumSource(value = TypeOfHearing.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) + public void willSetTypeOfHearingInHearingOptionsNotNullIfSelectNextTypeOfHearingIsYes(TypeOfHearing typeOfHearing) { + when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); + sscsCaseData.setSelectNextTypeOfHearing(YES); + sscsCaseData.setTypeOfHearing(typeOfHearing); + sscsCaseData.getAppeal().setHearingOptions(HearingOptions.builder().agreeLessNotice("string").build()); + HearingOptions expectedHearingOptions = HearingOptions.builder().agreeLessNotice("string").typeOfHearing(typeOfHearing).build(); + final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); + assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); + assertEquals(typeOfHearing, response.getData().getTypeOfHearing()); + assertEquals(typeOfHearing, response.getData().getAppeal().getHearingOptions().getTypeOfHearing()); + assertEquals(expectedHearingOptions, response.getData().getAppeal().getHearingOptions()); + } } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsWindowMappingTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsWindowMappingTest.java index 0a3f30fbf82..13bd3761416 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsWindowMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsWindowMappingTest.java @@ -141,7 +141,7 @@ void testBuildHearingWindowResponseBlank() { void testBuildHearingWindowNotAutoListUrgent() { SscsCaseData caseData = SscsCaseData.builder() .dwpResponseDate(LocalDate.now().toString()) - .appeal(new Appeal(null, null, null, new HearingOptions("yes", null, null, null, null, null, null, null, null, null, null, null), null, null, null, null, new HearingSubtype("yes", "07444123456", null, null, null), null)) + .appeal(new Appeal(null, null, null, new HearingOptions("yes", null, null, null, null, null, null, null, null, null, null, null, null), null, null, null, null, new HearingSubtype("yes", "07444123456", null, null, null), null)) .build(); HearingWindow result = HearingsWindowMapping.buildHearingWindow(caseData, refData); From e82b0b2c04f2ef2d687ee784ee7b244272bb3c2f Mon Sep 17 00:00:00 2001 From: nilay Date: Thu, 16 Jan 2025 10:49:11 +0000 Subject: [PATCH 08/17] checkstyle fix --- .../DirectionIssuedAboutToSubmitHandlerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java index fc6d3c8cdba..0630c2e235c 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java @@ -825,11 +825,11 @@ public void willSetTypeOfHearingInHearingOptionsNotNullIfSelectNextTypeOfHearing sscsCaseData.setSelectNextTypeOfHearing(YES); sscsCaseData.setTypeOfHearing(typeOfHearing); sscsCaseData.getAppeal().setHearingOptions(HearingOptions.builder().agreeLessNotice("string").build()); - HearingOptions expectedHearingOptions = HearingOptions.builder().agreeLessNotice("string").typeOfHearing(typeOfHearing).build(); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); assertEquals(typeOfHearing, response.getData().getTypeOfHearing()); assertEquals(typeOfHearing, response.getData().getAppeal().getHearingOptions().getTypeOfHearing()); + HearingOptions expectedHearingOptions = HearingOptions.builder().agreeLessNotice("string").typeOfHearing(typeOfHearing).build(); assertEquals(expectedHearingOptions, response.getData().getAppeal().getHearingOptions()); } } From e1535362021c66ae293c8a628a90da9853532bf5 Mon Sep 17 00:00:00 2001 From: nilay Date: Thu, 16 Jan 2025 11:46:46 +0000 Subject: [PATCH 09/17] wipe hearingOptions.typeOfHearing if select is no --- .../directionissued/DirectionIssuedAboutToSubmitHandler.java | 3 +++ .../DirectionIssuedAboutToSubmitHandlerTest.java | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java index a719de4bdf3..3ebb4127cb5 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java @@ -77,6 +77,9 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, YesNo selectNextTypeOfHearing = caseData.getSelectNextTypeOfHearing(); if (isNoOrNull(selectNextTypeOfHearing)) { caseData.setTypeOfHearing(null); + if (caseData.getAppeal().getHearingOptions() != null) { + caseData.getAppeal().getHearingOptions().setTypeOfHearing(null); + } } else { HearingOptions.HearingOptionsBuilder builder = caseData.getAppeal().getHearingOptions() != null ? caseData.getAppeal().getHearingOptions().toBuilder() : HearingOptions.builder(); diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java index 0630c2e235c..82cd671e04a 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java @@ -799,9 +799,11 @@ public void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNo() { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); sscsCaseData.setSelectNextTypeOfHearing(NO); sscsCaseData.setTypeOfHearing(TypeOfHearing.SUBSTANTIVE); + sscsCaseData.getAppeal().setHearingOptions(HearingOptions.builder().typeOfHearing(TypeOfHearing.SUBSTANTIVE).build()); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertEquals(NO, response.getData().getSelectNextTypeOfHearing()); assertNull(response.getData().getTypeOfHearing()); + assertNull(response.getData().getAppeal().getHearingOptions().getTypeOfHearing()); } @ParameterizedTest From 559c01fcaf17c95a6b4e6547dbc27b80130448a3 Mon Sep 17 00:00:00 2001 From: nilay Date: Thu, 16 Jan 2025 12:34:51 +0000 Subject: [PATCH 10/17] updating label --- definitions/benefit/sheets/CaseField/CaseField.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/definitions/benefit/sheets/CaseField/CaseField.json b/definitions/benefit/sheets/CaseField/CaseField.json index fe3c15f3659..c9415aea90f 100644 --- a/definitions/benefit/sheets/CaseField/CaseField.json +++ b/definitions/benefit/sheets/CaseField/CaseField.json @@ -523,5 +523,5 @@ {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomes", "Label": "Hearing Outcomes", "FieldType": "Collection", "FieldTypeParameter": "hearingOutcomeDetails", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomeValue", "Label": "Hearing Outcome", "FieldType": "hearingOutcomeValue", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "selectNextTypeOfHearing", "Label": "Do you want to select next hearing type i.e. Substantive or Directions hearing", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "ID": "typeOfHearing", "Label": "Hearing Type", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_typeOfHearing", "SecurityClassification": "PUBLIC"} + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "ID": "typeOfHearing", "Label": "Next hearing type", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_typeOfHearing", "SecurityClassification": "PUBLIC"} ] From 04602c3ffe87f3287a81941cda68056975ef0b57 Mon Sep 17 00:00:00 2001 From: nilay Date: Mon, 20 Jan 2025 09:52:56 +0000 Subject: [PATCH 11/17] sonarqube fix --- ...rectionIssuedAboutToSubmitHandlerTest.java | 134 +++++++++--------- 1 file changed, 66 insertions(+), 68 deletions(-) diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java index 82cd671e04a..ec5bd865f2d 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java @@ -1,9 +1,6 @@ package uk.gov.hmcts.reform.sscs.ccd.presubmit.directionissued; import static java.util.Collections.emptySet; -import static org.hamcrest.CoreMatchers.hasItem; -import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -47,7 +44,7 @@ import uk.gov.hmcts.reform.sscs.service.FooterService; import uk.gov.hmcts.reform.sscs.service.ServiceRequestExecutor; -public class DirectionIssuedAboutToSubmitHandlerTest { +class DirectionIssuedAboutToSubmitHandlerTest { private static final String USER_AUTHORISATION = "Bearer token"; private static final String DOCUMENT_URL = "dm-store/documents/123"; private static final String DOCUMENT_URL2 = "dm-store/documents/456"; @@ -138,31 +135,31 @@ public void setUp() { @ParameterizedTest @EnumSource(value = EventType.class, names = {"APPEAL_RECEIVED", "ACTION_FURTHER_EVIDENCE"}) - public void givenANonHandleEvidenceEvent_thenReturnFalse(EventType eventType) { + void givenANonHandleEvidenceEvent_thenReturnFalse(EventType eventType) { when(callback.getEvent()).thenReturn(eventType); assertFalse(handler.canHandle(MID_EVENT, callback)); } @ParameterizedTest @EnumSource(value = EventType.class, names = {"DIRECTION_ISSUED", "DIRECTION_ISSUED_WELSH"}) - public void givenAValidHandleAndEventType_thenReturnTrue(EventType eventType) { + void givenAValidHandleAndEventType_thenReturnTrue(EventType eventType) { when(callback.getEvent()).thenReturn(eventType); assertTrue(handler.canHandle(ABOUT_TO_SUBMIT, callback)); } @ParameterizedTest @EnumSource(value = CallbackType.class, names = {"ABOUT_TO_START", "MID_EVENT", "SUBMITTED"}) - public void givenANonCallbackType_thenReturnFalse(CallbackType callbackType) { + void givenANonCallbackType_thenReturnFalse(CallbackType callbackType) { assertFalse(handler.canHandle(callbackType, callback)); } @Test - public void givenGenerateNoticeIsYes_thenReturnTrue() { + void givenGenerateNoticeIsYes_thenReturnTrue() { assertTrue(handler.canHandle(ABOUT_TO_SUBMIT, callback)); } @Test - public void willCopyThePreviewFileToTheInterlocDirectionDocumentAndAddFooter() { + void willCopyThePreviewFileToTheInterlocDirectionDocumentAndAddFooter() { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertNull(response.getData().getDocumentStaging().getPreviewDocument()); @@ -177,7 +174,7 @@ public void willCopyThePreviewFileToTheInterlocDirectionDocumentAndAddFooter() { } @Test - public void givenDirectionNoticeAlreadyExistsAndThenManuallyUploadANewNotice_thenIssueTheNewDocumentWithFooter() { + void givenDirectionNoticeAlreadyExistsAndThenManuallyUploadANewNotice_thenIssueTheNewDocumentWithFooter() { handler = new DirectionIssuedAboutToSubmitHandler(footerService, dwpAddressLookupService, 35, 42, true); sscsCaseData.setPrePostHearing(PrePostHearing.PRE); sscsCaseData.getDocumentStaging().setPreviewDocument(null); @@ -205,13 +202,14 @@ public void givenDirectionNoticeAlreadyExistsAndThenManuallyUploadANewNotice_the verify(footerService).createFooterAndAddDocToCase(eq(theDocument.getDocumentLink()), any(), eq(DocumentType.DIRECTION_NOTICE), any(), eq(theDocument.getDocumentDateAdded()), eq(null), eq(null)); } - public void willSetTheWithDwpStateToDirectionActionRequired() { + @Test + void willSetTheWithDwpStateToDirectionActionRequired() { final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertThat(response.getData().getDwpState(), is(DIRECTION_ACTION_REQUIRED)); + assertEquals(DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); } @Test - public void givenDirectionTypeIsNull_displayAnError() { + void givenDirectionTypeIsNull_displayAnError() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(null); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -234,18 +232,18 @@ private static Object[] getDirectionNoticeConfidentialMembers() { @ParameterizedTest @MethodSource("getDirectionNoticeConfidentialMembers") - public void givenDirectionNoticeCheckFtaStateBasedOnConfidentiality(String confidentialityType, boolean isFtaChosen, DwpState newFtaState) { + void givenDirectionNoticeCheckFtaStateBasedOnConfidentiality(String confidentialityType, boolean isFtaChosen, DwpState newFtaState) { SscsCaseData caseData = callback.getCaseDetails().getCaseData(); caseData.setConfidentialityType(confidentialityType); caseData.setSendDirectionNoticeToFTA(isFtaChosen ? YES : NO); caseData.setDirectionDueDate(LocalDate.now().toString()); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertThat(response.getData().getDwpState(), is(newFtaState)); + assertEquals(newFtaState, response.getData().getDwpState()); } @Test - public void givenDirectionTypeOfProvideInformation_setInterlocStateToAwaitingInformationAndDirectionTypeIsNull() { + void givenDirectionTypeOfProvideInformation_setInterlocStateToAwaitingInformationAndDirectionTypeIsNull() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.PROVIDE_INFORMATION.toString())); sscsCaseData.setDirectionDueDate("11/07/2025"); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -254,7 +252,7 @@ public void givenDirectionTypeOfProvideInformation_setInterlocStateToAwaitingInf } @Test - public void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_setInterlocStateToAwaitingAdminActionAndDirectionTypeIsSet() { + void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_setInterlocStateToAwaitingAdminActionAndDirectionTypeIsSet() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); when(caseDetails.getState()).thenReturn(State.INTERLOCUTORY_REVIEW_STATE); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -266,7 +264,7 @@ public void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_setInte } @Test - public void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_willNotReturnValidationErrorsFromExternalService() { + void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_willNotReturnValidationErrorsFromExternalService() { String errorMessage = "There was an error in the external service"; when(mockedResponse.getErrors()).thenReturn(Set.of(errorMessage)); callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); @@ -277,7 +275,7 @@ public void givenDirectionTypeOfAppealToProceedAndCaseIsPreValidInterloc_willNot } @Test - public void givenDirectionTypeOfAppealToProceedAndCaseIsPostValidInterloc_setInterlocStateToAwaitingAdminActionAndDirectionTypeIsSet() { + void givenDirectionTypeOfAppealToProceedAndCaseIsPostValidInterloc_setInterlocStateToAwaitingAdminActionAndDirectionTypeIsSet() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); when(caseDetailsBefore.getState()).thenReturn(State.WITH_DWP); when(caseDetails.getState()).thenReturn(State.WITH_DWP); @@ -286,12 +284,12 @@ public void givenDirectionTypeOfAppealToProceedAndCaseIsPostValidInterloc_setInt assertNull(response.getData().getInterlocReviewState()); assertNull(response.getData().getDateSentToDwp()); - assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); + assertEquals(DwpState.DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); } @ParameterizedTest @CsvSource({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfAppealToProceed_shouldSetDwpRegionalCentre(String benefitType, int expectedResponseDays) { + void givenDirectionTypeOfAppealToProceed_shouldSetDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); appeal.setMrnDetails(MrnDetails.builder().dwpIssuingOffice("DWP PIP (1)").build()); @@ -303,14 +301,14 @@ public void givenDirectionTypeOfAppealToProceed_shouldSetDwpRegionalCentre(Strin assertEquals(AWAITING_ADMIN_ACTION, response.getData().getInterlocReviewState()); assertNotNull(response.getData().getDateSentToDwp()); - assertThat(response.getData().getDwpDueDate(), is(LocalDate.now().plusDays(expectedResponseDays).toString())); - assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); + assertEquals(response.getData().getDwpDueDate(), LocalDate.now().plusDays(expectedResponseDays).toString()); + assertEquals(DwpState.DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); assertEquals(DUMMY_REGIONAL_CENTER, response.getData().getDwpRegionalCentre()); } @ParameterizedTest @CsvSource({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsNull_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { + void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsNull_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); appeal.setMrnDetails(MrnDetails.builder().build()); @@ -319,7 +317,7 @@ public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsNull_should @ParameterizedTest @CsvSource({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsEmpty_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { + void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsEmpty_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); appeal.setMrnDetails(MrnDetails.builder().dwpIssuingOffice("").build()); @@ -328,7 +326,7 @@ public void givenDirectionTypeOfAppealToProceedWhenDwpIssuingOfficeIsEmpty_shoul @ParameterizedTest @CsvSource({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfAppealToProceedWhenNoMrnDetails_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { + void givenDirectionTypeOfAppealToProceedWhenNoMrnDetails_shouldSetDefaultDwpRegionalCentre(String benefitType, int expectedResponseDays) { Appeal appeal = callback.getCaseDetails().getCaseData().getAppeal(); appeal.setBenefitType(BenefitType.builder().code(benefitType).build()); appeal.setMrnDetails(null); @@ -344,23 +342,23 @@ private void assertDefaultRegionalCentre(int expectedResponseDays) { assertEquals(AWAITING_ADMIN_ACTION, response.getData().getInterlocReviewState()); assertNotNull(response.getData().getDateSentToDwp()); - assertThat(response.getData().getDwpDueDate(), is(LocalDate.now().plusDays(expectedResponseDays).toString())); - assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); + assertEquals(response.getData().getDwpDueDate(), LocalDate.now().plusDays(expectedResponseDays).toString()); + assertEquals(DwpState.DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); assertEquals(DUMMY_REGIONAL_CENTER, response.getData().getDwpRegionalCentre()); } @Test - public void givenDirectionTypeOfGrantExtension_setDwpStateAndDirectionTypeIsNotSet() { + void givenDirectionTypeOfGrantExtension_setDwpStateAndDirectionTypeIsNotSet() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.GRANT_EXTENSION.toString())); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertNull(response.getData().getInterlocReviewState()); - assertThat(response.getData().getDwpState(), is(DwpState.DIRECTION_ACTION_REQUIRED)); + assertEquals(DwpState.DIRECTION_ACTION_REQUIRED, response.getData().getDwpState()); } @ParameterizedTest @CsvSource({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { + void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_LISTING.toString())); @@ -374,7 +372,7 @@ public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToList @ParameterizedTest @CsvSource({"pip, 35", "childSupport, 42"}) - public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { + void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_VALID_APPEAL.toString())); callback.getCaseDetails().getCaseData().getAppeal().setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -385,7 +383,7 @@ public void givenDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToVali } @Test - public void givenDirectionTypeOfGrantReinstatementAndNotInterlocReview_setState() { + void givenDirectionTypeOfGrantReinstatementAndNotInterlocReview_setState() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -404,7 +402,7 @@ public void givenDirectionTypeOfGrantReinstatementAndNotInterlocReview_setState( } @Test - public void givenDirectionTypeOfGrantReinstatementAndInterlocReview_setState() { + void givenDirectionTypeOfGrantReinstatementAndInterlocReview_setState() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.INTERLOCUTORY_REVIEW_STATE); @@ -422,7 +420,7 @@ public void givenDirectionTypeOfGrantReinstatementAndInterlocReview_setState() { } @Test - public void givenDirectionTypeOfRefuseReinstatementkeepState() { + void givenDirectionTypeOfRefuseReinstatementkeepState() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -440,7 +438,7 @@ public void givenDirectionTypeOfRefuseReinstatementkeepState() { } @Test - public void givenDirectionTypeOfGrantReinstatementForWelshCaseDont_setStates() { + void givenDirectionTypeOfGrantReinstatementForWelshCaseDont_setStates() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -461,7 +459,7 @@ public void givenDirectionTypeOfGrantReinstatementForWelshCaseDont_setStates() { } @Test - public void givenDirectionTypeOfRefuseReinstatementForWelshCaseDont_setStates() { + void givenDirectionTypeOfRefuseReinstatementForWelshCaseDont_setStates() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -482,7 +480,7 @@ public void givenDirectionTypeOfRefuseReinstatementForWelshCaseDont_setStates() } @Test - public void givenDirectionTypeOfGrantUrgentHearingAndInterlocReview_setState() { + void givenDirectionTypeOfGrantUrgentHearingAndInterlocReview_setState() { callback.getCaseDetails().getCaseData().setState(State.INTERLOCUTORY_REVIEW_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.DORMANT_APPEAL_STATE); @@ -500,7 +498,7 @@ public void givenDirectionTypeOfGrantUrgentHearingAndInterlocReview_setState() { } @Test - public void givenDirectionTypeOfRefuseUrgentHearingkeepState() { + void givenDirectionTypeOfRefuseUrgentHearingkeepState() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setPreviousState(State.APPEAL_CREATED); @@ -520,7 +518,7 @@ public void givenDirectionTypeOfRefuseUrgentHearingkeepState() { } @Test - public void givenDirectionTypeOfRefuseHearingRecordingRequest_setInterlocReviewStateAndInterlocReferralReason() { + void givenDirectionTypeOfRefuseHearingRecordingRequest_setInterlocReviewStateAndInterlocReferralReason() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setReinstatementOutcome(RequestOutcome.IN_PROGRESS); @@ -536,7 +534,7 @@ public void givenDirectionTypeOfRefuseHearingRecordingRequest_setInterlocReviewS } @Test - public void givenDirectionTypeOfIssueAndSendToAdmin_setInterlocReviewStateOnly() { + void givenDirectionTypeOfIssueAndSendToAdmin_setInterlocReviewStateOnly() { callback.getCaseDetails().getCaseData().setState(State.DORMANT_APPEAL_STATE); callback.getCaseDetails().getCaseData().setReinstatementOutcome(RequestOutcome.IN_PROGRESS); callback.getCaseDetails().getCaseData().setDwpState(DwpState.LAPSED); @@ -552,7 +550,7 @@ public void givenDirectionTypeOfIssueAndSendToAdmin_setInterlocReviewStateOnly() @ParameterizedTest @ValueSource(strings = {"file.png", "file.jpg", "file.doc"}) - public void givenManuallyUploadedFileIsNotAPdf_thenAddAnErrorToResponse(String filename) { + void givenManuallyUploadedFileIsNotAPdf_thenAddAnErrorToResponse(String filename) { sscsCaseData.getDocumentStaging().setPreviewDocument(null); SscsInterlocDirectionDocument theDocument = SscsInterlocDirectionDocument.builder() @@ -571,7 +569,7 @@ public void givenManuallyUploadedFileIsNotAPdf_thenAddAnErrorToResponse(String f } @Test - public void givenNoPdfIsUploaded_thenAddAnErrorToResponse() { + void givenNoPdfIsUploaded_thenAddAnErrorToResponse() { sscsCaseData.getDocumentStaging().setPreviewDocument(null); sscsCaseData.setSscsInterlocDirectionDocument(null); @@ -585,7 +583,7 @@ public void givenNoPdfIsUploaded_thenAddAnErrorToResponse() { } @Test - public void shouldErrorWhenDirectionTypeIsProvideInformationAndNoDueDate() { + void shouldErrorWhenDirectionTypeIsProvideInformationAndNoDueDate() { sscsCaseData.setDirectionDueDate(null); sscsCaseData.getDirectionTypeDl().setValue(new DynamicListItem(DirectionType.PROVIDE_INFORMATION.toString(), "appeal To Proceed")); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -595,7 +593,7 @@ public void shouldErrorWhenDirectionTypeIsProvideInformationAndNoDueDate() { } @Test - public void givenDecisionIssuedEventAndCaseIsWelsh_SetFieldsAndCallServicesCorrectly() { + void givenDecisionIssuedEventAndCaseIsWelsh_SetFieldsAndCallServicesCorrectly() { when(caseDetailsBefore.getState()).thenReturn(State.WITH_DWP); sscsCaseData.setLanguagePreferenceWelsh("Yes"); callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); @@ -617,7 +615,7 @@ public void givenDecisionIssuedEventAndCaseIsWelsh_SetFieldsAndCallServicesCorre } @Test - public void givenDecisionIssuedWelshEvent_SetFieldsAndCallServicesCorrectly() { + void givenDecisionIssuedWelshEvent_SetFieldsAndCallServicesCorrectly() { expectedWelshDocument = SscsWelshDocument.builder() .value(SscsWelshDocumentDetails.builder() @@ -645,7 +643,7 @@ public void givenDecisionIssuedWelshEvent_SetFieldsAndCallServicesCorrectly() { @ParameterizedTest @CsvSource({"pip, 35", "childSupport, 42"}) - public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { + void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToListing_setResponseReceivedStateAndInterlocStateToAwaitingAdminAction(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_LISTING.toString())); callback.getCaseDetails().getCaseData().getAppeal().setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -660,7 +658,7 @@ public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendT @ParameterizedTest @CsvSource({"pip, 35", "childSupport, 42"}) - public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { + void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendToValidAppeal_setWithDwpStateAndDoNotSetInterlocState(String benefitType, int expectedResponseDays) { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.REFUSE_EXTENSION.toString())); callback.getCaseDetails().getCaseData().setExtensionNextEventDl(new DynamicList(ExtensionNextEvent.SEND_TO_VALID_APPEAL.toString())); callback.getCaseDetails().getCaseData().getAppeal().setBenefitType(BenefitType.builder().code(benefitType).build()); @@ -674,29 +672,29 @@ public void givenWelshDirectionTypeOfRefuseExtensionAndExtensionNextEventIsSendT } @Test - public void givenIssueDirectionNoticeForAppealToProceedForPreValidCase_thenSetNonDigitalToDigitalCase() { + void givenIssueDirectionNoticeForAppealToProceedForPreValidCase_thenSetNonDigitalToDigitalCase() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); when(caseDetails.getState()).thenReturn(State.INTERLOCUTORY_REVIEW_STATE); sscsCaseData.setCreatedInGapsFrom(null); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertThat(response.getData().getCreatedInGapsFrom(), is(READY_TO_LIST.getId())); + assertEquals(response.getData().getCreatedInGapsFrom(), READY_TO_LIST.getId()); } @Test - public void givenIssueDirectionNoticeForAppealToProceedForPreValidCase_thenSetNoDigitalToDigitalCase() { + void givenIssueDirectionNoticeForAppealToProceedForPreValidCase_thenSetNoDigitalToDigitalCase() { callback.getCaseDetails().getCaseData().setDirectionTypeDl(new DynamicList(DirectionType.APPEAL_TO_PROCEED.toString())); when(caseDetails.getState()).thenReturn(State.INCOMPLETE_APPLICATION); sscsCaseData.setCreatedInGapsFrom(VALID_APPEAL.getId()); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertThat(response.getData().getCreatedInGapsFrom(), is(READY_TO_LIST.getId())); + assertEquals(response.getData().getCreatedInGapsFrom(), READY_TO_LIST.getId()); } @Test - public void shouldNotClearInterlocReferralReasonIfPostHearingsNotEnabled() { + void shouldNotClearInterlocReferralReasonIfPostHearingsNotEnabled() { sscsCaseData.setInterlocReferralReason(InterlocReferralReason.REVIEW_CORRECTION_APPLICATION); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -705,7 +703,7 @@ public void shouldNotClearInterlocReferralReasonIfPostHearingsNotEnabled() { } @Test - public void shouldClearInterlocReferralReason() { + void shouldClearInterlocReferralReason() { handler = new DirectionIssuedAboutToSubmitHandler(footerService, dwpAddressLookupService, 35, 42, true); sscsCaseData.setInterlocReferralReason(InterlocReferralReason.REVIEW_CORRECTION_APPLICATION); @@ -717,25 +715,25 @@ public void shouldClearInterlocReferralReason() { private void assertValues(PreSubmitCallbackResponse response, InterlocReviewState interlocReviewState, DwpState dwpState, State state, int expectedResponseDays) { assertEquals(interlocReviewState, response.getData().getInterlocReviewState()); - assertThat(response.getData().getDwpState(), is(dwpState)); - assertThat(response.getData().getState(), is(state)); - assertThat(response.getData().getHmctsDwpState(), is("sentToDwp")); - assertThat(response.getData().getDateSentToDwp(), is(LocalDate.now().toString())); - assertThat(response.getData().getDwpDueDate(), is(LocalDate.now().plusDays(expectedResponseDays).toString())); + assertEquals(dwpState, response.getData().getDwpState()); + assertEquals(state, response.getData().getState()); + assertEquals("sentToDwp", response.getData().getHmctsDwpState()); + assertEquals(LocalDate.now().toString(), response.getData().getDateSentToDwp()); + assertEquals(LocalDate.now().plusDays(expectedResponseDays).toString(), response.getData().getDwpDueDate()); } @Test - public void givenNoUploadedAndGeneratedDoc_thenReturnError() { + void givenNoUploadedAndGeneratedDoc_thenReturnError() { sscsCaseData.getDocumentGeneration().setGenerateNotice(NO); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertFalse(response.getErrors().isEmpty()); - assertThat(response.getErrors(), hasItem("You need to upload a PDF document")); + assertTrue(response.getErrors().contains("You need to upload a PDF document")); } @Test - public void givenGenerateNoticeIsYes_thenReturnCaseDataPreviewDoc() { + void givenGenerateNoticeIsYes_thenReturnCaseDataPreviewDoc() { DocumentLink url = sscsCaseData.getDocumentStaging().getPreviewDocument(); handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); @@ -744,7 +742,7 @@ public void givenGenerateNoticeIsYes_thenReturnCaseDataPreviewDoc() { } @Test - public void givenGenerateNoticeIsSetToNoAndInterlocDocIsNotNull_thenReturnRelevantDocLink() { + void givenGenerateNoticeIsSetToNoAndInterlocDocIsNotNull_thenReturnRelevantDocLink() { sscsCaseData.getDocumentGeneration().setGenerateNotice(NO); assertFalse(sscsCaseData.getDocumentGeneration().getGenerateNotice().toBoolean()); @@ -765,7 +763,7 @@ public void givenGenerateNoticeIsSetToNoAndInterlocDocIsNotNull_thenReturnReleva } @Test - public void givenGenerateNoticeIsSetToYesAndInterlocDocIsNotNull_thenReturnNull() { + void givenGenerateNoticeIsSetToYesAndInterlocDocIsNotNull_thenReturnNull() { assertTrue(sscsCaseData.getDocumentGeneration().getGenerateNotice().toBoolean()); SscsInterlocDirectionDocument interlocDoc = SscsInterlocDirectionDocument.builder() @@ -785,7 +783,7 @@ public void givenGenerateNoticeIsSetToYesAndInterlocDocIsNotNull_thenReturnNull( } @Test - public void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNull() { + void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNull() { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); sscsCaseData.setSelectNextTypeOfHearing(null); sscsCaseData.setTypeOfHearing(TypeOfHearing.SUBSTANTIVE); @@ -795,7 +793,7 @@ public void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNull() { } @Test - public void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNo() { + void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNo() { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); sscsCaseData.setSelectNextTypeOfHearing(NO); sscsCaseData.setTypeOfHearing(TypeOfHearing.SUBSTANTIVE); @@ -808,7 +806,7 @@ public void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNo() { @ParameterizedTest @EnumSource(value = TypeOfHearing.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) - public void willSetTypeOfHearingInHearingOptionsNullIfSelectNextTypeOfHearingIsYes(TypeOfHearing typeOfHearing) { + void willSetTypeOfHearingInHearingOptionsNullIfSelectNextTypeOfHearingIsYes(TypeOfHearing typeOfHearing) { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); sscsCaseData.setSelectNextTypeOfHearing(YES); sscsCaseData.setTypeOfHearing(typeOfHearing); @@ -822,7 +820,7 @@ public void willSetTypeOfHearingInHearingOptionsNullIfSelectNextTypeOfHearingIsY @ParameterizedTest @EnumSource(value = TypeOfHearing.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) - public void willSetTypeOfHearingInHearingOptionsNotNullIfSelectNextTypeOfHearingIsYes(TypeOfHearing typeOfHearing) { + void willSetTypeOfHearingInHearingOptionsNotNullIfSelectNextTypeOfHearingIsYes(TypeOfHearing typeOfHearing) { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); sscsCaseData.setSelectNextTypeOfHearing(YES); sscsCaseData.setTypeOfHearing(typeOfHearing); From 4bb7368340070876aa1d43c988b8f572cacc93c5 Mon Sep 17 00:00:00 2001 From: nilay Date: Mon, 20 Jan 2025 11:21:52 +0000 Subject: [PATCH 12/17] migrating HearingType to HmcHearingType from commons and changing typeOfHearing to hmcHearingType --- .../AuthorisationCaseField.json | 32 +++++------ .../CaseEventToComplexTypes.json | 4 +- .../CaseEventToFields-directionIssued.json | 4 +- ...eEventToFields-writeAdjournmentNotice.json | 2 +- ...ventToFields-writeFinalDecisionNotice.json | 10 ++-- .../benefit/sheets/CaseField/CaseField.json | 4 +- .../sheets/CaseTypeTab/CaseTypeTab.json | 8 +-- .../sheets/ComplexTypes/ComplexTypes.json | 2 +- .../benefit/sheets/FixedLists/FixedLists.json | 4 +- .../reform/sscs/ContractTestDataProvider.java | 4 +- .../DirectionIssuedAboutToStartHandler.java | 4 +- .../DirectionIssuedAboutToSubmitHandler.java | 8 +-- .../mapping/HearingsDetailsMapping.java | 10 ++-- .../sscs/model/hmc/reference/HearingType.java | 27 --------- .../hearingvalues/ServiceHearingValues.java | 4 +- .../model/single/hearing/HearingDetails.java | 4 +- ...irectionIssuedAboutToStartHandlerTest.java | 10 ++-- ...rectionIssuedAboutToSubmitHandlerTest.java | 56 +++++++++---------- .../mapping/HearingsDetailsMappingTest.java | 25 ++++----- .../ServiceHearingValuesMappingTest.java | 3 +- 20 files changed, 96 insertions(+), 129 deletions(-) delete mode 100644 src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java diff --git a/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json b/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json index c760b625b3e..8b096d8f25f 100644 --- a/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json +++ b/definitions/benefit/sheets/AuthorisationCaseField/AuthorisationCaseField.json @@ -1662,22 +1662,22 @@ {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "hearingOutcomeValue", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, - {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextTypeOfHearing", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, - {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "typeOfHearing", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, + {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "selectNextHmcHearingType", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs", "CRUD": "R"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-judge", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-registrar", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-systemupdate", "CRUD": "CRUD"}, + {"LiveFrom": "15/12/2022", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-dwpresponsewriter", "CRUD": "CRUD"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "CaseFieldID": "hmcHearingType", "AccessProfile": "caseworker-sscs-teamleader", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "completedHearingsList", "AccessProfile": "caseworker-sscs-superuser", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "completedHearingsList", "AccessProfile": "caseworker-sscs", "CRUD": "CRUD"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "CaseFieldID": "completedHearingsList", "AccessProfile": "caseworker-sscs-clerk", "CRUD": "CRUD"} diff --git a/definitions/benefit/sheets/CaseEventToComplexTypes/CaseEventToComplexTypes.json b/definitions/benefit/sheets/CaseEventToComplexTypes/CaseEventToComplexTypes.json index c53f92329ab..b52b4dcb18d 100644 --- a/definitions/benefit/sheets/CaseEventToComplexTypes/CaseEventToComplexTypes.json +++ b/definitions/benefit/sheets/CaseEventToComplexTypes/CaseEventToComplexTypes.json @@ -2311,7 +2311,7 @@ "DisplayContext": "READONLY", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 4, - "PageID": "typeOfHearing", + "PageID": "hmcHearingType", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "FieldShowCondition": "appeal.benefitType.code=\"childSupport\" OR appeal.benefitType.code=\"taxCredit\" OR appeal.benefitType.code=\"guardiansAllowance\" OR appeal.benefitType.code=\"taxFreeChildcare\" OR appeal.benefitType.code=\"homeResponsibilitiesProtection\" OR appeal.benefitType.code=\"childBenefit\" OR appeal.benefitType.code=\"thirtyHoursFreeChildcare\" OR appeal.benefitType.code=\"guaranteedMinimumPension\" OR appeal.benefitType.code=\"nationalInsuranceCredits\"" @@ -2324,7 +2324,7 @@ "DisplayContext": "MANDATORY", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 5, - "PageID": "typeOfHearing", + "PageID": "hmcHearingType", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "FieldShowCondition": "appeal.benefitType.code=\"childSupport\" OR appeal.benefitType.code=\"taxCredit\" OR appeal.benefitType.code=\"guardiansAllowance\" OR appeal.benefitType.code=\"taxFreeChildcare\" OR appeal.benefitType.code=\"homeResponsibilitiesProtection\" OR appeal.benefitType.code=\"childBenefit\" OR appeal.benefitType.code=\"thirtyHoursFreeChildcare\" OR appeal.benefitType.code=\"guaranteedMinimumPension\" OR appeal.benefitType.code=\"nationalInsuranceCredits\"" diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json index 388a77ff78b..d592f923bdd 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json @@ -359,7 +359,7 @@ }, { "CaseEventID": "directionIssued", - "CaseFieldID": "selectNextTypeOfHearing", + "CaseFieldID": "selectNextHmcHearingType", "CaseTypeID": "Benefit", "DisplayContext": "MANDATORY", "LiveFrom": "01/01/2018", @@ -371,7 +371,7 @@ }, { "CaseEventID": "directionIssued", - "CaseFieldID": "typeOfHearing", + "CaseFieldID": "hmcHearingType", "CaseTypeID": "Benefit", "DisplayContext": "MANDATORY", "LiveFrom": "01/01/2018", diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeAdjournmentNotice.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeAdjournmentNotice.json index 620708132e0..797267ed6fa 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeAdjournmentNotice.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeAdjournmentNotice.json @@ -43,7 +43,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 4, "PageFieldDisplayOrder": 1, - "PageID": "typeOfHearing", + "PageID": "hmcHearingType", "PageLabel": "Type of hearing", "PageShowCondition": "adjournCaseGenerateNotice = \"Yes\"", "ShowSummaryChangeOption": "Y" diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeFinalDecisionNotice.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeFinalDecisionNotice.json index 451c512cc32..4e70839dde5 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeFinalDecisionNotice.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeFinalDecisionNotice.json @@ -60,7 +60,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 1, - "PageID": "typeOfHearing", + "PageID": "hmcHearingType", "PageLabel": "Type of hearing", "PageShowCondition": "writeFinalDecisionGenerateNotice = \"Yes\"", "ShowSummaryChangeOption": "Y" @@ -74,7 +74,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 2, - "PageID": "typeOfHearing", + "PageID": "hmcHearingType", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "RetainHiddenValue": "Yes" @@ -88,7 +88,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 3, - "PageID": "typeOfHearing", + "PageID": "hmcHearingType", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "RetainHiddenValue": "Yes" @@ -102,7 +102,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 3, - "PageID": "typeOfHearing", + "PageID": "hmcHearingType", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "RetainHiddenValue": "Yes" @@ -116,7 +116,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 4, - "PageID": "typeOfHearing", + "PageID": "hmcHearingType", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "RetainHiddenValue": "Yes" diff --git a/definitions/benefit/sheets/CaseField/CaseField.json b/definitions/benefit/sheets/CaseField/CaseField.json index b28e48de2c4..24f1ea55887 100644 --- a/definitions/benefit/sheets/CaseField/CaseField.json +++ b/definitions/benefit/sheets/CaseField/CaseField.json @@ -522,7 +522,7 @@ {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "ignoreCallbackWarnings", "Label": "Ignore callback warnings", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomes", "Label": "Hearing Outcomes", "FieldType": "Collection", "FieldTypeParameter": "hearingOutcomeDetails", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "hearingOutcomeValue", "Label": "Hearing Outcome", "FieldType": "hearingOutcomeValue", "SecurityClassification": "PUBLIC"}, - {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "selectNextTypeOfHearing", "Label": "Do you want to select next hearing type i.e. Substantive or Directions hearing", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, - {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "ID": "typeOfHearing", "Label": "Next hearing type", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_typeOfHearing", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "07/08/2024", "CaseTypeID": "Benefit", "ID": "selectNextHmcHearingType", "Label": "Do you want to select next hearing type i.e. Substantive or Directions hearing", "FieldType": "YesOrNo", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "10/09/2019", "CaseTypeID": "Benefit", "ID": "hmcHearingType", "Label": "Next hearing type", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_hmcHearingType", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "18/10/2024", "CaseTypeID": "Benefit", "ID": "completedHearingsList", "Label": "Completed Hearings", "FieldType": "Collection", "FieldTypeParameter": "hearingDetails", "SecurityClassification": "PUBLIC"} ] diff --git a/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json b/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json index f7cd9d95dab..39ef621eaa0 100644 --- a/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json +++ b/definitions/benefit/sheets/CaseTypeTab/CaseTypeTab.json @@ -286,7 +286,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 13}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 14}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 15, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, - {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "typeOfHearing", "TabFieldDisplayOrder": 16, "FieldShowCondition": "typeOfHearing=\"*\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_judge", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hmcHearingType", "TabFieldDisplayOrder": 16, "FieldShowCondition": "hmcHearingType=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "TabShowCondition": "regionalProcessingCenter.hearingRoute=\"listAssist\" OR regionalProcessingCenter.hearingRoute=\"gaps\"", "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs-clerk", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "defaultListingValues", "TabFieldDisplayOrder": 1}, @@ -305,7 +305,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 14}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 15}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 16, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, - {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "typeOfHearing", "TabFieldDisplayOrder": 17, "FieldShowCondition": "typeOfHearing=\"*\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_clerk", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hmcHearingType", "TabFieldDisplayOrder": 17, "FieldShowCondition": "hmcHearingType=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "TabShowCondition": "regionalProcessingCenter.hearingRoute=\"listAssist\" OR regionalProcessingCenter.hearingRoute=\"gaps\"", "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs-registrar", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "defaultListingValues", "TabFieldDisplayOrder": 1}, @@ -323,7 +323,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 13}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 14}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 15, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, - {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "typeOfHearing", "TabFieldDisplayOrder": 16, "FieldShowCondition": "typeOfHearing=\"*\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_registrar", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hmcHearingType", "TabFieldDisplayOrder": 16, "FieldShowCondition": "hmcHearingType=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "TabShowCondition": "regionalProcessingCenter.hearingRoute=\"listAssist\" OR regionalProcessingCenter.hearingRoute=\"gaps\"", "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "AccessProfile": "caseworker-sscs-superuser", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "defaultListingValues", "TabFieldDisplayOrder": 2}, @@ -342,7 +342,7 @@ {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hearingState", "TabFieldDisplayOrder": 15}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panelMemberExclusions", "TabFieldDisplayOrder": 16}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "panel", "TabFieldDisplayOrder": 17, "FieldShowCondition": "panelMemberExclusions.arePanelMembersReserved=\"Yes\""}, - {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "typeOfHearing", "TabFieldDisplayOrder": 18, "FieldShowCondition": "typeOfHearing=\"*\""}, + {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "listing_requirements_superuser", "TabLabel": "Listing Requirements", "TabDisplayOrder": 24, "CaseFieldID": "hmcHearingType", "TabFieldDisplayOrder": 18, "FieldShowCondition": "hmcHearingType=\"*\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "language_sscs", "TabLabel": "Welsh", "TabDisplayOrder": 25, "CaseFieldID": "isConfidentialCaseLabel", "TabFieldDisplayOrder": 1, "FieldShowCondition": "isConfidentialCase =\"Yes\""}, {"LiveFrom": "", "CaseTypeID": "Benefit", "TabID": "language_sscs", "TabLabel": "Welsh", "TabDisplayOrder": 25, "CaseFieldID": "languagePreferenceWelsh", "TabFieldDisplayOrder": 1, "TabShowCondition": "languagePreferenceWelsh=\"Yes\""}, diff --git a/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json b/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json index 921938e2ff5..1e0d614efd1 100644 --- a/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json +++ b/definitions/benefit/sheets/ComplexTypes/ComplexTypes.json @@ -15,7 +15,7 @@ {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "signLanguageType", "FieldType": "Text", "ElementLabel": "Sign languages", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "hearingRoute", "FieldType": "FixedList", "FieldTypeParameter": "FL_hearingRoute", "ElementLabel": "Hearing Route", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "agreeLessNotice", "FieldType": "YesOrNo", "ElementLabel": "Agree less notice of hearing availability", "FieldShowCondition": "wantsToAttend=\"Yes\"", "SecurityClassification": "PUBLIC"}, - {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "typeOfHearing", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_typeOfHearing", "ElementLabel": "Hearing Type", "FieldShowCondition": "typeOfHearing=\"*\"", "SecurityClassification": "PUBLIC"}, + {"LiveFrom": "01/01/2018", "ID": "hearingOptions", "ListElementCode": "hmcHearingType", "FieldType": "FixedRadioList", "FieldTypeParameter": "FL_hmcHearingType", "ElementLabel": "Hearing Type", "FieldShowCondition": "hmcHearingType=\"*\"", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingSubtype", "ListElementCode": "wantsHearingTypeTelephone", "FieldType": "YesOrNo", "ElementLabel": "Wants hearing type telephone", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingSubtype", "ListElementCode": "hearingTelephoneNumber", "FieldType": "Text", "ElementLabel": "Hearing telephone number", "FieldShowCondition": "wantsHearingTypeTelephone=\"Yes\"", "SecurityClassification": "PUBLIC"}, {"LiveFrom": "01/01/2018", "ID": "hearingSubtype", "ListElementCode": "wantsHearingTypeVideo", "FieldType": "YesOrNo", "ElementLabel": "Wants hearing type video", "SecurityClassification": "PUBLIC"}, diff --git a/definitions/benefit/sheets/FixedLists/FixedLists.json b/definitions/benefit/sheets/FixedLists/FixedLists.json index 7941e281b09..63d2f5974af 100644 --- a/definitions/benefit/sheets/FixedLists/FixedLists.json +++ b/definitions/benefit/sheets/FixedLists/FixedLists.json @@ -917,6 +917,6 @@ {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remade", "ListElement": "Remade"}, {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "refused", "ListElement": "Refused"}, {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remitted", "ListElement": "Remit from UT"}, - {"LiveFrom": "01/09/2021", "ID": "FL_typeOfHearing", "ListElementCode": "substantive", "ListElement": "Substantive"}, - {"LiveFrom": "01/09/2021", "ID": "FL_typeOfHearing", "ListElementCode": "direction", "ListElement": "Direction"} + {"LiveFrom": "01/09/2021", "ID": "FL_hmcHearingType", "ListElementCode": "substantive", "ListElement": "Substantive"}, + {"LiveFrom": "01/09/2021", "ID": "FL_hmcHearingType", "ListElementCode": "direction", "ListElement": "Direction"} ] diff --git a/src/contractTest/java/uk/gov/hmcts/reform/sscs/ContractTestDataProvider.java b/src/contractTest/java/uk/gov/hmcts/reform/sscs/ContractTestDataProvider.java index c6e5aa22456..515795c9f68 100644 --- a/src/contractTest/java/uk/gov/hmcts/reform/sscs/ContractTestDataProvider.java +++ b/src/contractTest/java/uk/gov/hmcts/reform/sscs/ContractTestDataProvider.java @@ -10,7 +10,6 @@ import static uk.gov.hmcts.reform.sscs.model.hmc.reference.CaseCategoryType.CASE_TYPE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.DayOfWeekUnavailabilityType.AM; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.DayOfWeekUnavailabilityType.PM; -import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.SUBSTANTIVE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.LocationType.COURT; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.PartyType.INDIVIDUAL; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.RequirementType.EXCLUDE; @@ -31,6 +30,7 @@ import java.util.Arrays; import java.util.List; import java.util.Map; +import uk.gov.hmcts.reform.sscs.ccd.domain.HmcHearingType; import uk.gov.hmcts.reform.sscs.model.HearingLocation; import uk.gov.hmcts.reform.sscs.model.hmc.reference.Adjustment; import uk.gov.hmcts.reform.sscs.model.single.hearing.*; @@ -148,7 +148,7 @@ protected static RequestDetails requestDetails() { protected static HearingDetails hearingDetails() { HearingDetails hearingDetails = new HearingDetails(); hearingDetails.setAutolistFlag(true); - hearingDetails.setHearingType(SUBSTANTIVE); + hearingDetails.setHearingType(HmcHearingType.SUBSTANTIVE); hearingDetails.setHearingWindow(hearingWindow()); hearingDetails.setDuration(1); hearingDetails.setNonStandardHearingDurationReasons(Arrays.asList("First reason", "Second reason")); diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java index a85d1afe855..097469d0865 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java @@ -54,8 +54,8 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, clearFields(sscsCaseData); setPartiesToSendLetter(sscsCaseData); - if (sscsCaseData.getSelectNextTypeOfHearing() == null) { - sscsCaseData.setSelectNextTypeOfHearing(NO); + if (sscsCaseData.getSelectNextHmcHearingType() == null) { + sscsCaseData.setSelectNextHmcHearingType(NO); } return new PreSubmitCallbackResponse<>(sscsCaseData); } diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java index 3ebb4127cb5..518fb7cda7a 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java @@ -74,17 +74,17 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, SscsDocumentTranslationStatus documentTranslationStatus = caseData.isLanguagePreferenceWelsh() && callback.getEvent() == EventType.DIRECTION_ISSUED ? SscsDocumentTranslationStatus.TRANSLATION_REQUIRED : null; log.info("DocumentTranslationStatus is {}, for case id : {}", documentTranslationStatus, caseData.getCcdCaseId()); - YesNo selectNextTypeOfHearing = caseData.getSelectNextTypeOfHearing(); + YesNo selectNextTypeOfHearing = caseData.getSelectNextHmcHearingType(); if (isNoOrNull(selectNextTypeOfHearing)) { - caseData.setTypeOfHearing(null); + caseData.setHmcHearingType(null); if (caseData.getAppeal().getHearingOptions() != null) { - caseData.getAppeal().getHearingOptions().setTypeOfHearing(null); + caseData.getAppeal().getHearingOptions().setHmcHearingType(null); } } else { HearingOptions.HearingOptionsBuilder builder = caseData.getAppeal().getHearingOptions() != null ? caseData.getAppeal().getHearingOptions().toBuilder() : HearingOptions.builder(); caseData.getAppeal() - .setHearingOptions(builder.typeOfHearing(caseData.getTypeOfHearing()) + .setHearingOptions(builder.hmcHearingType(caseData.getHmcHearingType()) .build()); } return validateDirectionType(caseData) diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java index af9db12ac96..49f05c91834 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMapping.java @@ -18,14 +18,13 @@ import uk.gov.hmcts.reform.sscs.ccd.domain.Appeal; import uk.gov.hmcts.reform.sscs.ccd.domain.CcdValue; import uk.gov.hmcts.reform.sscs.ccd.domain.Entity; +import uk.gov.hmcts.reform.sscs.ccd.domain.HmcHearingType; import uk.gov.hmcts.reform.sscs.ccd.domain.OtherParty; import uk.gov.hmcts.reform.sscs.ccd.domain.Party; import uk.gov.hmcts.reform.sscs.ccd.domain.SscsCaseData; -import uk.gov.hmcts.reform.sscs.ccd.domain.TypeOfHearing; import uk.gov.hmcts.reform.sscs.exception.ListingException; import uk.gov.hmcts.reform.sscs.model.HearingLocation; import uk.gov.hmcts.reform.sscs.model.HearingWrapper; -import uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType; import uk.gov.hmcts.reform.sscs.model.single.hearing.HearingDetails; import uk.gov.hmcts.reform.sscs.model.single.hearing.HearingWindow; import uk.gov.hmcts.reform.sscs.model.single.hearing.PanelRequirements; @@ -77,10 +76,9 @@ public static HearingDetails buildHearingDetails(HearingWrapper wrapper, Referen .build(); } - public static HearingType getHearingType(SscsCaseData sscsCaseData) { - TypeOfHearing typeOfHearing = sscsCaseData.getTypeOfHearing() != null - ? sscsCaseData.getTypeOfHearing() : TypeOfHearing.SUBSTANTIVE; - return HearingType.getFromTypeOfHearing(typeOfHearing); + public static HmcHearingType getHearingType(SscsCaseData sscsCaseData) { + return sscsCaseData.getHmcHearingType() != null + ? sscsCaseData.getHmcHearingType() : HmcHearingType.SUBSTANTIVE; } public static boolean isCaseUrgent(@Valid SscsCaseData caseData) { diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java b/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java deleted file mode 100644 index ebdc7635180..00000000000 --- a/src/main/java/uk/gov/hmcts/reform/sscs/model/hmc/reference/HearingType.java +++ /dev/null @@ -1,27 +0,0 @@ -package uk.gov.hmcts.reform.sscs.model.hmc.reference; - -import com.fasterxml.jackson.annotation.JsonValue; -import lombok.Getter; -import lombok.RequiredArgsConstructor; -import uk.gov.hmcts.reform.sscs.ccd.domain.TypeOfHearing; - -@Getter -@RequiredArgsConstructor -public enum HearingType { - SUBSTANTIVE("BBA3-SUB", "Substantive", null), - DIRECTION_HEARINGS("BBA3-DIR", "Direction Hearings", null), - CHAMBERS_OUTCOME("BBA3-CHA", "Chambers Outcome", null); - - @JsonValue - private final String hmcReference; - private final String valueEn; - private final String valueCy; - - public static HearingType getFromTypeOfHearing(TypeOfHearing typeOfHearing) { - return switch (typeOfHearing) { - case SUBSTANTIVE -> SUBSTANTIVE; - case DIRECTION_HEARINGS -> DIRECTION_HEARINGS; - case CHAMBERS_OUTCOME -> CHAMBERS_OUTCOME; - }; - } -} diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/model/service/hearingvalues/ServiceHearingValues.java b/src/main/java/uk/gov/hmcts/reform/sscs/model/service/hearingvalues/ServiceHearingValues.java index 2f2a02dc472..7f14a5d9ddf 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/model/service/hearingvalues/ServiceHearingValues.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/model/service/hearingvalues/ServiceHearingValues.java @@ -7,8 +7,8 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import uk.gov.hmcts.reform.sscs.ccd.domain.HmcHearingType; import uk.gov.hmcts.reform.sscs.model.HearingLocation; -import uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType; import uk.gov.hmcts.reform.sscs.model.single.hearing.CaseCategory; import uk.gov.hmcts.reform.sscs.model.single.hearing.HearingWindow; import uk.gov.hmcts.reform.sscs.model.single.hearing.PanelRequirements; @@ -42,7 +42,7 @@ public class ServiceHearingValues { private boolean autoListFlag; - private HearingType hearingType; + private HmcHearingType hearingType; private String caseType; diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/model/single/hearing/HearingDetails.java b/src/main/java/uk/gov/hmcts/reform/sscs/model/single/hearing/HearingDetails.java index e9531623713..34b5d2a42f1 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/model/single/hearing/HearingDetails.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/model/single/hearing/HearingDetails.java @@ -7,8 +7,8 @@ import lombok.Data; import lombok.NoArgsConstructor; import uk.gov.hmcts.reform.sscs.ccd.domain.AmendReason; +import uk.gov.hmcts.reform.sscs.ccd.domain.HmcHearingType; import uk.gov.hmcts.reform.sscs.model.HearingLocation; -import uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType; import uk.gov.hmcts.reform.sscs.reference.data.model.HearingChannel; @Data @@ -21,7 +21,7 @@ public class HearingDetails { private boolean autolistFlag; - private HearingType hearingType; + private HmcHearingType hearingType; private HearingWindow hearingWindow; diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java index c16d3f058c4..6a5de7d2f72 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java @@ -83,8 +83,8 @@ public void givenValidAppeal_populateExtensionNextEventDropdown() { DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); assertEquals(expected, response.getData().getExtensionNextEventDl()); assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); - assertNull(response.getData().getTypeOfHearing()); - assertEquals(NO, response.getData().getSelectNextTypeOfHearing()); + assertNull(response.getData().getHmcHearingType()); + assertEquals(NO, response.getData().getSelectNextHmcHearingType()); } @Test @@ -399,9 +399,9 @@ public void givenAValidCallbackType_NoAdditionalPartiesForOtherParty() { } @Test - public void givenNotDefaultSelectTypeOfHearingNo_whenValue() { + public void givenNotDefaultSelectHmcHearingTypeNo_whenValue() { when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); - sscsCaseData.setSelectNextTypeOfHearing(YES); + sscsCaseData.setSelectNextHmcHearingType(YES); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); List listOptions = new ArrayList<>(); listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); @@ -409,6 +409,6 @@ public void givenNotDefaultSelectTypeOfHearingNo_whenValue() { DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); assertEquals(expected, response.getData().getExtensionNextEventDl()); assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); - assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); + assertEquals(YES, response.getData().getSelectNextHmcHearingType()); } } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java index ec5bd865f2d..afa3509749f 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java @@ -783,53 +783,53 @@ void givenGenerateNoticeIsSetToYesAndInterlocDocIsNotNull_thenReturnNull() { } @Test - void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNull() { + void willWipeHmcHearingTypeIfSelectNextHmcHearingTypeIsNull() { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); - sscsCaseData.setSelectNextTypeOfHearing(null); - sscsCaseData.setTypeOfHearing(TypeOfHearing.SUBSTANTIVE); + sscsCaseData.setSelectNextHmcHearingType(null); + sscsCaseData.setHmcHearingType(HmcHearingType.SUBSTANTIVE); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertNull(response.getData().getSelectNextTypeOfHearing()); - assertNull(response.getData().getTypeOfHearing()); + assertNull(response.getData().getSelectNextHmcHearingType()); + assertNull(response.getData().getHmcHearingType()); } @Test - void willWipeTypeOfHearingIfSelectNextTypeOfHearingIsNo() { + void willWipeHmcHearingTypeIfSelectNextHmcHearingTypeIsNo() { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); - sscsCaseData.setSelectNextTypeOfHearing(NO); - sscsCaseData.setTypeOfHearing(TypeOfHearing.SUBSTANTIVE); - sscsCaseData.getAppeal().setHearingOptions(HearingOptions.builder().typeOfHearing(TypeOfHearing.SUBSTANTIVE).build()); + sscsCaseData.setSelectNextHmcHearingType(NO); + sscsCaseData.setHmcHearingType(HmcHearingType.SUBSTANTIVE); + sscsCaseData.getAppeal().setHearingOptions(HearingOptions.builder().hmcHearingType(HmcHearingType.SUBSTANTIVE).build()); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertEquals(NO, response.getData().getSelectNextTypeOfHearing()); - assertNull(response.getData().getTypeOfHearing()); - assertNull(response.getData().getAppeal().getHearingOptions().getTypeOfHearing()); + assertEquals(NO, response.getData().getSelectNextHmcHearingType()); + assertNull(response.getData().getHmcHearingType()); + assertNull(response.getData().getAppeal().getHearingOptions().getHmcHearingType()); } @ParameterizedTest - @EnumSource(value = TypeOfHearing.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) - void willSetTypeOfHearingInHearingOptionsNullIfSelectNextTypeOfHearingIsYes(TypeOfHearing typeOfHearing) { + @EnumSource(value = HmcHearingType.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) + void willSetTypeOfHearingInHearingOptionsNullIfSelectNextTypeOfHearingIsYes(HmcHearingType hmcHearingType) { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); - sscsCaseData.setSelectNextTypeOfHearing(YES); - sscsCaseData.setTypeOfHearing(typeOfHearing); + sscsCaseData.setSelectNextHmcHearingType(YES); + sscsCaseData.setHmcHearingType(hmcHearingType); sscsCaseData.getAppeal().setHearingOptions(null); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); - assertEquals(typeOfHearing, response.getData().getTypeOfHearing()); - assertEquals(typeOfHearing, response.getData().getAppeal().getHearingOptions().getTypeOfHearing()); - assertEquals(HearingOptions.builder().typeOfHearing(typeOfHearing).build(), response.getData().getAppeal().getHearingOptions()); + assertEquals(YES, response.getData().getSelectNextHmcHearingType()); + assertEquals(hmcHearingType, response.getData().getHmcHearingType()); + assertEquals(hmcHearingType, response.getData().getAppeal().getHearingOptions().getHmcHearingType()); + assertEquals(HearingOptions.builder().hmcHearingType(hmcHearingType).build(), response.getData().getAppeal().getHearingOptions()); } @ParameterizedTest - @EnumSource(value = TypeOfHearing.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) - void willSetTypeOfHearingInHearingOptionsNotNullIfSelectNextTypeOfHearingIsYes(TypeOfHearing typeOfHearing) { + @EnumSource(value = HmcHearingType.class, names = {"SUBSTANTIVE", "DIRECTION_HEARINGS"}) + void willSetTypeOfHearingInHearingOptionsNotNullIfSelectNextTypeOfHearingIsYes(HmcHearingType hmcHearingType) { when(caseDetails.getState()).thenReturn(State.READY_TO_LIST); - sscsCaseData.setSelectNextTypeOfHearing(YES); - sscsCaseData.setTypeOfHearing(typeOfHearing); + sscsCaseData.setSelectNextHmcHearingType(YES); + sscsCaseData.setHmcHearingType(hmcHearingType); sscsCaseData.getAppeal().setHearingOptions(HearingOptions.builder().agreeLessNotice("string").build()); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); - assertEquals(YES, response.getData().getSelectNextTypeOfHearing()); - assertEquals(typeOfHearing, response.getData().getTypeOfHearing()); - assertEquals(typeOfHearing, response.getData().getAppeal().getHearingOptions().getTypeOfHearing()); - HearingOptions expectedHearingOptions = HearingOptions.builder().agreeLessNotice("string").typeOfHearing(typeOfHearing).build(); + assertEquals(YES, response.getData().getSelectNextHmcHearingType()); + assertEquals(hmcHearingType, response.getData().getHmcHearingType()); + assertEquals(hmcHearingType, response.getData().getAppeal().getHearingOptions().getHmcHearingType()); + HearingOptions expectedHearingOptions = HearingOptions.builder().agreeLessNotice("string").hmcHearingType(hmcHearingType).build(); assertEquals(expectedHearingOptions, response.getData().getAppeal().getHearingOptions()); } } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java index 1b10e4f43d6..371cd757a94 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/HearingsDetailsMappingTest.java @@ -15,8 +15,6 @@ import static org.mockito.BDDMockito.given; import static uk.gov.hmcts.reform.sscs.ccd.domain.AdjournCaseNextHearingVenue.SAME_VENUE; import static uk.gov.hmcts.reform.sscs.ccd.domain.AdjournCaseNextHearingVenue.SOMEWHERE_ELSE; -import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.DIRECTION_HEARINGS; -import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.SUBSTANTIVE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.LocationType.COURT; import java.util.ArrayList; @@ -38,7 +36,6 @@ import uk.gov.hmcts.reform.sscs.model.HearingLocation; import uk.gov.hmcts.reform.sscs.model.HearingWrapper; import uk.gov.hmcts.reform.sscs.model.VenueDetails; -import uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType; import uk.gov.hmcts.reform.sscs.model.single.hearing.HearingDetails; import uk.gov.hmcts.reform.sscs.reference.data.model.HearingChannel; import uk.gov.hmcts.reform.sscs.reference.data.model.SessionCategoryMap; @@ -224,30 +221,30 @@ void testIsCaseLinkedNull() { assertThat(result).isFalse(); } - @DisplayName("Hearing type should be substantive if typeOfHearing is null.") + @DisplayName("Hearing type should be substantive if hmcHearingType is null.") @Test void getHearingTypeNull() { - HearingType result = HearingsDetailsMapping.getHearingType(caseData); + HmcHearingType result = HearingsDetailsMapping.getHearingType(caseData); - assertThat(result).isEqualTo(SUBSTANTIVE); + assertThat(result).isEqualTo(HmcHearingType.SUBSTANTIVE); } - @DisplayName("Hearing type should be substantive if typeOfHearing is substantive.") + @DisplayName("Hearing type should be substantive if hmcHearingType is substantive.") @Test void getHearingTypeSubstantive() { - caseData.setTypeOfHearing(TypeOfHearing.SUBSTANTIVE); - HearingType result = HearingsDetailsMapping.getHearingType(caseData); + caseData.setHmcHearingType(HmcHearingType.SUBSTANTIVE); + HmcHearingType result = HearingsDetailsMapping.getHearingType(caseData); - assertThat(result).isEqualTo(SUBSTANTIVE); + assertThat(result).isEqualTo(HmcHearingType.SUBSTANTIVE); } - @DisplayName("Hearing type should be direction if typeOfHearing is direction.") + @DisplayName("Hearing type should be direction if hmcHearingType is direction.") @Test void getHearingTypeDirection() { - caseData.setTypeOfHearing(TypeOfHearing.DIRECTION_HEARINGS); - HearingType result = HearingsDetailsMapping.getHearingType(caseData); + caseData.setHmcHearingType(HmcHearingType.DIRECTION_HEARINGS); + HmcHearingType result = HearingsDetailsMapping.getHearingType(caseData); - assertThat(result).isEqualTo(DIRECTION_HEARINGS); + assertThat(result).isEqualTo(HmcHearingType.DIRECTION_HEARINGS); } @DisplayName("When urgentCase is yes, isCaseUrgent return True") diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMappingTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMappingTest.java index 030dbef90a5..523c41c8702 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMappingTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/helper/mapping/ServiceHearingValuesMappingTest.java @@ -10,7 +10,6 @@ import static uk.gov.hmcts.reform.sscs.helper.mapping.HearingsWindowMapping.DAYS_TO_ADD_HEARING_WINDOW_TODAY; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.CaseCategoryType.CASE_SUBTYPE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.CaseCategoryType.CASE_TYPE; -import static uk.gov.hmcts.reform.sscs.model.hmc.reference.HearingType.SUBSTANTIVE; import static uk.gov.hmcts.reform.sscs.model.hmc.reference.PartyType.INDIVIDUAL; import static uk.gov.hmcts.reform.sscs.reference.data.model.HearingChannel.FACE_TO_FACE; @@ -188,7 +187,7 @@ void shouldMapServiceHearingValuesSuccessfully() throws ListingException { //then assertFalse(serviceHearingValues.isAutoListFlag()); assertEquals(60, serviceHearingValues.getDuration()); - assertEquals(SUBSTANTIVE, serviceHearingValues.getHearingType()); + assertEquals(HmcHearingType.SUBSTANTIVE, serviceHearingValues.getHearingType()); assertEquals(BENEFIT, serviceHearingValues.getCaseType()); assertThat(serviceHearingValues.getCaseCategories()) .extracting("categoryType","categoryValue") From 5fb910327c119b9a1b7be16e909b88570c87ee4a Mon Sep 17 00:00:00 2001 From: nilay Date: Mon, 20 Jan 2025 11:31:31 +0000 Subject: [PATCH 13/17] migrating HearingType to HmcHearingType from commons and changing typeOfHearing to hmcHearingType --- .../CaseEventToFields/CaseEventToFields-directionIssued.json | 2 +- .../directionissued/DirectionIssuedAboutToSubmitHandler.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json index d592f923bdd..be786e2bc9b 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-directionIssued.json @@ -379,7 +379,7 @@ "PageFieldDisplayOrder": 24, "PageID": "2.0", "PageLabel": "Issue direction", - "PageShowCondition": "selectNextTypeOfHearing=\"Yes\"", + "PageShowCondition": "selectNextHmcHearingType=\"Yes\"", "ShowSummaryChangeOption": "Y" }, { diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java index 518fb7cda7a..3cdc08b868d 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java @@ -74,8 +74,8 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, SscsDocumentTranslationStatus documentTranslationStatus = caseData.isLanguagePreferenceWelsh() && callback.getEvent() == EventType.DIRECTION_ISSUED ? SscsDocumentTranslationStatus.TRANSLATION_REQUIRED : null; log.info("DocumentTranslationStatus is {}, for case id : {}", documentTranslationStatus, caseData.getCcdCaseId()); - YesNo selectNextTypeOfHearing = caseData.getSelectNextHmcHearingType(); - if (isNoOrNull(selectNextTypeOfHearing)) { + YesNo selectNextHmcHearingType = caseData.getSelectNextHmcHearingType(); + if (isNoOrNull(selectNextHmcHearingType)) { caseData.setHmcHearingType(null); if (caseData.getAppeal().getHearingOptions() != null) { caseData.getAppeal().getHearingOptions().setHmcHearingType(null); From a7b9156185d2959ecc5ea02dcd536a2655d06b4b Mon Sep 17 00:00:00 2001 From: nilay Date: Mon, 20 Jan 2025 12:22:12 +0000 Subject: [PATCH 14/17] wiping hmcHearingType on aboutToStart and defaulting select to no --- .../DirectionIssuedAboutToStartHandler.java | 5 ++--- .../DirectionIssuedAboutToSubmitHandler.java | 1 - ...irectionIssuedAboutToStartHandlerTest.java | 20 +++++++++++++++++-- ...rectionIssuedAboutToSubmitHandlerTest.java | 2 -- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java index 097469d0865..b394751c710 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java @@ -54,9 +54,8 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, clearFields(sscsCaseData); setPartiesToSendLetter(sscsCaseData); - if (sscsCaseData.getSelectNextHmcHearingType() == null) { - sscsCaseData.setSelectNextHmcHearingType(NO); - } + sscsCaseData.setSelectNextHmcHearingType(NO); + sscsCaseData.setHmcHearingType(null); return new PreSubmitCallbackResponse<>(sscsCaseData); } diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java index 3cdc08b868d..cc03ef29956 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandler.java @@ -76,7 +76,6 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, log.info("DocumentTranslationStatus is {}, for case id : {}", documentTranslationStatus, caseData.getCcdCaseId()); YesNo selectNextHmcHearingType = caseData.getSelectNextHmcHearingType(); if (isNoOrNull(selectNextHmcHearingType)) { - caseData.setHmcHearingType(null); if (caseData.getAppeal().getHearingOptions() != null) { caseData.getAppeal().getHearingOptions().setHmcHearingType(null); } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java index 6a5de7d2f72..978363b6b8e 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java @@ -399,7 +399,7 @@ public void givenAValidCallbackType_NoAdditionalPartiesForOtherParty() { } @Test - public void givenNotDefaultSelectHmcHearingTypeNo_whenValue() { + public void givenNonDefaultSelectHmcHearingTypeNo_whenValue() { when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); sscsCaseData.setSelectNextHmcHearingType(YES); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); @@ -409,6 +409,22 @@ public void givenNotDefaultSelectHmcHearingTypeNo_whenValue() { DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); assertEquals(expected, response.getData().getExtensionNextEventDl()); assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); - assertEquals(YES, response.getData().getSelectNextHmcHearingType()); + assertEquals(NO, response.getData().getSelectNextHmcHearingType()); + assertNull(response.getData().getHmcHearingType()); + } + + @Test + public void givenNullSelectHmcHearingTypeNo_whenNull() { + when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); + sscsCaseData.setSelectNextHmcHearingType(null); + PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); + List listOptions = new ArrayList<>(); + listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); + listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); + DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); + assertEquals(expected, response.getData().getExtensionNextEventDl()); + assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertEquals(NO, response.getData().getSelectNextHmcHearingType()); + assertNull(response.getData().getHmcHearingType()); } } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java index afa3509749f..e45375e1466 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToSubmitHandlerTest.java @@ -789,7 +789,6 @@ void willWipeHmcHearingTypeIfSelectNextHmcHearingTypeIsNull() { sscsCaseData.setHmcHearingType(HmcHearingType.SUBSTANTIVE); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertNull(response.getData().getSelectNextHmcHearingType()); - assertNull(response.getData().getHmcHearingType()); } @Test @@ -800,7 +799,6 @@ void willWipeHmcHearingTypeIfSelectNextHmcHearingTypeIsNo() { sscsCaseData.getAppeal().setHearingOptions(HearingOptions.builder().hmcHearingType(HmcHearingType.SUBSTANTIVE).build()); final PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_SUBMIT, callback, USER_AUTHORISATION); assertEquals(NO, response.getData().getSelectNextHmcHearingType()); - assertNull(response.getData().getHmcHearingType()); assertNull(response.getData().getAppeal().getHearingOptions().getHmcHearingType()); } From 5dc23397fce75afea176518a41e6a620a390ca4b Mon Sep 17 00:00:00 2001 From: nilay Date: Tue, 21 Jan 2025 11:15:44 +0000 Subject: [PATCH 15/17] fix --- .../CaseEventToComplexTypes.json | 4 ++-- ...eEventToFields-writeAdjournmentNotice.json | 2 +- ...ventToFields-writeFinalDecisionNotice.json | 10 ++++----- .../DirectionIssuedAboutToStartHandler.java | 6 ++++-- ...irectionIssuedAboutToStartHandlerTest.java | 21 +++++++++++++++++-- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/definitions/benefit/sheets/CaseEventToComplexTypes/CaseEventToComplexTypes.json b/definitions/benefit/sheets/CaseEventToComplexTypes/CaseEventToComplexTypes.json index b52b4dcb18d..c53f92329ab 100644 --- a/definitions/benefit/sheets/CaseEventToComplexTypes/CaseEventToComplexTypes.json +++ b/definitions/benefit/sheets/CaseEventToComplexTypes/CaseEventToComplexTypes.json @@ -2311,7 +2311,7 @@ "DisplayContext": "READONLY", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 4, - "PageID": "hmcHearingType", + "PageID": "typeOfHearing", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "FieldShowCondition": "appeal.benefitType.code=\"childSupport\" OR appeal.benefitType.code=\"taxCredit\" OR appeal.benefitType.code=\"guardiansAllowance\" OR appeal.benefitType.code=\"taxFreeChildcare\" OR appeal.benefitType.code=\"homeResponsibilitiesProtection\" OR appeal.benefitType.code=\"childBenefit\" OR appeal.benefitType.code=\"thirtyHoursFreeChildcare\" OR appeal.benefitType.code=\"guaranteedMinimumPension\" OR appeal.benefitType.code=\"nationalInsuranceCredits\"" @@ -2324,7 +2324,7 @@ "DisplayContext": "MANDATORY", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 5, - "PageID": "hmcHearingType", + "PageID": "typeOfHearing", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "FieldShowCondition": "appeal.benefitType.code=\"childSupport\" OR appeal.benefitType.code=\"taxCredit\" OR appeal.benefitType.code=\"guardiansAllowance\" OR appeal.benefitType.code=\"taxFreeChildcare\" OR appeal.benefitType.code=\"homeResponsibilitiesProtection\" OR appeal.benefitType.code=\"childBenefit\" OR appeal.benefitType.code=\"thirtyHoursFreeChildcare\" OR appeal.benefitType.code=\"guaranteedMinimumPension\" OR appeal.benefitType.code=\"nationalInsuranceCredits\"" diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeAdjournmentNotice.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeAdjournmentNotice.json index 797267ed6fa..620708132e0 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeAdjournmentNotice.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeAdjournmentNotice.json @@ -43,7 +43,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 4, "PageFieldDisplayOrder": 1, - "PageID": "hmcHearingType", + "PageID": "typeOfHearing", "PageLabel": "Type of hearing", "PageShowCondition": "adjournCaseGenerateNotice = \"Yes\"", "ShowSummaryChangeOption": "Y" diff --git a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeFinalDecisionNotice.json b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeFinalDecisionNotice.json index 4e70839dde5..451c512cc32 100644 --- a/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeFinalDecisionNotice.json +++ b/definitions/benefit/sheets/CaseEventToFields/CaseEventToFields-writeFinalDecisionNotice.json @@ -60,7 +60,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 1, - "PageID": "hmcHearingType", + "PageID": "typeOfHearing", "PageLabel": "Type of hearing", "PageShowCondition": "writeFinalDecisionGenerateNotice = \"Yes\"", "ShowSummaryChangeOption": "Y" @@ -74,7 +74,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 2, - "PageID": "hmcHearingType", + "PageID": "typeOfHearing", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "RetainHiddenValue": "Yes" @@ -88,7 +88,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 3, - "PageID": "hmcHearingType", + "PageID": "typeOfHearing", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "RetainHiddenValue": "Yes" @@ -102,7 +102,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 3, - "PageID": "hmcHearingType", + "PageID": "typeOfHearing", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "RetainHiddenValue": "Yes" @@ -116,7 +116,7 @@ "LiveFrom": "01/01/2018", "PageDisplayOrder": 3, "PageFieldDisplayOrder": 4, - "PageID": "hmcHearingType", + "PageID": "typeOfHearing", "PageLabel": "Type of hearing", "ShowSummaryChangeOption": "Y", "RetainHiddenValue": "Yes" diff --git a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java index b394751c710..3a1d508b372 100644 --- a/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java +++ b/src/main/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandler.java @@ -54,8 +54,10 @@ public PreSubmitCallbackResponse handle(CallbackType callbackType, clearFields(sscsCaseData); setPartiesToSendLetter(sscsCaseData); - sscsCaseData.setSelectNextHmcHearingType(NO); - sscsCaseData.setHmcHearingType(null); + if (callbackType.equals(CallbackType.ABOUT_TO_START)) { + sscsCaseData.setSelectNextHmcHearingType(NO); + sscsCaseData.setHmcHearingType(null); + } return new PreSubmitCallbackResponse<>(sscsCaseData); } diff --git a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java index 978363b6b8e..5ee30a9ec26 100644 --- a/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java +++ b/src/test/java/uk/gov/hmcts/reform/sscs/ccd/presubmit/directionissued/DirectionIssuedAboutToStartHandlerTest.java @@ -5,6 +5,7 @@ import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.openMocks; import static uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType.ABOUT_TO_START; +import static uk.gov.hmcts.reform.sscs.ccd.callback.CallbackType.MID_EVENT; import static uk.gov.hmcts.reform.sscs.ccd.domain.DirectionType.*; import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.NO; import static uk.gov.hmcts.reform.sscs.ccd.domain.YesNo.YES; @@ -399,7 +400,7 @@ public void givenAValidCallbackType_NoAdditionalPartiesForOtherParty() { } @Test - public void givenNonDefaultSelectHmcHearingTypeNo_whenValue() { + public void givenNonDefaultSelectHmcHearingTypeNo_whenValueAboutToStart() { when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); sscsCaseData.setSelectNextHmcHearingType(YES); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); @@ -414,7 +415,7 @@ public void givenNonDefaultSelectHmcHearingTypeNo_whenValue() { } @Test - public void givenNullSelectHmcHearingTypeNo_whenNull() { + public void givenNullSelectHmcHearingTypeNo_whenNullAboutToStart() { when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); sscsCaseData.setSelectNextHmcHearingType(null); PreSubmitCallbackResponse response = handler.handle(ABOUT_TO_START, callback, USER_AUTHORISATION); @@ -427,4 +428,20 @@ public void givenNullSelectHmcHearingTypeNo_whenNull() { assertEquals(NO, response.getData().getSelectNextHmcHearingType()); assertNull(response.getData().getHmcHearingType()); } + + @Test + public void givenMidEvent_ThenDoesNotWipeHmcHearingTypeOrSelect() { + when(callback.getCaseDetails().getState()).thenReturn(State.WITH_DWP); + sscsCaseData.setSelectNextHmcHearingType(YES); + sscsCaseData.setHmcHearingType(HmcHearingType.DIRECTION_HEARINGS); + PreSubmitCallbackResponse response = handler.handle(MID_EVENT, callback, USER_AUTHORISATION); + List listOptions = new ArrayList<>(); + listOptions.add(new DynamicListItem(SEND_TO_LISTING.getCode(), SEND_TO_LISTING.getLabel())); + listOptions.add(new DynamicListItem(NO_FURTHER_ACTION.getCode(), NO_FURTHER_ACTION.getLabel())); + DynamicList expected = new DynamicList(new DynamicListItem("", ""), listOptions); + assertEquals(expected, response.getData().getExtensionNextEventDl()); + assertEquals(2, response.getData().getExtensionNextEventDl().getListItems().size()); + assertEquals(YES, response.getData().getSelectNextHmcHearingType()); + assertEquals(HmcHearingType.DIRECTION_HEARINGS, response.getData().getHmcHearingType()); + } } From f9f5ce1c73de408f6a02b6065d06690ee0800c91 Mon Sep 17 00:00:00 2001 From: nilay Date: Tue, 21 Jan 2025 11:24:09 +0000 Subject: [PATCH 16/17] fix --- definitions/benefit/sheets/FixedLists/FixedLists.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/definitions/benefit/sheets/FixedLists/FixedLists.json b/definitions/benefit/sheets/FixedLists/FixedLists.json index 63d2f5974af..49030fa0d18 100644 --- a/definitions/benefit/sheets/FixedLists/FixedLists.json +++ b/definitions/benefit/sheets/FixedLists/FixedLists.json @@ -917,6 +917,6 @@ {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remade", "ListElement": "Remade"}, {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "refused", "ListElement": "Refused"}, {"LiveFrom": "01/09/2021", "ID": "FL_actionSendToFirstTier", "ListElementCode": "remitted", "ListElement": "Remit from UT"}, - {"LiveFrom": "01/09/2021", "ID": "FL_hmcHearingType", "ListElementCode": "substantive", "ListElement": "Substantive"}, - {"LiveFrom": "01/09/2021", "ID": "FL_hmcHearingType", "ListElementCode": "direction", "ListElement": "Direction"} + {"LiveFrom": "01/09/2021", "ID": "FL_hmcHearingType", "ListElementCode": "BBA3-SUB", "ListElement": "Substantive"}, + {"LiveFrom": "01/09/2021", "ID": "FL_hmcHearingType", "ListElementCode": "BBA3-DIR", "ListElement": "Direction"} ] From b33a3f640bcc46d96de62952c19a3d0de90cf688 Mon Sep 17 00:00:00 2001 From: nilay Date: Tue, 21 Jan 2025 12:44:03 +0000 Subject: [PATCH 17/17] Trigger Build