It's all about the answers!

Ask a question

How can I create a workitem query programmatically in RTC


Wang Jian Qiu (2622) | asked Jun 27 '12, 9:35 p.m.
edited Jul 18 '12, 7:45 p.m. by David Olsen (5237)
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!

Comments
Jia Jia Li commented Aug 09 '12, 1:07 a.m.

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

One answer



permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Apr 23 '13, 7:04 a.m.
JAZZ DEVELOPER
Hi,
https://jazz.net/wiki/bin/view/Main/QueryDevGuide is a helpful guide in creating work item queries.

Your answer


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