[rt-users] Different SLA: Setting Due in scrip based on Starts
Cristiano da Costa
crsurf at gmail.com
Mon Feb 6 10:05:32 EST 2006
Hello
I want to set a different SLA if user filled the field Start, bellow is my
code, but doesn´t work.
my $now = RT::Date->new($RT::SystemUser);
my $sla = RT::Date->new($RT::SystemUser);
$now->SetToNow;
$sla->SetToNow;
$sla->AddSeconds(+14400);
if ( $self->TicketObj->Starts eq '1970-01-01 00:00:00' ) {
$self->TicketObj->SetStarts( $now->ISO );
}
else {
$sla = $self->TicketObj->Starts;
$sla->AddSeconds(+14400);
}
if ( $self->TicketObj->Started eq '1970-01-01 00:00:00' ) {
$self->TicketObj->SetStarted( $now->ISO );
}
if ( $self->TicketObj->Due eq '1970-01-01 00:00:00' ) {
$self->TicketObj->SetDue( $sla->ISO );
}
return 1;
Sds
Cristiano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20060206/4e4baf97/attachment.htm>
More information about the rt-users
mailing list