How to get the URL of a workitem ?
![]()
Hi all,
I have access to an IWorkItem. How do I retrieve its URL ? Thanks for any help. Regards, Arshad |
Accepted answer
![]()
Hi Arshad,
is this something you are looking for?
IWorkItem workItem = (IWorkItem) auditable;
...
...
...
String pWorkItemURL = Location.namedLocation(workItem, getPublicRepositoryURL()).toAbsoluteUri().toString();
Arshad Adavani selected this answer as the correct answer
Comments HI Anup,
And what is the implemetation of getPublicRepositoryURL() ..?
Hi Arshad,
Depends on where you want to publish this link. If I were to send it in an html email, I would simply wrap this string with <a href=" ...../a>.
Question is what are you trying to do with the link?
warm regards,
Anup Gaur
Hi Anup,
Arshad : And what is the implemetation of getPublicRepositoryURL() ..?
This is an internal API implementation.
I have no idea about it.
:-)
but it works fine if you have the Iworkitem..
|
One other answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Mar 17 '16, 6:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Use the search function to find the work item using its ID. In some of the UI's there is an action/context menu to copy the URI of the item. So you have the URI.
You can construct (one of the URI forms) if you have the ID. It is on my system for a work item with ID 43: https://clm.example.com:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/43 Replace the 43 at the end by your ID and make sure to replace the first part of the url (up to ccm) with the public UIR Root of your system. If this does not answer your question, please ask a more precise question. Comments HI Ralph,
|
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.