On Mon, Oct 20, 2014 at 10:29:10AM -0400, rjandric via rt-users wrote:
The screenshots seemed to be wrong in my last post, but here they are:
http://requesttracker.8502.n7.nabble.com/file/n58872/Screen_Shot_AfterHrs.png
---BeginMessage---
OK, I've been trying with the following condition:
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
if ($hour =8 $hour =17) {
$self-SetTemplate(Autoreply);
} elsif ($hour 8 $hour 17) {
$self-SetTemplate(AutoReply-AfterHrs);
}
return 1;
But
---BeginMessage---
The screenshots seemed to be wrong in my last post, but here they are:
http://requesttracker.8502.n7.nabble.com/file/n58872/Screen_Shot_AfterHrs.png
http://requesttracker.8502.n7.nabble.com/file/n58872/Screen_Shot_Autoreply.png
Both Scrips are using the same condition with
Le 15/10/2014 19:50, rjandric via rt-users a écrit :
In your custom condition you should be able to finish by:
if ($hours ...) {
$self-SetTemplate(WorkingHoursTemplateName);
} elsif ($hours ) {
$self-SetTemplate(NonWorkingHoursTemplateName);
}
return 1;
--
Easter-eggs
I think (never tried) that it could be possible to write a custom scrip
action that select the template based on a time condition.
This way you have just to use this action where needed and create the
pre-defined templates without changing them dynamically.
You can also write perl conditions in
---BeginMessage---
Thank you Emmanuel!
I was looking into it and since Perl is not my first language ;) I was
thinking on using custom conditions something like listed here:
http://requesttracker.wikia.com/wiki/CustomConditionSnippets
The idea is to have 2 AutoResponse templates with different
---BeginMessage---
I have to modify the global template in RT so the AutoResponse via email is
different during office hours and after hours. For Example at 9AM it should
say Thank you for contacting Help-desk etc. , and at 5PM will say that the
office is currently closed, all tickets will be