Recalculations in Project ManagementDescription<!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } --> 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 parentAfter 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 DurationFor a node in WIP state, Planned End Date = Actual Start Date + Planned DurationFor 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 DatePlanned End DateActual Start DateActual 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 SetRun an API call in Scripts > BackgroundFor 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? 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.From Scripts > Background, trigger recalculation.The platform prints out a significant number of messages in the system logs.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: Load the Project into memory.Perform recalculation.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.