Bug 1074322

Summary: REST /task/query parameter pageSize=10 returns all the tasks.
Product: [Retired] JBoss BPMS Platform 6 Reporter: Marek Baluch <mbaluch>
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED CURRENTRELEASE QA Contact: Ivo Bek <ibek>
Severity: low Docs Contact:
Priority: medium    
Version: 6.0.1CC: kverlaen, rrajasek, smcgowan
Target Milestone: ER1   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:50:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
screenshot none

Description Marek Baluch 2014-03-09 19:06:27 UTC
Description of problem:
Accessing http://localhost:8080/business-central/rest/task/query?language=en-UK&pageSize=5 returns all tasks in the database. If there are 10 then 10 will be in the returned list.

Expected results:
Only the first 5 tasks should be in the returned result.

Additional info:
See attached screenshot which defines pageSize=1.

Comment 1 Marek Baluch 2014-03-09 19:06:56 UTC
Created attachment 872453 [details]
screenshot

Comment 2 Marek Baluch 2014-03-09 19:08:12 UTC
I also noticed that the tasks are not sorted. It might improved UX if the tasks where sorted based on ID.

Comment 3 Marco Rietveld 2014-03-13 20:40:54 UTC
Fixed. Waiting for flags to cherry-pick to 6.0.x. 

Commits: 

master:
https://github.com/droolsjbpm/droolsjbpm-integration/commit/79231d84

Comment 4 Marco Rietveld 2014-03-13 20:41:20 UTC
BTW, good catch, Marek!

Comment 5 Marco Rietveld 2014-03-20 11:35:30 UTC
Fixed on 6.0.x. Commits: 

https://github.com/droolsjbpm/jbpm/commit/0e63010d
https://github.com/droolsjbpm/jbpm/commit/c307845b
https://github.com/droolsjbpm/droolsjbpm-integration/commit/c83287c2
https://github.com/droolsjbpm/droolsjbpm-integration/commit/8de5aa59
https://github.com/droolsjbpm/droolsjbpm-integration/commit/b5ac771d

FYI: the max number of results that a query will now return has been limited to 1000. I can't imagine that returning more than 1000 results is practical.

Comment 6 Ivo Bek 2014-05-05 09:44:36 UTC
Verified in BPMS 6.0.2.ER2