microsoft / microsoft/azure-devops-python-api
Fetch work item search results: usage of top and changedDate
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 684
- 派生
- 218
- 平均合并
- 8 天 10 小时
- 30 天内合并 PR
- 1
描述
Hey there,
am trying to find matches for some keywords with fetch_work_item_search_results. Param top within WorkItemSearchRequest is limited to max. 1000, does this mean they're max. 1000 results that can be returned or max. 1000 work items that are even checked?
I'd also like to apply a filter to check only for the work items from the past week, but when adding the filter with System.ChangedDate following exception is thrown:
azure.devops.exceptions.AzureDevOpsServiceError: Unknown filter [System.ChangedDate] found.. Which filter could be used instead or is there no possibility to filter a specific timeframe without using WIQL?
sort_option = SortOption(field='system.id', sort_order='ASC')
for keyword in test_keywords:
search_request = WorkItemSearchRequest(
#filters = { 'System.ChangedDate': [ '@Today-7' ]},
search_text = keyword,
order_by = [sort_option],
skip = 0,
top = 1000,
include_facets = False
)
work_item_search_response = search_client.fetch_work_item_search_results(search_request, project=project_name)
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先从 issue 中显示的 WorkItemSearchRequest 和 fetch_work_item_search_results 入口点开始,然后查阅 Azure DevOps work item search API 文档,了解 top 限制和支持的筛选器。完成标准是记录 top 限制的是返回的工作项还是搜索的工作项,并确定按更改日期限制结果的受支持方式,或者明确说明需要 WIQL。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- azure, python
- 领域
- api
- Issue 类型
- 文档
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100