I tried to get the rate of my JIRA worklogs with a python script. I have the Tempo Timesheet plugin with API for base, timesheets, accounts and teams. Everything is up to date. This is my prefered process:
Get worklogs
/rest/api/latest/worklogs?[params]
Get account key of worklog over the issue
/rest/api/latest/issue/[issue_key]
Get account data
/rest/tempo-accounts/1/account/key/[account_key]
Get member role
/rest/tempo-teams/2/team/1/member
(loop beans and search for member of the worklog)
- Now I have the account key and the member role id. Which API call helps me to get the related rate and currency?
In the docs is written, that the call
/rest/tempo-accounts/1/account/key/[account_key]
should response the ratetable id:
https://tempo.io/doc/accounts/api/rest/latest/#1463521625
With this information, I could extract everything from
/rest/tempo-accounts/1/ratetable/global/
In my case, this doens't work. There is no ratetable entry in the account response. Could this be a permission issue? Does anyone of you know a smarter way to get the rate and currency of a worklog?