Skip to content

Hdpi 7368 - #2379

Open
gergelykisshmcts wants to merge 65 commits into
masterfrom
HDPI-7368
Open

Hdpi 7368#2379
gergelykisshmcts wants to merge 65 commits into
masterfrom
HDPI-7368

Conversation

@gergelykisshmcts

Copy link
Copy Markdown
Contributor

Jira link

See HDPI-7368

Change description

Adds the Case Flags v2.1 Request Support and Manage Support journeys for external users in Manage Cases.

External users can view external support flags across the case, while creating and managing support is restricted to their own party or side.

Claimant and defendant parties are supported. The previous defendant-only behaviour in the internal Case Flags journey has also been corrected so claimant support can be recorded by internal users.

Added a separate external party support model so the external journey only exposes the support data it needs and does not expose the internal Party model or internal-only flags.

Updated party flag mapping to use party IDs rather than collection order.
Added organisation-name handling for organisation claimants.
Added validation for malformed or unknown party IDs.
Added hearing centre admin and team leader history visibility for the new events.
Separated the internal Case Flags update path from the external support update path so the two flag collections cannot overwrite each other.
Removed unused external event configuration and renamed the new external flag field to reflect that it applies to parties rather than defendants only.

Includes database and CCD configuration updates.

IMPORTANT: the PR BUILDS ON #2335 branch not yet in master!

Testing done

Unit tests and integration tests pass.
checkstyleMain and checkstyleTest pass.

Security Vulnerability Assessment

  • 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

PCS checklist

  • New functional test classes carry the gating annotations (@EnabledIfEnvironmentVariable(named = "CCD_ENABLED", ...) + shutter guard) unless they must run on unlabelled PRs (HDPI-8084)
  • Infrastructure / chart / suppression changes have a second pair of eyes from the service admins (HDPI-8153)

gksolirius and others added 6 commits August 4, 2026 14:53
…e else with a migration already applied: master had reached V006, and this branch's migration was V004, so two V004s would have collided and made Flyway refuse to start. Renamed mine to V007__add_case_flag_visibility.sql. Full unit, checkstyle and DB integration runs are green post-merge, and the regenerated definition still shows both v2.1 display context parameters and all ten pre-condition states.
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

DB breaking change scan

Recommended reading: HMCTS zero-downtime database deployments

No potentially breaking database changes were detected in the changed Flyway migration .sql files.

This check only scans changed .sql files under src/main/resources/db/migration and flags high-risk DDL patterns. It does not replace a full migration review.

Run details: https://github.com/hmcts/pcs-api/actions/runs/32510006855?check_suite_focus=true

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

CCD diff summary

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

AuthorisationCaseState.json

UserRoleCaseStateIDCRUD
+[CLAIMANTSOLICITOR]
+ALL_FINAL_ORDERS_ISSUED
+CRU
+citizen
+ALL_FINAL_ORDERS_ISSUED
+CRU
+[CLAIMANTSOLICITOR]
+BREATHING_SPACE
+CRU
+citizen
+BREATHING_SPACE
+CRU
+[CLAIMANTSOLICITOR]
+CASE_ISSUED
+CRU
+citizen
+CASE_ISSUED
+CRU
+[CLAIMANTSOLICITOR]
+CASE_PROGRESSION
+CRU
+citizen
+CASE_PROGRESSION
+CRU
+[CLAIMANTSOLICITOR]
+CASE_STAYED
+CRU
+citizen
+CASE_STAYED
+CRU
+[CLAIMANTSOLICITOR]
+DECISION_OUTCOME
+CRU
+citizen
+DECISION_OUTCOME
+CRU
+[CLAIMANTSOLICITOR]
+HEARING_READINESS
+CRU
+citizen
+HEARING_READINESS
+CRU
+[CLAIMANTSOLICITOR]
+JUDICIAL_REFERRAL
+CRU
+citizen
+JUDICIAL_REFERRAL
+CRU
+[CLAIMANTSOLICITOR]
+PENDING_CASE_ISSUED
+CRU
+[CLAIMANTSOLICITOR]
+PREPARE_FOR_HEARING_CONDUCT_HEARING
+CRU
+citizen
+PREPARE_FOR_HEARING_CONDUCT_HEARING
+CRU

[DEFENDANT]

PENDING_CASE_ISSUED

-R 
+CRU

CaseField.json

MinRegularExpressionMaxSearchableHintTextFieldTypeParameterLabelIDFieldType
+
+
+
+
+
+PartySupport
+Party support
+partySupport
+Collection

AuthorisationCaseEvent/AuthorisationCaseEvent.json

UserRoleCaseEventIDCRUD
+[CLAIMANTSOLICITOR]
+manageSupport
+CRU
+[DEFENDANTSOLICITOR]
+manageSupport
+CRU
+[DEFENDANT]
+manageSupport
+CRU
+caseworker-pcs-solicitor
+manageSupport
+CRU
+circuit-judge
+manageSupport
+R
+citizen
+manageSupport
+CRU
+ctsc
+manageSupport
+R
+ctsc-team-leader
+manageSupport
+R
+fee-paid-judge
+manageSupport
+R
+hearing-centre-admin
+manageSupport
+R
+hearing-centre-team-leader
+manageSupport
+R
+judge
+manageSupport
+R
+leadership-judge
+manageSupport
+R
+wlu-admin
+manageSupport
+R
+wlu-team-leader
+manageSupport
+R
+[CLAIMANTSOLICITOR]
+requestSupport
+CRU
+[DEFENDANTSOLICITOR]
+requestSupport
+CRU
+[DEFENDANT]
+requestSupport
+CRU
+caseworker-pcs-solicitor
+requestSupport
+CRU
+circuit-judge
+requestSupport
+R
+citizen
+requestSupport
+CRU
+ctsc
+requestSupport
+R
+ctsc-team-leader
+requestSupport
+R
+fee-paid-judge
+requestSupport
+R
+hearing-centre-admin
+requestSupport
+R
+hearing-centre-team-leader
+requestSupport
+R
+judge
+requestSupport
+R
+leadership-judge
+requestSupport
+R
+wlu-admin
+requestSupport
+R
+wlu-team-leader
+requestSupport
+R

AuthorisationCaseField/wlu-team-leader.json

UserRoleCaseFieldIDCRUD
+wlu-team-leader
+flagLauncherExternal
+R
+wlu-team-leader
+partySupport
+RD

AuthorisationCaseField/wlu-admin.json

UserRoleCaseFieldIDCRUD
+wlu-admin
+partySupport
+RD

AuthorisationCaseField/leadership-judge.json

UserRoleCaseFieldIDCRUD
+leadership-judge
+partySupport
+RD

AuthorisationCaseField/judge.json

UserRoleCaseFieldIDCRUD
+judge
+partySupport
+RD

AuthorisationCaseField/hearing-centre-team-leader.json

UserRoleCaseFieldIDCRUD
+hearing-centre-team-leader
+flagLauncherExternal
+R
+hearing-centre-team-leader
+partySupport
+RD

AuthorisationCaseField/hearing-centre-admin.json

UserRoleCaseFieldIDCRUD
+hearing-centre-admin
+partySupport
+RD

AuthorisationCaseField/fee-paid-judge.json

UserRoleCaseFieldIDCRUD
+fee-paid-judge
+partySupport
+RD

AuthorisationCaseField/ctsc.json

UserRoleCaseFieldIDCRUD
+ctsc
+partySupport
+RD

AuthorisationCaseField/ctsc-team-leader.json

UserRoleCaseFieldIDCRUD
+ctsc-team-leader
+flagLauncherExternal
+R
+ctsc-team-leader
+partySupport
+RD

AuthorisationCaseField/citizen.json

UserRoleCaseFieldIDCRUD
+citizen
+Case details
+R
+citizen
+Case parties
+R
+citizen
+Claimant details
+R
+citizen
+Defendant details
+R
+citizen
+Demotion of tenancy
+R
+citizen
+Documents you've uploaded
+R
+citizen
+Notice
+R
+citizen
+Occupation contract or licence
+R
+citizen
+Prohibited conduct standard contract
+R
+citizen
+Rent arrears
+R
+citizen
+Required Documents
+R
+citizen
+Summary
+R
+citizen
+Suspension of right to buy
+R
+citizen
+Tenancy or occupation contract or licence
+R
+citizen
+Underlessee or mortgagee
+R
+citizen
+caseNameHmctsInternal
+R
+citizen
+caseTitleMarkdown
+R
+citizen
+claimantNames
+R
+citizen
+confirmEvictionSummaryMarkup
+R
+citizen
+confirmEvictionSummaryMarkupLabel
+R
+citizen
+dashboardData
+R
+citizen
+dateIssuedString
+R
+citizen
+defendantNames
+R
+citizen
+featureFlags
+R
+citizen
+flagLauncherExternal
+CRU
+citizen
+nextStepsMarkdown
+R
+citizen
+nextStepsMarkdownLabel
+R
+citizen
+partySupport
+CRUD
+citizen
+postCode
+R
+citizen
+summaryLegalRepresentativeMarkdown
+R
+citizen
+summaryLegalRepresentativeMarkdownLabel
+R

AuthorisationCaseField/circuit-judge.json

UserRoleCaseFieldIDCRUD
+circuit-judge
+partySupport
+RD

AuthorisationCaseField/caseworker-pcs-solicitor.json

UserRoleCaseFieldIDCRUD
+caseworker-pcs-solicitor
+flagLauncherExternal
+CRU
+caseworker-pcs-solicitor
+partySupport
+CRUD

AuthorisationCaseField/DEFENDANTSOLICITOR.json

UserRoleCaseFieldIDCRUD
+[DEFENDANTSOLICITOR]
+partySupport
+CRUD

AuthorisationCaseField/DEFENDANT.json

UserRoleCaseFieldIDCRUD
+[DEFENDANT]
+flagLauncherExternal
+CRU
+[DEFENDANT]
+partySupport
+CRUD

AuthorisationCaseField/CLAIMANTSOLICITOR.json

UserRoleCaseFieldIDCRUD
+[CLAIMANTSOLICITOR]
+caseNameHmctsInternal
+R
+[CLAIMANTSOLICITOR]
+caseTitleMarkdown
+R
+[CLAIMANTSOLICITOR]
+claimantNames
+R
+[CLAIMANTSOLICITOR]
+dashboardData
+R
+[CLAIMANTSOLICITOR]
+dateIssuedString
+R
+[CLAIMANTSOLICITOR]
+defendantNames
+R
+[CLAIMANTSOLICITOR]
+featureFlags
+R
+[CLAIMANTSOLICITOR]
+nextStepsMarkdown
+R
+[CLAIMANTSOLICITOR]
+nextStepsMarkdownLabel
+R
+[CLAIMANTSOLICITOR]
+partySupport
+CRUD
+[CLAIMANTSOLICITOR]
+postCode
+R

CaseEvent/requestSupport.json

DescriptionEndButtonLabelIDNamePostConditionStatePreConditionState(s)PublishShowEventNotesShowSummary
+To request support
+Submit
+requestSupport
+Request support
+*
+ALL_FINAL_ORDERS_ISSUED;BREATHING_SPACE;CASE_ISSUED;CASE_PROGRESSION;CASE_STAYED;DECISION_OUTCOME;HEARING_READINESS;JUDICIAL_REFERRAL;PENDING_CASE_ISSUED;PREPARE_FOR_HEARING_CONDUCT_HEARING
+N
+N
+Y

CaseEvent/manageSupport.json

DescriptionEndButtonLabelIDNamePostConditionStatePreConditionState(s)PublishShowEventNotesShowSummary
+To manage support
+Submit
+manageSupport
+Manage support
+*
+ALL_FINAL_ORDERS_ISSUED;BREATHING_SPACE;CASE_ISSUED;CASE_PROGRESSION;CASE_STAYED;DECISION_OUTCOME;HEARING_READINESS;JUDICIAL_REFERRAL;PENDING_CASE_ISSUED;PREPARE_FOR_HEARING_CONDUCT_HEARING
+N
+N
+Y

ComplexTypes/4_Party.json

RetainHiddenValueFieldTypeParameterListElementCodeIDFieldTypeElementLabel
+Y
+
+partyFlagsExternal
+Party
+Flags
+Party Flags (external)
-Y
-
-defendantFlagsExternal
-Party
-Flags
-Party Flags (external)

ComplexTypes/PartySupport.json

ElementLabelFieldTypeIDListElementCodeRetainHiddenValue
+Support
+Flags
+PartySupport
+supportFlags
+Y

CaseEventToFields/requestSupport.json

CaseEventIDCaseFieldIDDisplayContextDisplayContextParameterPageColumnNumberPageDisplayOrderPageFieldDisplayOrderPageIDPageLabelShowSummaryChangeOption
+requestSupport
+flagLauncherExternal
+OPTIONAL
+#ARGUMENT(CREATE,EXTERNAL)
+1
+1
+3
+externalCaseFlag
+Request support
+Y
+requestSupport
+partySupport
+OPTIONAL
+[STATE]="NEVER_SHOW"
+1
+1
+1
+externalCaseFlag
+Request support
+Y
+Y

CaseEventToFields/manageSupport.json

CaseEventIDCaseFieldIDDisplayContextDisplayContextParameterPageColumnNumberPageDisplayOrderPageFieldDisplayOrderPageIDPageLabelShowSummaryChangeOption
+manageSupport
+flagLauncherExternal
+OPTIONAL
+#ARGUMENT(UPDATE,EXTERNAL)
+1
+1
+3
+externalCaseFlag
+Manage support
+Y
+manageSupport
+partySupport
+OPTIONAL
+[STATE]="NEVER_SHOW"
+1
+1
+1
+externalCaseFlag
+Manage support
+Y
+Y

CaseTypeTab/93_supportcitizen.json

CaseFieldIDChannelDisplayContextParameterTabDisplayOrderTabFieldDisplayOrderTabIDTabLabelTabShowConditionUserRole
+flagLauncherExternal
+CaseWorker
+#ARGUMENT(READ,EXTERNAL)
+93
+1
+supportcitizen
+Support
+[STATE]!="AWAITING_SUBMISSION_TO_HMCTS"
+citizen
+partySupport
+CaseWorker
+#ARGUMENT(Flags)
+flagLauncherExternal!=""
+93
+2
+supportcitizen
+Support
+

CaseTypeTab/92_supportcaseworker-pcs-solicitor.json

CaseFieldIDChannelDisplayContextParameterTabDisplayOrderTabFieldDisplayOrderTabIDTabLabelTabShowConditionUserRole
+flagLauncherExternal
+CaseWorker
+#ARGUMENT(READ,EXTERNAL)
+92
+1
+supportcaseworker-pcs-solicitor
+Support
+[STATE]!="AWAITING_SUBMISSION_TO_HMCTS"
+caseworker-pcs-solicitor
+partySupport
+CaseWorker
+#ARGUMENT(Flags)
+flagLauncherExternal!=""
+92
+2
+supportcaseworker-pcs-solicitor
+Support
+

CaseTypeTab/91_support[DEFENDANT].json

CaseFieldIDChannelDisplayContextParameterTabDisplayOrderTabFieldDisplayOrderTabIDTabLabelTabShowConditionUserRole
+flagLauncherExternal
+CaseWorker
+#ARGUMENT(READ,EXTERNAL)
+91
+1
+support[DEFENDANT]
+Support
+[STATE]!="AWAITING_SUBMISSION_TO_HMCTS"
+[DEFENDANT]
+partySupport
+CaseWorker
+#ARGUMENT(Flags)
+flagLauncherExternal!=""
+91
+2
+support[DEFENDANT]
+Support
+

@tvr-hmcts tvr-hmcts left a 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.

This is looking cool. I've added some comments over missing path tests mainly.

Comment thread src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/CaseFlagService.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/CaseFlagService.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/CaseFlagService.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/CaseFlagService.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/pcs/ccd/view/CaseFlagsView.java Outdated
Comment thread src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/PcsCaseService.java Outdated
# Conflicts:
#	src/main/java/uk/gov/hmcts/reform/pcs/ccd/PCSCaseView.java
#	src/test/java/uk/gov/hmcts/reform/pcs/ccd/PCSCaseViewTest.java
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.