Accessing information on a WorkItem of a linked WorkItem
Hi everyone, I have a custom WorkItem that has 2 links to other custom WorkItems. I want to create an extension that automatically copies the HTMLSummary from the second linked WorkItem to the saved WorkItem.
I read through this: https://rsjazz.wordpress.com/2012/09/19/the-rtc-workitem-link-api-linking-workitems-to-other-elements/
to get to my linked workitem, but I can't seem to get any information out of it.
I'm currently stuck at this:
if(resolvedRef instanceof IWorkItemHandle){ IWorkItemHandle handle = (IWorkItemHandle)resolvedRef; }How do I check if this IWorkItemHandle is my second link?
How do I access it's fields/HTMLSummary?
Thanks
|
Accepted answer
Ralph Schoon (63.6k●3●36●46)
| answered Aug 09 '16, 3:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Please see https://rsjazz.wordpress.com/2012/07/31/rtc-update-parent-duration-estimation-and-effort-participant/ . You have to resolve the handle.
Philipp H selected this answer as the correct answer
|
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.
Comments
the design of the system uses a small representation of the objects as the persistent data. its a 'handle' to the real object. the handle does NOT contain any useful data.
this reduces memory consumption for what is expected to be large numbers of objects.
you must ask the system to populate (resolve) the object with the data elements you need.
the resolve 'profiles' (small, medium, large, default) select the data elements you need. (you can create your own profile on the fly to get only specific data elements)
As an example, in one of my applications, I only need the email address of the user (IContributor), so that is all I ask the system to get me.. no point retrieving the other data if its not going to be used.
Ok, thanks for explaining!