138 views

Project Structure | Troubleshooting



Overview


The following diagram illustrates how Projects and corresponding tasks are related.

  • Each node is related to its child node through the parent column
  • All nodes should have the same top_task column value which should be the sys_id of the Top project

 

Project data integrity


In any project, the following conditions should be met

  • The top_task column of all nodes (including the Top Project) should be populated with the sys_id of the Top project
  • All records, except the Top Project, should have the parent column populated
  • The parents in the structure should be under the same Top Project - they should not belong to a different project structure

 

Viewing the entire project structure


  1. In he Application Navigator, type planned_task_list.do in the Filter navigator field and press enter or return on your keyboard.
  2. To list all records in the project structure, run the following query:
    [Top task] [is] [<top_project_sys_id>]

 

 

Relationships


The relationship between two nodes is specified through the planned_task_rel_planned_rel table.

The relationship types are:

  • Finish to Start (successor planned start date is derived from predecessor planned end date)
  • Start to Start (successor planned start date is derived from predecessor planned start date)
  • Finish to Finish (successor planned end date is derived from predecessor planned end date)
  • Start to Finish (predecessor planned start date is derived from successor planned end date)

 

Identifying relations in a project


Use one of the following to see the sys IDs of relation records:

var taskIds = [];
var gr = new GlideRecord("planned_task");
gr.addQuery("top_task", <sys_id_of_project_here>);
gr.query();
while(gr.next()) {
	taskIds.push(gr.getValue("sys_id"));
}

var gr = new GlideRecord("planned_task_rel_planned_task");
gr.addQuery("parent", "IN", taskIds.join(","));
gr.addQuery("child", "IN", taskIds.join(","));
gr.query();
var relIds = [];
while(gr.next()) {
	relIds.push(gr.getValue("sys_id"));
}

gs.log(relIds.join(","));

 

Copy the records and query the planned_task_rel_planned_task table for the sys IDs.

Article Information

Last Updated:2017-02-23 17:18:57
Published:2017-02-09