Work item attribute customization calculated value script, Summary field not populating another field
![](http://jazz.net/_images/myphoto/d5159965482b6c3c267ef49e2fd45c82.jpg)
I've created a simple attribute customization for a calculated value. I've set up the new field to use this calculated value script. I made it dependent on the Summary. However, the Summary is not copied into the new field at all.
Anyone know how to make this work?
dojo.provide("com.ibm.team.workitem.attribute.calc.loe.project.name");
(function() {
dojo.declare("com.ibm.team.workitem.attribute.calc.loe.project.name", null, {
getValue: function(attribute, workItem, configuration) {
// Grab the Summary
var result = workItem.getValue(WorkItemAttributes.SUMMARY)
return result
}
});
})();
Accepted answer
![](http://jazz.net/_images/myphoto/d5159965482b6c3c267ef49e2fd45c82.jpg)
The script is missing the declaration of WorkItemAttributes. Go back to the documentation or the Enactment workshop and check how to do that. Or use the ID e.g. "summary".
Comments
![](http://jazz.net/_images/myphoto/d5159965482b6c3c267ef49e2fd45c82.jpg)
Interesting... I have about 5-6 other scripts without it that work, but they don't use the built-in attributes. I don't usually use the built-in attributes. Thank you!
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
It is needed to access the built in work item ID's in the form WorkItemAttributes e.g. WorkItemAttributes.SUMMARY. If you provide the ID as string it is not needed afaik.