-
Feature Request
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
The following test case returns three tasks instead of two, due to the reason that expressions in OR queries are currently neither evaluated nor applied to the query:
@Test public void shouldReturnTwoTasks() { // given Date date = DateTimeUtil.now().plusDays(2).toDate(); Task task1 = taskService.newTask(); task1.setFollowUpDate(date); taskService.saveTask(task1); Task task2 = taskService.newTask(); task2.setDueDate(date); taskService.saveTask(task2); Task task3 = taskService.newTask(); taskService.saveTask(task3); // when List<Task> tasks = taskService.createTaskQuery() .or() .followUpAfterExpression("${ now() }") .dueAfterExpression("${ now() }") .endOr() .list(); // then assertEquals(2, tasks.size()); }