[英]How to retrieve the 'links' associated with a JIRA ticket using jira-python?
我正在尝试使用以下表达式来检索有关带有jira-python
的 JIRA 票证的数据,包括链接:
issue = self.jira.search_issues("key=MYPR-11", fields=["links", "worklogs", "created","timetracking", "updated", "status", "Severity", "priority", "type", "fixVersions", "affectedVersions","components", "labels", "reporter", "assignee"])
但是在查看可用字段时,似乎缺少“链接”:
print(dir(issue.fields))
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'assignee', 'components', 'created', 'customfield_10010', 'fixVersions', 'issuetype', 'labels', 'priority', 'reporter', 'status', 'timetracking', 'updated']
知道如何使用`jira-python 查询“链接”信息吗?
我不太确定你想要什么links
,但我认为你需要问题链接。 您使用了错误的字段名。 该字段被称为issuelinks
而不是links
。
issue = self.jira.search_issues("key=MYPR-11", fields=["issuelinks", "worklogs", "created","timetracking", "updated", "status", "Severity", "priority", "type", "fixVersions", "affectedVersions","components", "labels", "reporter", "assignee"])
如果您想拥有所有可用字段,请尝试*all
以包含所有字段。 https://docs.atlassian.com/software/jira/docs/api/REST/latest/#api/2/issue-getIssue
我不确定jira-python
支持这个
编辑
正如@Alex 提到的:如果未指定任何字段,则返回所有可用字段。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.