Dear Answers community,
We need to archive a whole lot of attachments load. We are hitting storage limit and want to start solving this issue. We will archive some issues and projects but I would also want to have a good criteria to search for issue with a lot of load.
For that I used JQL: "attachments is not empty"
But I can not know what is the size of the attachment. Any suggestion on how to solve this case? I want to have a list of issues with attachments, this list should included attachment size.
Cheers
You will definitely need some code to enable this - something that can go into an issue, check the attachments and display the size.
Francis is right in that the Script Runner could give you a scripted field that could display the total size of all attachments on an issue, and it's only a few lines of code.
But there's no Script Runner on Cloud, and the restrictions mean that you can't add similar add-ons either.
But, two other options
Both of those would use https://docs.atlassian.com/jira/REST/latest/#api/2/attachment-getAttachment
Hi Nic
Sorry for reviving old threads, but you always seem to be able to help me in here
I could really use a script (for ScriptRunner), that can tell me the attachment size per Issue. I managed to find one that gives me number of attachments, but that doesnt really help me unfortunately.
Hopefully you'll see this,
Best regards Nikolaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tibor beat me to it with https://answers.atlassian.com/questions/44223581
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The following action from JIRA Command Line Interface (CLI) will give you a CSV file of issues and attachments with size:
--action runFromIssueList --jql "project = XXX" --common "--action getAttachmentList --issue @issue@ --file attachmentList.csv --append --outputFormat 2" --clearFileBeforeAppend
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
SQL for JIRA is also an option as the ISSUEATTACHMENTS table supports FILESIZE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Francis,
No, did not consider that. I want to know if there is other approaches rather than recurring to scripts. However, thks for your quick reply, I may give it a try if no other option.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you consider a scripted field (script runner) which is set with the total size of all attachments related to an issue ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.