In my Jira namespace, while creating a ticket, there is a CustomField dropdown called Client which has some options as shown in the below image.
I am not able to find a way to fetch these options in the dropdown via JIRA REST API.
Can someone please suggest how to get it?
If you want to get all the allowed values for a custom field, use the createmeta or editmeta methods. Here is an example resource:
/rest/api/2/issue/createmeta?projectKeys=YOURPROJECTKEY&issuetypeNames=Bug&expand=projects.issuetypes.fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the createmeta methods. you will get allowed options for all custom fields.
REST API url : /rest/api/2/issue/createmeta?projectKeys=<PROJECT KEY>&issuetypeNames=Bug&expand=projects.issuetypes.fields
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.
@Nic Brough -Adaptavist- Thanks for the quick reply.
the id for the above client dropdown is customfield_12345
Can you pls tell how to retrive the fieldId and contextId so that I will use the same in the API call to fetch the field options?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same place, but the line above is "issue custom field contexts". You might want to check "projects" in the same area.
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 will need to use the custom field context calls, as documented in the link I gave, to get the context for the custom field you are querying the contents of.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.