Deleting Multiple attachments from JIRA

Francois Latouche October 26, 2014

Would it be possible to add a feature that allows the user to delete multiple attachments in one go through the 'Manage Attachments' feature?

We regularly update a JIRA issue by sending emails to it (great feature!) and are finding that our issues are getting cluttered with email signature logos. Deleting each logo individually results in a notification emails being repeatedly sent to viewers which is causing a lot of frustrations.

Alternatively (or in addition), the issue could be resolved by configuring JIRA not to attach any email attachments to an issue which would necessitate the user to manually attach the file if required.

Both approaches have a pros and cons and might be useful depending on how the system is being used.

5 answers

1 accepted

0 votes
Answer accepted
Pedro Cora
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 26, 2014

Hi Francois,

There's an improvement request for this already. It's filed at https://jira.atlassian.com/browse/JRA-22180.

smile

-- Pedro

8 votes
Vadim Rutkevich
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.
November 26, 2014

Hello, community.

You can try our add-on Smart Attachments. It allows you to delete a group of attachments at once and has many more features. You can download it from https://marketplace.atlassian.com/plugins/com.stiltsoft.jira.smart-attachments.

Thanks.

 

Best Regards,

Vadim Rutkevich

2 votes
cweiske July 10, 2019

Since the bulk deletion issue is open since 2006 and no end in sight, and I had to delete 200 attachments, I did the following:

 

  1. Open browser developer console
  2. Paste:

  3. while (true) { $('.attachment-delete a').first().click(); await new Promise(resolve => setTimeout(resolve, 3000));}
  4. Press enter
  5. Click on the confirmation button. Wait 3 seconds. Click on the next confirmation button.
Beverley Moysey July 23, 2019

Thanks, that was helpful for my 80+ that attached themselves I swear without me doing it.

Nicholas Palmer November 19, 2020

In case someone finds themselves here from a google search.  Here's my modified version that also clicks the confirmation button and "file no longer exists" error that sometimes pops up.

while (true)
{
if ($("#delete-attachment-submit").length)
{
$("#delete-attachment-submit").first().click();
await new Promise(resolve => setTimeout(resolve, 5000));
}
else if ($("#aui-dialog-close").length)
{
$("#aui-dialog-close").first().click()
await new Promise(resolve => setTimeout(resolve, 5000));
}
else
{
$('.attachment-delete a').first().click();
await new Promise(resolve => setTimeout(resolve, 5000));
}
}

Like Ahmed Arslan likes this
Ahmed Arslan February 22, 2021

Thanks @Nicholas Palmer  it worked like a charm but took a time obviously which should be fine.

0 votes
Vadim Rutkevich
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.
September 23, 2019

Hi Francois!

Please try Delete Bulk Attachments for Jira. No need to wait for request completion. The app is completely free. You can get more bulk operations in Smart Attachments for Jira.

Thanks.


Sincerely, Vadim

0 votes
Francois Latouche October 27, 2014

OK Thanks Pedro,

 

I am now watching issue JRA-22180 so happy to mark this as answered, although it looks like JRA-22180 has been around for a while.

Suggest an answer

Log in or Sign up to answer