Forums

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

Add work log for another user via API

nielsmouthaan
Contributor
May 21, 2023

Is it possible to add a work log on behalf of another user via Jira's API?

I tried using the documented author request body parameter, for example, like this:

{
    "started": "2021-01-17T12:34:00.000+0000",
    "timeSpentSeconds": 12000,
    "author": {
        "accountId": "557058:ed1482e3-00cb-41b9-89aa-XXXXXXX",
        "emailAddress": "XXXX@XXX.XX"
    }
}

But unfortunately, it still adds the work log for the user associated with the authorization details provided with the request instead of the supplied author.

I need this to create a Zapier integration between a time tracker and Jira on an individual plan. I would like Zapier to add work logs using a central account but still by specifying who worked on a given task.

Thanks for your help.

1 answer

1 accepted

1 vote
Answer accepted
Sunny Ape
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.
May 22, 2023

"Is it possible to add a work log on behalf of another user via Jira's API?"

Nope. The REST API documentation is misleading. Worklog entries are always recorded against the person (authorization token) who makes them, and the author parameter has no effect on this.

If you Google 'jira rest api worklog author' the first result is this thread where Atlassian advises why it can't be done and provides a link to JRACLOUD-30197 tracking the request to have that feature added (and where others debate the topic back and forth).

nielsmouthaan
Contributor
May 24, 2023

Thanks for your information!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events