Below is the script I have. Both fields are on the create screen but when I add the behavior and run a test nothing happens.
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
@BaseScript FieldBehaviours fieldBehaviours
def SegmentField = getFieldById("customfield_12015")
def MerchantOwnerAreaField = getFieldById("customefield_13601")
String SegmentIssueValue = SegmentField.getValue()
if (SegmentIssueValue == "Merchant") {
MerchantOwnerAreaField.setRequired(true)
} else {
MerchantOwnerAreaField.setRequired(false)
}
when I run it in the script console it gives me the following error Cannot get property 'customfield_12015' on null object
Any help would be greatly appreciated!!!
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.