Increasing work item query result size via Java API no more working in RTC 6.0.4
On this blog Ralph Schoon describes how a big amount of work items can be synchronized:
Especially this piece of code is important since it increased the query result size:
IQueryResult expression_results = resultsUnresolvedByExpression( teamRepository, projectArea, typeinProjectArea); expression_results.setLimit(Integer.MAX_VALUE);A call to expression_result.setLimit has no effect anymore in RTC 6.0.4 plain Java API. Does this "feature" need to be enabled on the server or is it simply a bug?
Accepted answer
I found the root cause of the problem. The above call is working if you do not do the following:
if
expression_results.getResultSize(monitor).getTotalAvailable()
is called before
expression_results.setLimit()
then a call to set limit has no effect any more. As it seems the call to getTotalAvailable() finalizes the limit of the query result size.
I personally do not know whether this is a very bad API design or simply a bug.