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

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
         }
    });
})();

0 votes


Accepted answer

Permanent link

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

1 vote

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.

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

Question asked: Oct 24 '18, 2:08 p.m.

Question was seen: 895 times

Last updated: Oct 25 '18, 10:44 a.m.

Confirmation Cancel Confirm