- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 07:47 PM
OOTB's Incident State Duration displays the Duration for all statuses.
However, if I want to display only the Duration for the status "In Progress", I do not know how to write the script.
I am an inexperienced coder, so I asked the question.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 10:00 PM
Hi unfortunately your question\requirement is not clear.
The metric values shown appear to be from the OOB metric definition 'Incident State Duration'
/nav_to.do?uri=metric_definition.do?sys_id=35f2b283c0a808ae000b7132cd0a4f55
and the duration of in-progress state metrics is part of the OOB metrics solution.
If you only want to record the in-progress metrics and not others?
Then you would need to disable the OOB definition ''Incident State Duration'', as it is based on incident state field change and is not a scripted solution, and replace it with a scripted Metric definition.
If this is not within your current skill-set then I would not recommend that you do this,
and instead just use a filter to exclude the values that you do not want to see in the metric instance table IE
/metric_instance_list.do?sysparm_query=definition%3D35f2b283c0a808ae000b7132cd0a4f55%5Evalue%3DIn%20Progress&sysparm_view=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2022 10:00 PM
Hi unfortunately your question\requirement is not clear.
The metric values shown appear to be from the OOB metric definition 'Incident State Duration'
/nav_to.do?uri=metric_definition.do?sys_id=35f2b283c0a808ae000b7132cd0a4f55
and the duration of in-progress state metrics is part of the OOB metrics solution.
If you only want to record the in-progress metrics and not others?
Then you would need to disable the OOB definition ''Incident State Duration'', as it is based on incident state field change and is not a scripted solution, and replace it with a scripted Metric definition.
If this is not within your current skill-set then I would not recommend that you do this,
and instead just use a filter to exclude the values that you do not want to see in the metric instance table IE
/metric_instance_list.do?sysparm_query=definition%3D35f2b283c0a808ae000b7132cd0a4f55%5Evalue%3DIn%20Progress&sysparm_view=