When I use time java api(TimeTracking,TimeSheetEntry),I have a ploblem(history data).
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!
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
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/
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/