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

Is there any way to read the work item history using RTC Java API's?

Hi

Does RTC JAVA API provides the functionality to read the work item history like , who has changed the 1) particular work item state 2) attribute and 3) the date/time when it has been changed for every change in the work item.

0 votes



One answer

Permanent link
Look at the methods for ItemManager in the API doc.   In particular the fetch methods.

very _sparse_ snippet:

         // workItem is a particular work item already fetched from repository
         IAuditableHandle auditableHandle = (IAuditableHandle) workItem.getItemHandle();
         IItemManager itemManager = repository().itemManager();
         ...
         handles = itemManager.fetchAllStateHandles( auditableHandle, null);
             List<IWorkItem> workItems = new ArrayList<IWorkItem>();
             
             workItems = itemManager.fetchCompleteStates(handles, null);

You can now iterate workItems and get the attributes you wish to examine, each of which is a historic view of the starting work item.


1 vote

Comments

Hi Kevin

Thanks for the solution. I tried but found that it is always giving the last state of the work item for every instance of the work item history but I need the copy of the work item for every time when the work item is saved.

Not an expert on this, but history should represent a workitem when it was saved.  It makes no logical sense that an attribute change is recorded w/o the work item being saved, whether by clicking the Save button on a UI or calling the save() method of an editable work item in a user-written program.

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
× 11,016

Question asked: Jun 15 '15, 6:54 a.m.

Question was seen: 4,063 times

Last updated: Jun 16 '15, 11:20 a.m.

Confirmation Cancel Confirm