我想删除redmine安装上的所有已归档项目。从我的浏览器这样做,但我有400个......
我有想法编写脚本,但redmine REST api似乎没有公开删除已存档的项目......并且没有"全部删除"管理小组的功能。
你们有没有必须处理这类事情?
答案 0 :(得分:0)
尝试python-redmine库:
from redmine import Redmine
redmine = Redmine('http:///', username='', password='')
projects = redmine.project.all()
for project in projects:
print project.status, project.id
for project in projects:
if project.status == 5:
redmine.project.delete(project.id)
https://media.readthedocs.org/pdf/python-redmine/latest/python-redmine.pdf