Created Date to In Progress date

drslry2
Tera Contributor

Hi Gurus,

Just wondering if its possible to retrieve Incident and RITM data that shows the duration from the 'Created Date' to the date when the status was changed to 'In Progress'.  

 

I'm able to show 'Created Date' to the 'Closed Date' but what about the dates for statuses prior to the Closing?

 

Let me know if you think this is possible and if so how to go about retrieving this data?

 

Thank you,

Rob

2 ACCEPTED SOLUTIONS

Pratiksha Lang1
Kilo Sage

@drslry2 steps:

Metric Definitions track performance data like time, and you can set it to track the time between specific events (e.g., Created Date to when the status changes to "In Progress").

Steps:

  1. Navigate to Performance AnalyticsMetric Definitions.
  2. Click on New to create a new Metric Definition.

Configure the Metric Definition:

  • Name: Give it a descriptive name like "Incident Time to In Progress".
  • Table: Choose the Incident or Request Item table (e.g., incident, sc_req_item).
  • Type: Select Duration as the type. This will allow you to calculate time differences.

Duration Fields:

  • Duration Start: Set this to sys_created_on (the timestamp when the record was created).
  • Duration End: This should be the timestamp when the status changes to In Progress. You can either capture this with a Metric Trigger or from the History Table.

Example Configuration:

  • Duration Start: sys_created_on
  • Duration End: A Metric Trigger (to be set later) that triggers when the state transitions to In Progress.

2. Create a Metric Trigger for Status Change to 'In Progress'

The Metric Trigger allows you to define the specific event (in this case, the change in status to "In Progress") that will stop the metric timer.

Steps:

  1. Go to Performance AnalyticsMetric Triggers.
  2. Click on New to create a new Metric Trigger.

Configure the Metric Trigger:

  • Metric Definition: Select the Metric Definition you created earlier (e.g., Incident Time to In Progress).
  • Table: Choose the Incident or RITM table (same as in the Metric Definition).
  • Trigger Condition: Define the condition that triggers the metric when the State is changed to In Progress.

Condition:

  • Field: state
  • Value: In Progress
  • This ensures that the metric will calculate the time when the state transitions to In Progress.

Example Trigger Configuration:

  • Metric Definition: Select Incident Time to In Progress.
  • Field: state
  • Condition: In Progress

3. Ensure State Change is Logged (History Table)

If your system does not track state changes via triggers automatically, you can check the sys_history_set table to capture the exact timestamp when the status is changed.

  • Navigate to sys_history_set → This table stores all changes made to records, including the state field changes.
  • You can query this table to track when the state field was updated to In Progress and use that as the timestamp for your "Duration End."

4. Testing and Validation

After setting up the Metric Definition and Metric Trigger, you should test to ensure it works as expected.

  • Test Scenario: Create a new Incident or RITM, leave it in New state, and then change the status to In Progress.
  • After the state change, check if the duration (from sys_created_on to when the state was changed) is being recorded correctly.

To check if the Metric Definition is working, you can view Performance AnalyticsMetric Data or use a report to display the duration for the created record.

5. View Metric Data

Once the metric is captured, you can view it in Performance Analytics or by using reports.

Steps to view Metric Data:

  1. Go to Performance AnalyticsMetric Data.
  2. Look for the Metric Definition you created (e.g., Incident Time to In Progress).
  3. You can view the calculated durations for each incident or RITM record here.

6. Optional: Create a Performance Analytics Widget

If you want to visualize the data (e.g., the average time it takes for incidents to move to In Progress), you can create a Performance Analytics Widget.

Steps:

  1. Go to Performance AnalyticsWidgets.
  2. Click New and configure a widget based on the Incident Time to In Progress metric.
  3. Choose a widget type, such as a bar chart or a time series graph, and display the metric data.

Summary of Steps:

  1. Create a Metric Definition:

    • Set the duration to start from sys_created_on and end on the status change to In Progress.
  2. Create a Metric Trigger:

    • Set a trigger to fire when the State field changes to In Progress.
  3. Ensure Data Logging:

    • Optionally, ensure the status change is captured in the history table (sys_history_set) to track the exact timestamp.
  4. Test:

    • Validate that the metric is being calculated correctly by testing with sample data.
  5. View the Data:

    • Access Performance Analytics or create a report to visualize and track the metric.

Additional Considerations:

  • Make sure Performance Analytics is set up in your instance to use Metric Definitions.
  • If you want to calculate the time in specific units (e.g., minutes, hours), you might need to add an additional calculation or conversion.

 

View solution in original post

wow chat gpt answer.

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

8 REPLIES 8

Dr Atul G- LNG
Tera Patron
Tera Patron

Yes, you can create the metirc in state and get it.

 

OOTB metrics

AGLearnNGrow_0-1740671093842.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Bert_c1
Kilo Patron

This should help you

 

MetricDefinitionSupport.html

 

drslry2
Tera Contributor

Thanks for the quick replies, truly appreciated....I've located the Metrics option however doesn't appear to be a way for me to Create a New Metric...I'm thinking I don't have authority to do so....

drslry2_0-1740672268205.png

 

Look like you don't have access to same. 

 

Before you begin

Role required: metric_admin

 

https://www.servicenow.com/docs/bundle/yokohama-platform-administration/page/use/reporting/task/crea...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************