如何在 WIQL 中查询不存在的字段

发布于 2025-01-11 11:26:10 字数 273 浏览 3 评论 0原文

我正在尝试获取特定字段为空的工作项。我尝试过

And [Dell.SDLC.CapabilityID] Not Contains [Any]
And [Dell.SDLC.CapabilityID] Is Empty
And [Dell.SDLC.CapabilityID] = ''

返回 0 结果的查询。我相信这是因为当未指定该字段时,它根本不会显示为工作项中的字段之一。我查看了一些此类工作项的 JSON,但该字段不在其中。有没有办法返回字段不存在的所有工作项?

I'm trying to get the workitems for which a particular field is empty. I have tried queries like

And [Dell.SDLC.CapabilityID] Not Contains [Any]
And [Dell.SDLC.CapabilityID] Is Empty
And [Dell.SDLC.CapabilityID] = ''

which return 0 results. I believe it's because when the field is not specified, it does not appear at all as one of the fields in the workitem. I have looked at the JSON for a few such workitems and that field is not in it. Is there a way to return all workitems for which a field does not exist?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

因为看清所以看轻 2025-01-18 11:26:10

当我测试查询时,我发现如果该字段为空,则在查询中将其保留为空即可。

例如,请参考下图。

有 6 个功能,其中 4 个 testsignleline 字段为空。
输入图片此处描述
添加“testsignleline”字段空查询。结果:
输入图片此处描述

在 wiql 格式中,这是 "SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State], [System.Tags]、[Custom.testsignleline] FROM WorkItems WHERE [System.TeamProject] = @project 和 [System.WorkItemType] = 'Feature' 和 [System.State] '' 和 [Custom.testsignleline] = '' ORDER BY [Custom.testsignleline]"

When I tested the query, I found if the field is empty, just leave it empty in the query.

For example, please refer the picture below.

There is 6 feature and 4 of them the testsignleline field is empty.
enter image description here
add the "testsignleline" field empty query. result:
enter image description here

In wiql format, this is "SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State], [System.Tags], [Custom.testsignleline] FROM WorkItems WHERE [System.TeamProject] = @project and [System.WorkItemType] = 'Feature' and [System.State] <> '' and [Custom.testsignleline] = '' ORDER BY [Custom.testsignleline]"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文