First of all, you need to have a working version of cron
For windows, that is a working cronw. This means that the c:\Program Files\OTRS\OTRS\bin\otrs.Cron4Win32.pl should run to convert unix based cron config files (located in C:\Program Files\OTRS\OTRS\var\cron) to windows based cronw config file (c:\Program Files\OTRS\CRONw\crontab.txt). Unfortunately, the default otrs.Cron4win32.pl file that comes with otrs3.0.8 is not working correctly. I have attatched a working file, taken from otrs3.0.4 source code.
Also, for windows, the apache server is always crashing. The only solution I found was this one: http://forums.otrs.org/viewtopic.php?f= ... 81&p=35537
Now, on to notifications:
You need the generic agent for this, and here is the logic.
I run the generic agent at 10 minutes interval. It will then check if any tickets had their Escalation Time (any of them or one in particular) in those last 10 minutes. If it did, I will attach a note to the ticket saying that the escalation point was reached. (You can also move it to another queue or change it's priority and so on).
For a second escalation I run the generic agent again every 10 minutes. I will check which tickets had their escalation time between 60 and 70 minutes ago. This way I will catch tickets that escalated more than 1 hour ago (but not more than 1 hour and 10 minutes) and will atatch another note to them.
If I need more escalation levels I can play with more 10 minutes intervals: 120 to 130 (2 hours), 180 to 190 (3 hours), and so on.
In order to do this I add this code to the GenericAgent.pm file (\OTRS\Kernel\Config\GenericAgent.pm)
Code: Select all
'send L1 escalation notifications' => {
# ticket escalation time of between 0 and 10 minutes ago
TicketEscalationTimeOlderMinutes => 0,
TicketEscalationTimeNewerMinutes => 10,
# new ticket properties
New => {
Note => {
From => 'helpdesk@example.com',
Subject => 'Escalation!',
Body => 'This ticket escalation counter was reached',
ArticleType => 'note-internal', # note-internal|note-external|note-report
},
},
'send L2 escalation notifications' => {
# ticket escalation time of between 0 and 10 minutes ago
TicketEscalationTimeOlderMinutes => 60,
TicketEscalationTimeNewerMinutes => 70,
# new ticket properties
New => {
Note => {
From => 'helpdesk@example.com',
Subject => 'Escalation!',
Body => 'This ticket escalation counter was reached',
ArticleType => 'note-internal', # note-internal|note-external|note-report
},
},
This cannot be done in the web version of the Generic Agent because you can only search for Tickets that escalated before or after a certain point in time. You cannot search just in 10 minutes intevals.
The last thing is the Notification before escalation.
This is run also at ten minutes intervals and otrs will measure what procent of time passed relative to the total escalation time. As soon as this procent is higher than the one you set in your SLA or Queue, the notification will be sent. To prevent multiple notifications (once you pass the threshold the procent will always be bigger than the one you set), the notification script will verify if a notification has already been sent in the ticket history. If no notification was found, it will send the notification.
To do this I had to create a new Generic Agent Module that sends only "before notifications". Also, by default the notifications are sent only if you are in working hours. In my version, notifications are sent if you are in working hours of the SLA (if using different calendars). You will have to place the attached file (WarnAgentGroupWithWritePermission.pm) in \OTRS\Kernel\System\GenericAgent\. This script can be definetly made better. It is just a workaround. In fact I never worked with perl until one week ago when I stumbled upon otrs

Now add this code to GenercAgent.pm:
Code: Select all
'send escalation warning' => {
Escalation => 1,
New => {
Module => 'Kernel::System::GenericAgent::WarnAgentGroupWithWritePermission',
},
},
Hope this helps somebody. OTRS is great
