如何在 WIQL 中查询不存在的字段
我正在尝试获取特定字段为空的工作项。我尝试过
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当我测试查询时,我发现如果该字段为空,则在查询中将其保留为空即可。
例如,请参考下图。
有 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.


add the "testsignleline" field empty query. result:
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]"