为了清理 Rally,我想更改标记为的项目的父级"Closed"
--MyWorkspace
- Project 1
- Project 2
- Child 1 (Status = Closed)
- Child 2 (Status = Closed)
- Child 3 (Status = Open)
- Project 3
我想更新"Child 1" and "Child 2" to "Project 1"
(想将那些子项目移动到不同的父项下)的父项。
import sys
from pyral import Rally, rallyWorkset
options = [arg for arg in sys.argv[1:] if arg.startswith('--')]
args = [arg for arg in sys.argv[1:] if arg not in options]
server = <server>
apikey = <api_key>
workspace = <workspace>
project = <project_name>
rally = Rally(server,apikey=apikey, workspace=workspace, project=project)
rally.enableLogging('mypyral.log')
我正在使用以下方法检查所需工作区下的所有项目
projects = rally.getProjects(workspace=workspace)
for proj in projects:
print (" %12.12s %s %s" % (proj.oid, proj.Name, proj.State))
这仅给了我父级项目
<id> <Name> <status>
但是,此逻辑不会返回所有子项目。
post
此外,一旦我获得要关闭的项目列表,我正在寻找更新父母的方法。