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" )


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.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.