How to enter time tracking values by API
Accepted answer
3 other answers
Hi Berthold,
Are you talking about entering time into fields like time spent? If so, you may find this post helpful: https://jazz.net/forum/questions/9007/how-to-change-the-value-of-attributes-time-spent-etc.
Are you talking about entering time into fields like time spent? If so, you may find this post helpful: https://jazz.net/forum/questions/9007/how-to-change-the-value-of-attributes-time-spent-etc.
Comments
Hi Lauren, thank you for your answer but no, I was looking to maintain the time tracking values per weekday, not the accumulated value in attribute TimeSpent.
Hi Berthold,
Unfortunately, I don't understand what you mean. Can you give an example?
In the Web UI you can open the Time tracking tab in a task work item and enter time spent values for each day. I would like to do the same by a Java API program to avoid double entering that data because we get this information from the SAP system.
Unfortunately I was not able to upload a screenshot to demonstrate it.
Hi Berthold,
Thanks for clarifying! I'm not sure how to input time tracking information. Perhaps this post could help get you started: https://jazz.net/forum/questions/112097/rtc-java-api-how-to-get-time-code.
Jazzers,
if looking at the published RTC SDK (setup cp. e.g. Ralph Schoon's Blog) and Java Searching for TimeSheet you can find that the com.ibm.team.rtc.reports.service.test has a class BaseRTCReportTest.
There is a method: createTimesheetEntry that has sample code. I would have guessed that some parts of it probably rely on internal API but so far I have not found anything. Seems to be all legit parts of the published RTC SDK.
Core method:
with: IWorkItemService workItemService
ITimeSheetEntry entry = workItemService.createTimeSheetEntry(projectArea);
and then
entry.setTimeSpent;
etc. etc.
If this is helpful please mark this answer accepted.
Thanks,
Arne
if looking at the published RTC SDK (setup cp. e.g. Ralph Schoon's Blog) and Java Searching for TimeSheet you can find that the com.ibm.team.rtc.reports.service.test has a class BaseRTCReportTest.
There is a method: createTimesheetEntry that has sample code. I would have guessed that some parts of it probably rely on internal API but so far I have not found anything. Seems to be all legit parts of the published RTC SDK.
Core method:
with: IWorkItemService workItemService
ITimeSheetEntry entry = workItemService.createTimeSheetEntry(projectArea);
and then
entry.setTimeSpent;
etc. etc.
If this is helpful please mark this answer accepted.
Thanks,
Arne