jaaq - 2014-09-05

Since there can be a max. total of 16 SLTs for any SLA/Service I wrote a Little script to generate all possible combinations(4urgencies,2request types, 2 metrics =16SLTs).
Just enter the Name of the Service you are generating SLTs for, run the script, copy the Output into the CSV Import copy and paste field, modify the Values and the Units(x minutes/hours) and you got it done.

Here's some Demo of what the Output for a Service named "Software Support" would look like:

Name;Priority;Request type;Metric;Value;Unit
'SLT Software Support critical service request';'critical';'service request';'TTO';1;'hours'
'SLT Software Support critical service request';'critical';'service request';'TTR';1;'hours'
'SLT Software Support critical incident';'critical';'incident';'TTO';1;'hours'
'SLT Software Support critical incident';'critical';'incident';'TTR';1;'hours'
'SLT Software Support high service request';'high';'service request';'TTO';1;'hours'
'SLT Software Support high service request';'high';'service request';'TTR';1;'hours'
'SLT Software Support high incident';'high';'incident';'TTO';1;'hours'
'SLT Software Support high incident';'high';'incident';'TTR';1;'hours'
'SLT Software Support medium service request';'medium';'service request';'TTO';1;'hours'
'SLT Software Support medium service request';'medium';'service request';'TTR';1;'hours'
'SLT Software Support medium incident';'medium';'incident';'TTO';1;'hours'
'SLT Software Support medium incident';'medium';'incident';'TTR';1;'hours'
'SLT Software Support low service request';'low';'service request';'TTO';1;'hours'
'SLT Software Support low service request';'low';'service request';'TTR';1;'hours'
'SLT Software Support low incident';'low';'incident';'TTO';1;'hours'
'SLT Software Support low incident';'low';'incident';'TTR';1;'hours'

and here's the script:

<? php

//init
$urgencies= array("critical","high","medium","low");
$types= array("service request","incident");
$metrics= array("TTO","TTR");
$unit= "hours";
$value= 1;
$sc= ";"; //separator charcter
$tq= "'"; //text qualifier

//config:
$ServiceName="Software Support";

//Main Program
echo "Name{$sc}Priority{$sc}Request type{$sc}Metric{$sc}Value{$sc}Unit
";
foreach($urgencies as $urgency){
foreach($types as $type){
foreach($metrics as $metric){
echo "{$tq}SLT {$ServiceName} {$urgency} {$type}{$tq}{$sc}{$tq}{$urgency}{$tq}{$sc}{$tq}{$type}{$tq}{$sc}{$tq}{$metric}{$tq}{$sc}{$value}{$sc}{$tq}{$unit}{$tq}
";
}

}

}

Hope I saved you some time ;)

 

Last edit: jaaq 2014-09-05