在jira中检查未分配票证的脚本?(java,python或其他)

时间:2017-02-02 03:27:12

标签: jira jira-rest-java-api python-jira

我想使用java,python或任何其他脚本检查jira中未分配的票证。

1 个答案:

答案 0 :(得分:0)

使用jira-python我们首先搜索所有可能的问题,然后检查受理人字段是否为None,因此没有人分配。

# search_issues can only return 1000 issues, so if there are more we have to search again, thus startAt=count
issues = []
while True:
    tmp_issues = jira_connection.search_issues('', startAt=count, maxResults=count + 999)
    if len(tmp_issues) == 0:
        # Since Python does not offer do-while, we have to break here.
        break
    issues.extend(tmp_issues)
    count += 999

not_assigned = []
for i in issues:
    if i.fields.assignee is None:
        not_assigned.add(i)