How to get 1000+ (all) workitems of project area ?
Kartik Gajjar (11●1●2)
| asked Nov 09 '10, 10:51 a.m.
retagged Nov 13 '12, 11:10 a.m. by Morten Madsen (305●32●50)
- the project area has 1000+ work items
- following code returns me work item of the project area, however it stops at 1000 count. How do I get all the work item of project area ?
|
7 answers
Ralph Schoon (63.3k●3●36●46)
| answered Mar 13 '12, 8:12 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Hi,
I had to make sure to use results.setLimit(Integer.MAX_VALUE-1); // First thing to do!!!!!! as the very first thing to do with the resultset. I assume later the iterators are already set up with a linit and that does not change anymore. |
I can't tell you how to get all the work items from a query, but it is controlled by a property on the server. From the server admin web page, select "Advanced Properties" and search for 1000. You will eventually come to the property for max query result size (it is "Maximum Query Result Set Size" in 3.0). The tool tip seems to indicate that the result set size could be set for the individual query itself.
- the project area has 1000+ work items |
- the project area has 1000+ work items You can set the limit for a query on IQueryResult (before iterating over the results): Instead of return queryClient.getResolvedExpressionResults(projectArea, (Expression) term, IWorkItem.FULL_PROFILE); You could write IQueryResult result= queryClient.getResolvedExpressionResults(projectArea, (Expression) term, IWorkItem.FULL_PROFILE); result.setLimit(5000); return result; -- Regards, Patrick RTC Work Item Component Lead |
I can't tell you how to get all the work items from a query, but it is controlled by a property on the server. From the server admin web page, select "Advanced Properties" and search for 1000. You will eventually come to the property for max query result size (it is "Maximum Query Result Set Size" in 3.0). The tool tip seems to indicate that the result set size could be set for the individual query itself. Having updated the property, there is no effect. Does this require a server side reboot? |
Having updated the property, there is no effect. Does this require a server side reboot? I have the same problem. Were you able to get this resolved? |
- the project area has 1000+ work items You can set the limit for a query on IQueryResult (before iterating over the results): Instead of return queryClient.getResolvedExpressionResults(projectArea, (Expression) term, IWorkItem.FULL_PROFILE); You could write IQueryResult result= queryClient.getResolvedExpressionResults(projectArea, (Expression) term, IWorkItem.FULL_PROFILE); result.setLimit(5000); return result; -- Regards, Patrick RTC Work Item Component Lead Hi Patrick, Picking up on this old thread. I'm trying to do this with v2 of the API and it doesn't seem to be working. Is there something I have to do to iterate other than: result.setLimit(totalSize); where Thanks, Tim |
Hi, Thanks. Not sure what I was doing wrong -- I definitely wasn't iterating before I set the limit -- but setting it immediately after getting it seems to have done the trick. Best, Tim |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.