How can I create a workitem query programmatically in RTC
![]()
Wang Jian Qiu (26●2●2)
| asked Jun 27 '12, 9:35 p.m.
edited Jul 18 '12, 7:45 p.m. by David Olsen (523●7)
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!
|
One answer
![]()
Hi,
https://jazz.net/wiki/bin/view/Main/QueryDevGuide is a helpful guide in creating work item queries. |
Comments
Hi, have you make it work? And could you share it? :)