summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-04 22:52:08 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-04 22:52:08 -0400
commitd5c95e8240639975f61f726e9722900a8d54611f (patch)
tree3bf55bda241616303e859b0aa8f829133f290a15 /app/Model
parent1e1c127a8548b65751eb332bf8edf5842d14d468 (diff)
Added automated action to change task color based on the priority
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Project.php15
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