0

Is there a way for a defect to be updated with Pyral and show the author of the change to be another user other than the user id used to log into Rally?

Here's what I've tried, but it doesn't work:

rally = Rally(server, user, password)
rally.enableLogging('rallyConnection.log')
rally.setProject("RallyTestPrj")

defectID = 'DE9221'
notes = "Adding new note from Python"
author = rally.getUserInfo(username='rallyTest@test.com').pop(0) 

defect_data = { "FormattedID" : defectID,
                "Notes"       : notes,
                "Author"      : author.Name
}

try:
defect = rally.update('Defect', defect_data)
except Exception, details:
sys.stderr.write('ERROR: %s \n' % details)
sys.exit(1)
print "Defect updated"

I've also tried author.DisplayName, author.EmailAddress, but it still logs the change to the defect from the user who's credentials are used to run the python script.

sorin
  • 161,544
  • 178
  • 535
  • 806
edwin.greene
  • 139
  • 3
  • 9

1 Answers1

0

The author attribute is not something that you can make modifications to. Rally will always record the author as whichever user is being used to run the script. For what purpose do you want to do this?

KateT
  • 199
  • 1
  • 6
  • When a subversion commit occurs, this python script will run and set a defects state to fixed; it would be best if the user who checked in the code was the same user that set the state to fixed. – edwin.greene Apr 04 '13 at 14:23
  • 1
    Check out Rally's Changeset functionality. This is what the Rally-built SVN connector uses to register SVN commits. When a Changeset is created on a Rally Artifact, the connector can set the Author to be a valid Rally user. –  Apr 04 '13 at 22:38