How to use automation rules in Jira to delete attachments from old issues

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Cloud Only

This article only applies to Atlassian products on the cloud platform.


Purpose

The purpose of this article is to explain how to set up an automation to fully remove your old issues that wasn't updated during a time frame you set ad deadline in your projects. 

Solution

  1. Access your Jira environment and go to Gear (right upper corner) > System > Global Automation

  2. Hit the "Create rule" button and create the automation rule with the following options: 
     
  • As the Trigger, choose the "Scheduled" option

         

  • Here you can choose the frequency and the time zone it's going to be executed. 
  • Then, you can set the JQL query to filter all the issues in the condition you want to remove the attachments, I've selected the following one, but you can edit the "-7d" to the timeframe you need. 

    tip/resting Created with Sketch.

    JQL QUERY

    attachments is not empty and updated < startOfDay("-7d")

  • After that, you need to choose the ACTION that the automation is going to execute, which is "Delete Attachments"

         


Deleted Attachments are gone forever

Note that once you remove the attachments, there's no backup file or something you can do to retrieve them. It's going to be completely deleted.


(tick) Now it's done. You just need to wait for the day you've chosen the rule to be executed, and it's going to clear all the attachments from old issues, accordingly to the time frame you've selected. OR, in case you want to test the rule, you can hit the "Run Rule" whenever you need and it's going to execute as well.

(lightbulb) Hope that can help you all with this attachments deletion and, for any further assistance, please let us know. 













Last modified on Apr 29, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.