I am trying to create Rally defect using pyral python package. Need to add a tag "#TestTag2". Is there a way to add Tag at the time defect is created? I am trying to add tag after the defect is created. But getting following error -
info = {"Workspace": "/workspace/123",
"Project": "/project/123",
"Name": "Test Defect",
"Description": "Test Defect details",
"Owner": "/user/123",
"ScheduleState": "Defined",
}
try:
defect = rally.create('Defect', info )
print ("Rally Defect Opened - {0} \n").format(defect.FormattedID)
adds = rally.addCollectionItems(defect, 'Tag',"#TestTag")
rally.addCollectionItems(defect,)
print(adds)
except Exception, details:
sys.stderr.write('ERROR: %s \n' % details)
sys.exit(1)
Getting following ERROR -
Rally Defect Opened - DE1234
ERROR: addCollectionItems() takes exactly 3 arguments (4 given)
Please help here, how to add a tag to a defect. Thanks in advance.
You got this error because of the signature of the method is the following:
You need to adjust your code to pass the list of tags:
Or you can use directly during Defect creation without any additional API calls: