diff --git a/ccd-config-generator/src/main/java/uk/gov/hmcts/ccd/sdk/generator/SearchFieldAndResultGenerator.java b/ccd-config-generator/src/main/java/uk/gov/hmcts/ccd/sdk/generator/SearchFieldAndResultGenerator.java index 835343ca..027a50ba 100644 --- a/ccd-config-generator/src/main/java/uk/gov/hmcts/ccd/sdk/generator/SearchFieldAndResultGenerator.java +++ b/ccd-config-generator/src/main/java/uk/gov/hmcts/ccd/sdk/generator/SearchFieldAndResultGenerator.java @@ -43,8 +43,9 @@ protected static void generateFields( result.add(map); } } + Path output = Paths.get(root.getPath(), fileName + ".json"); - JsonUtils.mergeInto(output, result, new AddMissing(), "CaseFieldID"); + JsonUtils.mergeInto(output, result, new AddMissing(), "CaseFieldID", "UserRole"); } protected static Map buildField(String caseType, String fieldId, String label, int displayOrder, diff --git a/ccd-config-generator/src/test/java/uk/gov/hmcts/reform/fpl/CCDConfig.java b/ccd-config-generator/src/test/java/uk/gov/hmcts/reform/fpl/CCDConfig.java index 7a969715..31161c9f 100644 --- a/ccd-config-generator/src/test/java/uk/gov/hmcts/reform/fpl/CCDConfig.java +++ b/ccd-config-generator/src/test/java/uk/gov/hmcts/reform/fpl/CCDConfig.java @@ -191,6 +191,7 @@ private void buildSearchInputFields() { .field(CaseData::getCaseName, "Case name") .field(CaseData::getFamilyManCaseNumber, "FamilyMan case number") .field(CaseData::getDateOfIssue, "Date of Issue", HMCTS_ADMIN) + .field(CaseData::getDateOfIssue, "Date of Issue", LOCAL_AUTHORITY) .field("hearingPreferencesWelsh", "Is in Welsh") .caseReferenceField() .field("allocatedJudge", "Allocated Judge", "judgeTitle", "hearingPreferencesWelsh=\"no\"") @@ -220,6 +221,7 @@ private void buildWorkBasketInputFields() { .field(CaseData::getCaseName, "Case name") .field(CaseData::getFamilyManCaseNumber, "FamilyMan case number") .field(CaseData::getHearingDetails, "Hearing Details", LOCAL_AUTHORITY) + .field(CaseData::getHearingDetails, "Hearing Details", HMCTS_ADMIN) .field("hearingPreferencesWelsh", "Is in Welsh") .caseReferenceField() .field(CaseData::getDateSubmitted, "Date submitted", "", "#DATETIMEDISPLAY(d MMMM yyyy)") diff --git a/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/AuthorisationCaseField/caseworker-publiclaw-courtadmin.json b/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/AuthorisationCaseField/caseworker-publiclaw-courtadmin.json index 0d6f121a..c42f6334 100644 --- a/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/AuthorisationCaseField/caseworker-publiclaw-courtadmin.json +++ b/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/AuthorisationCaseField/caseworker-publiclaw-courtadmin.json @@ -27,6 +27,13 @@ "LiveFrom": "01/01/2017", "CaseFieldID": "standardDirectionOrder" }, + { + "CRUD": "R", + "CaseTypeID": "CARE_SUPERVISION_EPO", + "UserRole": "caseworker-publiclaw-courtadmin", + "LiveFrom": "01/01/2017", + "CaseFieldID": "hearingDetails" + }, { "CRUD": "R", "CaseTypeID": "CARE_SUPERVISION_EPO", diff --git a/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/AuthorisationCaseField/caseworker-publiclaw-solicitor.json b/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/AuthorisationCaseField/caseworker-publiclaw-solicitor.json index ea331d03..e68f3895 100644 --- a/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/AuthorisationCaseField/caseworker-publiclaw-solicitor.json +++ b/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/AuthorisationCaseField/caseworker-publiclaw-solicitor.json @@ -76,6 +76,13 @@ "LiveFrom": "01/01/2017", "CaseFieldID": "allocatedJudgeLabel" }, + { + "CRUD" : "R", + "CaseTypeID" : "CARE_SUPERVISION_EPO", + "UserRole" : "caseworker-publiclaw-solicitor", + "LiveFrom" : "01/01/2017", + "CaseFieldID" : "dateOfIssue" + }, { "CRUD": "CR", "CaseTypeID": "CARE_SUPERVISION_EPO", diff --git a/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/SearchInputFields.json b/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/SearchInputFields.json index 38abf2d0..0dc5aaaa 100644 --- a/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/SearchInputFields.json +++ b/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/SearchInputFields.json @@ -27,6 +27,13 @@ "UserRole" : "caseworker-publiclaw-courtadmin", "Label" : "Date of Issue" }, + { + "LiveFrom" : "01/01/2017", + "CaseTypeID" : "CARE_SUPERVISION_EPO", + "CaseFieldID" : "dateOfIssue", + "UserRole" : "caseworker-publiclaw-solicitor", + "Label" : "Date of Issue" + }, { "LiveFrom": "01/01/2017", "CaseTypeID": "CARE_SUPERVISION_EPO", diff --git a/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/WorkBasketInputFields.json b/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/WorkBasketInputFields.json index c9700b99..f62d417a 100644 --- a/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/WorkBasketInputFields.json +++ b/ccd-config-generator/src/test/resources/CARE_SUPERVISION_EPO/WorkBasketInputFields.json @@ -20,6 +20,13 @@ "UserRole" : "caseworker-publiclaw-solicitor", "Label" : "Hearing Details" }, + { + "LiveFrom" : "01/01/2017", + "CaseTypeID" : "CARE_SUPERVISION_EPO", + "CaseFieldID" : "hearingDetails", + "UserRole" : "caseworker-publiclaw-courtadmin", + "Label" : "Hearing Details" + }, { "LiveFrom": "01/01/2017", "CaseTypeID": "CARE_SUPERVISION_EPO",