FAFR to set priority based on other change fields
Requirement:
Set priority based on 3 change fields. i.e Change Additional field - "Coverage", "Impact" and "Urgency".
Steps to configure:
1. Goto Admin > Change Templates > Field and Form Rules > On Field Change: Urgency.
2. Set Conditions as: Coverage is not empty, Impact is not empty and Urgency is not empty.
3. Execute Script: Paste the attached script. Update the change additional field value as per your instance.
Script:
var Priority_Matrix = {
"Coverage 4": {
"Impact 4": {
"Urgency 4": "Critical",
"Urgency 3": "High",
"Urgency 2": "Medium",
"Urgency 1": "Low"
},
"Impact 3": {
"Urgency 4": "High",
"Urgency 3": "High",
"Urgency 2": "Medium",
"Urgency 1": "Low"
},
"Impact 2": {
"Urgency 4": "Medium",
"Urgency 3": "Medium",
"Urgency 2": "Low",
"Urgency 1": "Low"
},
"Impact 1": {
"Urgency 4": "Low",
"Urgency 3": "Low",
"Urgency 2": "Low",
"Urgency 1": "Low"
}
},
"Coverage 3": {
"Impact 4": {
"Urgency 4": "High",
"Urgency 3": "High",
"Urgency 2": "Medium",
"Urgency 1": "Low"
},
"Impact 3": {
"Urgency 4": "High",
"Urgency 3": "Medium",
"Urgency 2": "Medium",
"Urgency 1": "Low"
},
"Impact 2": {
"Urgency 4": "Medium",
"Urgency 3": "Medium",
"Urgency 2": "Low",
"Urgency 1": "Low"
},
"Impact 1": {
"Urgency 4": "Low",
"Urgency 3": "Low",
"Urgency 2": "Low",
"Urgency 1": "Low"
}
},
"Coverage 2": {
"Impact 4": {
"Urgency 4": "Medium",
"Urgency 3": "Medium",
"Urgency 2": "Low",
"Urgency 1": "Low"
},
"Impact 3": {
"Urgency 4": "Medium",
"Urgency 3": "Medium",
"Urgency 2": "Low",
"Urgency 1": "Low"
},
"Impact 2": {
"Urgency 4": "Low",
"Urgency 3": "Low",
"Urgency 2": "Low",
"Urgency 1": "Low"
},
"Impact 1": {
"Urgency 4": "Low",
"Urgency 3": "Low",
"Urgency 2": "Low",
"Urgency 1": "Low"
}
},
"Coverage 1": {
"Impact 4": {
"Urgency 4": "Low",
"Urgency 3": "Low",
"Urgency 2": "Low",
"Urgency 1": "Low"
},
"Impact 3": {
"Urgency 4": "Low",
"Urgency 3": "Low",
"Urgency 2": "Low",
"Urgency 1": "Low"
},
"Impact 2": {
"Urgency 4": "Low",
"Urgency 3": "Low",
"Urgency 2": "Low",
"Urgency 1": "Low"
},
"Impact 1": {
"Urgency 4": "Low",
"Urgency 3": "Low",
"Urgency 2": "Low",
"Urgency 1": "Low"
}
}
};
var coverage = $CS.getText("UDF_CHAR1"); // Update with the change UDF field name as per your instance.
var impact = $CS.getText("IMPACT");
var urgency = $CS.getText("URGENCY");
$CS.setText("PRIORITY",Priority_Matrix[coverage][impact][urgency]);
New to ADSelfService Plus?
Related Articles
Script to set fields from CSV using FAFR.
Works in 10604 Requirement: Load Data from CSV depending on the value selected in an additional field. Usecase: Assume there are 3 additional fields for a request template, namely, "Reference number", "Payment type and "Vendor". "Reference number" is ...
Risk Matrix for Change using Custom Module
Overview: A risk matrix helps in identifying risks based on how likely they are to happen and how serious their impact could be. This makes it easier to decide which risks need urgent attention and which ones can be watched over time. It helps manage ...
Set SLA automatically for a service request using FAFR
Note: The below FAFR script will work only on 10600 MSP and above Requirement: Set SLA automatically for a service request depending on the Priority. Usecase: Let us consider a scenario where SLA has to be set depending on the requester's associated ...
How to diff of two Date& Time fields using FAFR
If you have two date and time additional fields or default fields, and if you want to capture the difference between those two fields in Hours and minutes, then use the below script to capture the value in an additional field, Under the respective ...
Automating change stage transition based on task completion
PURPOSE: To automatically move to the next change stage when all tasks are closed, using task custom function and task custom trigger. The attached script triggers upon the closure of each task, verifying whether all tasks within the current stage ...