How to query work items once and get desired fields
还没有人认领这个 Issue。
评估
调研方向
从 issue 中显示的 query_by_wiql 和 get_work_items 调用开始,然后阅读 Azure DevOps Python API 文档,了解它们支持的字段和请求行为。完成的标准是确定一次调用是否能够返回所请求的工作项字段;如果不能,则定义所需的 API 或文档变更。
由索引模型根据 Issue 内容生成。
描述
Hi There, I tried to use the following codes to execute my query with wiql. However, it depends on two times api calls, one is query_by_wiql and the other is get_work_items. In the first method, it will get all the ids (but no other fields), in the later one, it will get work items based on the ids returned in the first method. My question is that is there a way to directly query and get my desired fields in just one call?
credentials = BasicAuthentication('', api_token)
connection = Connection(base_url=server, creds=credentials)
client = connection.clients.get_work_item_tracking_client()
wiql = Wiql(query=query)
wiql_results = client.query_by_wiql(wiql, top=100).work_items
if wiql_results:
ids = [str(res.id) for res in wiql_results]
work_items = client.get_work_items(ids, fields=fields)
- 主要语言
- Python
- 星标
- 684
- 派生
- 218
- 平均合并
- 8 天 10 小时
- 30 天内合并 PR
- 1
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/azure-devops-python-api 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 55/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 1/5 1 小时以内 新手友好度 55/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 45/100
查看 microsoft/azure-devops-python-api 的全部 Issue
相似的 Issue
-
area/auth bug comp/agent P3 platform/discord type/security
难度 2/5 1-3 小时 新手友好度 88/100
NousResearch/hermes-agent#117848 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
bancolombia/sentinel#23 ·
-
test md 未关闭CI
难度 2/5 1-3 小时 新手友好度 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
难度 2/5 1-3 小时 新手友好度 74/100
langchain-ai/deepagents#6450 ·
-
bug client
难度 2/5 1-3 小时 新手友好度 88/100