diff options
| author | Lesstat <florianbarth@gmx.de> | 2015-07-11 11:44:26 +0200 |
|---|---|---|
| committer | Lesstat <florianbarth@gmx.de> | 2015-07-11 11:44:26 +0200 |
| commit | a85a1c613239c20fe72eb96c2921f4c220ec156b (patch) | |
| tree | d032b4591e518cbbbfaa8886f8f5d98a6ea2efb7 /app/Model/Transition.php | |
| parent | 5101eaa8060ce3c75a81a26f6e47aae40e3d4ac3 (diff) | |
| parent | 7e94d0ca233d15d6124c0adf3f956a119c82ccae (diff) | |
Merged branch 'master' of https://github.com/fguillot/kanboard
only imports conflicted
Diffstat (limited to 'app/Model/Transition.php')
| -rw-r--r-- | app/Model/Transition.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/Model/Transition.php b/app/Model/Transition.php index cb759e4a..ac3fba54 100644 --- a/app/Model/Transition.php +++ b/app/Model/Transition.php @@ -39,6 +39,22 @@ class Transition extends Base } /** + * Get time spent by task for each column + * + * @access public + * @param integer $task_id + * @return array + */ + public function getTimeSpentByTask($task_id) + { + return $this->db + ->hashtable(self::TABLE) + ->groupBy('src_column_id') + ->eq('task_id', $task_id) + ->getAll('src_column_id', 'SUM(time_spent) AS time_spent'); + } + + /** * Get all transitions by task * * @access public |
