customFields API calls missing?
See original GitHub issueI’m just starting out with this library and trying to find the values for some custom fields (as I’m getting an error that I can’t create an issue unless I fill out some of these custom fields).
Looking at the docs there are API calls for custom fields, however I can’t find all of them in the library.
Am I looking in the wrong spot? I had a quick look through the code and found calls for /rest/api/2/customField/<id>/option
but I can’t see those calls listed in the JIRA API docs (only /rest/api/2/customFieldOption
) so I’m not sure whether the API has changed or if I’m just looking in the wrong place! I was wanting to make a GET to /rest/api/2/customFields
but can’t find where that one is implemented.
Would you mind pointing me in the right direction for the custom field calls? Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Sorry I’m getting confused with all the similarly-named endpoints! I was originally wanting to call
/rest/api/2/customFields
which I think this library doesn’t implement, however I have since tried to call it manually and realised you need admin access so that endpoint won’t be of any use for me anyway.Your example with
issueCustomFieldOptions.getOptionsForField()
calls a working endpoint, but unfortunately Jira returns a 404 error no matter whatfieldId
I pass through. However I have confirmed that this library is accessing the correct URL so the error is not a problem with this library.I think I will have to go back to Jira support for this, as I cannot find any API endpoint that will tell me the available options I can assign to a custom select field!
Many thanks for your help with this, and sorry for all my confusion 😃
Just for the benefit of anyone else coming across this in future, I eventually found this knowledge base article from 2016 which acknowledges that there’s no API call to retrieve the list of possible values that can be assigned to a custom dropdown/select list.
The workaround suggested is to use what in this library is
jiraClient.issues.getCreateIssueMetadata()
which I got to work like this: