Getting Time Spent by plain java API
Hello,
I try to get the time spent attribute by plain java API.
In IWorkItem is a getter for duration available, but this is the estimated time.
The id of time spent is according to the administration web interface timeSpent and of estimated time duration.
Is there a way to get the value of time spent through the plain java API?
Best regards
I try to get the time spent attribute by plain java API.
In IWorkItem is a getter for duration available, but this is the estimated time.
The id of time spent is according to the administration web interface timeSpent and of estimated time duration.
Is there a way to get the value of time spent through the plain java API?
Best regards
2 answers
Hello,
in a earlier post I found a solution to my problem. https://jazz.net/forums/viewtopic.php?t=2379&highlight=spent
I tried the suggested way. If the attribute is not set I get -1 else 0 is returned. How can I get the concret value of time spent?
My code is:
Best regards
in a earlier post I found a solution to my problem. https://jazz.net/forums/viewtopic.php?t=2379&highlight=spent
I tried the suggested way. If the attribute is not set I get -1 else 0 is returned. How can I get the concret value of time spent?
My code is:
IWorkItemCommon workItemCommon = (IWorkItemCommon) repository
.getClientLibrary(IWorkItemCommon.class);
IAttribute timeSpentattribute = workItemCommon.findAttribute(
projectArea, WorkItem.TIME_SPENT_PROPERTY, monitor);
Object o = rtcWorkItem.getValue(timeSpentattribute);
Best regards
Hello,
I figured out, that it is not the code, that is wrong.
In the field time spent I do not type in the time I have already spent on that item. It is the time remaining. The program calculates estamated time - the in time spent typed in time and this is time spent in the attribute.
In my case estemated and time spent were always the same and I got 0.
Is the assumption of this behavior right and is it possible to type in time spent?
Best regards
I figured out, that it is not the code, that is wrong.
In the field time spent I do not type in the time I have already spent on that item. It is the time remaining. The program calculates estamated time - the in time spent typed in time and this is time spent in the attribute.
In my case estemated and time spent were always the same and I got 0.
Is the assumption of this behavior right and is it possible to type in time spent?
Best regards