It's all about the answers!

Ask a question

Work Item Time Spent and Correction Attribute Values


Renuka Sindhgatta (13) | asked Mar 27 '09, 11:51 a.m.
JAZZ DEVELOPER
The Work Item contains the Time Spent and Correction attributes. How can these attribute values be programatically extracted
I Could not find a IWorkItem. that can be used along with IWorkItemClient.findAttribute to get attribute and then its value.

2 answers



permanent link
Moti Wertheimer (18913627) | answered Jan 07 '10, 7:32 a.m.
JAZZ DEVELOPER
I have the same question. We would like to extract the value of "correction", so far we get only "Time estimate" even if correction is set with a value. My understanding is that these fields are somehow tied together. Any help on this is appreciated.


I have found a way, hope it's safe...

public static long getCorrectedEstimate(IWorkItem theWorkItem) {

long retval = theWorkItem.getDuration();
IItem item = theWorkItem.getFullState();
if (item instanceof WorkItemImpl) {
WorkItemImpl wii = (WorkItemImpl) item;
long corrected = wii.getCorrectedEstimate(); //or wii.getTimeSpent();
if (corrected >= 0)
retval = corrected;
}
return retval;
}

permanent link
Uwe Glaeser (111) | answered Dec 29 '09, 8:47 a.m.
I have the same question. We would like to extract the value of "correction", so far we get only "Time estimate" even if correction is set with a value. My understanding is that these fields are somehow tied together. Any help on this is appreciated.

Your answer


Register or to post your answer.