Skip to content

adtk work-items

The work-items command group (alias: wi) lets you query, inspect, and list work items from Azure DevOps.

FlagShortDescription
--project-pProject 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.

Terminal window
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:

Terminal window
adtk wi get 42 -p MyProject
ID: 42
Rev: 5
System.Title: Fix login page redirect
System.State: Active
System.AssignedTo: Jane Doe

Auto-detect from branch:

Terminal window
# On branch feature/42-fix-login
adtk wi get
# Automatically fetches work item 42

List work items using a WIQL query. If no query is provided, a default query returns recent work items ordered by changed date.

Terminal window
adtk work-items list [--project myproject] [--query "SELECT ..."] [--top 25]
FlagDefaultDescription
--query, -qRecent items queryWIQL query string
--top25Max results to return

Example:

Terminal window
adtk wi list -p MyProject --query "SELECT [System.Id], [System.Title] FROM WorkItems WHERE [System.State] = 'Active'" --top 10
ID TYPE TITLE STATE ASSIGNED TO
42 Bug Fix login page redirect Active Jane Doe
51 User Story Add dark mode support Active John Smith
2 work items

List available work item types for a project. Requires --project.

Terminal window
adtk work-items types --project MyProject
NAME DESCRIPTION
Bug Describes a divergence between required and actual behavior
Epic Describes a large body of work
Task Describes work to be completed
User Story Describes functionality from a user perspective

List work items currently assigned to you.

Terminal window
adtk work-items my [--project myproject]

Example:

Terminal window
adtk wi my -p MyProject
ID TYPE TITLE STATE ASSIGNED TO
42 Bug Fix login page redirect Active Jane Doe
55 Task Update API documentation Active Jane Doe
2 work items

List comments on a work item.

Terminal window
adtk work-items comments <id> [--project myproject]

Example:

Terminal window
adtk wi comments 42 -p MyProject
ID AUTHOR DATE TEXT
1 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 comments

Show lifecycle metrics for a work item, including cycle time, lead time, time-in-status, and status transitions.

Terminal window
adtk work-items metrics <id> [--project myproject]

Example:

Terminal window
adtk wi metrics 42 -p MyProject
Current Status: Closed
Cycle Time: 72h0m0s
Lead 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