It's all about the answers!

Ask a question

When I use time java api(TimeTracking,TimeSheetEntry),I have a ploblem(history data).


guoping chen (191014) | asked May 24 '16, 12:01 a.m.
edited May 24 '16, 2:19 a.m. by Ralph Schoon (61.1k33643)
When I use time java api(TimeTracking,TimeSheetEntry),I have a ploblem.
operator:
the first:use java api to insert the data(WiID:1 date:2016/05/20 time:10 timecode:AAA)
the second:use webUI to modify the data(WiID:1 date:2016/05/20 time:8 timecode:AAA)
then, I use time java api to get data.
But,
on the same workitem(WiID:1) and the same day(date:2016/05/20) and same timecode(timecode:AAA),
I get 2 records. the following data:
WiID    date            time    timecode
1    2016-05-20 12:00:00    10    AAA
1    2016-05-20 08:00:00    8    AAA

why I can get the old data(tims is 10hous)?
I only want to get the newest time data by java api. (the same data from web page. In web page, only display the 8 hours)
Have a flag to separate the new data and the old data?
or have another method to separate the data(old/new)?
Could anybody kindly help me to resolve it?Thanks a lot!

One answer



permanent link
Ralph Schoon (61.1k33643) | answered May 30 '16, 3:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Consider to read the data that is created with the UI and compare it with the information you provide. Especially look at the date and time for items created with the UI and Items you create with the API.

There are tons of issues you can run into based on server time and time zones. The System only recognizes things as the same on certain information and that can be tricky in this case.

I think the code I created (for my tinme zone) worked for me: https://rsjazz.wordpress.com/2015/03/31/the-work-item-time-tracking-api/

 

Your answer


Register or to post your answer.