standards/CLAUDE.md: document ADO WIQL @CurrentIteration team-context requirement
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 7
Description
Problem
When querying ADO work items for the current sprint via az boards query with WIQL, the @CurrentIteration macro fails outside a team context:
ERROR: VS402612: The macro '@CurrentIteration' is not supported without a team context.
This was hit live while filtering a user's assigned stories to the current iteration. az boards query takes no --team flag, so @CurrentIteration (and @CurrentIteration('[Project\Team]')) can't be resolved the way it can in the ADO web UI. The recovery required three extra steps that aren't obvious.
Goal
Add a short subsection to the ADO area of standards/CLAUDE.md documenting the failure and the resolve-team → resolve-iteration → filter-by-explicit-path workaround, with copy-paste az commands.
Proposed content (for standards/CLAUDE.md)
ADO WIQL:
@CurrentIterationneeds a team context
az boards query --wiql "... [System.IterationPath] = @CurrentIteration ..."fails with
VS402612: The macro '@CurrentIteration' is not supported without a team context— the CLI
has no--teamflag to supply one. Resolve the current iteration path explicitly first, then
filter by the literal path:# 1. Find the team (project default team is often "<Project> Team") az devops team list --org "<ORG_URL>" --project "<PROJECT>" --query "[].name" -o tsv # 2. Resolve that team's current iteration PATH az boards iteration team list --org "<ORG_URL>" --project "<PROJECT>" \ --team "<TEAM>" --timeframe current --query "[].path" -o tsv # e.g. "BGV Development\Iteration 165" # 3. Filter WIQL by the explicit path (note the doubled backslash in shell) az boards query --org "<ORG_URL>" --wiql \ "SELECT [System.Id], [System.Title] FROM WorkItems \ WHERE [System.IterationPath] = 'BGV Development\Iteration 165' \ AND [System.AssignedTo] = '<you@domain>'"
Acceptance criteria
-
standards/CLAUDE.mdADO section documents theVS402612failure and the 3-step resolution. - Exact
azcommands for resolving team + current iteration path are included. - Note that
az boards queryhas no--teamflag (so the macro can't be supplied directly).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open standards/CLAUDE.md and locate its ADO section. Add the proposed subsection covering the VS402612 failure, the missing --team flag, and the three az commands for resolving the team and current iteration path before filtering by an explicit path. Done means all three acceptance criteria are satisfied in that file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, bash
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 92/100