Configuring dynamic Read-Only attributes

You can configure a condition customization that specifies which attributes are Read-Only based on the value of another attribute.

Before you begin

To configure dynamic Read-Only attributes, you must create a script that checks the value of an attribute to determine whether a condition is true. To use scripts to customize attributes, you must set the Enable Process Attachment Scripts property on the server Advanced Properties page. See Configuring conditions for details about setting Enable Process Attachment Scripts.

About this task

The example in the following task creates a condition named Tested, which uses the Tested.js script, shown below, to check for a specific value in an attribute. The Operation Behavior is then configured to prevent users from modifying several attributes if the condition is true.
For details about writing scripts, see

(function() {
    dojo.declare("org.example.Tested", null, {

        matches: function(workItem, configuration) {
            return true;



  1. Open the Attribute Customization page:
    1. In the Team Artifacts view of the Work Items perspective, right-click the project area and select Open.
    2. Click the Process Configuration tab.
    3. Expand Project Configuration > Configuration Data > Work Items, and then click Attribute Customization.
  2. Select Conditions, then click Add. Enter a name that describes the customization. Select Script Based Condition from the Provider drop-down list.
    Screen capture of Add Configuration window with Script Based Condition selected in the Provider field.
  3. In the Configuration section, click Browse and navigate to the script that tests for the condition.
    Screen capture of Configuration section with Tested.js shown in the Local File Path field.
  4. Expand Team Configuration, then click Operation Behavior. Click in the Everyone cell for the Save Work Item action. In the Preconditions section, click Add. Select the Read-Only Attributes For Condition precondition.
  5. Click Add. In the Edit Read-Only Attributes window, select the condition, in the Rule field, that you created. Then select the attribute or attributes that should be Read-Only if the condition is true.
    Screen capture of Edit Read-Only Attributes window with Tested selected in the Rule field, and several attributes selected in the list below the rule.
  6. Click Save to save your changes to the project area.


When users try to save work items where the condition is evaluated as true, the operation fails if the users have modified any of the Read-Only attributes.

video icon Video channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community forums library

support icon Support

IBM Support Community
Deployment wiki