Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the Jira CLI with custom fields?

Timothy Hutt September 18, 2025

I'm trying to use the Jira CLI to create an issue, but we have a custom field "Variant" that can be a list of tags.

Unfortunately whatever I try, the CLI gives a VERY uninformative message:

 

"additionalAttributes": {
"customfield_10319": {
"value": "Common"
}
},
Gives "✗ Error: Specify the value for Variant in an array"
Ok 
"additionalAttributes": {
"customfield_10319": {
"value": ["Common"]
}
},
Gives exactly the same error. What about this?
"additionalAttributes": {
"customfield_10319": [{
"value": "Common"
}]
},
This gives "✗ Error: failed to generate JSON"
Where is the documentation for this? Where is the JSON schema?
(Sorry for the bad code formatting; this input widget sucks.)

1 answer

0 votes
Samuel Weiss September 19, 2025

Hi @Timothy Hutt 

Have you tried to fetch a sample work item using API "/rest/api/3/issue/{issueIdOrKey}" so that you see how the data looks like?

Kind regards,
Samuel

Timothy Hutt September 22, 2025

Yes, it was like this:

 "customfield_10319": [
{
"value": "Common"
}
],

And actually that format worked fine with the Python API. Must be a bug in the Jira CLI. It doesn't appear to be open source so there's no way around it.

Probably better to avoid it until it and use the Python API (what I did) or REST directly until it is better tested, or at least has better error messages.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events