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: 

Attachment Validation

Harsh
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.
February 21, 2023

Hello All,

Scenario - 
If on creation of a ticket an attachment is added. Then on triggering a transition using ACCEPT transition a screen pops up with date and attachment field again. Here there should be 2 things happening - 
1. It should check whether the ticket has an attachment already, if there exist an attachment then it should accept and go ahead with transition, else

2. if there in no attachment it should not accept (an error should come -Please upload an attachment) the transition until an attachment is uploaded.

Is it possible to implement this, I am new to JIRA script runner.

Thanks!

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
Vamsi Kandala
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.
February 21, 2023

Hi,

You can try using the 'Validator' option for the transition linking the 'ACCEPT' status where you have the screen associated with it.  In this, you can use either the 'Field Required' validator and select the 'Attachment' field or select the validator 'Must have a Document Vault or Jira attachment' option.

Hope this helps.

Thanks,
Vamsi

Harsh
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.
February 23, 2023

Hey,

Thanks a lot. I figured it out. 

Although I have another question. If you can help with that.

Thanks! 

0 votes
Tiago Pereira
Contributor
June 15, 2023

And if you want to check if there are attachments dependent on other fields selection?