Using Ticket State Duration in reports

I notice there is a TSD field in {REPORT TICKET DETAILS} to display the minutes since last state change, however I’d like to be able to use this as an expression to filter the results for tickets that have changed state over 10 minutes.

I saw this mentioned before when the feature was implemented in 5.2.11 and mentions about using it it as an expression to filter results:

However I have tried (TSD.Progress>10) in the expression but get blank results.

As a test this works fine to display the minutes:

[Test:1,2,2]
{REPORT TICKET DETAILS:T.Id,TS.Progress,TSD.Progress.asc}

image

But this shows blank results:

[Test:1,2,2]
{REPORT TICKET DETAILS:T.Id,TS.Progress,TSD.Progress.asc:(TSD.Progress>10)}

There is no shorthand syntax for comparison expressions. You can use the method version of that. I won’t be able to test now so I’ll be glad if you let me know if it works or not.

T.GetStateDuration("Progress") > 10

By the way I really wondered how you’ll use it :slight_smile:

1 Like

Nope doesn’t work. I added like this and get blank results:

[Test:1,2,2]
{REPORT TICKET DETAILS:T.Id,TS.Progress,TSD.Progress.asc:(T.GetStateDuration("Progress")>10)}

Also adding T.GetStateDuration("Progress") as a field it doesn’t return a value.

I’m re-creating a kitchen display and this is about tracking progress of the tickets as well as attempting to create a method to use a “bump bar” keyboard support with Ticket Lister (to change state with a trigger after say 10 minutes - to remove from recall list - and to give a single 1-9 number for the tickets shown on screen).

I say re-creating as I already had it working fine using the Bump Bar kitchen display using Task Editor which I have used on multiple setups however with this setup I have ran into problems with the Task Editor updating on the kitchen display PC, it just wouldn’t refresh automatically (and frustratingly it worked for a few hours then stopped working). I spent a long time messing around with that and will be posting about it later when I have time (as I want to get a solution for whatever was causing it) but this customer is using the system now and we needed a solution quickly, they can’t cope handling their coffees without the kitchen display as they are serving something like 300-400 a day.

Try removing parenthesis

[Test:1,2,2]
{REPORT TICKET DETAILS:T.Id,TS.Progress,TSD.Progress.asc:T.GetStateDuration("Progress")>10}

Nope, still blank results :frowning:

Is it possibly returning a string?

Hmm sorry that was an extension method so not visible to custom reports.

I added a new function for this. It will work fine on next update.

GetTicketStateDuration("Progress") > 5000
2 Likes