The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

How to Limit number of attachments per jira issue using script runner(groovy script)?

Pokala Venkatesh
November 20, 2018

Hi Team,

   Please help me how to limit number of attachments per jira issue using script runner(groovy script)?

Regards,

Venkatesh.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Nic Brough -Adaptavist-
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 Champions.
November 20, 2018

I can't think of a way to do this.

You could write a validator and/or condition that says "do not allow transition if there are too many attachments", but that would not block a user just adding too many attachments when they felt like it.

Tom Tran
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!
December 1, 2021

A validator is the best way to do this. If you need some resources on some snippets, please refer to this.

 

https://docs.adaptavist.com/sr4js/latest/features/workflows/validators/built-in-validators/validating-attachments-links-in-transitions