Skip to content

[BUG] az boards query: WIQL @project macro returns empty result (exit 0) while literal project works #1480

@younes-io

Description

@younes-io

Summary

az boards query returns an empty response with exit code 0 when WIQL uses @project in [System.TeamProject] = @project.

Using the same query with the literal project name returns results.

Versions

  • Azure CLI: 2.76.0
  • Azure DevOps extension: 1.0.2
  • OS: Linux (WSL2)

Repro

az devops configure --defaults organization="https://dev.azure.com/<org>" project="<project>"

az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = @project AND [System.State] = 'Technical Refinement'"
echo $?

Actual

  • Command exits 0
  • No output returned

Control (works)

az boards query --wiql "SELECT [System.Id] FROM WorkItems WHERE [System.TeamProject] = '<project>' AND [System.State] = 'Technical Refinement'"
  • Returns expected work item list

Expected

@project should resolve to the configured default project and return the same result set as the literal project value.

Notes

  • Local config contains project exactly as expected (no hidden/trailing chars).
  • This appears specific to @project expansion in this WIQL context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureFeature Work required.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions