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

How to join expressions using term to get the specific workitems

I want to get defect WorkItems which have foundIn values assigned to either Test1 or Test2 (for example) for particular project. so i have two expressions related to these found in values

Term term1 = new Term(Operator.AND);
term1.add(projectAreaExpression); //For particular project
term1.add(workItemTypeExpression); //For workitem type defect

Term term2 = new Term(Operator.OR);
term2.add(foundIn1Expression); //For found in value set to Test1
term2.add(foundIn2Expression); //For found in value set to Test2

How can we join these 2 terms that we can use it below to get the specific workItems?

com.ibm.team.workitem.common.query.IQueryResult<iresolvedresult<iworkitem>> results = queryClient.getResolvedExpressionResults(projectArea, term, IWorkItem.FULL_PROFILE);

0 votes



One answer

Permanent link
I have figured out the way to achieve this as below.
--------------------------
term1.add(term2);
com.ibm.team.workitem.common.query.IQueryResult<iresolvedresult<iworkitem>> results = queryClient.getResolvedExpressionResults(projectArea, term1, IWorkItem.FULL_PROFILE);
-------------------------
class Term extends Expression so you can add term as well in place of expression.

0 votes

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,935
× 411
× 169

Question asked: Sep 15 '15, 1:30 p.m.

Question was seen: 3,577 times

Last updated: Sep 19 '15, 1:58 p.m.

Confirmation Cancel Confirm