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

Howto query a workitem without providing a project area

We want to implement a plain java client for RTC using REST API.
The program gets a small String presenting a Work Item ID as input and queries the RTC DB to return if such a work item exists.
But in order to have an instance of IQueryableAttribute we need to provide a project area to the API which brings an extra input 'project area name' to our program, which we need to get rid of. Also it is an unnecessary input because Work Item id is unique in the system so the query itself actually doesn't use it in the condition. The following code demonstates our issue:


//.............
IQueryableAttributeFactory factory = QueryableAttributes.getFactory(IWorkItem.ITEM_TYPE);

IQueryableAttribute idAttribute = factory.findAttribute(projectArea, attributeId, auditableCommon,monitor); //we want to get rid of the parameter projectArea

AttributeExpression idExpression = new AttributeExpression(
idAttribute, AttributeOperation.EQUALS, workItemID);
Term term = new Term(Operator.AND);
term.add(idExpression);

return queryClient.getResolvedExpressionResults(
null, term, IWorkItem.SMALL_PROFILE);
}


Can you point me to another way of querying workitems which does not require providing a project area?

0 votes


Be the first one to answer this question!

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,938

Question asked: Jul 29 '10, 11:25 a.m.

Question was seen: 5,224 times

Last updated: Jul 29 '10, 11:25 a.m.

Confirmation Cancel Confirm