Hdpi 5213 confirm eviction update data model#1583
Open
Conversation
…ion` table to store confirmed eviction details.
…risk profile with physical description fields.
…213-Confirm-eviction-Update-data-model # Conflicts: # src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/enforcetheorder/EnforcementOrderService.java
… replace case‑not‑found exception with clearer IllegalStateException. Update migration V067.
…213-Confirm-eviction-Update-data-model # Conflicts: # src/main/java/uk/gov/hmcts/reform/pcs/ccd/service/enforcetheorder/EnforcementOrderService.java # src/test/java/uk/gov/hmcts/reform/pcs/ccd/service/enforcetheorder/EnforcementOrderServiceTest.java
…213-Confirm-eviction-Update-data-model
…ename `hasUnavaliableDates` to `hasUnavailableDates`. Simplify `retrieveEnforcementOrderEntity` to return first order or null. Update migration V071 to include `enf_unavailable_date` and adjust schema. Remove obsolete tests and add new ones for the updated model.
…213-Confirm-eviction-Update-data-model
CCD diff summary👉 Full report: https://github.com/hmcts/pcs-api/actions/runs/23808139613?check_suite_focus=true No change |
…213-Confirm-eviction-Update-data-model
… change confirmEviction to only require caseReference, return an empty set instead of null, simplify enforcement order retrieval. Update related tests accordingly.
…213-Confirm-eviction-Update-data-model
toby-plunkett
approved these changes
Mar 27, 2026
guygrewal77
reviewed
Mar 27, 2026
...n/java/uk/gov/hmcts/reform/pcs/ccd/repository/enforcetheorder/ConfirmEvictionRepository.java
Outdated
Show resolved
Hide resolved
guygrewal77
reviewed
Mar 27, 2026
src/main/java/uk/gov/hmcts/reform/pcs/ccd/entity/enforcetheorder/ConfirmEvictionEntity.java
Outdated
Show resolved
Hide resolved
guygrewal77
reviewed
Mar 27, 2026
| Set<EnforcementOrderEntity> enforcementEntitySet = claimEntity.getEnforcementOrders(); | ||
| if (CollectionUtils.isEmpty(enforcementEntitySet)) { | ||
| Set<EnforcementOrderEntity> enforcementEntitySet = getEnforcementOrderEntities(caseReference); | ||
| if (enforcementEntitySet == null) { |
Contributor
There was a problem hiding this comment.
Need test case for empty enforcement cases scenarios
Contributor
Author
There was a problem hiding this comment.
Aleady is one - shouldReturnNullIfNotFoundInDatabase()
Contributor
There was a problem hiding this comment.
The code below - isn't getting hit
if (enforcementOrders.isEmpty()) {
return null;
}
guygrewal77
reviewed
Mar 27, 2026
…213-Confirm-eviction-Update-data-model
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://tools.hmcts.net/jira/browse/HDPI-5213
Introduces the ability to confirm an eviction against an existing enforcement order, including persistence of eviction details and unavailable dates.
NOTE: Does not cover the Statement of Work at this time.
New ConfirmEvictionEntity and UnavailableDateEntity JPA entities with a one-to-many relationship for tracking dates the party is unavailable for eviction
New ConfirmEvictionRepository for persistence
Flyway migration creating enf_confirm_eviction and enf_unavailable_date tables, plus two new columns on enf_risk_profile
EnforcementOrderService additions: confirmEviction() method with mapping logic, and a new getClaimEntity() helper that throws IllegalStateException when no claim exists (for the save path)