Can i get list of all attachments and the size of the attachment

mani@123
Contributor
August 11, 2019

Hello All,

I am trying to determine the distribution of file size across all the attachments.  For example,  number of files less than 1MB, between 1MB and 10MB and between 10MB and 50 MB.

Is it possible?

Thanks in Advance,

Mani

3 answers

2 accepted

2 votes
Answer accepted
Payne
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.
August 12, 2019

If you or perhaps a DBA within your company has access to the database, a simple query like the following will give you that information. I generally advocate against directly accessing the database, but an occasional query like this I say is OK.

select filesize from fileattachment order by filesize desc

mani@123
Contributor
August 13, 2019

Thanks Payne! I can see all attachments size in DESC order.

Thanks Again,

Mani

Payne
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.
August 14, 2019

You can do a select *; there are only 9 columns, and none are BLOBs

SELECT * FROM fileattachment

Like # people like this
2 votes
Answer accepted
Alexey Matveev
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.
August 11, 2019

Hello,

You can not do it out of the box. You can either have a look at the jira_home/data/attachments folder and write a script to get the data, you need, or you can use Jira API to get the same info. But in any case you would need to develop a script.

Aleksandr Duk November 13, 2024

2024_11_13_14_55_21 Projects - Jira and 20 more pages - Work - Microsoft​ Edge.jpg

It's JIRA home. Where should I look for "data"?

0 votes
Alexander Pappert
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.
August 12, 2019

you can use Excel power query, to get Information About Name, size, … from a specific folder

https://www.mssqltips.com/sqlservertip/4022/retrieve-file-sizes-from-the-file-system-using-power-query/

mani@123
Contributor
August 12, 2019

Hi Alexander,

Thanks for the reply!

How do i connect powerquery to the centos server? I didn't find any documentation online.

Thanks in Advance,

Mani

Alexander Pappert
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.
August 12, 2019

Install the power query addon in ecxel
then, as in my link above,:
-> Power Query ribbon, go to the section Get External Data, click on From File and then navigate to From Folder

You Need access to the jira-addon folder

Suggest an answer

Log in or Sign up to answer