NEW METRIC DEFINITION APPEARS TO NOT WORK

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 06:02 AM - edited 09-18-2024 08:42 AM
Hello. I need help because I know I am not doing something correctly. I created a new metric definition called "Create To Staff Assignment" where the goal is to record metric record from the time the INC is created and up to the time the assigned to field is valued.
Below is the metric definition. The following code below the screen shot is the business rule. As shown in the lower part of the screen shot of the metric definition record, the metric created records the start date of when I updated the INC to add an assigned to value. I am wondering what am I missing given that there was already a metric definition for the same field I am trying to measure with the same type as shown by the screen shot after the new metric definition I created.
Would love to get some help to make this work. Thank you all.
New Metric Definition Record
Metric Definition List on INC
Business Rule
Script in the business rule
- Labels:
-
Architect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 06:33 AM
Hi @randytangco For such scenarios where you need to create metric instance to start from incident creation to time it is assigned, you should go with type as "Script calculation" and write scrip within definition to update start and end date of metric instance. Something like below.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 08:55 AM
Thank you for the response @Anantha Gowrara . Would this mean I can turn off the business rule?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 09:08 AM
can i use the below same code in the metric script record?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 09:57 AM
i tried adding the script in the metric definition and the metric record is not created. i tried doing it with the business rule disabled and enabled.