diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-05-04 22:52:08 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-05-04 22:52:08 -0400 |
commit | d5c95e8240639975f61f726e9722900a8d54611f (patch) | |
tree | 3bf55bda241616303e859b0aa8f829133f290a15 /app/Model/Project.php | |
parent | 1e1c127a8548b65751eb332bf8edf5842d14d468 (diff) |
Added automated action to change task color based on the priority
Diffstat (limited to 'app/Model/Project.php')
-rw-r--r-- | app/Model/Project.php | 15 |
1 files changed, 14 insertions, 1 deletions
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) @@ -245,6 +245,19 @@ class Project extends Base } /** + * 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 * * @access public |