How to log/notify admins when an issue is deleted using automation?
Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.
Summary
We often find that issues are no longer available in the project despite being the admin or having the right access. Such issues could have been accidentally deleted by other users and for auditing it is important for admins to figure this out.
This article provides a way for the project admins to monitor this using automation without having to reach out to Atlassian Support.
Environment
Jira Cloud, Automation
Diagnosis
Verify the following:
- The user is added to the project
- User has the permission to access the issue(both project permission and issue security levels)
- If the issue still exists in the database but the user can't access
By default, the notification schemes have the Issue Deleted event. Please see Configure notification schemes
In case this isn't enabled, then there are very less options for admins to figure out who deleted the issue
Solution
We can configure a rule that would capture the information about the issue deleted along with the timestamp and the details of the user who deleted it.
- Navigate to Project Settings > Automation
- Select Create Rule > Trigger Issue Deleted
Add a Log action
{{issue.key}} was deleted on {{now}} by {{initiator.displayName}} {{initiator.emailAddress}}
Sample rule that you can import: IssueDeletedRule.json
You can choose to send email in the same rule as well, but if you choose to use the Notification Scheme it would ensure that this rule wouldn't count towards the execution limits in automation. You can find more details about the limits on New Cloud Automation Limits
If you still encounter issues with this approach or need help please contact Atlassian Support