Skip to content

Commit fc33a6d

Browse files
committed
SSCS-10722 Ensure at least appellant or appointee postcode exits.
1 parent 4f00ec5 commit fc33a6d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/processor/src/main/java/uk/gov/hmcts/reform/migration/queries/CcdElasticSearchQueries.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public static SearchSourceBuilder fetchAllUnsetCaseAccessManagementFieldsCasesQu
4141

4242
public static BoolQueryBuilder unsetCaseAccessManagementFieldsQuery() {
4343
return QueryBuilders.boolQuery()
44+
.must(QueryBuilders.boolQuery()
45+
.should(existsQuery("data.appeal.appellant.address.postcode"))
46+
.should(existsQuery("data.appeal.appellant.appointee.address.postcode"))
47+
.minimumShouldMatch(1))
4448
.mustNot(
4549
QueryBuilders.boolQuery()
4650
.should(existsQuery("data.CaseAccessCategory"))

0 commit comments

Comments
 (0)