Question in a subject. We're handle sensitive data in attachments and want to purge all of them after reporter will aprove that he received them. Is there an easy way to automate this process?
Download post-function plugin from here.
https://bitbucket.org/bhushan154/jira-delete-attachments-post-function/downloads#download-263211
Haven't tested it yet. Let me know if you have any issues.
Try using ComponentAccessor.getAttachmentManager()
And see similar artical.
Hope this helps you
Patina
Thanks, but writing a plugin for this procedure isn't an easy way for me
if you need to automate then you have to write postfunction or listener to do that job
else you can delete attachments by using rest api
/rest/api/2/attachment/{id}(DELETE)
check this
https://docs.atlassian.com/jira/REST/latest/#d2e3993
free plugin is there to delete all attachements at once
https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.attachdeleter
That's an interesting plugin but still not a lot difference between manual deleting.
Maybe there is a way to check existence of attachments in Issue on transition?
I think I can expand my add-on https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.attachdeleter to add new post-function. I will create a issue in my bug tracker
That will be a very nice feature to have!
You can use the Script Runner plugin and code like this in a scripted workflow postfunction.
import com.atlassian.jira.component.ComponentAccessordef attachmentManager = ComponentAccessor.attachmentManager def attachments = attachmentManager.getAttachments(issue) attachments.each {attachment -> attachmentManager.deleteAttachment(attachment) }
Done it. https://marketplace.atlassian.com/plugins/ru.mail.jira.plugins.attachdeleterNext version will provide options by date
i have a error on -> can you help me?
It has to be „->“ instead of „->“
what is a import i need to add on this post function?
Hi i am using smart attachment plugin
I need to delete the attachements in some categories after the invoice is been done in the title so kindly help me to write a script in the post fuction.'
For ex : i need only input file and output file from the attachment and i need to delete other files from the attachment after the transition is been done to invoice.
Hi Bhushan Sir,
I have installed this jar on local host but not getting how it will work can you please guide me !
Regards
Sanjay Dhandare
Hi Sir I got it it will appear as a custom functionality in workflow !
Great work !
It looks like you're new here. Sign in or register to get started.