- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2022 09:40 AM
How can I calculate the amount of time a sc task has spent in the various states? i.e. the task was in pending X days and then was Work in progress Y days. TIA
Solved! Go to Solution.
- Labels:
-
Analytics and Reports

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2022 10:53 AM
Out of the box there is a metric called "Incident State Duration".
Copy that metric definition and change it to be applied to the sc_task table, naming it something like "SC task state duration".
Then, you can run a report to get records where "definition" equals to "SC task state duration".
You can report on a metric by using a database view that links the metric to the table on which it is defined (in this case, the sc_task table). You can check database view "incident_metric" to see its definition and then create one called "sc_task_metric".
You can then the do a group by ID so you can get the state changes per SC task.
In your case, you can copy that metric and change its definition to be applied to the sc_task table. That should do the trick for you!
If you consider this answer relevant, please mark it as correct/helpful!
Thanks!
Filipe Cruz

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2022 10:53 AM
Out of the box there is a metric called "Incident State Duration".
Copy that metric definition and change it to be applied to the sc_task table, naming it something like "SC task state duration".
Then, you can run a report to get records where "definition" equals to "SC task state duration".
You can report on a metric by using a database view that links the metric to the table on which it is defined (in this case, the sc_task table). You can check database view "incident_metric" to see its definition and then create one called "sc_task_metric".
You can then the do a group by ID so you can get the state changes per SC task.
In your case, you can copy that metric and change its definition to be applied to the sc_task table. That should do the trick for you!
If you consider this answer relevant, please mark it as correct/helpful!
Thanks!
Filipe Cruz