javascript value provider default description
I try to use javascript in rtc to set default value for description area.
https://jazz.net/wiki/bin/view/Main/AttributeCustomization
dojo.provide("com.example.common.DefaultDescription");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
var instruction= "";
var instructions= {
"project": "Please see http://jazz.net/project",
"other": "Please see http://jazz.net/other",
"test": "Please see http://jazz.net/test"
}
dojo.declare("com.example.common.DefaultDescription", null, {
getDefaultValue: function(attribute, workItem, configuration) {
var type= workItem.getValue(WorkItemAttributes.TYPE);
instruction= instructions;
return instruction;
}
});
})();
It works successfully. But
when I select a new workitem project typed , description area is set "Please see http://jazz.net/project" correctly,
then before saving workitem , I change workitem type to other, description area isn't refreshing. It must be "Please see http://jazz.net/other" for other type.
https://jazz.net/wiki/bin/view/Main/AttributeCustomization
dojo.provide("com.example.common.DefaultDescription");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
var instruction= "";
var instructions= {
"project": "Please see http://jazz.net/project",
"other": "Please see http://jazz.net/other",
"test": "Please see http://jazz.net/test"
}
dojo.declare("com.example.common.DefaultDescription", null, {
getDefaultValue: function(attribute, workItem, configuration) {
var type= workItem.getValue(WorkItemAttributes.TYPE);
instruction= instructions;
return instruction;
}
});
})();
It works successfully. But
when I select a new workitem project typed , description area is set "Please see http://jazz.net/project" correctly,
then before saving workitem , I change workitem type to other, description area isn't refreshing. It must be "Please see http://jazz.net/other" for other type.