HI
I want to input customfield_11105 when the fix version/s is specified. But customfield_11105 is required when the fix version/s is not specified (undefine).
How can I modify?
----------
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.context.IssueContext
import utils.*
if(versionName == 'undefined') {
return true
} else {
def cf = ComponentAccessor.customFieldManager.getCustomFieldObject("customfield_11105")
def fieldConfig = ComponentAccessor.fieldConfigSchemeManager.getRelevantConfig(IssueContext.GLOBAL, cf)
def fieldValue = FieldUtil.instance.getCustomFieldStringValue(issue, "11105", log)
def defaultValue = cf.getCustomFieldType().getDefaultValue(fieldConfig)
if(fieldValue.equals(defaultValue)){
return false
} else {
return true
}
}
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.