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

How can I create a workitem query programmatically in RTC

I am now using RTC 3.1.2 SDK to do some extension work, when programmatically  create a workitem query using the these conditions: defect, resolved, subscribed by login contributor. I wrote the following code, but found it did not work. So I am wondering how to create a workitem query programmatically 

// Predicate for finding workitems 
 final String predicateStates[] = { "resolved" };

 IPredicate defectPredicate = workItemModel.workItemType()._eq("defect");
 
IPredicate resolvedPredicate = workItemModel.internalResolution()._in(predicateStates)._and(defectPredicate);

 IPredicate subscriptionPredicate = workItemModel.internalSubscriptions()._contains(contributor)._and(resolvedPredicate);

the above is the Predicate I used for query, resolvedPredicate and subscriptionPredicate  did not work, so how to write java code to fulfill my requirement, thanks!

1 vote

Comments

Hi, have you make it work? And could you share it? :)



One answer

Permanent link
Hi,
https://jazz.net/wiki/bin/view/Main/QueryDevGuide is a helpful guide in creating work item queries.

3 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,952

Question asked: Jun 27 '12, 9:35 p.m.

Question was seen: 8,151 times

Last updated: Apr 23 '13, 7:04 a.m.

Confirmation Cancel Confirm