rally - Modifying item created with rallyaddnew -
i'm creating portfolio item rallyaddnew button, i'd modify before created. example, i'd add particular parent, , add tags.
i'm guessing can modify object in perhaps beforecreate() event. if methods use? see modifying record.data.name seems work, correct way it?
for parent or tags, figure need rally.util.ref object. again, correct way modify object? doing record.data.tags.push(ref) in response beforecreate event again seems bit direct...
using beforecreate
listener, you're given record modify:
var addnew = ext.widget('rallyaddnew', { recordtypes: ['user story'], ignoredrequiredfields: ['name', 'schedulestate', 'project'], listeners: { beforecreate: function(addnewcomponent, record) { record.set('name', 'new name'); record.set('parent', '/hierarchicalrequirement/123.js') } } });
so, use record.set
function set data, , properties references parent
should use ref string, /hierarchicalrequirement/123.js
(if have record, can ref record.get('_ref')
.
Comments
Post a Comment