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 Leaders.
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

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 Leaders.
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 Leaders.
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?

Suggest an answer

Log in or Sign up to answer