It's all about the answers!

Ask a question

Item references point always to a workitem?


Marko Tomljenovic (31647109) | asked May 29 '15, 4:33 a.m.
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


permanent link
Ralph Schoon (63.1k33646) | 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
Marko Tomljenovic commented May 29 '15, 4:44 a.m.

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.


Ralph Schoon commented May 29 '15, 4:57 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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


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