限制 TFS WorkItemStore.Query 的结果

发布于 2024-09-08 23:07:25 字数 279 浏览 2 评论 0原文

有没有办法限制从 WorkItemStore.Query 返回的工作项数量?

workItemStore.Query("Select Title from Issue where (State = 'Active') order by Title") <-- 返回相当多的结果。对于我正在做的事情,我只想要前 5 个结果。

使用类似的查询 “从问题中选择前 5 个 ID、标题,其中 (State = 'Active') 按标题排序” 结果是“预期字符串结束。错误是由 «5» 引起的。 “ 错误。

Is there a way to limit the amount of workitems that gets returned from WorkItemStore.Query?

workItemStore.Query("Select Title from Issue where (State = 'Active') order by Title") <-- returns quite a few results. For what I'm doing I only want the first 5 results.

Using a query like
"Select TOP 5 ID, Title from Issue where (State = 'Active') order by Title"
results in a "Expecting end of string. The error is caused by «5».
" error.

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

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

发布评论

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

评论(1

那一片橙海, 2024-09-15 23:07:25

我认为在这种情况下,您可能无法使用 WIQL。我想到了一些事情 - 您可以对 TFSWorkItemTracking 数据库进行数据库查询,或者您可以使用另一个限制因素(上次更新日期、创建日期等)。

I think you may be out of luck with WIQL in this case. A couple things come to mind-- you could do a database query against the TFSWorkItemTracking database, or you could use another limiting factor (last updated date, create date, etc.).

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