Back to ER Diagram
Project Management

Project Management Logic

Complete project lifecycle from creation through WBS breakdown, activity scheduling, milestones, daily progress reporting, and site diary management.

PostgreSQL
14 Tables
Schema: project
Baseline Tracking

Overview

InfraTraq Project Management provides a hierarchical Work Breakdown Structure (WBS) approach to manage construction projects. Projects are decomposed into WBS elements, activities, and milestones. Daily Progress Reports (DPR) capture manpower, equipment, and activity progress. Site diaries record weather, visitors, and site events. Baselines enable schedule variance tracking.


Create Project

Define WBS

Plan Activities

Set Milestones

Track DPR
14
Project Tables
5
WBS Levels
Daily
DPR Tracking
Multi
Baseline Support

Status States

StatusDescriptionAllowed ActionsNext States
PlanningProject created, WBS being definedEdit WBS, Add ActivitiesActive
Pending ApprovalAwaiting management approvalApprove, Reject, ReturnActive, Rejected
ActiveProject in execution phaseLog DPR, Update ProgressOn Hold, Completed
On HoldProject temporarily suspendedResume, CloseActive, Closed
CompletedAll milestones achieved, handover doneGenerate Reports, ArchiveClosed
ClosedFinal closure with documentationView, Audit
CancelledProject abandonedView, Audit

Project Types

Infrastructure Projects

Roads, bridges, tunnels, railways — linear construction with chainage-based progress tracking.

Building Projects

Residential, commercial, institutional — floor/zone-based WBS with finishing milestones.

Industrial Projects

Refineries, power plants, factories — discipline-based WBS with commissioning phases.

Water & Utilities

Water treatment, pipelines, sewage — network-based tracking with hydraulic testing milestones.

Database Schema

project.project

  • project_id — PK, unique project identifier
  • tenant_id — FK → organization.tenant
  • entity_id — FK → organization.company_entity
  • project_code, project_name — Unique code and display name
  • client_id, contract_id — FK references to client and contract
  • start_date, end_date, status — Schedule and lifecycle state
  • budget_amount, currency — Approved budget ceiling

project.wbs

  • wbs_id — PK, WBS element identifier
  • project_id — FK → project.project
  • parent_wbs_id — FK → self (hierarchical tree)
  • wbs_code, wbs_name — WBS numbering (e.g., 1.2.3)
  • level, sort_order — Hierarchy depth and display order
  • planned_start, planned_end — Scheduled dates
  • weight_pct — Percentage weight for progress rollup

project.activity

  • activity_id — PK
  • wbs_id — FK → project.wbs
  • activity_code, description — Activity identifier and details
  • planned_qty, actual_qty, uom — Quantity tracking
  • duration_days, predecessors — Scheduling with dependencies
  • percent_complete — Auto-calculated from DPR entries

project.milestone

  • milestone_id — PK
  • project_id — FK → project.project
  • milestone_name, planned_date, actual_date — Tracking key dates
  • is_contractual — Marks milestones with LD implications
  • status — Achieved / Pending / Delayed

project.dpr

  • dpr_id — PK, daily progress report header
  • project_id, dpr_date — One DPR per project per day
  • weather, temperature, rainfall — Site conditions
  • prepared_by, approved_by — Workflow tracking
  • remarks, safety_incidents — Free-text observations

project.baseline

  • baseline_id — PK
  • project_id — FK → project.project
  • baseline_number, baseline_date — Version tracking
  • is_current — Only one active baseline per project
  • snapshot_json — Full WBS/activity snapshot for variance analysis

Project Lifecycle Steps

1

Project Creation

Project Manager creates project with basic details, client reference, contract linkage, and budget allocation. System generates unique project code per tenant naming convention.

2

WBS Definition

Break down project scope into hierarchical WBS elements (max 5 levels). Each WBS node gets a weight percentage for progress rollup. Total weight at each level must sum to 100%.

3

Activity Planning

Define activities under leaf WBS nodes with planned quantities, durations, and predecessor dependencies. Link activities to BOQ items for cost tracking.

4

Milestone Setup

Create contractual and internal milestones with planned dates. Contractual milestones trigger LD calculations when delayed. Internal milestones drive dashboard alerts.

5

Daily Progress Reporting

Site engineers submit DPR daily with manpower deployed, equipment used, activity progress (qty completed), weather conditions, and safety observations. System auto-calculates percent complete.

6

Baseline Management

Freeze current schedule as a numbered baseline. Compare actuals against baseline for SPI/CPI calculations. Re-baseline requires approval from Project Director.

Implementation Queries

Calculate WBS Progress Rollup

-- Weighted progress rollup from activities to WBS
WITH activity_progress AS (
  SELECT w.wbs_id, w.parent_wbs_id, w.weight_pct,
         COALESCE(AVG(a.percent_complete), 0) AS avg_progress
  FROM project.wbs w
  LEFT JOIN project.activity a ON a.wbs_id = w.wbs_id
  GROUP BY w.wbs_id
)
SELECT wbs_id, SUM(avg_progress * weight_pct / 100) AS weighted_progress
FROM activity_progress
GROUP BY parent_wbs_id;

DPR Summary Dashboard

-- Daily progress summary for project dashboard
SELECT d.dpr_date, d.weather,
       COUNT(DISTINCT dm.worker_id) AS manpower_count,
       COUNT(DISTINCT de.equipment_id) AS equipment_count,
       SUM(da.qty_today) AS total_qty_done
FROM project.dpr d
LEFT JOIN project.dpr_manpower dm ON dm.dpr_id = d.dpr_id
LEFT JOIN project.dpr_equipment de ON de.dpr_id = d.dpr_id
LEFT JOIN project.dpr_activity da ON da.dpr_id = d.dpr_id
WHERE d.project_id = :project_id
ORDER BY d.dpr_date DESC;

Validation Rules

Business Rules

  • WBS Weight: Sum of sibling WBS weights must equal 100% at each level
  • DPR Uniqueness: Only one DPR per project per date; duplicate submission blocked
  • Baseline Freeze: Cannot modify activities/WBS after baseline is frozen; create new baseline
  • Milestone Dates: Milestone planned dates must fall within project start/end range
  • Activity Dependencies: Circular predecessor chains are rejected by topological sort check

Integration Points

Connected Modules

  • Estimation & BOQ: Activity quantities linked to BOQ items for cost tracking
  • Finance: Project budget mapped to commitment accounting layers
  • EVM: Baseline used for BCWS; actuals for BCWP/ACWP calculations
  • Labour & Equipment: DPR manpower/equipment feeds attendance and utilization reports
  • Document Management: Project documents linked via project_document junction table

Best Practices

Recommended Practices

  • Define WBS to 4-5 levels max for manageability
  • Submit DPR by 10 AM next day — enforce via SLA escalation
  • Review milestone dates weekly in project review meetings
  • Re-baseline only at major scope changes with formal approval

Common Pitfalls

  • Avoid WBS weight = 0 on any node (creates division-by-zero in rollup)
  • Do not skip DPR submission — gaps break S-curve continuity
  • Never delete completed baselines — archive for audit trail