It's all about the answers!

Ask a question

How to enter time tracking values by API


Berthold Kröger (7841923) | asked May 03 '13, 6:27 a.m.
retagged May 03 '13, 6:34 a.m. by Dinesh Kumar B (4.0k413)
Hi, does anybody know how to enter time tracking values by Java API?
Thanks!

RTC v.3.0.1

Accepted answer


permanent link
Ralph Schoon (58.7k23642) | answered Mar 31 '15, 10:42 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
For anyone who searches for example, I created example code to access and modify the time tracking data for work items and published in this post: https://rsjazz.wordpress.com/2015/03/31/the-work-item-time-tracking-api/
Berthold Kröger selected this answer as the correct answer

3 other answers



permanent link
Lauren Hayward Schaefer (3.3k11427) | answered May 06 '13, 7:04 a.m.
JAZZ DEVELOPER
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.

Comments
Berthold Kröger commented May 08 '13, 9:38 a.m.

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.


Lauren Hayward Schaefer commented May 10 '13, 6:38 a.m.
JAZZ DEVELOPER

Hi Berthold,

Unfortunately, I don't understand what you mean.  Can you give an example? 


Berthold Kröger commented May 17 '13, 5:36 a.m.

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.


Lauren Hayward Schaefer commented May 17 '13, 6:55 a.m.
JAZZ DEVELOPER

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.


permanent link
Gabi mordov (624) | answered Jun 17 '14, 6:35 a.m.
 Hi Berthold,
i have the same issue.
did you find some answer to your post???
well i want to update our Time Track by external *.csv file.

if you have an answer or find some solution ill be glad to see it.

Thanks
Gabi 

permanent link
Arne Bister (2.6k12732) | answered Jun 25 '14, 11:38 a.m.
JAZZ DEVELOPER
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

Your answer


Register or to post your answer.