Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Recommended way to obtain a work item given a work item numb

I am working on a feature that extracts a work item number from some
text and I need to translate that into a work item. I got this to work
in the Eclipse client using a Location that contains the URI for a work
item as obtained from the work item editor. However, this approach does
not work on the server since it requires the use of the Item Manager
(and is rather round about in the first place). What is the recommended
way to fetch a work item given the work item number from both an Eclipse
client and from the server (i.e. a scheduled task)?

Michael

0 votes



2 answers

Permanent link
Hi Michael,

The closest what we have today is the predefined query
WorkItemQueries.workItemById(...)
that returns a WorkItemHandle via an ItemQueryIterator.

This isn't the easiest API to use, but since it lives in common,
it is at least available both on the server and the client.

I've create enhancement request 37012 for providing a better API
within the M4 timeframe.

Cheers,
--andre


On 2007-11-19 20:41:14 +0100, Michael Valenta
<Michael_Valenta@ca.ibm.com> said:

I am working on a feature that extracts a work item number from some
text and I need to translate that into a work item. I got this to work
in the Eclipse client using a Location that contains the URI for a work
item as obtained from the work item editor. However, this approach does
not work on the server since it requires the use of the Item Manager
(and is rather round about in the first place). What is the recommended
way to fetch a work item given the work item number from both an
Eclipse client and from the server (i.e. a scheduled task)?

Michael

0 votes


Permanent link
Michael -

If you have a Location on the server, you can use the ILocationService
to resolve the location to an IItem.

However, if you only have the item number Andre's suggestion is the way
to go, rather than crafting by the URI by hand.

-- Todd

Michael Valenta wrote:
I am working on a feature that extracts a work item number from some
text and I need to translate that into a work item. I got this to work
in the Eclipse client using a Location that contains the URI for a work
item as obtained from the work item editor. However, this approach does
not work on the server since it requires the use of the Item Manager
(and is rather round about in the first place). What is the recommended
way to fetch a work item given the work item number from both an Eclipse
client and from the server (i.e. a scheduled task)?

Michael

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,926

Question asked: Nov 19 '07, 2:48 p.m.

Question was seen: 7,336 times

Last updated: Nov 19 '07, 2:48 p.m.

Confirmation Cancel Confirm