- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 10:40 PM
Hello,
I am trying to calculate the time an incident is in a particular state. I have added a timer field to the incident record. The timer should start running if the state of incident is either 'awaiting evidence' or 'awaiting user info' and should be paused if it's neither of the formerly mentioned states. My idea is to do this using a business rule, but I have no idea of how to start or pause a timer field through a script.
How do I achieve this?
Thanks in Advance,
Harsha
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 10:49 PM
Hi,
You can have a metric definition it will give you for how many time it was in one of the state.
See Metric definition, there are some OOB definitions available for this purpose

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 10:58 PM
I Have replied you based on to calculate time your ticket is in one of the state.
Not for pause and play.
If you want to have Exact time your ticket was in work in progress then go for Metric option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 11:08 PM
Hi Ashutosh,
The way you have suggested works too. There is an OOB Metric definition that stores the duration that an incident is in a particular state. But it doesn't have a field that shows, to which Incident the metric is created for.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 11:32 PM
Yes it gives you a number of incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 11:37 PM
Thanks Ausotosh. I think I can use the way you have suggested to meet my requirements.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2016 11:42 PM
Welcome Harsha,
Don't forget to Click:
Hit Helpful or Correct