Skip to content

HDPI-4054 Adding caseManagementLocation as top level field#1570

Open
SachinPNaikHMCTS wants to merge 9 commits intomasterfrom
HDPI-4054-caseManagementLocation-b
Open

HDPI-4054 Adding caseManagementLocation as top level field#1570
SachinPNaikHMCTS wants to merge 9 commits intomasterfrom
HDPI-4054-caseManagementLocation-b

Conversation

@SachinPNaikHMCTS
Copy link
Copy Markdown
Contributor

Jira link

See PROJ-XXXXXX

Change description

Testing done

Security Vulnerability Assessment

CVE Suppression: Are there any CVEs present in the codebase (either newly introduced or pre-existing) that are being intentionally suppressed or ignored by this commit?

  • Yes
  • No

Checklist

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)
  • Does this PR introduce a breaking change

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 2026

CCD diff summary

👉 Full report: https://github.com/hmcts/pcs-api/actions/runs/23590769287?check_suite_focus=true

CaseField.json

RegularExpressionMaxSearchableMinFieldTypeParameterHintTextLabelIDFieldType
+
+
+
+
+
+
+CaseManagementLocation
+caseManagementLocationFormatted
+Text
+
+
+
+
+
+
+Region Id
+regionId
+Number

AuthorisationCaseField/caseworker-pcs.json

UserRoleCaseFieldIDCRUD
+caseworker-pcs
+caseManagementLocationFormatted
+CRUD

AuthorisationCaseField/caseworker-pcs-solicitor.json

UserRoleCaseFieldIDCRUD
+caseworker-pcs-solicitor
+caseManagementLocationFormatted
+CRUD

@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z bot requested a deployment to preview March 24, 2026 22:03 Abandoned
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z bot requested a deployment to preview March 24, 2026 22:12 Abandoned
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z bot requested a deployment to preview March 24, 2026 22:15 Abandoned
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z bot requested a deployment to preview March 24, 2026 22:18 Abandoned
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z bot requested a deployment to preview March 24, 2026 22:39 Abandoned
Copy link
Copy Markdown
Contributor

@tvr-hmcts tvr-hmcts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts.

Please check the formatting on the classes also.


@Component
@AllArgsConstructor
@Slf4j
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not used

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

claimant.getValue().getLastName())
.orElse(null));
.findFirst()
.map(ListValue<Party>::getValue)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be interred. Ok to keep if it helps others though I guess.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was done as part of review. #1496 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry ... typo ... I meant 'infered' ... Kinesis split keyboard pain.

private CaseNameHmctsFormatter caseNameHmctsFormatter;
private CaseNameHmctsView caseNameHmctsView;
@Mock
CaseManagementLocationView caseManagementLocationView;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}


private String getFormattedValue(final Integer region, final Integer epimsId) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final's not needed



private String getFormattedValue(final Integer region, final Integer epimsId) {
return String.format("{region:%s,baseLocation:%s}", region, epimsId);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure on this approach. Suspect it maybe fragile.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I didn't catch that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return "{region:%s,baseLocation:%s}".formatted(region, epimsId);

@Test
void shouldSetCaseManagementLocationField() {
// When
doNothing().when(caseManagementLocationView).setCaseManagementLocationField(any(PCSCase.class));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor - why is this needed? Isn't that the default behaviour?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

caseManagementLocationView is a Mock. So when setCaseManagementLocationField is called we wanted to inform mock to do nothing since its a void method.

}


private String getFormattedValue(final Integer region, final Integer epimsId) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know at this stage that the parameters are not null so you might as well make them primitive types.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@hmcts-jenkins-j-to-z
Copy link
Copy Markdown
Contributor

Plan Result (aat)

No changes. Your infrastructure matches the configuration.

*
* @param pcsCase The current case data
*/
public void setCaseManagementLocationField(final PCSCase pcsCase) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No direct tests on this method. However I see it is only called internally so it should - private or tested

Copy link
Copy Markdown
Contributor

@tvr-hmcts tvr-hmcts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The refactoring helped :) Though there are still some elements that can be changed up a bit.

Copy link
Copy Markdown
Contributor

@tvr-hmcts tvr-hmcts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just these two. One a minor naming and the other a clarification as to what I meant in my earlier comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants