How Do I Create a Custom Ticket Rule that Calculates how Long A Ticket Has Been 'Opened', Taking into Account Business Hours?
I have been looking all over for some SQL that could calculate the true 'Age' of a ticket - meaning how many days/hours/minutes it has been sitting open, taking into account nights and weekends.
I know KACE is able to calculate this in theory, because the Service Level Agreement settings allow you to use the defined business hours. However, I don't know *how* it does that and I'd like to be able to use business hours in custom rules.
Answers (1)
Short answer is you can't (unless you are an SQL Wizard)
So KACE's view on Tickets and SLA's is screwed up, it always has been and despite many of us complaining and asking for change over the last decade, nothing has been done to rework how SLA's work and make it easier to report.
You will need to have a field that calculates how long the ticket has been open, that field will need to make reference to your working hours so that duration is correct and it will also need to probably start and stop in line with status that puts the ticket on hold. Nothing in the HD_TICKET table caters for that, hence my comment about needing to be an SQL Wizard.