It's all about the answers!

Ask a question

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


Donna Thomas (14122548) | asked Oct 24 '18, 2:08 p.m.
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


permanent link
Ralph Schoon (63.1k33645) | answered Oct 24 '18, 3:00 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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".

Donna Thomas selected this answer as the correct answer

Comments
Donna Thomas commented Oct 25 '18, 10:12 a.m.

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!


Ralph Schoon commented Oct 25 '18, 10:44 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.

Your answer


Register or 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.