could someone give me an example on how to update a task’s revision using javascript?
I just created a task with
rallyDataSource.create("task", {"Name": "DEV: Do Work", "WorkProduct": thisDefect}, onCreateComplete,onCreateError);
Now I want to update description of the first revision of the task from “Original revision” to “Auto-created task”. I tried to get _ref of that first revision, but don’t know how. Using
function onCreateComplete(object, warnings) {
var createdObject = object;
rallyDataSource.update({"_ref": createdObject.RevisionHistory.Revisions[0]._ref, "Description": "Auto-created task"}, onComplete,onError);
}
does not work
Thanks
Revisions are a read-only collection – and are meant to provide a reliable record of changes to an Artifact, so you won’t be able to update a Revision using AppSDK or Webservices API.
I would recommend that you accomplish your end goal (i.e. providing a descriptor indicating that the Task was auto-created) via a naming convention in either the Task’s Name, or its Description text.