On this page
Use case
Create an automation rule that will remove the attachments of all issues that were resolved 30 days ago.
Configuration
Create a new rule and name it appropriately.
Providing a description will help you to identify what the rule does but this step is optional.
Scheduled trigger
Add a trigger
Select Scheduled trigger
Schedule the trigger once a day.
Interval
Run the automation at 3:00 am as it is preferable to make this operation outside of business hours.
JQL Selector
Add a Selector
Select JQL selector
JQL Query
Use the following expression:
status WAS closed BEFORE -30d
Boolean condition
Add a Condition
Select Boolean condition
Expression
Use the following expression:
%{selector.issue.attachment} != null
Update field action
Add an Action
Select Update field
Field
Select Attachments (current attachments will be replaced)
Update to
Select Value returned by parser expression and fill the field below with an empty string (empty quotations marks "").
Related use cases
If you still have questions, feel free to refer to our support team.