Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is It Possible To Delete Attachments with Certain Extensions Using JIRA Automation?

clerambeau
May 6, 2026

Hello. New to Atlassian and loving it already. My question is this. With JIRA automation I was able to create an automation trigger/rule that deletes named files after an issue/task status transitions to RESOLVED. But this means I either have to instruct the users to assign those specific names to all uploads, or I have to rename everything they upload to those specific names. That is not acceptable. I need to create an automation rule that will delete all attachments with a "*.sql" or "*.SQL" extension.

I used this article to set up the rule: https://community.atlassian.com/forums/Jira-Service-Management/Deleting-attachments-in-Jira-Service-Management/qaq-p/2498363

Here is the screenshot of the rule, that works fine:

jira.png

As you can see the *.sql files are all prenamed as DCR_001.sql - DCR_020.sql. I need the rule to delete any *.SQL or *.sql file, not just those specific ones.

Is that even possible? If it is, how do I set that up?

Thanks.

Nestor.

1 answer

1 accepted

3 votes
Answer accepted
Dexter de Vera
Community Champion
May 6, 2026

Hi @clerambeau ,

You can use this regular expression ---  (?i).*\.sql$

Under Delete attachment action:

Filename = Matches

Regular expression = (?i).*\.sql$

 

For more info: 

(?i)  -> makes case not sensitive

*  -> any filename

\.sql -> .sql extension

$  -> end of filename

 

image.png

 

Hope it helps,

Thanks!

clerambeau
May 7, 2026

@Dexter de Vera  It works. Thank you so very much! 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events