美文网首页
python连接jira

python连接jira

作者: gz_tester | 来源:发表于2021-07-30 15:21 被阅读0次
  1. 安装jira包
    pip install jira
  2. 获取jira账户权限
from jira import JIRA

jr = JIRA('http://jira.test×××.net', auth=("useranme", "password"))
  1. 调取jira接口,获取jira数据
jql = "project=test AND issuetype=Sub-task AND assignee in ('test') AND Sprint in openSprints()"

search_data = jr.search_issues(jql, maxResults=999)

data = []

for i in search_data:
      res = {}

      isss = jr.issue(i.id)
      res['issuekey'] = i.key
      res["summary"] = isss.fields.summary
      data.append(res)

print(data)

相关文章

网友评论

      本文标题:python连接jira

      本文链接:https://www.haomeiwen.com/subject/ibfcvltx.html