Forums

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

Delete all attachments from a certain category on old issues.

Boris Hitev December 5, 2018

Hello, 

 

For security purposes we need to distinguish all attachments coming from our customers and delete them all from all resolved issues older than 45 days. We need to keep our own attachments that the team has uploaded. 

Something important. Our Jira is internal only so issues will be opened only by our support team. And customers attachments uploaded also from them. So no way to make difference  by reporter, or reporter's email. 

How do you guys would achieve that?

Thank you in advance,

Boris

1 answer

0 votes
Edwin Kyalangalilwa
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2018

Hi @Boris Hitev,

For this you can use REST API

Looping through all issues returned from a JQL filter and getting all attachments, if the authors email for example ends with @mycompany.com then don't delete.

You can find libraries out there depending on the language you're most comfortable with.

For example in Python: jira-py attachments

Boris Hitev December 6, 2018

Hello Edwin, 

 

Thank you for the answer. I forgot to mention something very important. Our Jira is internal only. We have another system to deal with the customers and then the support team will open a case and eventually add the attachments from the customer there. This could be escalated to devs. In that case from the email perspective all reporters are internal. Sorry being not clear enough. 

 

Regards, 

Boris

Suggest an answer

Log in or Sign up to answer