From ServiceNow Wiki
Get the Book
The Planned Task plugin provides a Planned Task [planned_task] table that extends the Task [task] table. Planned tasks provide additional fields for tasks pertaining to time and effort as part of a planned, multi-stage process.
The Planned Task plugin is included with the Project Management plugin. The Project [pm_project] table extends planned task, but any custom table can be created to extend Planned Task and leverage its fields.
The scripts (business rules and one script include) that power calculation of planned task calculated fields have been significantly reworked. In particular, major changes have been made to the PlannedTaskCalculator script include. The old version of PlannedTaskCalculator will be deleted, unless it has been customized, in which case it will be deactivated and commented. This means any customizations that have been made to PlannedTaskCalculator will be deactivated and will need to be reapplied.
For more information, see Planned Task Scripts.
3 Creating a Planned Task
Planned Tasks are not created directly on the Planned Task [planned_task] table. Instead, planned tasks are created on planned task child tables. Clicking the New button on the Planned Task record list will launch the Planned Task Interceptor, which prompts the user to select a child table to create the planned task on:
3.1 Modifying the Planned Task Interceptor
To modify the planned task interceptor:
- Navigate to System Definition > Interceptors (this module may need to be activated).
- Select the Planned Task Interceptor.
- The Related List Answers specifies what choices are presented, and where the user will be redirected to once they select the choice. Modify the list as desired.
4 Measuring Time and Effort
The Planned Task [planned_task] table provides standard fields for tracking duration and effort.
Duration measures time from start to end date. Effort measures hours of work exerted on the project.
- Planned duration: the projected length of time for the planned task.
- Actual duration: the actual length of time so far for the planned task.
- Remaining duration: the Planned duration minus the Actual duration, which represents the projected length of time left.
- Planned effort: the projected amount of time that will be spent on the planned task.
- Actual effort: the actual amount of time that has already been spent on the planned task.
- Remaining effort: the Planned effort minus the Actual effort, which represents the project amount of work left.
- Percent complete: the Actual effort divided by the Planned effort, which estimates the percentage of planned work which has been completed.
5 Important Planned Task Table Fields
The following table contains a list of important Planned Task fields:
|Actual cost||work_cost||currency||The actual cost of the planned task, to be compared with the Estimated cost.|
|Actual duration||work_duration||glide_duration||The actual length of time (from start time to end time) of work on the planned task, to be compared with the Planned duration.|
|Actual effort||work_effort||glide_duration||The actual time spent working, to be compared to the Planned effort.|
|Estimated cost||cost||currency||An estimation of the cost of the planned task, to be compared with the actual cost.|
|HTML Description||html_description||html||A description field that accepts HTML mark-up.|
|Percent Complete||percent_complete||decimal||A percentage of the completed effort. Generated using the Planned effort and Actual effort fields.|
|Planned duration||duration||glide_duration||The estimated length of time (from start time to end time) of the planned task.|
|Planned effort||effort||glide_duration||The estimated amount of time spent working on the planned task.|
|Planned end date||end_date||glide_date_time||The estimated date and time for the planned task to end.|
|Planned start date||start_date||glide_date_time||The estimated date and time for the planned task to start.|
|Remaining duration||remaining_duration||glide_duration||The difference in planned and actual duration, representing the time left for the planned task.|
|Remaining effort||remaining_effort||glide_duration||The difference in planned and actual effort, representing the amount of work time left for the planned task.|
|Rollup||rollup||boolean||Read-only field managed by the system that identifies the task as having child tasks. A rollup task will have a number of its fields calculated from the children so those fields will be read-only.|
|Time constraint||time_constraint||string||A description of time constraints that apply to the planned task.|
|Top Task||top_task||reference (planned_task)||When different planned tasks are stacked in a hierarchy, this field populates with the highest-level parent task. For example, if Project A has a child Project B, and Project B has a child Project C, then Project C's Top Task is Project A. Project A's Top Task field will be blank.|
6 Planned Task Scripts
A number of business rules and one script include power the dynamic calculation of crucial Planned Task fields:
|Set Actual Work Start Value||Sets the planned task's Actual Start Date when State is set to the default work state.|
|Set Close Data on Inactive||Sets the planned task's close data when task becomes inactive.|
|Recalculate||Recalculates the planned task schedule fields when one of the schedule fields changes. Note: this business rule is altered with June11.|
|Auto close milestones||Automatically closes milestones when they are passed. Note: this business rule is altered with June11.|
In addition the script include PlannedTaskCalculator contains a number of functions used throughout the Planned Task Plugin to calculate scheduling.
|Note: With June 11, the PlannedTaskCalculator has been replaced with a replacement record (new sys_id) with the same class name. If the pre-June11 script include has not been modified, it will be deleted and replaced with the new one; if the script include has been modified, it will be deactivated with a comment added, and the new one will replace the logic. This means any customizations made will be deactivated, but will be preserved in the old script include, and can be manually reapplied in the new one.|
7 Creating a Baseline
A Planned Task Baseline is a record of the planned task's start and end times at a particular moment in time.
To create a baseline, navigate to the top planned task's form and select the Create a Baseline related link:
To view the baseline, personalize the related lists to add a related list of baselines:
Each baseline has a related list of Baseline Items that records every task associated with the top planned task, as well as its start and end times:
The baseline can be viewed on a Gantt Chart using the related link.
8 Activating the Plugin
The plugin is included in the Project Management plugin.