I want to get the list of all the values of a dropdown field using jql.
For example - There is a dropdown field 'A' having options 1,2,3 then in the response of my query or api I want the list(or a json response having all the values) - [1,2,3]
Additional Info -
I do not have admin rights
Try this API endpoint:
Option 1
https://<your-tenant>.atlassian.net/rest/api/2/jql/autocompletedata/suggestions?fieldName=<field name>
It will return the list of possible values for the field. These are the same values you'll see in the JQL autocomplete suggestions.
Documentation on https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-jql/#api-rest-api-2-jql-autocompletedata-suggestions-get
Option 2
This is probably easier. But if you are not an admin you'll only see the options for the project you have access too, which is probably enough for you.
https://<your-tenant>/rest/api/2/customFieldOption/<field ID>
Thankyou so much for your reply!
Option 1 worked for me and I am getting the required output.
For Option 2, I was getting 404, I was using the customfield_XXXXX type of id, as <field ID> is it correct or did I do something wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry, option 2 is not valid.
I was confused but it only returns 1 option of the custom field where the ID is the ID of the option. So not what you are looking for.
I guess you'll have to go with option 1 :-)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
option 1 is not giving the full list, do I need to give some other parameter to get full list
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Shilpy Rana and @Charlie Misonne
Is there any update on how to get all options list?
Thanks,
Raaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Did anyone find a way to get entire list of options ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Charlie Misonne Hey!
Only getting a partial list of 15 values using Option #1 above. Is there any param which can be used to increase the # of values being fetched?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't see a parameter to get more than 15 values in the documentation.
I think JQL autocomplete will not show more than that in the UI. Other results will show up when typing something.
This solution seems even less ideal than I thought.
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.