Item references point always to a workitem?
![]()
Hi,
I want to find out whether an "IReference" is pointing to a workitem.
Is it correct that if an IReference (whose link type is one of the work item link types like contributes, mentions, ...) is an ItemReference it always points to a workitem?
What about mentions links? Since it can point to multiple targets when does a mentions reference return true when asking it if it is an itemreference?
Thank you
|
Accepted answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered May 29 '15, 4:38 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
No, the reference is not always a work item. That depends on the link type. It could also be a change set or a URI.
See https://rsjazz.wordpress.com/2014/12/03/creating-custom-link-types-for-rational-team-concert/ and https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/ for more information. You have to basically check what you get. See the analyze references section in the second post. Marko Tomljenovic selected this answer as the correct answer
Comments But if I make sure the link type is always one that links exclusively (mentions is the only exeption) to a work item than an ItemReference is always pointing to a work item, correct?
For mentions links I will check the post.
There are various link types that don't reference work items. Build, change set, links to RM, QM resources. Even the ones that reference work items have different formats e.g. are a url and not a work item. This is true for CLM links. You can make the assumption only for links that have work items as end points. Even then it might be a good idea to check.
|
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.