feat(issue): add yt issue get-field (YT-8) #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/issue-get-field-YT-8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
yt issue get-field <ID> <FIELD>to read a single custom-field value: plain mode prints the presentation string and exits 0;--jsonemits{field, value, type, raw}.claude-botneeds to read theAI Agentcustom field after a Claude run; today consumers parseinspect --json, filtercustomFields[]by name, then dig intovalue.name. This mirrors theset-state/set-estimationergonomics.Closes YT-8.
Test plan
yt issue get-field YT-8 StateprintsIn Progress.yt issue get-field YT-8 State --jsonreturns the four-field envelope with theStateBundleElementdiscriminator.yt issue get-field YT-8 Estimation --jsonreturnsvalue: nullfor an unset field and exits 0.yt issue get-field YT-8 NonexistentFieldexits non-zero with a clear error.Adds `yt issue get-field <ID> <FIELD>` to read a single custom-field value. Plain mode prints the presentation string on stdout (`Queued`, `In Progress`, etc.) and exits 0; `--json` emits `{field, value, type, raw}` where `raw` is the original JSON value (lets scripted consumers parse non-string shapes) and `type` is the value's `$type` discriminator. An unknown field name exits non-zero; a known-but-unset field exits 0 with an empty value, matching how data callers already treat null custom fields. Driver: claude-bot's YouTrack action needs to read the `AI Agent` custom field after a Claude run. Today every consumer has to parse `inspect --json`, filter `customFields[]` by name, then dig into `value.name`. Mirrors the existing `yt issue set-state` / `set-estimation` ergonomics. #YT-8 State Done