Query by System field not working.

Celso Martins 1 Reputation point
2022-01-20T00:39:33.567+00:00

Hi.

I'm struggling with this query and I'm wondering if the system has some type of block to query work items by some fields.

I use two System fields to keep the department information: System.AreaLevel1 and System.AreaLevel2.

This information composes the System.AreaPath.

I can query normally by AreaPath and AreaLevel2 but there is no way to make the API return the items when I add the query by the AreaLevel1, even when I only query by this field.

This works: query = { 'query' => "SELECT Id FROM WorkItems WHERE [System.AreaLevel2] = 'E2E'" }
Also this works: query = { 'query' => "SELECT System.AreaLevel2 FROM WorkItems WHERE System.AreaPath under 'PMO Marketing E2E\\E2E\\'" }
But this not: query = { 'query' => "SELECT Id FROM WorkItems WHERE System.AreaLevel1 = 'PMO Marketing E2E'" }

The last query returns an empty set, and I have more than a thousand work items satisfying the query. I tried every operation available for string fields.

How it could be possible?

Thanks in advance

Microsoft Partner Center API
Microsoft Partner Center API
Microsoft Partner Center: A Microsoft website for partners that provides access to product support, a partner community, and other partner services.API: A software intermediary that allows two applications to interact with each other.
312 questions
0 comments No comments
{count} votes