Bug 1008824 - Avoid task duplicates when querying for tasks
Avoid task duplicates when querying for tasks
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.1
Unspecified Unspecified
unspecified Severity high
: GA
: ---
Assigned To: Maciej Swiderski
Radovan Synek
Depends On: 1026838 1018173
Blocks: 1022758
  Show dependency treegraph
Reported: 2013-09-17 03:00 EDT by Toshiya Kobayashi
Modified: 2014-04-15 20:45 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1053793 (view as bug list)
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)
jBPMEx109_getTasksAssignedAsPotentialOwner_BZ (776.17 KB, application/zip)
2013-09-17 04:38 EDT, Toshiya Kobayashi
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBPM-3866 Major Resolved Avoid task duplicates when querying for tasks 2017-04-20 09:07 EDT

  None (edit)
Description Toshiya Kobayashi 2013-09-17 03:00:38 EDT
Description of problem:

Backport https://issues.jboss.org/browse/JBPM-3866

JBPM-3866 has been addressed by 'group by' at first (commit: e8fbea998621608f02cac6f8963a41a18bb80b36) but now addressed by 'distinct' (commit: 11743329deb101bbb7e26a11f7ae49afa0f24086)

Steps to Reproduce:
1. Create a process with a User Task which has both actorId (="john") and groupId (="PM") 
2. Start a process and let it create a Task
3. call getTasksAssignedAsPotentialOwner with userId and groupIds

        List<String> groupIds = new ArrayList<String>();
        List<TaskSummary> list = localTaskService.getTasksAssignedAsPotentialOwner("john", groupIds,  "en-UK");
        System.out.println("list.size() = " + list.size());

Actual results:

list.size() = 2

Expected results:

list.size() = 1
Comment 1 Toshiya Kobayashi 2013-09-17 04:38:46 EDT
Created attachment 798674 [details]
Comment 2 Toshiya Kobayashi 2013-10-02 03:19:19 EDT
Just adding 'distinct' fails in Oracle because Oracle doesn't accept CLOB columns (name.text, subject.text, description.text) for distinct.

Need to use I18NText.shortText like implemented in master as well.
Comment 3 Toshiya Kobayashi 2013-10-11 07:23:11 EDT
If you fix this BZ with 'distinct' + I18NText.shortText, you also need to backport BZ1018173 to BRMS 5.3.x branch because I18NText.shortText has a defect which is decribed in the BZ.
Comment 4 Maciej Swiderski 2013-11-18 14:14:31 EST
backported to 5.2.x branch:

this includes usage of distinct and change of text to shortText to all I18NText fields used in the queries.
Comment 5 Radovan Synek 2014-02-13 12:16:17 EST
Verified with BRMS-5.3.1-P05

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