Unable to Set Custom Dropdown Field When Creating Jira Issue in n8n

Describe the problem/error/question

I am trying to create a Jira issue using the Jira node in n8n and need to set a custom dropdown field (customfield_10082 ) which is mandatory to create jira. When I try to set it, I receive a 400 error stating that a valid ‘id’ or ‘value’ could not be found in the Parent Option object. I have confirmed this field in a GET request and it is structured as follows:

“customfield_10082”: {
“self”: “https:/”,
“value”: “”,
“id”: “”,
“disabled”: false
}

I am trying to set the field in n8n as follows:

{
“customfield_10082”: { “value”: “Dropdown Value” }
}

What is the error message (if any)?

Here’s the error message I’m getting:

400 - {"errorMessages":[],"errors":{"customfield_10082":"Could not find valid 'id' or 'value' in the Parent Option object."}}

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.39.1
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker Desktop
  • Operating system: MacOS

@TeCoe_POC , I think you are better off using JSON in the body field rather than dedicated custom field. Also, I do not believe you need to include self and id (see API doc). Something like this

Thanks @ihortom for the response.

Actually I am trying to create a new jira through n8n so I was looking to use inbuilt Jira node for ntegration. Isn’t there a convenient way to pass customfield using Jira node iteself.

Though I will try the http node as well as you suggested.

Thanks again.

Yes, for that you need to specify the object (for dropdowns) utilizing expression as in

Thanks @ihortom.

So I tried to update Jira custom fields from the n8n UI, but I’m encountering an issue.
Getting 400 - {“errorMessages”:,“errors”:{“customfield_10082”:“Could not find valid ‘id’ or ‘value’ in the Parent Option object.”}}

Furthermore, When I add the custom field values directly in the JSON like this:

“customFieldsUi”: {
“customFieldsValues”: [
{
“fieldId”: “customfield_10082”,
“fieldValue”: {
“id”: “<“ID”>”
}
}
]

and then import the workflow, it works perfectly. (The UI shows the value as [Object object].)

However, when I try to add the fields from the n8n UI, it doesn’t work.

I have tried entering the value in JSON format in the ‘Field Value’ field, but it’s not being recognized by the UI. Here’s what I’m entering:

  • For a single value field: {"id": "<ID>"}

400 - {“errorMessages”:,“errors”:{“customfield_10082”:“Could not find valid ‘id’ or ‘value’ in the Parent Option object.”}}

My requirement is to be able to add these fields from the UI. Can anyone help me understand why this isn’t working, and what I can do to resolve the issue?

Thank you in advance for your assistance.

@TeCoe_POC , let me try once more.

400 - {“errorMessages”:,“errors”:{“customfield_10082”:“Could not find valid ‘id’ or ‘value’ in the Parent Option object.”}}

A dropdown is a list of items each of which has a text value and the associated id for that value. To set the value programmatically, you need to provide either id or value - there is no need to use them both. Moreover, getting to know the actual option id is not straightforward (and it is not the same as field ID). Also, if both are used the id takes precedence over value. Thus, I would recommend using actual values instead unless you know the id for sure (both IDs - the field and the option).

In the latter case, you would use an expression as below (from my own test workflow, use your own IDs ensuring they are valid).

The error “Could not find valid ‘id’ or ‘value’” likely indicates that the option ID is not recognized.

2 Likes

Thank you very much @ihortom.

Your solution worked perfectly and resolved the issue I was facing.

Thank you once again for your valuable help. It’s this kind of supportive and collaborative community that makes n8n a great tool to work with.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.