measure the time for each status in "Metric"

teruo
Tera Contributor

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.

 

find_real_file.png

1 ACCEPTED SOLUTION

Tony Chatfield1
Kilo Patron

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=

 

 

View solution in original post

1 REPLY 1

Tony Chatfield1
Kilo Patron

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=