Item references point always to a workitem?
![](http://jazz.net/_images/myphoto/6d88b90ea682d4ca47fe2cfb46ee645d.jpg)
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
![](http://jazz.net/_images/myphoto/6d88b90ea682d4ca47fe2cfb46ee645d.jpg)
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.
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.
Comments
![](http://jazz.net/_images/myphoto/6d88b90ea682d4ca47fe2cfb46ee645d.jpg)
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.
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
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.