how to get the old references of a workitem?
![]()
Hi All,
I`m Trying to develop a plugin where I need to auto calculate a field based on the its children.
It worked fine for me in all the scenarios but facing issue as below.
When I edited the children to remove the parent work item I`m not able to get the Parent workitemhandle to update it accordingly.
Can any one help me out in getting this done.
I tried getting the parent workitemhandle but it is returning null and I did not find any method to get the old references.
Thanks
Surender
|
Accepted answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Nov 13 '14, 2:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I'd try to get the references of the old state and the current references and compare the list.
Surender Biyyala selected this answer as the correct answer
Comments Thanks Ralph.
i got the old state and I did not find any methods to get the references.
could you please point me to some example source.
saveParameter.getNewReferences().getReferences(WorkItemEndPoints.PARENT_WORK_ITEM)
This is what I`m using now to get the parent workitem.
Thanks
Surender.
I would try to resolve the old state and then use the normal API to get the references from that. There should be example code in my blog that you could find searching for "References". There might be something here: http://rsjazz.wordpress.com/2012/09/20/the-rtc-workitem-server-link-api-linking-to-work-items-and-other-elements/
|
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.