【发布时间】:2020-07-18 06:11:32
【问题描述】:
以下是我当前的代码。它成功连接到组织。如何在 Azure 中获取查询结果,就像他们拥有 here 一样?我知道这已经解决了,但没有任何解释,而且他们正在做的事情存在很大差距。
from azure.devops.connection import Connection
from msrest.authentication import BasicAuthentication
from azure.devops.v5_1.work_item_tracking.models import Wiql
personal_access_token = 'xxx'
organization_url = 'zzz'
# Create a connection to the org
credentials = BasicAuthentication('', personal_access_token)
connection = Connection(base_url=organization_url, creds=credentials)
wit_client = connection.clients.get_work_item_tracking_client()
results = wit_client.query_by_id("my query ID here")
附:请不要将我链接到github 或documentation。几天来我已经广泛研究了这两种方法,但都没有帮助。
编辑:我添加了成功获取查询的结果行。但是,它返回的 WorkItemQueryResult 类并不完全是需要的。我需要一种方法来查看该列和该列的查询结果。
【问题讨论】:
标签: python azure-devops