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

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.

0 votes



One answer

Permanent link

 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.

0 votes

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

Question asked: Nov 14 '18, 3:20 a.m.

Question was seen: 1,732 times

Last updated: Nov 23 '18, 4:40 p.m.

Confirmation Cancel Confirm