Skip to content

Commit

Permalink
IVYPORTAL-18125 Portal Tasks: Filtering on a custom field of type tim…
Browse files Browse the repository at this point in the history
…estamp delivers false data due to auto-enhancing the date-scope (#1302)

- Fixed bug
  • Loading branch information
lttung-axonivy authored Dec 13, 2024
1 parent e33889a commit 4e33aca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private void queryCreatedDate(CaseQuery query, Date from, Date to) {
}

if (to != null) {
subQuery.where().startTimestamp().isLowerOrEqualThan(DateUtils.addDays(to, 1));
subQuery.where().startTimestamp().isLowerThan(DateUtils.addDays(to, 1));
}
query.where().and(subQuery);
}
Expand Down Expand Up @@ -226,7 +226,7 @@ private CaseQuery applyFilter(ColumnModel column, String field, String configure
}

if (to != null) {
filterQuery.timestampField(field).isLowerOrEqualThan(DateUtils.addDays(to, 1));
filterQuery.timestampField(field).isLowerThan(DateUtils.addDays(to, 1));
}
} else if (column.isText()) {
queryTextField(filterQuery, field, configuredFilter);
Expand All @@ -250,7 +250,7 @@ private void queryFinishedDate(CaseQuery query, Date from, Date to) {
}

if (to != null) {
subQuery.where().endTimestamp().isLowerOrEqualThan(DateUtils.addDays(to, 1));
subQuery.where().endTimestamp().isLowerThan(DateUtils.addDays(to, 1));
}
query.where().and(subQuery);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void queryCreatedDate(TaskQuery query, Date from, Date to) {
}

if (to != null) {
subQuery.where().startTimestamp().isLowerOrEqualThan(DateUtils.addDays(to, 1));
subQuery.where().startTimestamp().isLowerThan(DateUtils.addDays(to, 1));
}
query.where().and(subQuery);
}
Expand All @@ -77,7 +77,7 @@ private void queryExpiryDate(TaskQuery query, Date from, Date to) {
}

if (to != null) {
subQuery.where().expiryTimestamp().isLowerOrEqualThan(DateUtils.addDays(to, 1));
subQuery.where().expiryTimestamp().isLowerThan(DateUtils.addDays(to, 1));
}
query.where().and(subQuery);
}
Expand Down Expand Up @@ -297,7 +297,7 @@ private TaskQuery applyFilter(ColumnModel column, String field, String configure
}

if (to != null) {
filterQuery.timestampField(field).isLowerOrEqualThan(DateUtils.addDays(to, 1));
filterQuery.timestampField(field).isLowerThan(DateUtils.addDays(to, 1));
}
} else if (column.isText()) {
queryTextField(filterQuery, field, configuredFilter);
Expand Down Expand Up @@ -335,7 +335,7 @@ private CaseQuery applyCaseFilter(ColumnModel column, String field, String confi
}

if (to != null) {
filterQuery.timestampField(field).isLowerOrEqualThan(DateUtils.addDays(to, 1));
filterQuery.timestampField(field).isLowerThan(DateUtils.addDays(to, 1));
}
} else if (column.isText()) {
queryCaseTextField(filterQuery, field, configuredFilter);
Expand Down

0 comments on commit 4e33aca

Please sign in to comment.