Skip to content

Commit

Permalink
Merge pull request #189 from openstandia/MID-8400-for-support-4.4
Browse files Browse the repository at this point in the history
MID-8400 Fixed date search from GUI not being ge/le search (for support-4.4 branch)
  • Loading branch information
KaterynaHonchar committed Dec 19, 2022
2 parents 28936e5 + 5db7dda commit bd2c8f3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -628,20 +628,20 @@ private ObjectFilter createFilterForSearchValue(PropertySearchItem item, Display
if (((DateSearchItem) item).getFromDate() != null && ((DateSearchItem) item).getToDate() != null) {
return ctx.queryFor(ObjectType.class)
.item(path, propDef)
.gt(((DateSearchItem) item).getFromDate())
.ge(((DateSearchItem) item).getFromDate())
.and()
.item(path, propDef)
.lt(((DateSearchItem) item).getToDate())
.le(((DateSearchItem) item).getToDate())
.buildFilter();
} else if (((DateSearchItem) item).getFromDate() != null) {
return ctx.queryFor(ObjectType.class)
.item(path, propDef)
.gt(((DateSearchItem) item).getFromDate())
.ge(((DateSearchItem) item).getFromDate())
.buildFilter();
} else if (((DateSearchItem) item).getToDate() != null) {
return ctx.queryFor(ObjectType.class)
.item(path, propDef)
.lt(((DateSearchItem) item).getToDate())
.le(((DateSearchItem) item).getToDate())
.buildFilter();
} else {
return null;
Expand Down

0 comments on commit bd2c8f3

Please sign in to comment.