Unable to copy RTC workitem description using javascript
Hi,
I am trying to copy the RTC WI description value to a medium string / Html box using the script attached and it is not working.
dojo.provide("com.example.common.MyClass");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
dojo.declare("com.example.common.MyClass", null, {
getDefaultValue: function(attributeId, workItem, configuration) {
var value = workItem.getValue(workItemAttributes.DESCRIPTION);
return value;
}
});
})();
The Same script is working between two custom attributes.
I tried replacing the description attribute id as wee, no luck !
Any help on this is much appreciated.
|
Accepted answer
I created a calculated Value with the below script based on yours and set it to a custom attribute: medium string or HTML and this works for me:
dojo.provide("com.example.common.MyClass");
Hareesh Jairaj selected this answer as the correct answer
Comments
Hareesh Jairaj
commented Jun 05 '15, 9:08 a.m.
Hi Don Yang,
Thank you, This code is working fine.
When compared, I found the below line is the only difference from my script.
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
Can you please explain how this line makes the difference.
Thanks in advance
Hareesh.
Don Yang
commented Jun 05 '15, 6:12 p.m.
Hareesh,
|
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.