Hi,
is there a possibility to delete worklogs per automation rule?
I wrote automation rules to sum up Original Estimates, Time Spent and Remaining Estimates of tasks to their parent Epics.
There is a problem when a worklog of a task is edited, e.g. the used had logged 30h instead of 30m and corrected this later. Then it is not possible to edit the Time Spent on Epic directly per automation. So I thought there might be the solution to delete the worklog on the epic and sum up the total Time Spent of the tasks again.
Best regards
Karin
thank you very much. I'll test this.
I'm not at all experienced when it's about API. Are there any risks to do so?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only risk I can think of, is to delete the wrong worklog. But if you find the proper id, I wouldn't expect you to encounter any problem. It's like performing the actual action. Having said that, if you look at the API you will read the necessary permissions:
Browse projects project permission for the project that the issue is in.
If issue-level security is configured, issue-level security permission to view the issue.
Delete all worklogs project permission to delete any worklog or Delete own worklogs to delete worklogs created by the user,
If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alex Koxaras _Relational_ ,
thanks a lot. Unfortunately I'll have to postpone this due to other urgent issues.
But could you please tell me how to detect the correct worklog-ID in an automation rule? Would a worklog in my live-system be affected when I tested with a copied issue in my sandbox, are the IDs identical?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Run a /rest/api/3/issue/ request on any issue that has a worklog:
/rest/api/3/issue/KEY-XXX
and search the response for that specific worklog. Under field "worklogs" you should search for that specific worklog ID:
"worklog": {
"startAt": 0,
"maxResults": 20,
"total": 1,
"worklogs": [
{
"self": "https://koxaras.atlassian.net/rest/api/3/issue/10701/worklog/10057",
"author": {
"displayName": "Alex Koxaras",
"active": true,
"timeZone": "Europe/Athens",
"accountType": "atlassian"
},
"displayName": "Alex Koxaras",
"active": true,
"timeZone": "Europe/Athens",
"accountType": "atlassian"
},
"created": "2022-09-13T17:35:48.095+0300",
"updated": "2022-09-13T17:35:48.095+0300",
"started": "2022-09-13T12:35:45.309+0300",
"timeSpent": "5h",
"timeSpentSeconds": 18000,
"id": "10057",
"issueId": "10701"
}
]
}
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.