Scriptrunner validator transition require checkbox

Daren Seto March 22, 2024

I am attempting to add a validator to a workflow.

I have tried a couple different scripts but wasnt sure if how to complete.
Would something as simple as this code work? 

Or do i need something more complex.

I have two fields

Code review assignee - customfield_13300
Code review complete - customfield_14130

If code review assignee has a value i want to require code review complete to equal yes 

I tried this code but i am unfamiliar with scriptrunner

and( issue.fields['customfield_13300'].hasvalue, issue.fields['customfield_14130'].value == "yes" )

Screenshot 2024-03-22 at 11.09.41 AM.pngScreenshot 2024-03-22 at 11.09.35 AM.png

1 answer

1 vote
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 28, 2024

Hi Daren,

Thank you for your question.

I can confirm that in ScriptRunner for Jira Cloud that Workflow validators use the Jira Expression framework provided by Atlassian, and you will need to use these to create the conditions you require.

It sounds from your description that you require that when a value is selected in a user picker field named Code review assignee, the checkbox field named  Code review complete must have the value yes.

I can confirm we have an example here which shows how to check if a user picker field has a certain value and in the example here, we show how to check if a checkbox field has a certain value selected.

Using these examples and the linked Jira Expression documentation should help as a guide to help you create the expression required to solve your requirement.

I hope this information helps.



Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events