feat(jira): add --field flag for custom fields on issue create and update#2
Open
andinger wants to merge 2 commits intoBjoernSchotte:mainfrom
Open
feat(jira): add --field flag for custom fields on issue create and update#2andinger wants to merge 2 commits intoBjoernSchotte:mainfrom
andinger wants to merge 2 commits intoBjoernSchotte:mainfrom
Conversation
…date
Add support for setting arbitrary Jira custom fields via a repeatable
--field <id>=<value> flag on both `jira issue create` and `jira issue update`.
Values are auto-coerced by type:
- numeric strings → number
- "null" → null
- valid JSON → parsed (enables option objects and arrays)
- everything else → string
Example usage:
atlcli jira issue create \
--project PROJ --type Story --summary "My story" \
--field customfield_10028=5 \
--field customfield_10077={"value":"Feature"}
atlcli jira issue update --key PROJ-123 \
--field customfield_10028=8 \
--field customfield_10079=3
- issues.md: add --field to Create/Update options tables, new "Custom Fields" section with type coercion table, value syntax for option/multi-select/user fields, field discovery workflow, and a note on field availability; remove stale bulk-edit tip - fields.md: replace non-existent --set syntax with correct --field flag and cross-reference to the new custom fields section
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
jira issue createandjira issue updateonly support a hardcoded set of standard fields. There is currently no way to set custom fields (e.g.customfield_10028for Story Points) via the CLI — requiring users to fall back to direct REST API calls withcurl.Solution
Add a repeatable
--field <id>=<value>flag to both commands. Values are auto-coerced to the correct type before being passed to the Jira API:customfield_10028=55(number)customfield_10194=Some text"Some text"(string)customfield_10077={"value":"Feature"}{ value: "Feature" }(object)customfield_10195=[{"value":"A"}][{ value: "A" }](array)customfield_10028=nullnullUsage
Changes
apps/cli/src/commands/jira.tsgetFlagsfrom@atlcli/core(already exported, handles repeated flags →string[])parseCustomFields()helper with type coercion--fieldintohandleIssueCreateandhandleIssueUpdateissueHelp()with flag documentationTesting
Verified against a live Jira Cloud instance. The flag correctly passes custom field values through to the API; field availability errors (wrong screen/issue type) are returned by Jira as expected.