summaryrefslogtreecommitdiff
path: root/app/Model/ProjectAnalytic.php
diff options
context:
space:
mode:
authorMatthew Cillo <matthewacillo@gmail.com>2015-12-11 21:33:27 -0500
committerMatthew Cillo <matthewacillo@gmail.com>2015-12-11 21:33:27 -0500
commitb2b75a4a6e58ffda180e148fe87f996a24fa6973 (patch)
tree3b98eaca623fb9a70e9513e2762b34b1dcb82b5d /app/Model/ProjectAnalytic.php
parentc72e13a976a64feee992b77b1d676bf584e44c47 (diff)
added/reworded some comments
Diffstat (limited to 'app/Model/ProjectAnalytic.php')
-rw-r--r--app/Model/ProjectAnalytic.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/app/Model/ProjectAnalytic.php b/app/Model/ProjectAnalytic.php
index 8a982bd7..79277e79 100644
--- a/app/Model/ProjectAnalytic.php
+++ b/app/Model/ProjectAnalytic.php
@@ -180,13 +180,18 @@ class ProjectAnalytic extends Base
return $stats;
}
-
+ /**
+ * Get the time spent and estimated into each status
+ *
+ * @access public
+ * @param integer $project_id
+ * @return array
+ */
public function getHoursByStatus($project_id)
{
$stats = array();
- $columns = $this->board->getColumnsList($project_id);
- // Get the time spent of the last move for each tasks
+ // Get the times related to each task
$tasks = $this->db
->table(Task::TABLE)
->columns('id', 'time_estimated', 'time_spent', 'is_active')
@@ -206,7 +211,7 @@ class ProjectAnalytic extends Base
);
- // Get time spent foreach task/column and take into account the last move
+ // Add times spent and estimated to each status
foreach ($tasks as &$task) {
if ($task['is_active']) {
$stats['open']['time_estimated'] += $task['time_estimated'];