It's all about the answers!

Ask a question

How can I get the epic id and Pv id using feature id and story related to that work item. Please help if there is any API for the same

Rinkal Garg (1719) | asked Mar 15 '18, 6:58 a.m.
edited Mar 15 '18, 8:16 a.m. by Ralph Schoon (63.1k33646)

 I have some feature ids and i need to get some data related to that. like epic id, pv id, story planned for and many other things. i have found some of the data using this code IWorkItem workItem = workItemClient.findWorkItemById(id, IWorkItem.FULL_PROFILE, monitor);

But there i have found only 2 things. please help is there is any other API to find related data

Accepted answer

permanent link
Ralph Schoon (63.1k33646) | answered Mar 15 '18, 7:07 a.m.

Start here:

There are a lot of code examples including your snippet in that blog. I created the blog because the answers don't fit here. You need the link API - search the blog for link api, and you need the work item attribute API so search for work item attribute.

Rinkal Garg selected this answer as the correct answer

Rinkal Garg commented Mar 15 '18, 7:16 a.m.

Can you please help me to find only one like how can I find the epic Id, rest i will find out. Thanks for your quick response 

Ralph Schoon commented Mar 15 '18, 8:14 a.m. | edited Mar 15 '18, 8:15 a.m.

In short, you

  1. iterate the links of the item (that is linked to the epic) using the link type you use for that
  2. Once you found the other end (the linked item) you resolve the handle and look up the ID

If you are unable to spend the time you need to even read the introduction and the essential links ( especially ) you will not be able to do this.From experience with other such questions you will ask more and more questions that are already explained in the links that I asked you to follow.

Rinkal Garg commented Mar 17 '18, 5:02 a.m.

 ok tysm Ralph.

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.