Use the following code for get historical record of one workitem, but cannot get all the history info?
IItemManager itm = m_repository.itemManager();
List history = itm.fetchAllStateHandles((IAuditableHandle) workItem.getStateHandle(), m_monitor);
for(int i = history.size() -1; i >= 0; i--)
{
IAuditableHandle audit = (IAuditableHandle) history.get(i);
IWorkItem workItemPrevious = (IWorkItem) m_repository.itemManager().fetchCompleteState(audit,null);
Date recordModifiedDate = workItemPrevious.modified();
System.out.println( recordModifiedDate);
}
Get modified record today, will lose some information, but yesterday's change records, found that is not lost.
|
One answer
Hello Sussie, if I remember correctly the fetchAllStateHandles returns a non-linked list, meaning that the database does not guarantee order, so you would have to check the modified date and restructure in another list. |
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.