question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

customFields API calls missing?

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
adam-nielsencommented, Sep 3, 2020

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 what fieldId 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 😃

0reactions
adam-nielsencommented, Sep 3, 2020

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:

const values = await jiraClient.issues.getCreateIssueMetadata(
	{
		projectKeys: ['MyProject'],
		issuetypeNames: ['MyIssueType'],
		expand: 'projects.issuetypes.fields',
	}
);
const fields = values.projects[0].issuetypes[0].fields;
// Now use fields.customfield_1234.allowedValues
Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing information in CustomFields table when working with ...
Hello I am working with API and its integration with Power Bi and when I call to the CustomFields table i get the...
Read more >
Missing custom fields into api call - invoices - Zoho Cares
If a custom field value is empty, that custom field information won't be sent in our response. We request you to check this...
Read more >
Missing API call: Create new Custom Field on an object
Is there a way to register a new custom field on a object using pure api calls?As part oi an app custom installation...
Read more >
Custom fields have been created in Jira but I'm no...
The custom fields have been created but are not present in the API response call. How do we add the fields in the...
Read more >
Customfields missing in API : r/ConnectWise - Reddit
so when I run GET request, _info is the last field in reply JSON and customFields field is missing. If I fetch all...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found