[rt-users] Autoresponse on create with SLA Due date

Per von Zweigbergk pvz at itassistans.se
Mon Mar 7 08:35:23 EST 2016

I've been trying to do an autoresponse on create with SLA Due date inside the message with RT 4.4. It almost works for me. The template I'm using is at the bottom of the email.

When manually triggering the template using rt-crontool on an existing ticket, it works fine. The problem is - that because the SLA is actually set *after* the ticket has been created, the Due date will be 0 (Jan 1 1970) which means it doesn't actually work. I get Thursday at 01.00 AM localtime which corresponds just fine to 1 Jan 1970 00.00 UTC.

I'm using the scrips pretty much out of the box right now, except I've tried re-ordering the scrip "On Create Autoreply To Requestors" by prepending "ZZ" to the description as in http://requesttracker.wikia.com/wiki/ScripExecOrder but this does not seem to have actually helped.

Irrespective of that, when looking at the history this is what I get:

-          Ticket Created

-          Outgoing email Recorded (from the autoresponse)

-          Start date set (using SLA)

-          Due date set (using SLA)

Any idea what I might try in order to have the Due Date set at the time of generating the autoresponse?


This is the template I'm using:

Subject: AutoReply: {$Ticket->Subject}
Content-Type: text/html

(blah blah)

<p>Vår målsättning är att svara på alla ärenden inom fyra arbetstimmar.
Förvänta dig alltså ett svar senast på <b>{
my $tz = "Europe/Stockholm";
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$ydaym,$isdst,$offset) = $Ticket->DueObj()->Localtime("utc");

my $dt = DateTime::->new(
    locale => "sv_SE",
    time_zone => "UTC",
    year => $year,
    month => $mon,
    day => $mday,
    hour => $hour,
    minute => $min,
    second => $sec,
    nanosecond => 0,

$dt->format_cldr("cccc 'kl.' k.mm");

(blah blah)

{$Transaction->Content(Type => 'text/html')}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20160307/17834807/attachment.html>

More information about the rt-users mailing list