Work item attribute customization calculated value script, Summary field not populating another field

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

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

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!

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.