It's all about the answers!

Ask a question

How to dynamically set a work item attributes as read-only

Srihari G (112) | asked Dec 26 '13, 7:58 a.m.
edited Dec 26 '13, 8:00 a.m.
 Hi Team,

I am trying to configure work item fields, or attributes, to be dynamically read-only based on conditions in other fields.  For example, if a user selects "Release 1.0" in the "Found In" field, RTC should automatically set the "Found In Release" field to "Release 1.0.1" .  Setting the "Found In Release" field automatically based on the selected "Found In" value would make the interface much more user-friendly because users would not need to provide the same information in two places and it would eliminate the possibility of having mismatched "Found In" and "Found In Release" values.  I have followed the below script and it is working for default value only.  Please check the below script and I gone through this link

(function() {
var WorkItemAttributes=;
 dojo.declare("custom.enum.foundinbuild", null, {
     matches: function(workItem, configuration) {
        var state= workItem.getValue(WorkItemAttributes.FOUND_IN);
        var result= state !=null;
return result;

One answer

permanent link
Millard Ellingsworth (2.5k12431) | answered Dec 31 '13, 2:42 p.m.
Did you do all of the steps as shown in the video you referenced? Configuring the operational behavior to leverage the script against the desired attribute is the critical part to get the read-onlyness.

Your answer

Register or to post your answer.