Pavel,
I would like to share a small function I wrote to help with determining when to send an escalation notification.
Best Regards,
Jeff
====================================================
udb_property Name: IntervalCalculation
Value:
{
# Input parameters (input_date, Wait_Period)
my $interval;
my ($input_date) = $_[0];
my ($Wait_Period) = $_[1];
# Default is 7 days if no wait period value is passed in
if ($Wait_Period eq "") {
$Wait_Period = 7;
}
# Returns an integer value (i.e. 1) at each full $Wait_Period interval. Returns a fractional value (i.e. 1.7) otherwise.
# Parse for the decimal point to determine if a $Wait_Period has been reached.
$interval=DateTimeDiff(GetDate(),DateTimeToDate($input_date),'d')/$Wait_Period;
return $interval;
}
================================
Example Email Rule:
RULE NAME:
Defect_Escalation
RECORD TYPE:
Defect
CONDITION:
IntervalCalculation($Submit_Date)!~/\./
TO:
$Owner.email
SUBJECT:
ESCALATION: This Defect record $ID was submitted DateTimeDiff(GetDate(),DateTimeToDate($Submit_Date),'d') days ago
BODY:
Please review this record to see if any follow up is required:
ID: $ID
State: $State
Headline: $Headline
Submit Date: DateTimeToDate($Submit_Date)
Today's Date: GetDate()