It's all about the answers!

Ask a question

How to use JAVA API to query work item by tags


Jia Jia Li (8057155192) | asked May 19 '15, 5:11 a.m.
Hi, I want to query work item by tags, but the following code return null, anyone can help? Thanks!
IQueryableAttribute queryableAttribute = factory.findAttribute(projectArea, "tags",auditableClient,null);

Accepted answer


permanent link
Ralph Schoon (63.2k33646) | answered May 19 '15, 5:51 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Have you tried?

        IQueryableAttribute attribute = QueryableAttributes.getFactory(
                IWorkItem.ITEM_TYPE).findAttribute(projectArea,
                IWorkItem.TAGS_PROPERTY, auditableCommon, monitor);


In general you could also call an existing query like described here: https://rsjazz.wordpress.com/2012/10/29/using-work-item-queris-for-automation/ that avoids to expose yourself too much to the API.
Jia Jia Li selected this answer as the correct answer

One other answer



permanent link
Jia Jia Li (8057155192) | answered May 19 '15, 6:00 a.m.
Thanks Ralph, but unfortunately I can not access wordpress in China. ..

Comments
Ralph Schoon commented May 19 '15, 6:13 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Sorry to hear that. I heard that there are ways to, but I obviously have no experience. That makes a lot harder in this area.

You can drop me an e-mail at ralph.schoon@de.ibm.com and I can send you the core article as zip. Please mention it the next time, so I can do it again.

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.