Bug 1008824 - Avoid task duplicates when querying for tasks
Summary: Avoid task duplicates when querying for tasks
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: GA
: ---
Assignee: Kris Verlaenen
QA Contact: Radovan Synek
URL:
Whiteboard:
Depends On: 1026838 1018173
Blocks: 1022758
TreeView+ depends on / blocked
 
Reported: 2013-09-17 07:00 UTC by Toshiya Kobayashi
Modified: 2020-04-27 01:16 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1053793 (view as bug list)
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)
jBPMEx109_getTasksAssignedAsPotentialOwner_BZ (776.17 KB, application/zip)
2013-09-17 08:38 UTC, Toshiya Kobayashi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPM-3866 0 Major Resolved Avoid task duplicates when querying for tasks 2017-04-20 13:07:30 UTC

Description Toshiya Kobayashi 2013-09-17 07:00:38 UTC
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>();
        groupIds.add("PM");
        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 08:38:46 UTC
Created attachment 798674 [details]
jBPMEx109_getTasksAssignedAsPotentialOwner_BZ

Comment 2 Toshiya Kobayashi 2013-10-02 07:19:19 UTC
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 11:23:11 UTC
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 19:14:31 UTC
backported to 5.2.x branch:
https://github.com/droolsjbpm/jbpm/commit/751dfcb907cc26721b54ebad6d2fd2c17a19fffd

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 17:16:17 UTC
Verified with BRMS-5.3.1-P05


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