Skip to content

Commit

Permalink
DTSSTCI-921 (#1879)
Browse files Browse the repository at this point in the history
DTSSTCI-921: Fix date filter as lte is used for dates further in the past

Co-authored-by: Tom Elliott <tomelliott@Toms-MacBook-Pro.local>
  • Loading branch information
tomxelliott and Tom Elliott authored Aug 21, 2024
1 parent 9e2aa7b commit 9146506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void run() {
try {
final BoolQueryBuilder query = boolQuery()
.must(matchQuery("state", "DSS_Draft"))
.filter(rangeQuery("last_modified").gte(LocalDate.now().minusDays(30)));
.filter(rangeQuery("last_modified").lte(LocalDate.now().minusDays(30)));

final List<CaseDetails> inactiveCasesInDssDraftState =
ccdSearchService.searchForAllCasesWithQuery(query, user, serviceAuth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class SystemClearInactiveDssDraftCasesTaskTest {

private static final BoolQueryBuilder query = boolQuery()
.must(matchQuery("state", "DSS_Draft"))
.filter(rangeQuery("last_modified").gte(LocalDate.now().minusDays(30)));
.filter(rangeQuery("last_modified").lte(LocalDate.now().minusDays(30)));

@BeforeEach
void setUp() {
Expand Down

0 comments on commit 9146506

Please sign in to comment.