2017-02-02 48 views

回答

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) 
相關問題