Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes



One answer

Permanent link
Hi, you need to have enough dependent attributes for description configured that trigger the value provider. see https://jazz.net/library/article/1093 Lab 5 for a similar approach.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Mar 12 '12, 10:12 a.m.

Question was seen: 5,693 times

Last updated: Mar 21 '13, 12:11 p.m.

Confirmation Cancel Confirm