Skip to content

Commit

Permalink
add states to evidence upload check
Browse files Browse the repository at this point in the history
  • Loading branch information
drummondjm committed Sep 19, 2024
1 parent bad4c64 commit 4ae1128
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import static org.elasticsearch.index.query.QueryBuilders.boolQuery;
import static org.elasticsearch.index.query.QueryBuilders.matchQuery;
import static org.elasticsearch.index.query.QueryBuilders.rangeQuery;
import static uk.gov.hmcts.reform.civil.enums.CaseState.All_FINAL_ORDERS_ISSUED;
import static uk.gov.hmcts.reform.civil.enums.CaseState.CASE_PROGRESSION;
import static uk.gov.hmcts.reform.civil.enums.CaseState.DECISION_OUTCOME;
import static uk.gov.hmcts.reform.civil.enums.CaseState.HEARING_READINESS;
import static uk.gov.hmcts.reform.civil.enums.CaseState.PREPARE_FOR_HEARING_CONDUCT_HEARING;

Expand All @@ -31,6 +33,8 @@ public Query query(int startIndex) {
.minimumShouldMatch(1)
.should(beState(PREPARE_FOR_HEARING_CONDUCT_HEARING))
.should(beState(HEARING_READINESS))
.should(beState(DECISION_OUTCOME))
.should(beState(All_FINAL_ORDERS_ISSUED))
.should(beState(CASE_PROGRESSION)))
.must(boolQuery()
.minimumShouldMatch(1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ protected Query buildQuery(int fromValue) {
.minimumShouldMatch(1)
.should(boolQuery().must(matchQuery("state", "PREPARE_FOR_HEARING_CONDUCT_HEARING")))
.should(boolQuery().must(matchQuery("state", "HEARING_READINESS")))
.should(boolQuery().must(matchQuery("state", "DECISION_OUTCOME")))
.should(boolQuery().must(matchQuery("state", "All_FINAL_ORDERS_ISSUED")))
.should(boolQuery().must(matchQuery("state", "CASE_PROGRESSION"))))
.must(boolQuery()
.minimumShouldMatch(1)
Expand Down

0 comments on commit 4ae1128

Please sign in to comment.