Default Value Provider in RTC
Hello Team,
i am referring to example script used by jazz.net
dojo.provide("com.ibm.team.workitem.defect.DefaultDescriptionProvider");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
var DEFECT_DESCRIPTION_DEFAULT="\
What steps will reproduce the problem?\n\
1.\n\
2.\n\
3.\n\
\n\
What is the expected output? \n\
\n\
\n\
What do you see instead? Please provide screen shots if possible.\n\
\n\
\n\
Please provide any additional relevant information below (server logs, custom project area template, etc...).\n\
";
dojo.declare("com.ibm.team.workitem.defect.DefaultDescriptionProvider", null, {
getDefaultValue: function(attribute, workItem, configuration) {
var type= workItem.getValue(WorkItemAttributes.TYPE);
if (type == "defect") {
return DEFECT_DESCRIPTION_DEFAULT;
}
return workItem.getValue(attribute);
}
});
})();
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
var DEFECT_DESCRIPTION_DEFAULT="\
What steps will reproduce the problem?\n\
1.\n\
2.\n\
3.\n\
\n\
What is the expected output? \n\
\n\
\n\
What do you see instead? Please provide screen shots if possible.\n\
\n\
\n\
Please provide any additional relevant information below (server logs, custom project area template, etc...).\n\
";
dojo.declare("com.ibm.team.workitem.defect.DefaultDescriptionProvider", null, {
getDefaultValue: function(attribute, workItem, configuration) {
var type= workItem.getValue(WorkItemAttributes.TYPE);
if (type == "defect") {
return DEFECT_DESCRIPTION_DEFAULT;
}
return workItem.getValue(attribute);
}
});
})();
My query is the following:
- Default Value Script is triggered only in Intialise state? not in any other states?