Forums

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

Use scriptrunner to perform validations

Mathew Monteiro
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!
April 16, 2023

Hello there, 

We need to create an automation on a project in Jira for a particular issue type . 

We have the following fields on a project say Project A for issue type Epic 

a. QA Due Date( date )

b. Dev Date ( date ) 

c. FixVersion ( varchar ) 

d. Project Manager ( jira user )

e. Product Owner ( jira user )

The main goal here is to allow the Project Manager or the Product Owner mentioned in the ticket to populated the FixVersion which is always null initially but he/she cannot edit it once populated

Before the FixVersion gets populated the script must check if the QA Due Date and the Dev Date is not empty if true then an exception should be trigged saying please populated those fields first. 

This should validate irrespective of any status in the workflow

How can I go about this ? 
I am fairly new to Script-runner. Hoping that this wonderful community can provide some inputs

Thanks in advance. 

 

1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
May 2, 2023

Hi @Mathew Monteiro

From your description, you seem to want the validation to occur on the transition screen.

You can use ScriptRunner's Behaviour to handle the validation while setting the Fix Version/s field to read-only.

Please let me know if you would like a sample code.

Thank you and Kind regards,

Rma

Suggest an answer

Log in or Sign up to answer