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);
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:

is called before 
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

Ralph Schoon commented Feb 19 '18, 3:44 a.m.

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.