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!
Comments
Jia Jia Li
Aug 09 '12, 1:07 a.m.Hi, have you make it work? And could you share it? :)