how can I read history from RTC workItem. I want to check some attribute change and its value before and after change form history. By jazz API. how its is possible? Please help .
how can I read history from RTC workItem jazz
2.2k Views Asked by Tom At
2
There are 2 best solutions below
5

Ragarding attributes, you can see more at "Working with Work Item Attributes"
If you have the Attribute ID available as a string, you can use this code to get the attribute.
IWorkItemClient workItemClient = (IWorkItemClient) fTeamRepository.getClientLibrary(IWorkItemClient.class);
IAttribute someAttribute= workItemClient.findAttribute(fProjectArea, "some_attribute_ID", monitor);
For the history, this thread can help
you can use
IItemManager.fetchCompleteState()
to get the full item in its historical state.
If you want to get the full history you can also get all state handles at once usingIItemManager.fetchAllStateHandles()
instead of walking the history usingIAuditable.getPredecessorState()
.
Use the below snippet: