Skip to content

Hdpi 3764 income expenditure backend#1568

Open
arun-hmcts wants to merge 21 commits intomasterfrom
HDPI-3764-income-expenditure-backend
Open

Hdpi 3764 income expenditure backend#1568
arun-hmcts wants to merge 21 commits intomasterfrom
HDPI-3764-income-expenditure-backend

Conversation

@arun-hmcts
Copy link
Copy Markdown
Contributor

@arun-hmcts arun-hmcts commented Mar 24, 2026

Jira link

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

Change description

Adds regular income tracking fields
(income from jobs, pension, universal credit, other benefits, money from
elsewhere) to household circumstances for defendant possession claim
responses, with amount and frequency details for each income source.
Includes database migrations, domain/entity models, and comprehensive test
coverage for both draft save and final submit workflows, following proper
naming conventions and money field handling.

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?

  • 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/23658646728?check_suite_focus=true

ComplexTypes/1_HouseholdCircumstances.json

ListElementCodeIDFieldTypeElementLabel
+shareIncomeExpenseDetails
+HouseholdCircumstances
+YesOrNo
+ 
+incomeFromJobs
+HouseholdCircumstances
+YesOrNo
+ 
+incomeFromJobsAmount
+HouseholdCircumstances
+MoneyGBP
+ 
+incomeFromJobsFrequency
+HouseholdCircumstances
+FixedRadioList
+ 
+IncomeFrequency
+pension
+HouseholdCircumstances
+YesOrNo
+ 
+pensionAmount
+HouseholdCircumstances
+MoneyGBP
+ 
+pensionFrequency
+HouseholdCircumstances
+FixedRadioList
+ 
+IncomeFrequency
+universalCredit
+HouseholdCircumstances
+YesOrNo
+ 
+ucApplicationDate
+HouseholdCircumstances
+Date
+ 
+universalCreditAmount
+HouseholdCircumstances
+MoneyGBP
+ 
+universalCreditFrequency
+HouseholdCircumstances
+FixedRadioList
+ 
+IncomeFrequency
+otherBenefits
+HouseholdCircumstances
+YesOrNo
+ 
+otherBenefitsAmount
+HouseholdCircumstances
+MoneyGBP
+ 
+otherBenefitsFrequency
+HouseholdCircumstances
+FixedRadioList
+ 
+IncomeFrequency
+moneyFromElsewhere
+HouseholdCircumstances
+YesOrNo
+ 
+moneyFromElsewhereDetails
+HouseholdCircumstances
+Text
+ 

FixedLists/IncomeFrequency.json

IDListElementListElementCode
+IncomeFrequency
+Monthly
+MONTHLY
+IncomeFrequency
+Weekly
+WEEKLY

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

Plan Result (aat)

No changes. Your infrastructure matches the configuration.

@hmcts-jenkins-j-to-z hmcts-jenkins-j-to-z bot requested a deployment to preview March 24, 2026 22:02 Abandoned
private BigDecimal pensionAmount;

@CCD
private String pensionFrequency;
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.

I think these frequency fields should be enum types if possible, (here and in the entity).

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.

Done

ADD COLUMN universal_credit_amount DECIMAL(18,2);

ALTER TABLE household_circumstances
ADD COLUMN universal_credit_frequency VARCHAR(60);
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 - did these column sizes come from the data model? If I'm reading the ticket correctly these would just be "WEEK" or "MONTH" so 60 characters seems a bit much.

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.

Done

/**
* Enum representing the frequency of income and benefit payments.
*/
public enum IncomeFrequency implements HasLabel {
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.

maybe rename the enum to just 'Frequency' or something more generic? so this enum can be used for both the regular income and regular expenses.

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.

4 participants