Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Script runner validator- reject the option for setting FieldA as long as the fieldB is empty


 I would like to reject the option for setting the FieldA ("Fixed in version/s") filed as long as the fieldB ("Affects Version/s") field is empty

should I work with ?

if (! cfValues['FieldA']) ...

how should I write it with script validator? 


Thanks for your help !

1 answer

1 accepted

1 vote
Answer accepted

Instead of doing this in a validator, you could set up a behaviour and hide the fixedVersions field until the user inputs something in the affectsVersions field. 

Server-side script on "Affects Version/s" field:

def affectsVersions = getFieldById("versions")
def fixedInVersions = getFieldById("fixVersions")

if (!affectsVersions.value) {
} else {

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

190 views 1 6
Read article

Atlassian Community Events