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

How can i get the history of the work item in the plugin using server SDK?

Hi everyone,

I want to retrieve the work item history and i have a requirement to know the details of the attributes in advisor plugin, that were undergone changes  with the current save operation of the work item   i.e i want to get the difference between the old state and the new state of the work item .
For better understanding,

I created a work item with summary and category and saved it. Then i added Description when i opened it in the next time . So i want to get the details that "Description" was added newly . in short i want to get the history.
I tried my best to explain.
Kindly help me to solve this.
Thanking you.
-Jyothsna.

0 votes



One answer

Permanent link
The states are stored in the state table. As far as i know the interface IAuditable provides the access to the historical data.

com.ibm.team.repository.common.IAuditable
You can get the PredecessorState and the MergedPredecessor State from that interface. See below how to get all states.

0 votes

Comments
Hi Ralph,
Thanks for your reply. But i couldn't understand how to get the history from Predecessor state and Merged Predecessor State .If you don't mind please explain the things in a clear way.
Waiting for your reply..
Thank you

Hi everyone,

Could you please explain the predecessor and mergedPredecesssors or suggest any docs related to it.
Thanks in advance.

The documentation of com.ibm.team.repository.common.IAuditable explains what the operations do. Basically return a previous (history) state of the item. Read the documentation. If you can't setup the SDK development environment. I have hinted to execute the RTC Extensions Workshop several times before. If you have, you can search for interfaces, references, types, examples. If not, you should not develop for the SDK.

I mention https://jazz.net/forum/questions/7046/how-to-get-the-history-of-an-work-item that mentions to use IItemManager.fetchAllStateHandles() and other interesting options to deal with the history states of an com.ibm.team.repository.common.IAuditable .





I never had the time to create a simple example for this, but you should have enough to get started.

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,936

Question asked: Sep 14 '20, 9:21 a.m.

Question was seen: 1,385 times

Last updated: Sep 16 '20, 8:08 a.m.

Confirmation Cancel Confirm