Hi everyone
We have a considerable amount of large files in our JIRA instance. From 100mb to 1gb.
I wanted to do a query for issues with attachments larger than 100mb, so we can make sure we have the file on our local archive, before deleting it.
We have ScriptRunner installed, so I tried modifying this script to return attachmentSize instead of numbers of attachments, but I can't get it to work.
import com.atlassian.jira.component.ComponentAccessor
def attachmentManager = ComponentAccessor.getAttachmentManager()
def numberAttachments = attachmentManager.getAttachments(issue).size()
// use the following instead for number of PDFs
//def numberAttachments = attachmentManager.getAttachments(issue).findAll {a ->
// a.filename.toLowerCase().endsWith(".pdf")
//}.size()
return numberAttachments ? numberAttachments as Double : null
Does anyone have a suggestion as to how I modify this script? Or another way to get a list of issues with large attachments? (We are running JIRA 6.4)
Thanks for your help,
/Nikolaj
That's not how fields work - you should probably add three fields, one for each line.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.