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

Work item URL

Hi,

Is there a way to get the URL of an IWorkItem object? The URL that takes user directly to the details of the work item.

Many thanks.

0 votes

Comments

I'm looking for an answer to this as well.

don't understand.. the URL of the workitem would open the UI if used in a browser.

and the UI lands on the overview page 

what are u looking to do? 

sorry, maybe misunderstood the words..

in Eclipse, click the dropdown next to the workitem number and select copy URL
in the web, just copy the URL in the browser window


Accepted answer

Permanent link
I found the class com.ibm.team.repository.common.Location in the RTC API, which avoids hard-coding URI fragments. For example:
String workitemURL = Location.namedLocation(workitem, getPublicRepositoryURL()).toAbsoluteUri().toString();
Ralph Schoon selected this answer as the correct answer

1 vote

Comments

Nice!.. thanks 


One other answer

Permanent link
I'm looking for a way to get the URI programmatically for any IWorkItem instance, not through the UI for a specific workitem.

0 votes

Comments

ok, well, the model is


server + "/resource/itemName/com.ibm.team.workitem.WorkItem/" + number

you can get server from the repository object.

repository.getRepositoryURI();

most objects have a getOrigin() method that returns the repository object

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,939

Question asked: Feb 23 '09, 5:23 p.m.

Question was seen: 7,525 times

Last updated: Mar 31 '14, 10:32 a.m.

Confirmation Cancel Confirm