Project Management Business Logic¶
The project management system handles the complete lifecycle of projects within the Stratpoint Timesheet Application, from creation to completion. It manages project assignments, tracks progress, and integrates with financial systems.
How Project Management Works¶
For Project Managers: 1. Create new projects with client and business unit assignments 2. Assign team members with specific roles and allocations 3. Track project progress and resource utilization 4. Manage project status changes throughout the lifecycle 5. Monitor revenue and profitability
For Team Members: 1. Get assigned to projects by project managers 2. Log time against your assigned projects 3. Work within your allocated hours and project scope 4. View project details and team assignments
System Features: - Complete project lifecycle management - Resource assignment and allocation tracking - Integration with timesheet and financial systems - Revenue tracking and profitability analysis - NetSuite integration for accounting
Project Lifecycle¶
Project Status Flow¶
stateDiagram-v2
[*] --> Active
Active --> OnHold
Active --> Completed
Active --> Inactive
OnHold --> Active
OnHold --> Inactive
Completed --> Inactive
Inactive --> [*]
What Each Status Means¶
- Active: Project is running, team can log time, revenue is being tracked
- OnHold: Temporarily suspended, no time logging allowed, resources may be reassigned
- Completed: All work finished, final billing processed, used for historical analysis only
- Inactive: Closed or cancelled projects
Project Setup Requirements¶
- Client Assignment: Every project must be assigned to a client
- Business Unit: Determines organizational responsibility and reporting
- Project Type: Affects billing rules and approval workflows
- Project Manager: Responsible for day-to-day management
- Financial Setup: Billing rates, budget, and revenue tracking configuration
Team Assignment¶
How Team Assignments Work¶
flowchart TD
A[Project Manager] --> B[Assigns Team Members]
B --> C[Sets Role & Allocation]
C --> D[Configures Time Period]
D --> E[Team Member Can Log Time]
Assignment Details¶
- Role: What job the person does on the project (Developer, Designer, etc.)
- Allocation: What percentage of their time is dedicated to this project
- Time Period: When they start and end working on the project
- Billing Rate: How much the client gets charged for their work (if billable)
- Approver: Who approves their time entries for this project
Bulk Assignment Features¶
- Project managers can assign multiple people at once
- Easy to set up entire project teams quickly
- Automatic notifications to newly assigned team members
- Integration with user dashboards to show current assignments
Project Types¶
Different Types of Projects¶
- Client Projects: Work for external clients, usually billable
- Internal Projects: Company initiatives, training, or administrative work
- Maintenance Projects: Ongoing support and maintenance for existing systems
- Research Projects: Innovation and development work
- Training Projects: Skill development and learning initiatives
What Project Type Affects¶
- Time Logging Rules: Some projects may restrict what types of work can be logged
- Billing: Whether work is billable to clients or charged internally
- Approval Workflows: Different types may require different approval processes
- Access Control: Who can see and work on the project
Financial Tracking¶
How Project Revenue Works¶
- Time & Materials: Revenue based on hours worked at agreed hourly rates
- Fixed Price: Revenue based on milestone completion or percentage of work done
- Milestone Billing: Specific payments tied to completed deliverables
- Monthly Billing: Regular monthly invoicing for ongoing work
Budget and Cost Tracking¶
- Project Budgets: Track estimated vs actual costs
- Resource Costs: Monitor how much team time costs
- Profitability: Calculate project margins and profitability
- Variance Reports: Compare planned vs actual spending
Integration with Accounting¶
- NetSuite: Automatic sync with financial systems
- Invoice Generation: Create invoices based on approved work
- Revenue Recognition: Proper accounting based on work completion
- Cost Allocation: Track costs to proper business units and clients
Work Classification¶
Task Types¶
- Development: Writing code, programming work
- Testing: Quality assurance and testing activities
- Documentation: Writing specifications, user guides, etc.
- Meetings: Client meetings, team meetings, planning sessions
- Project Management: Planning, coordination, administrative work
- Leave Types: Vacation, sick leave, holidays (special handling)
Project-Specific Rules¶
- Projects can limit which task types are available
- Some clients may require specific work categorization
- Leave types automatically affect leave balances
- Task types help with billing and cost allocation
Project Monitoring¶
Key Project Metrics¶
- Total Hours: How much time has been spent on the project
- Billable vs Non-Billable: Breakdown of chargeable vs internal time
- Budget vs Actual: How spending compares to planned budget
- Team Utilization: How efficiently team members are working
- Project Margin: Profitability of the project
Available Reports¶
- Project Details: Complete overview of project status and metrics
- Team Assignment: Who's working on what and their allocations
- Utilization Reports: How effectively resources are being used
- Revenue Analysis: Financial performance and forecasting
- Cost Variance: Budget vs actual spending analysis
Dashboard Features¶
- Real-time Metrics: Current project status and performance
- Team Performance: Individual and team utilization rates
- Financial Summary: Revenue, costs, and profitability at a glance
- Alert System: Notifications for budget overruns or schedule issues
Organizational Structure¶
Client Management¶
- Every project must have a client (even internal projects use internal client codes)
- Client settings affect billing (rates, currency, payment terms)
- Security levels may restrict who can access certain client projects
- Client location affects tax and compliance requirements
Business Unit Assignment¶
- Projects belong to business units (Technology, Consulting, etc.)
- Affects organizational reporting and profit/loss tracking
- Determines resource allocation and management hierarchy
- Influences approval workflows and access permissions
Project Completion¶
How Projects End¶
flowchart TD
A[Project Work Complete] --> B[Final Time Entries]
B --> C[Final Billing]
C --> D[Client Sign-off]
D --> E[Status: Completed]
Completion Checklist¶
- All work deliverables completed and accepted by client
- Final time entries submitted and approved
- Final billing processed and invoices sent
- Outstanding issues resolved or properly documented
- Client sign-off obtained on project completion
- Project status changed to Completed for historical tracking
What Happens After Completion¶
- No more time logging allowed on completed projects
- Data becomes historical for reporting and analysis
- Team members freed up for assignment to new projects
- Final reports generated for performance analysis
- Lessons learned documented for future projects
Technical Implementation Details¶
For developers and system administrators
Core API Endpoints¶
Project Management:
// Project status changes
POST /api/v2/projects/changestatus
{
"id": 123,
"status": "Active",
"reason": "Project resuming after client approval",
"effectiveDate": "2024-01-15"
}
// Bulk user assignments
POST /api/v2/projects/bulkAssignUsers
{
"projectId": 123,
"assignments": [
{
"userId": 456,
"startDate": "2024-01-15",
"allocation": 100,
"role": "Senior Developer"
}
]
}
Reporting Endpoints:
// Project reports
POST /api/v2/projects/getdetails/{id}
POST /api/v2/projects/getprojectassignmentreport
POST /api/v2/projects/getprojectutilizationreport
POST /api/v2/projects/reports/project-cost-variance
// Financial reports
POST /api/v2/revenue/forecastReport
POST /api/v2/profits/projectMarginReport
POST /api/v2/profits/projectmarginassignedactualreport
Database Schema¶
Project Model Structure:
// Required project fields
'name' => 'Project name (required)',
'client_id' => 'Client assignment (required)',
'projectType_id' => 'Project type classification (required)',
'businessUnit_id' => 'Business unit assignment (required)',
'companyBooking_id' => 'Legal entity assignment (required)',
'startDate' => 'Project start date (required)',
'endDate' => 'Planned end date (nullable)',
'status' => 'Project status (default: Active)',
// Financial fields
'hourlyRate' => 'Default billing rate (nullable)',
'fixedAmount' => 'Fixed price amount (nullable)',
'currency_id' => 'Currency assignment (nullable)',
// Management fields
'projectManagerUserId' => 'Project manager assignment (nullable)',
'engagementManagerUserId' => 'Engagement manager (nullable)',
'salesPersonUserId' => 'Sales person (nullable)',
// Business classification
'isInternal' => 'Internal vs client project flag',
'isBillable' => 'Billing eligibility flag',
'netsuiteProjectId' => 'NetSuite integration ID (nullable)'
ProjectUser Assignment Model:
// Actual ProjectUser assignment fields
'project_id' => 'Project ID (required)',
'user_id' => 'User ID (required)',
'startDate' => 'Assignment start date (required)',
'endDate' => 'Assignment end date (nullable)',
'allocation' => 'Percentage allocation (0-100)',
'hourlyRate' => 'User-specific billing rate (nullable)',
'role' => 'Assignment role/title (nullable)',
'isActive' => 'Assignment status flag',
'approverUser_id' => 'Project-specific approver (nullable)'
Status Management¶
Status Values:
- Active: Project is running, time logging enabled
- OnHold: Temporarily suspended, no time logging
- Completed: Finished, historical data only
- Inactive: Closed/cancelled projects
Status Business Rules: - Only Active projects allow time logging - Status changes tracked with reasons and effective dates - Completed projects become read-only for historical analysis - Status affects revenue recognition and resource allocation
Permission System¶
Project Access Permissions: - Permission 40: Can view all projects - Permission 41: Can create/edit projects - Permission 42: Can manage project assignments - Permission 43: Can change project status
Access Validation:
// Actual permission check pattern
if (!hasPermission($this->authUser, 40)) {
return respondAccessNotAllowed('Projects');
}
Revenue Integration¶
Revenue Models:
Fixed Price Projects:
{
"projectId": 123,
"revenueModel": "fixed_price",
"totalAmount": "150000.00",
"milestones": [
{
"name": "Phase 1 Completion",
"amount": "50000.00",
"targetDate": "2024-03-15"
}
]
}
Time and Materials Projects:
{
"projectId": 124,
"revenueModel": "time_materials",
"defaultHourlyRate": "125.00",
"userRates": [
{
"userId": 456,
"hourlyRate": "150.00",
"role": "Senior Developer"
}
]
}
Task Type Integration¶
Project-Specific Task Types:
-- Actual query pattern
SELECT tt.*
FROM tasktypes tt
JOIN project_task_types ptt ON tt.id = ptt.tasktype_id
WHERE ptt.project_id = ?
AND tt.isActive = 1
Leave Integration:
Task types with isLeaveType = 1 create special timelog entries that affect leave balances.
External System Integration¶
NetSuite Integration:
// NetSuite integration fields
'netsuiteProjectId' => 'NetSuite project ID',
'netsuiteBranch_id' => 'Branch assignment',
'netsuiteCustomerId' => 'Customer mapping'
Data Flow: - Project creation triggers NetSuite project setup - Time entries flow to NetSuite for billing - Revenue recognition synchronized - Cost allocation automated
F1 Resource Management:
POST /api/v2/f1/getProjectAssignments
{
"projectId": 123,
"startDate": "2024-01-01",
"endDate": "2024-12-31"
}
Client and Business Unit Rules¶
Client Assignment Rules: 1. Every project must be assigned to a client 2. Client determines default billing parameters 3. Client-specific approval workflows may apply 4. Client security classifications affect access
Client Data Structure:
// Client model integration
'client_id' => 'Required client assignment',
'clientLocation' => 'Local vs Foreign classification',
'clientType' => 'Government, Private, NGO, etc.',
'securityLevel' => 'Access control requirements'
Business Unit Assignment: - Projects assigned to specific business units - Affects reporting hierarchies - Determines profit center allocation - Influences resource allocation rules
Project Completion Process¶
Completion Validation: - All timelog entries approved - Final billing processed - Outstanding issues resolved - Documentation completed - Client acceptance obtained
Post-Completion Actions: - Update status to Completed - Archive project data - Update resource availability - Generate final reports - Document lessons learned
Performance Metrics¶
Dashboard Data Structure:
{
"projectSummary": {
"totalHours": "1250.5",
"billableHours": "1100.0",
"totalCost": "156250.00",
"projectedRevenue": "175000.00",
"margin": "10.7%"
},
"teamUtilization": [
{
"userId": 456,
"userName": "John Doe",
"allocatedHours": "160.0",
"loggedHours": "152.5",
"utilization": "95.3%"
}
]
}
This project management system is designed for enterprise-level project execution with complex business rules, financial integration, and comprehensive resource management specific to Stratpoint's consulting and development operations.