Good morning,
I have a behavior that uses the value of a multi-select drop down field to show another text field when selected, however; when any other value in the multi-select field is also selected, the behavior does not work.
Any ideas on what I can do to correct this?
def accessPoints = getFieldByName("Access Points")
def optionsManager = ComponentAccessor.getOptionsManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def accessPointsField = customFieldManager.getCustomFieldObject(accessPoints.getFieldId())
def accessPointsConfig = accessPointsField.getRelevantConfig(getIssueContext())
def accessPointsOptions = optionsManager.getOptions(accessPointsConfig)
def other = getFieldByName("Other, explanation required access")
if (accessPoints.value == "Other (add detail to access request explanation)") {
other.setHidden(false)
} else {
other.setHidden(true)
}
I'm sure it is something simple. I just can't seem to figure it out.
Thanks!
accessPoints.value.contains("Other (add detail to access request explanation)")
Try this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can ignore that error.
Groovy is a dynamic language, which means all method and property names are looked up when your code is run, not when it’s compiled, unlike Java. Because of this, the static type checker is not always correct. It is a best-efforts attempt to let you know if there are problems with your code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you both for the assist! This is working as expected now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did you catch the news at Team ‘25? With Loom, Confluence, Atlassian Intelligence, & even Jira 👀, you won’t have to worry about taking meeting notes again… unless you want to. Join us to explore the beta & discover a new way to boost meeting productivity.
Register today!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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.