It's all about the answers!

Ask a question

customization attribute


De'Shea Bennett (166) | asked Apr 10 '13, 6:06 p.m.
edited Apr 11 '13, 2:00 a.m. by Ralph Schoon (63.7k33648)

I can not figure out why this is not working.

All I want to do as an initial test is display 1177.

Help please.

Code Base

=======================

dojo.provide("com.example.ValueProvider");


(function() {
 

    
dojo.declare("com.example.ValueProvider", null, {

        
getValue: function(attribute, workItem, configuration) {
    
             
        
             
var result= 1177; 
             
        
return result;          
            
        
}
    
});
})();

======================================================

One answer



permanent link
Don Yang (7.7k21114139) | answered Apr 11 '13, 1:24 a.m.
I tested with your script in 4.0.1 and it works for me.
I am wondering how you tried and what you mean it does not work, did you receive any error? What is your RTC version.

Here is what I did:

1) Enable process attachment scripts first:
http://www-01.ibm.com/support/docview.wss?uid=swg21508875
2) Create a calculated value custom attribute and point to the above js script.
3) Create a new string attribute and set the above new calculated custom attribute to it.
4) Add the new string attribute to presentation. For example Task workitem.
When creating a new task, 1117 will be set to the string attribute.

HTH

Comments
De'Shea Bennett commented Apr 11 '13, 11:35 a.m.

I set my attribute as a integer....

You said you created a new 'string' attribute.

and also

You said you created a new task... If my task are already created the new change should take place in all the task already created; right?


Ralph Schoon commented Apr 11 '13, 11:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You should consider reading https://jazz.net/library/article/1093 Lab 4 and 5 and https://jazz.net/wiki/bin/view/Main/AttributeCustomization to understand the basic steps.


Ralph Schoon commented Apr 11 '13, 11:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Also look at https://jazz.net/forum/questions/107941/synchronize-attributes-of-thousands-of-work-items-is-there-an-easy-way for when new attributes appear in work items created before the attribute was added.

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.