Azure / Azure/azure-devops-cli-extension

JMESPath Cannot query values containing a dot in the key

Open
#1,253 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
682
Forks
278
Avg merge
3d 23h
Merged PRs (30d)
3

Description

### This is autogenerated. Please review and update as needed.

## Describe the bug
Trying to query specific values from a work-item using the az boards cli with the `--query` parameter fails as some of the keys in the JSON payload contains a dot in them.
The following parameter is expected to return the title of a work item:
```--query "fields.`"System.Title`""```

Sample payload without the `--query`
```json
{
"fields": {
...
"System.Description": "

Sample Description
",
"System.Id": 1234,
"System.Title": "Sample Title"
...
},
...
}
```

**Command Name**
`az boards work-item show
Extension Name: azure-devops. Version: 0.21.0.`

## To Reproduce:

Command used (id and organization has been removed)
```powershell
az boards work-item show `
--id {} `
--organization {} `
--query "fields.`"System.Title`""
```

## Expected Behavior
The title of the task returned in the terminal output.

## Environment Summary
```
Windows-10-10.0.18362-SP0
Python 3.8.9
Installer: MSI

azure-cli 2.26.1 *

Extensions:
azure-devops 0.21.0

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.