Track implementation of the azdo boards iteration project list command.
Command Description
List the iteration (sprint) hierarchy for a project within an Azure DevOps organization. Iteration paths classify work by schedule and expose optional start/finish dates, all retrieved through the Work Item Tracking Classification Nodes REST API.
Command Signature
azdo boards iteration project list [organization/]<project>
- Aliases:
ls, l
- Positional argument follows
[organization/]<project> parsing rules with default organization fallback.
Flags
--path, -p: Optional iteration path relative to the project root. When set, treat the node as the root for listing.
--depth, -d: Optional integer (1–10) limiting depth. Default 3. Maps to $depth.
--include-dates: Optional bool. When enabled, surface Start Date and Finish Date columns sourced from node attributes.
- JSON export flags wired via
util.AddJSONFlags.
Behavior
- Resolve streams, parse
[organization/]<project>, and start/stop the progress indicator around API calls.
- Acquire the Work Item Tracking client and call
classificationnodes/Iterations using either GetClassificationNodes (root listing) or GetClassificationNode (scoped path) with $depth.
- Flatten the returned tree depth-first. For each node capture:
Name, fully-qualified Path, HasChildren, Level, and optionally StartDate/FinishDate. The Path must remain untouched so users can copy it directly into azdo boards work-item list --iteration.
- When JSON export requested, emit an object with
json:"nodes" containing the ordered list. Each node entry must expose a path field so scripts can feed the value to --iteration without parsing table text. Include date pointers with omitempty when requested.
- Default path outputs a table via
ctx.Printer("list") with columns Name, Path, Level, Has Children, plus date columns when --include-dates is set. Use indentation prefixes to illustrate hierarchy while keeping the Path column intact.
- Validate
--depth bounds and surface descriptive errors for invalid paths or client failures.
Testing
- Cover root listing, scoped path listing, depth truncation, JSON export (assert
path presence), and error propagation using classification node mocks.
References
Track implementation of the
azdo boards iteration project listcommand.Command Description
List the iteration (sprint) hierarchy for a project within an Azure DevOps organization. Iteration paths classify work by schedule and expose optional start/finish dates, all retrieved through the Work Item Tracking Classification Nodes REST API.
Command Signature
ls,l[organization/]<project>parsing rules with default organization fallback.Flags
--path,-p: Optional iteration path relative to the project root. When set, treat the node as the root for listing.--depth,-d: Optional integer (1–10) limiting depth. Default 3. Maps to$depth.--include-dates: Optional bool. When enabled, surfaceStart DateandFinish Datecolumns sourced from node attributes.util.AddJSONFlags.Behavior
[organization/]<project>, and start/stop the progress indicator around API calls.classificationnodes/Iterationsusing eitherGetClassificationNodes(root listing) orGetClassificationNode(scoped path) with$depth.Name, fully-qualifiedPath,HasChildren,Level, and optionallyStartDate/FinishDate. ThePathmust remain untouched so users can copy it directly intoazdo boards work-item list --iteration.json:"nodes"containing the ordered list. Each node entry must expose apathfield so scripts can feed the value to--iterationwithout parsing table text. Include date pointers withomitemptywhen requested.ctx.Printer("list")with columnsName,Path,Level,Has Children, plus date columns when--include-datesis set. Use indentation prefixes to illustrate hierarchy while keeping thePathcolumn intact.--depthbounds and surface descriptive errors for invalid paths or client failures.Testing
pathpresence), and error propagation using classification node mocks.References