Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,467,302
Community Members
 
Community Events
177
Community Groups

Update the worklog author from the REST API

Hi dear all,

I am trying to update the worklog author of a worklog through the REST API on Jira Cloud. I am using this endpoint documented here. Means I call the endpoint: 
https://myatlassianurl.atlassian.net//rest/api/3/issue/10027/worklog/10016

I tried to send the payload as:

{ "author": {"accountId": "myAtlassianAccountID"}

without any success. I get a positive response and i see myself as the "updatedauthor" but the passed "worklogauthor" gets ignored. I tried also the "properties" section with:

{
"properties":
[{"author":
{"key":"accountId",
"value": "myAtlassianAccountID"}
}]
}

but this throws an error:

{    "errorMessages": [        "N/A (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.WorklogJsonBean[\"properties\"])"    ]}

Any hint is much appreciated.

 

3 answers

Hi,

I can do that by using the Addon WorklogPro (WEB or REST API): log et edit for another, and so it can change the worklog Author and UpdateAuthor. 

But I can't understand why it is not possible with a specific permission in User permission without buying then worklogPro. 

Juste to have this basic capability you need to buy the worklogPro :-(

Regards,

M David

Thanks for coming back. My best guess is that the add-on is doing something in the background that we are not aware of. E.g. deleting the worklog and creating a new one. But I agree it would be great to get an answer from the WorklogPro Team on this.

BR

Like Eciruam Divad likes this

I am aware that deleting and creating the worklog is an option but does not help me in solving my problem.

I would really like to see how a well formatted JSON body would look like to be sent with "properties". If the REST call would accept my payload I guess I will get another error message (if the worklog author can´t be updated). So any help to provide me with a valid payload would be much appreciated.

Thanks

0 votes
Andy Heinzer Atlassian Team Mar 03, 2020

Hi Alexander,

I understand that you want to use the REST API in Jira Cloud to change the details of which user logged work on an issue.   However I do not believe this is technically possible to do in Jira, either via REST or via the web console and I will try to explain why.

Even as a Site admin in Jira Service Cloud, you can't actually change the user that created the worklog.  You can edit the comments, timespent. date started, and remaining estimate in the web interface, OR you could delete the worklog entirely.  You can also do that in REST.  Both of these methods require you have the necessary project permissions to do so. 

But neither method actually supports you changing the author of the worklog itself.  There is an open feature request for admins to be able to expressly log work as another user over in JRACLOUD-30197.  I believe that the updateAuthor is actually in reference to the user that edited the worklog.  However changing the author field of a worklog is not supported here.

I did come across another post on this topic over in https://community.atlassian.com/t5/Jira-questions/Edit-worklogs-author/qaq-p/1134809

In it @Thomas Deiler has an interesting workaround where he suggests you could get all the entries of a worklog author via REST, add them back under the desired account, and then delete the old entries.  I know that might not be a glamorous work-around, but I believe it will have the desired results in the end at least.

I hope this helps.

Andy

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events