Hello,
I am trying to implement action-based script, that reacts on multiple actions in Jira. Whenever an action happens, webhook is fired with info to my app, where I do the rest of the action.
It works great for tickets (comments create/update, status update etc), however for work logs I have quite a problem.
Freshly created work logs are not accessible via API. At the same time, work logs which are there for some days are accessible without problem.
I could create my own "worklog" locally in my APP, however the data provided from webhook have Tempo Timesheet as the user.
How is this possible? Why work logs take so much time? How much time exactly? Is there a workaround?
Used API URL with baerer token... It works fine for this one for example. Higher number brings "worklog not found or you dont have access". Even though the work log was just created and I literally get the API URL to supposed worklog.
Hi @Ladislav Prchal ,
If you are using Jira API to get Jira worklogs, then the worklog author is showing Tempo Timesheets as intended behaviour as Tempo hosts our own Tempo worklogs in different from Jira instance. Please refer to this KB for more details.
If you are using Tempo API to get worklogs, you will get the actual username as worklog author. However, you need to make sure you have either "View all worklogs" permission for all the projects or "View worklogs" permission for all Tempo Teams to view all worklogs. Else. you will only be able to view your own worklogs through UI and API with your bear token.
Hope this helps.
Best regards,
Susan Wu
Tempo Product Expert
Thank you for your reply, at this moment I think I found out the problem.
From webhook I retrieve JiraWorklogId, not TempoWorkLogId. Which is little bit not expected, but I think I am going to be able to get over it and post the whole solution.
As you can see here, when I list all worklogs in given ticket, I can see that in fact I do not have tempo ID.
So I need to find relation in between jira worklog ID and tempo worklog ID. I hope that I can get ticket key. If I have it, then I can just list all worklogs and get what I need.
And with the tempo worklog ID, I retrieve real data without tempo timesheet. It is pain, but ... yeah, it is pain...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With Tempo API V3, you can see both jiraWorklogId and tempoWorklogId, but with Tempo API V4, you will only see tempoWorklogId. But you can still get jiraWorklogId with this endpoint on V4.
https://apidocs.tempo.io/#tag/Worklogs/operation/getJiraWorklogIdsByTempoWorklogIds
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Excellent, thank you very much, going to test it on Monday, but this looks like exactly what I need. Have a great day!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Susan Wu,
so I am looking at the endpoint you provided and unfortunatelly I need the literal opposite - I need Tempo WorkLog ID from Jira WorkLog ID :) I havent found such API there, however I found a solution I will implement meanwhile.
Sooo this might be solution as well.
01) From webhook you retrieve data such as:
"https://our.glorious.domain/rest/api/2/issue/41570/worklog/351507"
02) Using Issue ID, I require all work logs for the issue as:
"https://api.tempo.io/4/worklogs/issue/41570"
03) Last worklog there (with the same creation date as from the webhook) will be the one which I am looking for. This include the Tempo Worklog ID:
04) And with Tempo Worklog ID I can get the details I needed:
https://api.tempo.io/tempo-timesheets/4/worklogs/332520
I hope this will help someone.. I am of course open for adjustmens, if therre is better, direct method to get me this worklog, I will implement it gladly... But this time I need it to be operational and this is possibility :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Since Jira does not track Tempoworklogid, it's not possible to use Jira API to find Tempo worklogs. So you have to get the list of tempo worklog ids first and then back track to find the matching Jira worklog ids. But your solution works well as you can get the data needed.
Just a side note that in the option #4, you are using a private endpoint to get the details. So this endpoint is not documented and subject to change without advance notice. We would recommend you to use the public endpoint instead.
https://api.tempo.io/4/worklogs/332520
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Susan Wu,
thank you very much for your imputs. It made my work much easier. I wish you the best for the future :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.