Sql bug with task query when using OR statement

Description

In fact this issue affects version 5.16.1, since it is related to the new feature of OR statement.
If I use
taskService.createTaskQuery().taskVariableValueEquals("applicationNo", "XXXXX").list();
or
taskService.createTaskQuery().processVariableValueEquals("applicationNo", "XXXXX").list();
both will return a nonempty task list.
But if I want to query all tasks related to a certain application by using the following
taskService.createTaskQuery().or().taskVariableValueEquals("applicationNo", "XXXXX").processVariableValueEquals("applicationNo", "XXXXX").endOr().list();
I would get an empty task list.

I guess it may because of task query use 'inner join' between ACT_RU_TASK and ACT_RU_VARIABLE when handling "orQueryObject.queryVariableValues" in Task.xml

Environment

None

Assignee

Joram Barrez

Reporter

Thomas Young

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure