Tickets Not a Bug Ticket Escalations not executing (Logic Error?)

I have two escalations that respond with an automatic reply that is set on timing. 3 days and 7 days. 3 days sends a reminder and 7 days resolves the ticket automatically... so far so good...

Now I have set the execution to "only execute once".... and the escalations are not working... could it be that with "only execute once" it is meant that they are only CHECKED ONCE instead of executed once? They are only checked if applicable once and then ignored by any of the following recurring cron jobs it seems... which is wrong in my opinion, they should check with every cron job but then only EXECUTE ONCE... otherwise there would be a reminder every 3 days or no reminder at all.

Do you somehow can sense what I mean? :)
 
Last edited:
@NixFifty could you look at this one?
I did but apparently I forgot to reply, lol.

Let me try again...

they should check with every cron job but then only EXECUTE ONCE
This is essentially what happens.

The cron loops through tickets and fires escalations against them.

If an escalation has already been triggered by a specific ticket, the cron skips that ticket and moves to the next. No criteria is checked and no actions are triggered.

If an escalation hasn't already been triggered by a specific ticket (i.e. there's no record in the xf_nixfifty_ticket_escalation_trigger_log table), the escalation criteria is checked and then actions are fired only if the ticket matches the criteria. After all of this, a log entry is made that escalation X triggered on ticket Y and the cron moves on to the next ticket.

Is this not the behaviour you're expecting or is your post going over my head?
 
Now I have set the execution to "only execute once".... and the escalations are not working... could it be that with "only execute once" it is meant that they are only CHECKED ONCE instead of executed once? They are only checked if applicable once and then ignored by any of the following recurring cron jobs it seems... which is wrong in my opinion, they should check with every cron job but then only EXECUTE ONCE... otherwise there would be a reminder every 3 days or no reminder at all.

Right now I have unchecked "only execute once" and the escalations are not working at all. If I check "only execute once" they are executed on EVERY recurring cron task... so... THAT is not "optimal" right? ;)
 
After giving this a bit more thought (and also trying to implement the routines you were trying to add), I think I better understand what you meant.

The execute once per ticket option does exactly that, it only runs an escalation once per ticket regardless of whatever happens to it in the future. Thats kind of the whole point, but this would not work for the escalations you’re trying to add as they’d each work once and wouldn’t trigger again.

I suspect you’re actually looking for an execute once per ticket message so that escalations would only run once per message and would not be checked or triggered again until there was a new message meeting the criteria. This would work much better in this case so I’ve gone ahead and added that.

For this thread though, it’s not really a bug. Just something that perhaps wasn’t clear. :)
 
Back
Top