Bug 1266553 - TaskQueryBuilder tests failing - missing expression
TaskQueryBuilder tests failing - missing expression
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
Unspecified Unspecified
urgent Severity high
: ER5
: 6.2.0
Assigned To: Shelly McGowan
Tibor Zimanyi
Depends On:
  Show dependency treegraph
Reported: 2015-09-25 11:17 EDT by Tibor Zimanyi
Modified: 2016-09-20 01:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tibor Zimanyi 2015-09-25 11:17:17 EDT
Description of problem: 

Test TaskQueryBuilderCoverageTest.taskQueryBuilderCoverageTest, which is located in module jbpm-human-task fails when executed on supported production DB systems. Exception thrown on Oracle 11gR2 is here: [1]. 

When tested with hibernate.show_sql=true property, it fails on this SQL statement: [2].

The problem is related to empty "IN" clauses. E.g. OR organizati2_.id IN (). 
The solution can be that the IN clauses are not generated when they are empty. 

[1] http://pastebin.com/w59bQ44s
[2] http://pastebin.com/FDaud1XT

Version-Release number of selected component (if applicable):6.2.0.ER3

How reproducible: 

Execute TaskQueryBuilderCoverageTest.taskQueryBuilderCoverageTest on one of supported production database systems.
Comment 1 Marco Rietveld 2015-09-29 03:09:59 EDT
The problem here is that some users will not have groups, but the query is adding a predicate/where phrase that references an empty criteria (no groups). 

The solution is to make sure to only add those clauses (potOwner/stakeHolder/busAdmin in groups) when the user has 1+ groups.
Comment 2 Marco Rietveld 2015-10-27 22:45:19 EDT
Fixed. Commits: 


Comment 3 Marco Rietveld 2015-10-28 05:48:03 EDT
These commits were also part of the fix: 


Comment 4 Tibor Zimanyi 2015-11-10 08:49:03 EST
Verified in 6.2.0.ER5 by running community test suite on supported DB systems. All failing tests pass now.

Note You need to log in before you can comment on or make changes to this bug.