adtk work-items
The work-items command group (alias: wi) lets you query, inspect, and list work items from Azure DevOps.
Shared Flags
Section titled “Shared Flags”| Flag | Short | Description |
|---|---|---|
--project | -p | Project name |
Get a single work item by its ID. If the ID is omitted, adtk auto-detects the work item ID from the current git branch name.
adtk work-items get [id] [--project myproject]Supported branch patterns for auto-detection: feature/12345-description, users/name/12345-fix, bugfix/12345, 12345-description.
Example:
adtk wi get 42 -p MyProject ID: 42 Rev: 5 System.Title: Fix login page redirect System.State: Active System.AssignedTo: Jane DoeAuto-detect from branch:
# On branch feature/42-fix-loginadtk wi get# Automatically fetches work item 42List work items using a WIQL query. If no query is provided, a default query returns recent work items ordered by changed date.
adtk work-items list [--project myproject] [--query "SELECT ..."] [--top 25]| Flag | Default | Description |
|---|---|---|
--query, -q | Recent items query | WIQL query string |
--top | 25 | Max results to return |
Example:
adtk wi list -p MyProject --query "SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.State] = 'Active'" --top 10ID TYPE TITLE STATE ASSIGNED TO42 Bug Fix login page redirect Active Jane Doe51 User Story Add dark mode support Active John Smith
2 work itemsList available work item types for a project. Requires --project.
adtk work-items types --project MyProjectNAME DESCRIPTIONBug Describes a divergence between required and actual behaviorEpic Describes a large body of workTask Describes work to be completedUser Story Describes functionality from a user perspectiveList work items currently assigned to you.
adtk work-items my [--project myproject]Example:
adtk wi my -p MyProjectID TYPE TITLE STATE ASSIGNED TO42 Bug Fix login page redirect Active Jane Doe55 Task Update API documentation Active Jane Doe
2 work itemscomments
Section titled “comments”List comments on a work item.
adtk work-items comments <id> [--project myproject]Example:
adtk wi comments 42 -p MyProjectID AUTHOR DATE TEXT1 Jane Doe 2025-01-15 10:30 Investigating the root cause now...2 John Smith 2025-01-15 14:22 Found the issue in the redirect handler
2 commentsmetrics
Section titled “metrics”Show lifecycle metrics for a work item, including cycle time, lead time, time-in-status, and status transitions.
adtk work-items metrics <id> [--project myproject]Example:
adtk wi metrics 42 -p MyProjectCurrent Status: ClosedCycle Time: 72h0m0sLead Time: 132h0m0s
Time in Status: New: 32h0m0s Active: 72h0m0s Closed: 28h0m0s
Status Transitions: FROM TO AT New 2025-01-10 09:00 New Active 2025-01-11 17:00 Active Closed 2025-01-14 17:00