It's all about the answers!

Ask a question

RTC 6.0.1: How to set value of a work item field if another field has been modified ?


Narayanan Potti (27037679) | asked Sep 19 '17, 1:38 p.m.

In RTC 6.0.1 how to set a work item field if another field has been modified ?  


I need to set the value of field Is Release Modified to Yes automatically if Release field has been modified. Please let me know the best way to implement it. 

Thanks In Advance. 

2 answers



permanent link
Manju Gowda (37110) | answered Sep 20 '17, 12:32 a.m.
edited Sep 20 '17, 12:33 a.m.

Hello Narayanan,

Use calculated values to achieve this. Below is sample example.

dojo.provide("com.example.calculatedvalues");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
    dojo.declare("com.example.calculatedvalues", null, {
        getValue: function(attribute, workItem, configuration) {
                       var url = "String to add to other attribute (Filed)";
                       return (url);
        }
    });
})();

Once the script is done, Goto Types and Attributes.
-> Select a work item type which work items require this script.
-> Select an attribute where you want change and add calculated script.

- Manju


permanent link
Ulf Arne Bister (1.3k413) | answered Sep 19 '17, 4:42 p.m.

 Hi,


please work through this Calculated Value example for work item customization. You will have to write a little JavaScript of your own.

If this works for you please mark this accepted.

 - Arne


Comments
Narayanan Potti commented Sep 19 '17, 9:01 p.m.

 Thanks for the information. How do I write JavaScript  to find if a field Release has been changed.   Appreciate your help !

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.