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
I'd try to get the references of the old state and the current references and compare the list.
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/