It's all about the answers!

Ask a question

Programmatically query work item types to retrieve work items


Chirayu Patel (4611012) | asked Oct 24 '12, 10:39 a.m.

I am looking for executing query inside my operation participant that will search / retrieve work items of a specific work item type in a specific project. I searched API and other posts in this forum but couldn't find good examples in relation to this matter. Can some one show me how to do this programmatically.

e.g In ProjectA, I have a work item type app_profiles containing name and id ( attributes ) . Each work item of this type will contain unique data about applications. So for 10 applications there will be 10 work items of this type. I want to retrieve work item based on filter on name or id.

Any help on this is greatly appreciated.

Thanks,

Chirayu

One answer



permanent link
Lauren Hayward Schaefer (3.3k11727) | answered Oct 24 '12, 1:41 p.m.
JAZZ DEVELOPER
Hi Chirayu,

https://jazz.net/wiki/bin/view/Main/QueryDevGuide has examples that can get you started.

Comments
Chirayu Patel commented Oct 25 '12, 9:37 a.m.

Thanks Lauren,

This atleast got me started with what I need. Can you tell me how to execute this query ? I mean I don't want to code this in my operration participant ( which only runs during Save work item time).

The requirement is that search results from the desired query should populate an attribute of the type Enum ( preferably a drop down field in the work item UI) each time I access/modify my work item. I am trying to implement something similar to Valueset script based attribute customization but using java plugin instead of javascript.

I appreciate your help

Thanks,

Chirayu  


Lauren Hayward Schaefer commented Oct 26 '12, 7:41 a.m.
JAZZ DEVELOPER

Hi Chirayu,
I'm not familiar with how to do this.  I found https://jazz.net/forum/questions/63487/how-to-add-literals-to-existing-enumeration-programmatically, which may help.

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.