[plain java] Adding Work Item type to query?
![]()
Bryan Miller - Integration Developer (449●35●31)
| asked Jun 18 '12, 3:54 p.m.
retagged Nov 13 '12, 4:02 a.m. by Morten Madsen (305●32●50)
I have a Work Item query that works well but I wish to add an expression to my existing query to filter by Work Item type (defect, task, etc). I am not seeing any methods that will take my type string (i.e. "Defect") and return a type ID to add to my existing query.
Any thoughts? BTW, I have read the excellent Developer's Guide to Querying Work Items and it doesn't cover this use case. |
2 answers
![]()
Use the ID from the process configuration Work Item Type editor as String. For instance, for a defect:
//following the code from "Developer's Guide to Querying Work Items"... new AttributeExpression( findAttribute(projectArea, auditableClient, IWorkItem.TYPE_PROPERTY, null), AttributeOperation.EQUALS, "defect" ); -- Gabriel Enriquez, IBM Rational, Tracking & Planning Comments Much obliged Gabriel. I had the correct code but was capitalising "defect" as "Defect" and that apparently doesn't match anything... Hi Gabriel, do you have a link to this "Developer's Guide" ....?
Here is a link to the Query Dev Guide.
|
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.