Jira "The value X does not exist for the field Y" in CI
Jira validates set-field values against the field configuration. If you send a component, version, or select option that is not defined for the project, it returns 400 with "The value X does not exist for the field Y."
What this error means
Creating or updating an issue fails with 400 and "components":"The value 'API' does not exist for the field 'components'." while other fields succeed.
HTTP/1.1 400 Bad Request
{"errorMessages":[],"errors":{"components":"The value 'API' does not exist for the field 'components'."}}Common causes
The option is not defined for this project
Components, versions, and select options are project-scoped. A value valid in one project is rejected in another that lacks it.
Setting a value by name that must be an id
Some fields resolve by id, not display name. A close-but-wrong name (case or spacing) fails to match any allowed value.
How to fix it
List the allowed values with createmeta
- Query create metadata with fields expanded for the project and issue type.
- Read the exact allowed component, version, or option names or ids.
- Send a value that appears in that list.
curl -sf -u "$JIRA_EMAIL:$JIRA_API_TOKEN" \
"https://your-domain.atlassian.net/rest/api/3/issue/createmeta?projectKeys=ABC&expand=projects.issuetypes.fields"Reference the value by id when names are ambiguous
For components and versions, set by id to avoid name-matching pitfalls.
-d '{"fields":{"components":[{"id":"10001"}]}}'How to prevent it
- Resolve components, versions, and options from createmeta per project.
- Prefer ids over display names for option-backed fields.
- Create missing components or versions before the CI job runs.