我正在尝试预先填充创建缺陷弹出窗口,但我不清楚我可以传递哪些键/值。文档说密钥应该是“名称”和“描述”,但它们没有被拾取。但是,环顾四周后,我注意到它正在选择“defaultName”。任何帮助表示赞赏!
`
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);
`