Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Script to calculate duration time

Dayanand
Contributor
September 30, 2021

Hi All,

Script to calculate duration time

  • Timer starts ticking when Severity Flag is set to (Yellow or Red)
  • Timer stops ticking when Resolution is set
  • Pause timer when status = OnHold

Looking for this requirements any help will be appreciated.

1 answer

1 vote
Tom Lister
Community Champion
October 1, 2021

Hi @Dayanand 

what you are describing is the same as SLA processing.

IMHO this will be very difficult to create in scripting. Especially the pausing.

if you look inside the contents of an SLA field it uses a data structure to track all the events on the the SLA, start , pause etc. to calculate a running total of elapsed time.

you could save time stamps on flag setting and resolution being set using listeners 

Dayanand
Contributor
October 6, 2021

@Tom Lister ,

 

Thank you Tom for giving idea.

Like Tom Lister likes this

Suggest an answer

Log in or Sign up to answer