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.
Recalculations in Project Management - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Recalculations in Project Management
KB0621203

Recalculations in Project Management


4452 Views Last updated : Jan 28, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

Recalculations in Project Management 



What is recalculation?


Recalculation, where project dates are computed based on the parent-child hierarchy and the relationships set up across various project tasks, is the core of project planning.

Key recalculation points:

  • Dates are rolled up from child nodes to parent
  • After a node has children, its date cannot be modified through the user interface (except the top project where the Planned Start Date can be modified)
  • The logic of deriving dates is:
    • For a node in Pending/Open states, Planned End Date = Planned Start Date + Planned Duration
    • For a node in WIP state, Planned End Date = Actual Start Date + Planned Duration
    • For a node in Closed state, Actual Duration = Actual End Date - Actual Start Date

 

How do I know if recalculation is working correctly?


Navigate to planned_task.list and query top_task as described in Troubleshooting Project Structure. Personalize (not configure) the list to add the following columns:

  • Planned Start Date
  • Planned End Date
  • Actual Start Date
  • Actual End Date

Sort the list by Planned Start Date in Ascending (A-Z) order. You should see the top project at the top of the list. The top project should share the Planned Start Date with at least one node appearing at the top of the list.

Sort the list by Planned End Date in Descending (Z-A) order. You should see the top project at the top of the list. The top project should share the Planned End Date with at least one node appearing at the top of the list.

 

How do I trigger recalculation myself and check?


There are two options:

  • Use the Diagnostics Update Set
  • Run an API call in Scripts > Background

    For Geneva:

    (new SNC.ProjectManagementAPI()).recalculate('<sys_id_of_top_project>')

    For Helsinki:

    (new SNC.PlannedTaskAPI()).recalculate('<sys_id_of_top_project>')

 

How do I check that recalculation is completing properly?


  1. If the property does not already exist, create the com.snc.pm.debug.enable property.
    Ensure that the type is true|false and the value is set to true.
  2. From Scripts > Background, trigger recalculation.
    The platform prints out a significant number of messages in the system logs.
  3. Look for the highlighted messages in the screenshot below.
    This output is from a Geneva instance and may differ slightly in subsequent releases. 
    Note that this modifies the project and task records, so be aware when running on a production instance.

If you see the last message Into saveRelations(), the recalculation has completed successfully and the project has been saved.

 

How do I debug recalculation from forms/lists?


Trigger the recalculation by changing the Start Date or Duration of a project task.

Navigate to System > Logs and look for the following:

Message Source
 Start of Load com.snc.planned_task.core.loader.Planned
 End of Load : - 00:00:00 : 37 :: 37 com.snc.planned_task.core.loader.Planned
 Start of recalculation com.snc.planned_task.core.engine.Automat
 End of recalculation :  - 00:00:00 : 45 :: 45  com.snc.planned_task.core.engine.Automat
 Start of Save com.snc.planned_task.core.datastore.Data
 End of Save :  - 00:00:00 : 11 :: 11  com.snc.planned_task.core.datastore.Data

These are the key logs that indicate the recalculation process is working properly. The process involves the following three steps:

  1. Load the Project into memory.
  2. Perform recalculation.
  3. Save the dirty records to the database.

 

I still can't figure why recalculation is not happening


Check the calculation_type field in Project and all sub-Projects/Project Tasks. They should be set to Automatic or Manual. Automatic projects are what we have used in this document. Manual projects do not honor relationships between nodes.

Check the project schedule in project record. Check if the schedule is valid. It should be valid for the dates of the project (for example, Schedule defined for year 2025 may not work properly today). It is acceptable to leave the schedule blank.


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?

Attachments

Attachments

  • Debug recalc.png

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.