Hello , I’m looking at a way to automatically clean work log under a ticket on cloud instance of Jira
Automation does not the trick, we can only add work log
API rest does not seems to work, I’ve already tryed a delete method on the work log endpoint and got a unauthorized method response.
Anyone have a solution for this ?
Hi @Florian PEREZ [Valiantys Administrator]
You should be able to delete worklogs with API. What is the response number you are getting? 401?
@Florian PEREZ [Valiantys Administrator]
To answer to your reply, the endpoint you have to use to delete a worklog is:
https://yourdomain.atlassian.net/rest/api/3/issue/ISSUE_ID/worklog/WORKLOG_ID
and not /rest/api/3/issue/{{issue}}/worklog
You can't delete all worklogs right at the get go. You have to provide the worklog id and then delete a specific worklog. I've tried on my instance the above endpoint I mentioned and everything works fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello, after a deeper dive I can confirm we can’t delete all the work logs in one time. There’s no end point to do this with api.
I was having another problem by not encoding my username with my api token password when encoding to base64. Rookie mistake here.
I successfully delete the work log if I only got one worklog on my issue. This can fit the need so I’ll not go further on this !
Many thanks !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And finally I’ve found this article : https://community.atlassian.com/t5/Jira-Software-articles/Delete-all-worklogs-from-an-issue-using-Jira-Automation-with/ba-p/2233207.
I may have a try on this one !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yup, I wrote it based on your question :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You’re the best ! 🥳
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm using the https://projectbaseline.atlassian.net/rest/api/3/issue/{{issue}}/worklog endpoint and it seems not accepting Delete method to kill all the worklog.
https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-worklogs/
when I use the endpoint on Automation I get wrong method response.
I think there no way to delete all worklog at once.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.