Forums

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

validation of 1 attachments on create screen

arno
Contributor
July 21, 2025

Hi All

    We hope that users will perform verification when creating an issue, to check if they have uploaded attachments. I referred to this post(https://community.atlassian.com/forums/Jira-questions/ScriptRunner-Validation-of-2-attachments-on-create-screen/qaq-p/2788286) and found that an error was triggered. Our scriptrunner does not support getAllagetAllAttachments, but only supports getAttachment.

 

    Is there a better way to achieve this function?

1 answer

0 votes
Marc - Devoteam
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.
July 21, 2025

Hi @arno 

Are you still on Server?

it is possible, that this function is not there for the script runner version in Server, as Server is not supported anymore, I suspect this will not be coming.

Best is to contact Script runner (daaptavist) support on this.

arno
Contributor
July 21, 2025

Hi @Marc - Devoteam 

   Thank you for your reply

   Thank you for your reminder. Currently, we are indeed using the server version. I have found the corresponding method, which is to use issue.attachment.size() for judgment. I would like to further optimize it. Could we obtain the corresponding attachment name? Do you have any better suggestions?

Like Maria Rusnakova likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events