From d5c95e8240639975f61f726e9722900a8d54611f Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 4 May 2016 22:52:08 -0400 Subject: Added automated action to change task color based on the priority --- app/Model/Project.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'app/Model') diff --git a/app/Model/Project.php b/app/Model/Project.php index 6e3c2326..9843a54c 100644 --- a/app/Model/Project.php +++ b/app/Model/Project.php @@ -201,7 +201,7 @@ class Project extends Base * Get all projects with all its data for a given status * * @access public - * @param integer $status Proejct status: self::ACTIVE or self:INACTIVE + * @param integer $status Project status: self::ACTIVE or self:INACTIVE * @return array */ public function getAllByStatus($status) @@ -244,6 +244,19 @@ class Project extends Base ->count(); } + /** + * Get Priority range from a project + * + * @access public + * @param array $project + * @return array + */ + public function getPriorities(array $project) + { + $range = range($project['priority_start'], $project['priority_end']); + return array_combine($range, $range); + } + /** * Gather some task metrics for a given project * -- cgit v1.2.3