Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes


Accepted answer

Permanent link
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

0 votes

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

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

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,943

Question asked: Nov 13 '14, 2:32 a.m.

Question was seen: 2,750 times

Last updated: Nov 13 '14, 3:50 a.m.

Confirmation Cancel Confirm