In order to clean up Rally I want to change the parent for projects which are marked as "Closed"
--MyWorkspace
- Project 1
- Project 2
- Child 1 (Status = Closed)
- Child 2 (Status = Closed)
- Child 3 (Status = Open)
- Project 3
I want to update the parent of "Child 1" and "Child 2" to "Project 1"
(Want to move those child projects under different parent.
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')
I am using below method to check all the projects under the required workspace
projects = rally.getProjects(workspace=workspace)
for proj in projects:
print (" %12.12s %s %s" % (proj.oid, proj.Name, proj.State))
This gives me parent level projects only
<id> <Name> <status>
This logic doesn't return all the child projects though.
Also I am looking for post
method to update the parents once I get the list of projects I want to close.