TimZander / TimZander/claude

standards/CLAUDE.md: document ADO WIQL @CurrentIteration team-context requirement

Open Beginner friendly
#167 0 comments 0 reactions 0 assignees View on GitHub

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: @CurrentIteration needs 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 --team flag 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.md ADO section documents the VS402612 failure and the 3-step resolution.
  • Exact az commands for resolving team + current iteration path are included.
  • Note that az boards query has no --team flag (so the macro can't be supplied directly).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.