Hi, I am trying to update some fields on a tempo worklog via the API, but I want to avoid updating the startTime attribute.
From what I can gather, when I GET a worklog from the API, the startTime is in the author's timezone, but when update via PUT, then the request expects startTime to be in UTC.
That means that I can't just pass the startTime i get from the API, and I also can't just omit the startTime from the body, because for some reason it is then set to 0:00:00 UTC.
Do I really need to fetch the author's timezone and adjust the startTime accordingly to be able to update a worklog without changing the startTime?
Hi Neils,
You may want to explore the option of using Tempo REST API 4.0.
In this version the startTime is not required for updating a worklog. For more information please see the link https://apidocs.tempo.io/#tag/Worklogs/operation/updateWorklog
Best regards,
Chih from Tempo Support
Hi Chih, I am using the V4, but if I don't include startTime in the PUT request, then the time gets set to 0:00:00 UTC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Niels,
It is expected that the startTime of the worklog is defaulted to 0:00:00 UTC if you don't specify.
For the reason of this behavior, please see https://tempo-io.atlassian.net/wiki/spaces/KB/pages/232816644/Why+is+there+a+time+difference+between+my+Jira+worklog+and+my+Tempo+worklog
Best regards,
Chih from Tempo Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chih, thank you very much for this. This has helped a lot.
I can now see that my observed behaviour is only happening for worklogs that were created via Jira's API and not Tempo's. Worklogs created directly in Tempo work normally without timezone issues.
So I guess my next question is how can I identify which worklogs are from tempo and which were created in the Jira API. Is it enough to just check if the Author is the Tempo Timesheets add-on user when fetching the worklog from Jira's api?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm adding an @mention for @Tempo Support, so they see a notice about your last reply, @Niels Frederiksen.
Using the @mention feature will ensure the person(s) you are addressing see your reply 😊
Best,
-dave
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Niels,
That is correct. It works checking if the worklog author is Tempo Timesheet from Jira to determine if worklogs are created from Tempo.
Best regards,
Chih from Tempo Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.