Add lead and cycle time for projects

This commit is contained in:
Frederic Guillot
2015-07-06 21:34:57 -04:00
parent 663a1c20e6
commit 08259d4f20
26 changed files with 461 additions and 95 deletions

View File

@@ -0,0 +1,28 @@
<?php
namespace Console;
use Model\Project;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ProjectDailyStatsCalculation extends Base
{
protected function configure()
{
$this
->setName('projects:daily-stats')
->setDescription('Calculate daily statistics for all projects');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$projects = $this->project->getAllByStatus(Project::ACTIVE);
foreach ($projects as $project) {
$output->writeln('Run calculation for '.$project['name']);
$this->projectDailyColumnStats->updateTotals($project['id'], date('Y-m-d'));
$this->projectDailyStats->updateTotals($project['id'], date('Y-m-d'));
}
}
}