Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Querying Work Items by their planned for / target (IBM RTC Java API)

  Hi All
   If I am trying to fetch the work items based on the current sprint,
I am  getting java.lang.IllegalArgumentException: Argument must be an instance of IAuditableHandle .
below is my code,
IWorkItemClient workItemClient = (IWorkItemClient) iTeamRepository.getClientLibrary(IWorkItemClient.class);
IAuditableCommon iAuditableCommon = (IAuditableCommon) iTeamRepository.getClientLibrary(IAuditableCommon.class);

IQueryableAttribute planAttribute = factory.findAttribute(projectArea, IWorkItem.TARGET_PROPERTY, iAuditableCommon, monitor);
Expression plan = new AttributeExpression(planAttribute, AttributeOperation.EQUALS, CurrentMilestoneVariable.VARIABLE_ID);
Term term = new Term(Term.Operator.AND);
term.add(plan);
IQueryDescriptor iQueryDescriptor = queryClient.createQuery(projectArea, QueryTypes.WORK_ITEM_QUERY, "AllItems", term); --- getting exception at this line.
Please provide the solution if you did that.

regards, ramesh

0 votes



One answer

Permanent link
I would carefully consider to find the iteration (the IIteration Object) and use it instead of using CurrentMilestoneVariable.VARIABLE_ID

0 votes

Comments

 Could you Please provide the way to find Iteration Object.  Please provide the sample code.

You could search the SDK for IIteration. If you can't search the SDK follow https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/ . If you don't, don't expect to get very far. You can also search that blog which has actually downloadable code for how to work with Timelines and iterations or Google for IIteration.
You can also Google Jazz.net for IIteration i.e. google IIteration site:jazz.net to find posts around this. 

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,948

Question asked: Sep 29 '15, 11:01 a.m.

Question was seen: 2,407 times

Last updated: Sep 30 '15, 2:04 a.m.

Confirmation Cancel Confirm