Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Time worked on incident is showing incorrect value when the incident is created from alerts. - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Time worked on incident is showing incorrect value when the incident is created from alerts.
KB0813198

Time worked on incident is showing incorrect value when the incident is created from alerts.


327 Views Last updated : Dec 13, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

An entry showing under Time worked related list with a high time work value is present on many incidents when the incident is created from Alert.

 

Cause

Noticed that the behavior you see is as per the design that the "Time worked" value on Incident will show greater than "0" when an incident is created from the Alert for which there is already an Incident associated.


Here is how the flow goes:-

When an "em_alert" record is reopened the below OOB After - Business rule is triggered, which is used to Reopen associated closed incident.
Reopen associated closed incident - https://<instance-name>.service-now.com/sys_script.do?sys_id=31fe8a23eb2211004d7763fba206fe0f

The business rules call the script include "EvtMgmtAlertManagementAlertReopenHandler". Wherein a function "createNew", the data from the old incident is copied and created a new incident, which includes the value from "time_worked" is also copied to the new Incident. So that the reason the "Time worked" value on the new incident created on reopening of alert has the value greater than "0".
EvtMgmtAlertManagementAlertReopenHandler - createNew function
https://<instance-name>.service-now.com/sys_script_include.do?sys_id=e5159ef1534013007f9bddeeff7b120c

The OOB After - Business rule on the Task table is used to create "task_time_worked" for the task records.
This will get the value from "time_worked" on task record and create the 1st time worked record with the value.
As the value of "time_worked" on Incident is copied from the previous Incident, so the same value is display at the 1st "task_time_worked" records.
Task Time Worked - https://<instance-name>.service-now.com/sys_script.do?sys_id=c068b268c61122b700985016ce770871


The task_time_worked record will have no value from the Incident records when its created from alert which has no incident associated.

Resolution

You will need to create a before business rule to set the "Time worked" value on Incident to have 0 during the insert of the incident record.

This will set the "Time worked" value to 0 at the time of creation, so any "task_time_worked" records will not be created as the time worked on the incident is 0.

Related Links

Steps to Reproduce:-

Open any alert

Close the "Incident" connected to this alert.

On closing, the Alert will be changed to Resolved.

Now reopen the alert, a new Incident will be created.

You will notice that there is a "time_worked" value that is copied from the old incident and there are a "task_time_worked" related records for the incident which is having the value from the previous incident.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.