Create or edit a proposed change verification rule

To ensure that proposed changes meet business requirements and do not introduce invalid data to the CMDB, create a rule that includes a script to verify the proposed changes.

Before you begin

Role required: asset or itil

About this task

When you configure proposed change verification rules for a CI, you have an option to verify that the proposed changes pass the verification test script in the rule. The verification test results are logged as passed or failed, and you can view the results. Running the verification test is not mandatory, and a failed verification test does not prevent you from applying proposed changes.

Procedure

  1. Navigate to Configuration > Change Verification > Proposed Change Verification Rules.
  2. Click New or select an existing rule to edit.
  3. Fill in the fields, as appropriate.
    Table 1. Proposed Change Verification Rules form
    Field Description
    Rule name The name of this rule.
    Table name The table to which the rule applies.
    Filter condition Conditions to apply this rule to specific CIs.
    Active Check box to activate this rule.
    Rule script

    A verification Java script that needs to return true or false. For example:

    validateRule()
     {
     var os = current.getValue("os");
     var cpu = current.getValue("cpu_count");
    
        //Use current.getValue(fieldName) to get the proposed change value, eg. var os = current.getValue("os");
        //Your verification code
    
     if (os != "SunOS" || cpu < 2)
     return false;
         //Return true to pass the verification and false if the verification failed
     return true;
     }
  4. Click Submit or Update.

Result

On the Change Request form, you can click Verify Proposed Changes to verify proposed changes for the affected CIs.