How to get previous values (state) of an ITimeSheetEntry?
Hi,
I'm developing an IOperationParticipant that needs to detect the exact change on time tracking. In order to get previous values of an WorkItem attribute inside an IOperationParticipant, I simply use:
But as far as I know, ITimeSheetEntry is linked to a WorkItem using endpoint I tried this, but obviously didn't work, because it gets the current values of the links: List<ITimeSheetEntry> listTimeChildren = new ArrayList<ITimeSheetEntry>(); For new or deleted ITimeSheetEntry, I can use |
3 answers
I worked out a workaround that traverse all ITimeSheetEntry.modified() and get the TimeSheetEntry which modified in last a few seconds in the followup action.
|
This is an old question, but for anyone that is still wondering, I have a more direct way than looking at the recently modified timesheets.
As usual, remember that if you are using the IWorkItemServer object, you'll need to add the "requiredService" node to the plugin.xml of your MANIFEST.MF file.
|
Ralph Schoon (63.5k●3●36●46)
| answered Apr 02 '15, 9:55 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In general for IAuditables, and ITimeSheetEntry, you can get the two possible predecessors like this:
IAuditable.getPredecessorState() IAuditable.getMergePredecessorState() Assuming that that history is actually preserved. |
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.
Comments
Any idea? I have the same question.