I can use expressions within OR queries

XMLWordPrintable

    • Type: Feature Request
    • Resolution: Fixed
    • Priority: L3 - Default
    • 7.8.0, 7.8.0-alpha2
    • Affects Version/s: None
    • Component/s: engine
    • 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());
      }
      

        This is the controller panel for Smart Panels app

              Assignee:
              Unassigned
              Reporter:
              Tassilo Weidner-Mühl
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: