Skip to content

Hdpi 6864 defence pack#1980

Merged
arun-hmcts merged 171 commits into
masterfrom
HDPI-6864_defence_pack
Jun 30, 2026
Merged

Hdpi 6864 defence pack#1980
arun-hmcts merged 171 commits into
masterfrom
HDPI-6864_defence_pack

Conversation

@arun-hmcts

@arun-hmcts arun-hmcts commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Jira link

https://tools.hmcts.net/jira/browse/HDPI-6864

Change description

Generates the defendant defence-form PDF and attaches it to the case so it's visible in Case File View and available for bulk-print distribution. Mirrors the claim-pack pipeline, reusing the shared formatter/mapper.

  • On defendant response submission (citizen path only — legal-rep submissions are out of scope), schedules generation after the response transaction commits (db-scheduler
    CustomTask, retries + exponential backoff), keyed per defendant response.
  • Builds the payload from the defendant's response: contact/identity, household circumstances, income & expenses, payment agreement, statement of truth, plus disputable
    fields — name, address, tenancy/notice details etc. resolved from the defendant's party_attribute_assertion (asserted value where present, else the claim baseline).
  • England & Wales — Wales-only rows (landlord registered/licensed, household detail rows) gated by country.
  • Income/expense row labels use the Cook design wording.
  • Imports the rendered PDF into STATEMENTS_OF_CASE, types it DocumentType.DEFENDANT_RESPONSE, links it non-owning on DefendantResponseEntity.submissionDocument (lifecycle
    owned by PcsCaseEntity.documents; FK ON DELETE SET NULL), and logs the outcome to claim_activity_log against the defendant party. Idempotent — skips if a submission
    document already exists.

Testing done

Locally tested

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?

  • [x ] 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

arun-hmcts and others added 30 commits May 18, 2026 10:52
…ORT enum values (out of scope for this branch)
…lar-expenses sections are hidden on the defence form
@arun-hmcts arun-hmcts added the enable_e2e_test Currently used to test the common e2e test call label Jun 28, 2026
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z Bot requested a deployment to preview June 29, 2026 19:40 Abandoned
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z Bot requested a deployment to preview June 29, 2026 19:54 Abandoned
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z Bot requested a deployment to preview June 29, 2026 20:10 Abandoned
@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z Bot requested a deployment to preview June 30, 2026 04:06 Abandoned
@arun-hmcts arun-hmcts merged commit 3ffa6d8 into master Jun 30, 2026
12 checks passed
@arun-hmcts arun-hmcts deleted the HDPI-6864_defence_pack branch June 30, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants