Hi,
I try to pre-fill an Insight custom field with ScripRunner Behaviours.
Basically I am struggeling getting the options out of the custom field I want to prefill. Here's the code I use so far (with some logging)
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
def field = getFieldByName("SP Anzahl RAM")
def optionsManager = ComponentAccessor.getOptionsManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def customField = customFieldManager.getCustomFieldObject(field.getFieldId())
def config = customField.getRelevantConfig(getIssueContext())
def options = optionsManager.getOptions(config)
Debugging this I get the following content of config: "com.atlassian.jira.issue.fields.config.FieldConfigImpl@d59871da"
and options seems to be empty "[]"
what am I missing?
Thank you
Markus
Community moderators have prevented the ability to post new answers.
Hi Markus
I've marked this as a duplicate of this:
Please don't double post :)
Closing this thread!
Cheers!
DYelamos
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.