It's all about the answers!

Ask a question

Increasing work item query result size via Java API no more working in RTC 6.0.4


Marko Tomljenovic (31648109) | asked Feb 16 '18, 11:08 a.m.

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


permanent link
Marko Tomljenovic (31648109) | answered Feb 16 '18, 12:01 p.m.

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.

Ralph Schoon selected this answer as the correct answer

Comments
Ralph Schoon commented Feb 19 '18, 3:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I think I mention in my post that the limit needs to be set as a first operation. If you do anything before this statement, the limit is not changed.

Your answer


Register or to post 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.