Can I require a field be populated based on specific resolution values?

We have a text field we would like to be populated on resolve/close but only when the resolution is fixed, complete, or cannot reproduce.  Is this possible?

1 answer

you could create 2 transitions: 

  • fixed, complete, or cannot reproduce
  • other

And use 2 diferent transition screens and validators.

 

Thanks, but that's really not what we're looking for.  We need a validator that incorporates conditional logic.

This is a script for simple script validator:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.fields.CustomField

switch (issue?.getResolutionObject().getName()){
    case "fixed": case "complete": case "cannot reproduce":
        CustomField textField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("field name")
        return issue?.getCustomFieldValue(textField) != null;
            
    default:
        return true;           
}

Suggest an answer

Log in or Join to answer
Community showcase
Emilee Spencer
Published Friday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

50 views 0 3
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot