Reporting if a ticket state has exceeded x minutes

Am trying to improve my layaway/switch user system to prompt differently if there is a ticket played away for over so many minutes.
All I can find on the forum are examples of reporting time for entity screens etc.

What I am looking to do is report/count the number of tickets where state is over so many minutes on a user login action.

Aim is if a ticket had been on layaway/hold for more than 5 minutes all users are prompted to finalise the ticket rather than the current of just prompting that user that they have a ticket on hold…

Ok so how is it going to check that time? Trigger? Trigger would work but then if ticket is open it wouldnt fire.

Entity Screens are reading that on refreshes… so since your not using entity screen you need to figure out how and when it will read that.

On login…
When any user logs in it will check if there is any tickets with layaway status greater than say 5 minutes. These ticket will also have a ticket tag which can be used to filter the search parameters down…

I think he said on user login I think just use {DATE:X} compare on {TICKET TIME}

Ok so you would have to load ALL tickets and then check their states…Probably would lead to unnecessary resources being used. hmmm

Not all tickets, just the tickets with that state/tag, tag would be good way to reduce the list to check…
In theory shouldn’t be more than half a dozen tickets at any one time so shouldn’t be any more intensive that listing time/checking time for formatting of entity screen/kitchen display…
Tag and state will be removed once ticket is finalised/submitted so will only be current played away tickets.

Do we have state time as a ticket detail value?
Something like;
{REPORT TICKET COUNT:(TSD.Layaway>5)&&(TS.Layaway=Layaway)}
TSD representing ticket state duration?

Forgot to clarify, You can use Change ticket property to update ticket date/time. So, when you want to start counter just trigger change ticket property.

What will you do if more than 1 ticket? How would you display that?

Ticket List, already have a basic layaway for current user system which either shows the ticket if only 1 or list if multiple.

This is the current rule for displaying the layaway tickets from the prompt which is just based on the logging in user having a ticket on layaway;

Im looking to expand on that to have an ask question on all users if a ticket (or tickets :wink: ) has been on layaway for more than say 5 minutes.
So say a naughty employee were to put something on layaway and go for a break forgetting about the layed away ticket all others would be notified after it had been played away for however long.
Maybe also change the specific user login to red, perhaps blue for a ticket on layaway, red just that user for 5-10mins and all users in red after 10 minutes…

Any ideas for this? Would make the layaway switch user really nice…