Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I log time (worklog) for another user, using an API key (with admin rights) using Rest API?

Ameer Zain September 13, 2023

I am able to log time in worklogs for me using an API that's available in the Jira Rest API Collection. (Using my email and API as basic authentication)

But can I log time for another user on a particular date using a Jira API key and email (with admin rights) as basic authentication?

2 answers

1 vote
Mohamed Benziane
Community Champion
September 13, 2023

Hi,

welcome to the community

this is not possible unfortunately https://jira.atlassian.com/browse/JRACLOUD-1676

but you have some plugin like Tempo that let you achieve this.

Ameer Zain October 3, 2023

Hi @Mohamed Benziane ,

Thanks for your input in this. I have faced another issue, while working with GET /rest/api/3/issue/{issueIdOrKey}/worklog to retrieve the worklogs logged in a particular ticket, it returns for only Tempo Timesheets in displayName for recent entries. I am not able to get the timesheets logged by users. Is there any thing that I need to change/pass in params in order to get all the users logged datas. (I have admin privileges for the project that I am trying to retrieve worklogs.)

Wojciech Wardaszko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 4, 2023

Hi @Ameer Zain

From what I've gathered (and I'm not a Tempo user, actually I work for their competition) the way Tempo works, it tracks all time under its own custom user called Tempo Timesheets, and you can only see which user it was tracked for by accessing data stored in Tempo servers. They do have their own API you can use to fetch the data, but I'm not familiar with it.

Please reach out to Tempo team for further guidance on this matter or refer to their documentation.

Cheers!

Like Ameer Zain likes this
Ameer Zain October 4, 2023
0 votes
Wojciech Wardaszko
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 13, 2023

Hi @Ameer Zain

Welcome to the Community!

If you're specifically after adding the worklog for some other user via the REST API, that is currently not possible as the worklog endpoint does not support POST requests with the author object in its body parameters.

If you just want to be able to log work as others, I strongly recommend using our Clockwork Pro. With it, adding a worklog in someone's stead is as simple as granting a permission to select users, roles or groups:

Log work for others permission.png

and selecting the author in the log work dialog:

Log work for others dialog.png

Please note that the fields: Transition status, Status, and Reson for delay are all custom worklog attributes that can be defined by any Jira admin in the app's configuration page.

I hope this helps. If you have any questions, feel free to ask here or reach out to us directly via our service portal.

Cheers!

Suggest an answer

Log in or Sign up to answer