Use a script to define risk and impact conditions

You can set either risk or impact or both based on variable conditions.

  1. Click New to create a new calculation.
  2. Enter a name.
  3. Select the Risk or Impact values or both.
    This determines which field is updated by this risk calculation.
  4. Enter a description.
  5. Check the Use script values box.
  6. Write the script in the Script field that appears.
    The Critical service changed condition, which is provided with the plugin, sets risk and impact according to the values returned by the Business Services. If the criticality is 1, the script values are used to assign the appropriate risk and impact.
    Values from the current change request can be invoked to optionally set either risk or impact or both. Below is an example using current field values:
    if (current.assignment_group.getDisplayValue == "Network") {
    current.risk = 2;
    current.impact = 1;
    } else {
    current.risk = 3;
    current.impact = 2;