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

How to get all work items by passing planned for attribute

Hi

How to get all work items by passing planned for attribute by using java api in alm rtc

0 votes



One answer

Permanent link

Hi,

please find a very good description of this in Ralph Schoon's Blog: Query Models with API

If this answers your question please mark it accepted.

- Arne

0 votes

Comments
  I am also trying to fetch the work items based on the current sprint,
I am also 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);

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
× 7,495
× 1,701
× 1,220

Question asked: Sep 14 '17, 4:09 a.m.

Question was seen: 2,746 times

Last updated: Sep 14 '17, 11:26 p.m.

Confirmation Cancel Confirm