通过PYTHON操作JIRA的COMMENT注释和TRANSITION工作流

这是目前我们的自动化部署系统要作的,所以先实现吧。

1
2
3
4
5
6
7
8
9
10
11
12
>>> from jira import JIRA
>>> authed_jira = JIRA(server=('http://jira.internet.com.cn:8080/'), basic_auth=('chengang','xxxxxxx'))
>>> issue = authed_jira.issue('SISOMM-1315')
>>> jira.add_comment(issue, 'PRISM 234234ND uat chengang test')
>>> transitions = authed_jira.transitions(issue)
>>> print transitions
>>> print [(t['id'], t['name']) for t in transitions]
[(u'11', u'\u9700\u6c42\u7f16\u5199\u5b8c\u6210')]
# Resolve the issue and assign it to 'pm_user' in one step
>>> jira.transition_issue(issue, '5', assignee={'name': 'pm_user'}, resolution={'id': '3'})
# The above line is equivalent to:
>>> jira.transition_issue(issue, '5', fields: {'assignee':{'name': 'pm_user'}, 'resolution':{'id': '3'}})

  通过PYTHON操作JIRA的COMMENT注释和TRANSITION工作流

上一篇:Outlook 2013 在邮件里面点击超链接时弹出“组织策略阻止我们为您完成此操作”


下一篇:WPF快速指导4:数据绑定之绑定方向与自定义转换器