diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/create-sample-burndown.php | 4 | ||||
-rwxr-xr-x | scripts/create-sample-cfd.php | 4 | ||||
-rwxr-xr-x | scripts/create-sample-lead-time.php | 70 |
3 files changed, 74 insertions, 4 deletions
diff --git a/scripts/create-sample-burndown.php b/scripts/create-sample-burndown.php index ae0b2627..188ad7d9 100755 --- a/scripts/create-sample-burndown.php +++ b/scripts/create-sample-burndown.php @@ -3,11 +3,11 @@ require __DIR__.'/../app/common.php'; -use Model\ProjectDailySummary; +use Model\ProjectDailyColumnStats; use Model\TaskCreation; use Model\TaskStatus; -$pds = new ProjectDailySummary($container); +$pds = new ProjectDailyColumnStats($container); $taskCreation = new TaskCreation($container); $taskStatus = new TaskStatus($container); diff --git a/scripts/create-sample-cfd.php b/scripts/create-sample-cfd.php index 73135f7a..e7ff1ec9 100755 --- a/scripts/create-sample-cfd.php +++ b/scripts/create-sample-cfd.php @@ -3,11 +3,11 @@ require __DIR__.'/../app/common.php'; -use Model\ProjectDailySummary; +use Model\ProjectDailyColumnStats; use Model\TaskCreation; use Model\TaskPosition; -$pds = new ProjectDailySummary($container); +$pds = new ProjectDailyColumnStats($container); $taskCreation = new TaskCreation($container); $taskPosition = new TaskPosition($container); diff --git a/scripts/create-sample-lead-time.php b/scripts/create-sample-lead-time.php new file mode 100755 index 00000000..d4d82006 --- /dev/null +++ b/scripts/create-sample-lead-time.php @@ -0,0 +1,70 @@ +#!/usr/bin/env php +<?php + +require __DIR__.'/../app/common.php'; + +use Model\Project; +use Model\ProjectDailyStats; + +$p = new Project($container); +$pds = new ProjectDailyStats($container); + +$p->create(array('name' => 'Test Lead/Cycle time')); + +$container['db']->table('tasks')->insert(array( + 'title' => 'Lead time = 4d | Cycle time = 3d', + 'date_creation' => strtotime('-7 days'), + 'date_started' => strtotime('-6 days'), + 'date_completed' => strtotime('-3 days'), + 'is_active' => 0, + 'project_id' => 1, + 'column_id' => 1, +)); + +$container['db']->table('tasks')->insert(array( + 'title' => 'Lead time = 1d | Cycle time = 1d', + 'date_creation' => strtotime('-7 days'), + 'date_started' => strtotime('-7 days'), + 'date_completed' => strtotime('-6 days'), + 'is_active' => 0, + 'project_id' => 1, + 'column_id' => 1, +)); + +$pds->updateTotals(1, date('Y-m-d', strtotime('-6 days'))); + +$container['db']->table('tasks')->insert(array( + 'title' => 'Lead time = 7d | Cycle time = 5d', + 'date_creation' => strtotime('-7 days'), + 'date_started' => strtotime('-5 days'), + 'date_completed' => strtotime('today'), + 'is_active' => 0, + 'project_id' => 1, + 'column_id' => 1, +)); + +$pds->updateTotals(1, date('Y-m-d', strtotime('-5 days'))); + +$container['db']->table('tasks')->insert(array( + 'title' => 'Lead time = 1d | Cycle time = 0', + 'date_creation' => strtotime('-3 days'), + 'date_started' => 0, + 'date_completed' => 0, + 'is_active' => 0, + 'project_id' => 1, + 'column_id' => 1, +)); + +$pds->updateTotals(1, date('Y-m-d', strtotime('-4 days'))); + +$container['db']->table('tasks')->insert(array( + 'title' => 'Lead time = 1d | Cycle time = 1d', + 'date_creation' => strtotime('-3 days'), + 'date_started' => strtotime('-3 days'), + 'date_completed' => 0, + 'is_active' => 0, + 'project_id' => 1, + 'column_id' => 1, +)); + +$pds->updateTotals(1, date('Y-m-d', strtotime('-3 days'))); |