Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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
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

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

JSM June Challenge #2: Share how your business teams became ITSM rockstars

For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...

167 views 6 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you