Jira Cloud Automation - Schedule delete issue attachments (2023)


Don't delete your issues in Jira just to save storage space. Delete attachments instead if you really have to.

#Automation #ScheduledRule #DeleteAttachments

Smart values: support.atlassian.com/jira-software-cloud/docs/what-are-smart-values/


Jira books and Video courses (Available to buy)

1. Jira Quick Start Guide (Book): go.ravi.pro/JiraQuickStartGuide
2. Mastering Jira (Book): go.ravi.pro/masteringjira
3. Jira 7 Guide for Administrators and Developers (Video course): go.ravi.pro/JiraGuideAdmin
4. Jira 7 Essentials (Video course): go.ravi.pro/JiraEssentials

Free Video courses

1. GetAnswers: go.ravi.pro/GetAnswers
2. Portfolio for Jira: go.ravi.pro/portfolio
3. Structure for Jira: go.ravi.pro/StructureJira
4. ScriptRunner for Jira: go.ravi.pro/ScriptRunnerJira
5. Google Apps Script tutorials: go.ravi.pro/GoogleAppsScript
6. JiraTips: go.ravi.pro/JiraTips


1. Blog: www.ravisagar.in
2. Linkedin: www.linkedin.com/in/ravisagar/
3. Twitter: www.twitter.com/ravisagar
4. Instagram: www.instagram.com/ravisagar.in
5. Spotify Podcast: go.ravi.pro/spotify
6. Apple Podcast: go.ravi.pro/apple
7. Youtube: youtube.com/ravisagar1



Hello everyone so today I received this question on the community from aaron, and erin is asking, how can I auto delete issues after six months? And this question is actually very interesting.

And by the way I have covered this in one of my video, but uh, I wanted to to talk about it one more time today, because people want to delete issues, uh for some reason, because maybe they need more, maybe they don't have space on their server.

And this particular question, if you if you read the question, this question says that we received a lot of lot of tickets in their jira in their jira service management project, where people are also sending attachments.

And when of course, you have a lot of attachments on the issue, it will contribute towards the total space.

And what aaron is trying to do here is to try to delete the issues if they are if they're old now first of all.

So there are a couple of things that I want to talk about first of all, I think, uh, try to control the attachments that are coming, uh to your mailbox.

If you can, maybe I think that is probably one place where you can definitely look at if you have attachments that are really huge, or maybe maybe maybe do something about those emails.

But let us say you have those attachments, converted as jira tickets in your jira service management project.

Then instead of deleting, an issue, although deleting an issue is possible.

You can write an automation rule to do this.

But instead of deleting, the issue, you can actually delete the attachments.

So let me show you.

Let me show you one rule, which I showed in one of my video, um, I think a few months back or maybe last year, I'm, not really sure when so yeah, it was actually on 12th of january.

So I I did talk about this, and I created one rule, and I can show you the rule.

I I should have the rule with me.

So let me open the rule.

And if you look at the rule here that says delete attachments now by the way you can, I mean, first of all, what we are doing here is we are trying to delete the issues based on, uh, nothing.

But one transition if there is a transition then delete it delete the attachment, but which is probably not a good way, but I want to of course, trigger it manually, but you can also create a rule.

Let us say let us say scheduled delete attachments.

So if you okay, come on, this is not really the name of the rule.

But okay, let us select schedule here and I'll probably move my face on the left hand side.

So let us run this rule every one week and run a jql search and execute actions on each issues in the query.

So let us do that.

So maybe you can uh use here, some kind of uh, some kind of a query jql query based on the creation date, maybe for something like that, for example, if you look here, or maybe we can write one while we are doing it.

Let us let us write our jql query.

So if we go to issues let us do it one more time.

Okay, so what I want to do, let us say I want to delete the issues based on some date field.

Let us say their resolution.

Date may be switched to basic when you're working with date fields.

It is always, you know, just can we just use the basic search.

It is convenient.

So within the last or maybe more than more than more than 30 days ago.

So if you if you run this, so basically all the issues that were resolved, uh, more than 30 days ago.

You can actually take a look at this jql go to your rule.

And if you validate the query, you will find some issues.

I guess with 38 issues.

And if you open, maybe one of those maybe couple of those issues.

I just want to see if there are some attachments or not, because I want to delete those attachments, because I want to show you if it works.

So right now there are no attachments, but maybe we can upload let us see if we can upload the attachments.

So I'll try to find a way to upload, maybe maybe not on this one can't.

I just upload upload attachments on resolved issues.

Let me just try to do it on a different one.

I may have by the way some kind of some kind of a workflow transition property.

So let us try to upload any file here.

Ah, come on I'm, a bit confused how to do it.

So let me just let me just, you know, change it to in progress and try to find a way to upload a file.

Ah, come on.

I can see this big, huge button called done, which is, uh, definitely one option.

I mean, I'm not familiar with the I'm, not massively familiar with the cloud interface because I'm more used to working on server.

But yeah, there is a button.

And I now see it? Okay, so let us let us attach a couple of files.

And what I will do, I will make sure that when I run this, maybe I will go back to some of those other issues.

So maybe this one, let us upload couple of files here as well.

Maybe this one as well.

So basically we have couple of issues with some attachments, and what I want to do.

Now I want to make sure that when this rule is executed, we want to delete the attachment.

So we can also delete the issue, which you should not do, because if you delete the attachments and those issues are gone, and I want to delete all the attachments so save it.

And I want to basically should do delete attachments, turn it on.

And and what I want to do now is, I want to I want to run this.

So how do we run this come on? So maybe maybe maybe maybe this rule is still not running, because this rule will be supposed to run every week every tuesday.

So let us do one thing.

Let us do minutes, and what I will do now I will save this now because it should run.

Maybe now in just one minute, oh, come on.

Okay, we have to specify interval, which should be more than five minutes.

Okay, let us do five minutes.

And while we wait for the rule to execute, maybe I will talk about something because we have to wait for five minutes, which is not really a long time, but we have to wait.

So let me open the audit log and uh, keep on refreshing this.

So what will happen when this rule will run? It will uh go through each and every issue that will match this.

I mean, of course, first of all this rule will run.

And when this rule runs, if you have some some jql defined here, it will do something for those issues.

It says here on top execute, this rule on the provided schedule you can choose if you if you if you would like to perform actions on a set of issues gathered with a jq search or simply execute the rule, I definitely want to do it on a set of issues.

And and and that is what this rule will do.

So this rule is supposed to run on 5 28, which is roughly few minutes from now.

So let us wait for it to finish.

And if you go back to the, if you go back to the question, let me just look at the reply.

So this is what this is what I also recommended to aaron that please try not to delete an issue.

And the good thing about g, dive is that you have change history.

You have history of all the things that you have been doing in this video of jira cloud automation I showed how to delete an issue and it worked.

But when you look at the actual issue, you will see that these issues are removed, and maybe you can, I mean, I mean to be honest, I'm also, not in a favor to delete the attachments as well, because first of all try to control the the email where you have big attachments.

And when you have those attachments in jeera, you also you can delete the attachments, but when you delete the attachments again, you will lose those attachments, uh.

So just think about something else, maybe maybe write a script to download those attachments using a rest api, maybe that might work.

And then again, use the rest api to delete the attachments.

I think that will be my preference.

I have covered this by the way.

So let us take a look at the video that I made talking about working with attachments using a rest api.

So let us do that.

Yes, I think recently I made this video, delete, 700 attachments and uh, you can by the way.

So you can get all these shoes attachments, and you can also upload an attachment.

So there are so many things that you can do with rest api, and let us go back to the rule and still not still waiting for the rule to run.

It says, next one 5 28.

And what time is it right now, it is not 5 28 by the way.

Okay, I think couple of minutes from now.

So let me just open the rule again.


So what will happen when this rule will run? It? Will it should delete the attachments that we just uploaded these two files in these two issues, and it should work.

I mean, I'm just trying to make sure whenever whenever I do something I have this habit whenever I do something like scripting, or maybe any work that I do, I prefer validating it because you should you should try to validate your work, always a good thing to do in my opinion.


I guess one more minute before this rule can run.

And this is what I do normally.

I mean in the evening, I open atlassian community.

And I start looking for questions.

I try to spend few minutes every day.

I I mean, I don't really really spend like a lot of time, but you know few minutes once in a while, uh during the day, if I can especially during the evening period, I spend like 15 minutes, I open community and look at the questions and try to answer.

And when I do that, of course, I get ideas to make more videos for you guys still not run.

I don't see any any message here that says, uh that it that the rule ran.

But let me just look at the issue at the issue.

Okay, the attachments are still there on the ticket, but I don't see the rule, oh, come on.

I think, uh, I'm so stupid, I I can actually click on the button on top.

So let us do that and uh, let us see.


So it says in progress, the interface is now different.

I am so sorry, I should have clicked on the button on before, but I missed it.

I think I'm, not really in in my best mode, but let us wait for it to do something and uh, it is still in progress by the way.

And the rule is supposed to delete the attachments.

And if you don't have attachments, I think it will move on.

So I think the rule worked at least on this issue.

You can take a look at the history of the issue.

And it says, it will tell you that, you know, the screenshot is now deleted, and it was done by automation for jira.

So let us do the same thing for the other issue, and this will be, of course, the issue will be, of course, without any attachment.


So this is how you will be able to delete your attachments if you need to, and that is it.

That is all I wanted to talk about in this video.

I hope you enjoyed watching this video, and you learned something new today.

Thank you very much.



How do I remove attachments from Jira issue? ›

Open the JIRA issue, which you want to remove a file from. Click the down-arrow icon to the right of the 'Attachments' section and select Manage Attachments from the dropdown menu. The Manage Attachments page will appear: Locate the file you want to delete and click the Delete Attachment icon.

How do I delete an attachment in Jira cloud? ›

In order to delete an attachment, Move your mouse pointer over the attachment file in your Jira issue. You will be able to see a delete icon. Click on that icon to delete the attachment.

Why can't i delete attachments in Jira? ›

If the attachment was added to the issue by a comment or field, you can't delete it from the attachment panel. If that's the case, find the field or comment the attachment was added to and delete it from there. You can only delete attachments that you've added yourself.

Where are attachments stored in Jira cloud? ›

The default directory location is the data/attachments subdirectory of the Jira home directory. To be able to change the default path, create a symbolic link to the new path.

How do I Delete an attachment in Jira ScriptRunner? ›

Navigate to General Configuration > ScriptRunner > Built-In Scripts. Select Bulk Delete Attachments. Enter the space you want to work with in Space.

How do I delete stored attachments? ›

Cleaning out attachments from Android
  1. Tap on the Files app.
  2. Scroll down and tap Images or Videos.
  3. Scroll to the left to find the Messages folder and open it. This is where the images will be stored.
  4. Tap on any images you want to delete and hit the Trash button.
Apr 4, 2022

How do I delete my attachment files? ›

Remove an attachment
  1. Open the email that contains the attachment you want to delete.
  2. In the Attached box, right-click the attachment, and click Remove or select the file in the Attached box and then press the delete key on your keyboard. Note: This method deletes only one attachment at a time.

How do I bulk delete issues in Jira cloud? ›

To delete multiple issues:
  1. Perform a search with the required filters to produce a list of issues.
  2. Select Tools > Bulk Change.
  3. Select the issues you'd like to perform the bulk operation on, and select Next.
  4. Select Delete Issues and then select Next.
  5. If available, decide whether you'd like to send email notifications.
Jun 24, 2022

How do I make an attachment mandatory in Jira? ›

If you go to Project Settings > Request Types, and view the Request form Visible fields, you can define the Attachments field as required.

Which attachment settings can be configured in the attachment settings menu in Jira? ›

Edit attachment settings
  • Choose > System.
  • Select Advanced > Attachments.
  • Click Edit Settings, which opens the Edit Attachment Settings dialog.
  • In Attachment Size, specify the maximum attachment size. ...
  • (Optional) In Enable Thumbnails, choose ON to display image attachments as thumbnails on an issue.

How do I delete all attachments in Confluence API? ›

In the REST API, attachments are content. You can use the DELETE command for the attachment id on the /rest/api/content/{id} resource to delete all versions of the given attachment.

How do I delete multiple attachments at once? ›

If the target is to delete multiple attachments simultaneously, press and hold the Shift key on the keyboard. Now click the first and last attachment and then press the Delete key on the keyboard.

Why can't i delete an attachment in Confluence? ›

To delete the attachment, you have to have the edit comment permission. This is a permission we do not want to grant users.

How do I automatically delete attachments in Outlook? ›

Outlook for Windows

Click on the menu for any attachment to see the choices available which includes “Remove Attachment”. These options are in the Windows versions of Outlook 365, Outlook 2021 and Outlook 2019. Outlook 2016 has Save and Remove attachments without the Upload option.

How are Jira attachments stored? ›

Jira will store the attachments under the original project key, even if the project key is changed. For scenarios like this, you can use the query below which will use the original project key for your projects.

Can Jira issues contain attachments? ›

To share information with your team, you can attach documents, images, and screenshots to your Jira application issues. Multiple files can be attached to an issue.

Where is sen in Jira Cloud? ›

Your SEN (Support Entitlement Number) can be found under the Manage apps section of the global Jira Administration page: Click on Jira Administration cog icon. Select Apps. On the left-hand menu, click on Manage apps.

How do I Delete an attachment from a team task? ›

Select the assignment you'd like to edit, then Edit assignment. In the Edit assignment page, you'll see the file that you've attached, click the ellipses at far right of the document and select Remove form drop-down menu. Select Update to save your changes.

How do I Delete an attachment in AWS? ›

Delete a VPC attachment

Open the Amazon VPC console at https://console.aws.amazon.com/vpc/ . On the navigation pane, choose Transit Gateway Attachments. Select the VPC attachment. Choose Actions, Delete transit gateway attachment.

How do I change the attachment path in Jira? ›

JIRA 5.2 and above

Create a symbolic link on your server from the default attachment path ( <JIRA_HOME>/data/attachments ) to the path where you want your attachments to be stored.

What does deleting attachments do? ›

Your phone's messaging app can be a sneaky storage hog. Whether you're using Messages on iOS or Google Messages on Android, your settings could be taking up chunks of your device's memory. Changing them to delete message attachments is a quick way to free up space on your phone.

Is there a way to delete attachments without deleting email? ›

Gmail Attachment Remover can remove large attachments from Gmail without deleting emails permanently. Users can remove attachments from any of the mailbox folders of the Gmail account. It allows users to remove multiple attachments from Gmail in a single attempt.

How do I delete all attachments in life? ›

Keep experiences in your mind and learn out from them, observe your mistakes, and think about how you can least numbers of your mistakes.
  1. Meditate daily: ...
  2. Let go of expectation: ...
  3. Stay calm no matter the situation: ...
  4. Live an ethical life: ...
  5. Read books about non-attachment: ...
  6. Stay active even when things are changing:
Aug 31, 2020

How do I remove all attachments from a PDF? ›

Single Mode: Remove Attachments from a PDF document

To remove a single attachment or multiple attachments, select it from the list and click 'Remove' button. To remove all attachments, click 'Remove All' button. You will be prompted for confirmation as attachments once removed from the PDF documents cannot be undone.

Do attachments take up storage? ›

Message attachments are the photos, GIFs, and videos your friends and family send you. They're stored as a part of each text message, and they can take up a lot of space without you ever thinking about it.

How do I delete large attachments in email? ›

How to clear space
  1. In the Search box, type has:attachment larger:10M.
  2. Click Search . Note: Replace " 10 " with a higher number to delete larger files.
  3. Select the emails you don't need, then click Delete .
  4. On the left side of the page, click Menu. Trash.
  5. At the top, click Empty trash now.

How do I delete data from Jira cloud? ›

If you have more than one Jira product, they count as one.
  1. Activate another product on your cloud site. ...
  2. Once your second product is activated, go to Billing > Manage.
  3. Look for the product you want to reset (Jira or Confluence), select the 3 dot icon … in the product card, and then select Delete.

How do I clean up Jira? ›

Basic mandatory cleanup process
  1. Step 1: Archive old projects. If your Jira is several years old, you're bound to have a couple dozen projects that are complete, retired or never-to-be finished. ...
  2. Step 2: Archive old issues. ...
  3. Step 3: Clean up custom fields. ...
  4. Step 4: Remove inactive users.
May 31, 2022

How do I archive Jira issues in the cloud? ›

You either need to be a Jira admin or a delegated admin to make a bulk change.
  1. Open Issues.
  2. Select the issues you want to view.
  3. Open the Tools drop-down and select the number of issues you want to perform the change on. ...
  4. Select the issues you want to archive and click Next. ...
  5. Select Archive issues.
Feb 9, 2023

How do I turn off attachment preview in Jira? ›

You can do this by going to your user avatar, and select personal settings. Then disable the Jira Labs new issue view there.

Can only one document be attached at a time to a Jira issue? ›

Multiple files can be attached to an issue. Click an image thumbnail to open a preview, and if there is more than one image in the gallery, navigate to the next image preview by clicking the right arrow in the preview.

What is the attachment size for Jira automation? ›

Jira Cloud attachment size limit set to 10MB.

What is the maximum number of attachments in Jira? ›

By default, JIRA shows a maximum of 30 files in the content of ZIP-format files attached to an issue.

How do I use attachment options? ›

Add an attachment
  1. Select Home > New Email. Or, for an existing email, select Reply/Reply All or Forward.
  2. Select Home > Attach File, and choose an option: Recent items - select the arrow to find a file or image you have saved or worked with recently.

How do I delete attachments in d365? ›

In this article
  1. Select a record.
  2. Click Attachments.
  3. Select the attachment that you want to delete, click Delete on the ribbon, and then confirm the deletion. Warning. When you delete a URL attachment, you are not deleting the document itself. Instead, you are deleting only the reference to the document.
Nov 28, 2021

How do I delete attachments from SharePoint list? ›

Navigate to the SharePoint Online List >> Select the List Item >> Click on Edit from tool pane. In the Edit panel, scroll down to the bottom and click on the little X Icon next to any attachment to delete it from the list item. Click on Save to commit your changes.

Is there a way to extract attachments from multiple emails? ›

Saving Mail Attachments in Bulk from Multiple Emails
  1. Select all the attachments that you want to save. Next, hold the CTRL or SHIFT key to select multiple or specific attachments for saving and click OK.
  2. Choose a location and then click OK to save the attachments.
Jan 11, 2023

How do I mass delete attachments in Jira? ›

To delete all attachments on an issue:
  1. Open an issue.
  2. Find the Attachments section and select ···.
  3. Click Delete all.
  4. Read the confirmation message, then select the appropriate option.

Can you delete attachments in Jira? ›

Open the JIRA issue, which you want to remove a file from. Click the down-arrow icon to the right of the 'Attachments' section and select Manage Attachments from the dropdown menu. The Manage Attachments page will appear: Locate the file you want to delete and click the Delete Attachment icon.

What is the difference between archive and delete in Confluence? ›

It does not fully delete your content, just changes access to the page, as described: Archived content is excluded from quick search and analytics to keep those functions focused and relevant. However, there's an option to include archived content in an advanced search. Links to archived pages will still work.

How do I delete recent attachments in Outlook 365? ›

If there are files on your recently used list that you'd like to remove, simply right-click them and choose Remove from list.

How do I remove attachments from Outlook calendar appointments? ›

Delete Attachments From Your Calendar

Appointments that contain attachments are listed first; these appointments have an attachment symbol to the left of their names. Double-click each email, select the attachments and press "Delete" to delete them. Click the "Save and Close" button to close the appointment.

How do I see all attachments in Jira? ›

The easiest way to see all attachments is to go to the "space tools" for the space in question (you will need to be a space admin.) From there, select the "Content tools" menu item, then "Attachments." You can see all attachments in the space here.

How do I add an attachment to an issue in Jira? ›

Add an attachment to an issue
  1. Open an issue.
  2. Scroll down to the Attachments section and click +.
  3. Click Upload a file or drag and drop your files into the media picker.

How do I turn off automatic attachment preview in email? ›

Can I turn off file preview?
  1. In Outlook, select File > Options > Trust Center > Trust Center Settings, and then select Attachment Handling. ...
  2. To turn off all attachment previewers, click Turn off Attachment Preview.

How do I delete multiple attachments in Jira? ›

To delete all attachments on an issue:
  1. Open an issue.
  2. Find the Attachments section and select ···.
  3. Click Delete all.
  4. Read the confirmation message, then select the appropriate option.

How do I make an attachment field mandatory in Jira? ›

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. If you go to Project Settings > Request Types, and view the Request form Visible fields, you can define the Attachments field as required.

How do I recover a deleted attachment in Jira? ›

Description. Currently, if an attachment is accidentally deleted in Jira Cloud, there is no way to restore it apart from importing a backup. There should be a trash / soft delete / recycle bin from where these attachments can be retrieved.

Where are planner task attachments stored? ›

To see a list of all files or photos that you've attached to Planner tasks, select the three dots to the right of the plan name (…), and then choose Files. These files are stored in the SharePoint document library associated with your plan's Microsoft 365 Group.

How do I see all attachments in a thread? ›

At the top of the message list, you'll see a box that says Search Current Mailbox. Click to place your cursor in that box, type hasattachments:yes, and then click Enter.

How do I add an attachment to a workflow? ›

Adding attachments to workflows
  1. Go to System Configuration > Platform Configuration > Workflow Designer (Advanced)
  2. Open a new Workflow process or an existing one for the Incident object.
  3. Click the Attachment icon to add an attachment file.
  4. Apply the Attachment Configuration.

What are the file types for Jira attachments? ›

pptx, . vsd, . vsdx. The current size limit is 4 MB per file, but you can upload multiple files.

Top Articles
Latest Posts
Article information

Author: Tuan Roob DDS

Last Updated: 26/10/2023

Views: 5309

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Tuan Roob DDS

Birthday: 1999-11-20

Address: Suite 592 642 Pfannerstill Island, South Keila, LA 74970-3076

Phone: +9617721773649

Job: Marketing Producer

Hobby: Skydiving, Flag Football, Knitting, Running, Lego building, Hunting, Juggling

Introduction: My name is Tuan Roob DDS, I am a friendly, good, energetic, faithful, fantastic, gentle, enchanting person who loves writing and wants to share my knowledge and understanding with you.