Task Editor Duration Format to have a count down

Hi!
I am currently trying to figure out if it is possible to have the task editor to have a countdown for the “duration format.”

Instead of:
image

Have it display something like

Time left: 5 minutes.

(I did figure out how to do it in the Ticket Lister with scripts, but not really useful right now, and well…technically in the Task Editor as well but it would require LOTS of sql.exec() calls, and updating the [Tasks].[Content]…and that is not ideal either)

Thank you!

Could you take the duration time, add it to the DateTime at that moment and then subtract it from current DateTime to get time left?

I had thought about something like that, but I wasn’t able to implement it…

I wanted do something like [= {CUSTOM DATA TASK: Fulfillment Minutes} - <m:>]

I was thinking this:

[=FD(ADS('{TICKET DATE:yyyy-MM-dd HH:mm}',TN('{CUSTOM DATA TASK:Fulfillment Minutes}' * 60)),'yyyy-MM-dd HH:mm')]

to get fulfilment time but I can’t get TN() to work inside ADS()

You might be able to pass everything off to a script to calculate fulfilment time. For javascript use this time format for adding and subracting dates: yyyy-MM-ddTHH:mm:ss

Hmm I couldn’t even get the whole thing starting from the [= to work it just displays exactly what is typed, other than the <m:> which is replaced with the elapsed minutes…

I sort of figured it out.

If you want the time to count down from x minutes

When the task’s End Date and Start Date are both {TIME} + x minutes It’ll count down from x minutes.

1 Like