Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pull all attachments more than 150 MB and reduce

shakibuddin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 1, 2022

Hi All,

Currently we have many attachments which has size of150MB and more. We need to analyze the number of attachment more than 150mb and reduce the option to 50MB.

Kindly help us if we can pull the attachments using JQL

 

2 answers

0 votes
Rilwan Ahmed
Community Champion
February 1, 2022

@shakibuddin 

By JQL it is not possible. But I can suggest this work around to find max file sizes. Modify to retrieve based on size.

1. Run the below query to find the files ordered by their size. File size are in bytes
select * from fileattachment order by filesize desc

2. Get required the attachment ID's from query 1 and add in this query. 

select a.id as attachmentId,concat(p.pkey,'-',issuenum) as issueNum, filename, FILESIZE
from fileattachment a
left join jiraissue i on i.id = a.issueid
left join project p on p.id = i.project
where a.id in (590446,880263,647811)

0 votes
Hana Kučerová
Community Champion
February 1, 2022

Hi @shakibuddin ,

welcome to the Atlassian Community!

Please see the answers here for the possibilities - it is not possible to use JQL.

Suggest an answer

Log in or Sign up to answer