It's all about the answers!

Ask a question

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

lakshmi jyothsna (3716) | asked Sep 14 '20, 9:21 a.m.
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.

One answer

permanent link
Ralph Schoon (63.2k33646) | answered Sep 15 '20, 4:37 a.m.
The states are stored in the state table. As far as i know the interface IAuditable provides the access to the historical data.
You can get the PredecessorState and the MergedPredecessor State from that interface. See below how to get all states.

lakshmi jyothsna commented Sep 15 '20, 8:55 a.m.
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

lakshmi jyothsna commented Sep 16 '20, 3:55 a.m.
Hi everyone,

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

Ralph Schoon commented Sep 16 '20, 8:06 a.m.
The documentation of 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 that mentions to use IItemManager.fetchAllStateHandles() and other interesting options to deal with the history states of an .

Ralph Schoon commented Sep 16 '20, 8:08 a.m.

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

Your answer

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