#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, os,time,requests,datetime
import schedule
from jira import JIRA
def send_jira():
jira = JIRA(auth=("user", "pwd"), options={'server': 'host'}) #改成自个的账户密码及地址
name_list = ['aa','bb','cc','dd','ee','ff'] # 这块写jira_name ,指向人
data = {}
for x in (name_list):
issue = jira.search_issues('project in (SUPV01, SUPV02) AND issuetype = 故障 AND status in (Open, Progress, Reopened) AND assignee in (%s)'%x,fields='')
data[x]=len(issue)
print(data)
return data
if __name__ == '__main__':
schedule.every(3).seconds.do(send_jira)
while True:
schedule.run_pending()
time.sleep(1)
python jira 取提出指向未解决的问题
发布时间 2024-01-04 17:32:43作者: 乐乐乐乐乐乐樂