I’m trying to pre-populate create defect popup and I’m not clear on what key/values I can pass. The documentation says the keys should be ‘Name’ and ‘Description’ but they are not being picked up. However, after looking around I noticed that it’s picking up ‘defaultName’.
Any help is appreciated!
`
function onAddNewPreCreate(addNew, eventArgs)
{
eventArgs.item["defaultName"] = "name";
eventArgs.item["Description"] = "description";
eventArgs.item["defaultDescription"] = "description123";
}
function onLoad() {
var rallyDataSource = new rally.sdk.data.RallyDataSource('__WORKSPACE_OID__',
'__PROJECT_OID__',
'__PROJECT_SCOPING_UP__',
'__PROJECT_SCOPING_DOWN__');
var addNewConfig = {
types : ["Defect"]
};
var addNew = new rally.sdk.ui.AddNewArtifact(addNewConfig, rallyDataSource);
addNew.addEventListener('onPreCreate', onAddNewPreCreate);;
addNew.display("addNewDiv");
}
rally.addOnLoad(onLoad);
`
Unfortunately, the list of fields supported for the AddNewArtifact (as well as rally.sdk.util.Navigation.popupCreatePage) is not well-documented. Description is not one of the fields supported for pre-population into the editor window. The fields that are supported for pre-population are: