I'm having an issue getting all customFieldOption objects. How can i get them? I'd like to map the custom field option name with it's id. Thoughts?
I hope i understand what you are asking.
If you have the Script runner plugin you can go this way .
Now to get the custom field object, press F12 then click on inspect in the Firefox developer view, drag the cursor to the field on create screen, and then you will see "customfield_id" You can also get the by going to custom field on the JIRA admin panel and edit the field then you will see the id, so you will now have "customfield_id"
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
CustomField cf86900 = ComponentAccessor.getCustomFieldManager().getCustomFieldObject("customfield_86900")
String cf86900Value = issue.getCustomFieldValue(cf86900)
Kind regards,
Mo
import jira.component.ComponentAccessor
import jira.issue.CustomFieldManager
import jira.issue.fields.CustomField
doesn't exist. I do not have access to CustomFieldManager. I've tried various methods.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have the script runner plugin for Jira, you need this plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to install it depends where exactly you want to place your script for eg. Postfuntion script on work flow transition e.t.c you can download here
Kind regards,
Mo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.