业务需求
要求统一修改缺陷管理工具redmine issue版本
基本实现
#!/usr/bin/env python
from redmine import Redmine
redmine = Redmine(url='http://10.10.10.110', username='改成自己的 redmine 账号',
password='改成自己的 redmine 密码', requests={'verify': False})
issues = redmine.issue.filter(project_id='eayunobs', status_id="*")
versions = redmine.version.filter(project_id='eayunobs')
dict_ver = {}
for version in versions:
dict_ver[version.name] = version.id
print dict_ver
for issue in issues:
print issue.description.encode('utf-8')