feat(issue): expose per-link direction and verb in inspect --json #96

Merged
Claude-Run merged 1 commit from feat/YT-40-link-direction-json into main 2026-07-03 17:58:51 +02:00
Member

yt issue inspect --json returned two structurally identical entries for the two directed slots of a link type (they differed only by their issues array), so a consumer could not tell the blocker (depends on) from the blocked (is required for) without inverting silently.

Request direction on the inspect_issue links fetch, guarantee a direction (OUTWARD/INWARD/BOTH) on every serialized links[] entry, and attach a resolved verb (sourceToTarget for OUTWARD/BOTH, targetToSource for INWARD) computed client-side via IssueLink::resolve_verb. The linkType object and issues array (with idReadable and the nullable resolved stamp) are unchanged for back-compat. Documented on the yt issue inspect --json CLI help.

#YT-40

`yt issue inspect --json` returned two structurally identical entries for the two directed slots of a link type (they differed only by their `issues` array), so a consumer could not tell the blocker (`depends on`) from the blocked (`is required for`) without inverting silently. Request `direction` on the `inspect_issue` links fetch, guarantee a `direction` (`OUTWARD`/`INWARD`/`BOTH`) on every serialized `links[]` entry, and attach a resolved `verb` (`sourceToTarget` for `OUTWARD`/`BOTH`, `targetToSource` for `INWARD`) computed client-side via `IssueLink::resolve_verb`. The `linkType` object and `issues` array (with `idReadable` and the nullable `resolved` stamp) are unchanged for back-compat. Documented on the `yt issue inspect --json` CLI help. #YT-40
feat(issue): expose per-link direction and verb in inspect --json
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 38s
Create release / Create release from merged PR (pull_request) Has been skipped
6cbd0f82e2
`yt issue inspect --json` returned two structurally identical entries for the two directed slots of a link type (they differed only by their `issues` array), so a consumer could not tell the blocker (`depends on`) from the blocked (`is required for`) without inverting silently.

Request `direction` on the `inspect_issue` links fetch, guarantee a `direction` (`OUTWARD`/`INWARD`/`BOTH`) on every serialized `links[]` entry, and attach a resolved `verb` (`sourceToTarget` for `OUTWARD`/`BOTH`, `targetToSource` for `INWARD`) computed client-side via `IssueLink::resolve_verb`. The `linkType` object and `issues` array (with `idReadable` and the nullable `resolved` stamp) are unchanged for back-compat. Documented on the `yt issue inspect --json` CLI help.

#YT-40
Claude-Run deleted branch feat/YT-40-link-direction-json 2026-07-03 17:58:52 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pandoras-box/youtrack-cli!96
No description provided.