How to update a system field for Jira issue using CLI
This article is about system fields. If you’re looking to update custom fields, please refer to this instead: https://bobswift.atlassian.net/l/c/xZPhJLTd which uses the action updateCustomFieldOptions.
This article provides guidelines on updating the system field options using the Jira Command Line Interface (JCLI).
Instructions
To update a system field using JCLI, you can use direct parameters. The available parameters can be found under Optional Parameters here:
Use the action updateIssue.
--action updateIssue --issue "ZJIRACLI-4" --components "auto1"
Make use of the direct parameters to update:
issueType, type, summary, resolution, labels, priority, reporter, assignee, description, components, affectsVersions, fixVersions, environment, security, field, value, lookup, date, dateFormat, autoVersion, autoComponent, estimate, originalEstimate, append, appendText, continue, suppressNotify, comment, group, role, findReplace, findReplaceRegex, file, encoding
Potential problem:
If you face the error: is not defined or not valid in this context
the most probable cause is: the field is NOT on the edit screen.
Being on create screen is not enough, be sure to add the field to the edit screen. After that step, the error will disappear, and the command will succeed.