diff options
Diffstat (limited to 'app/Helper/Task.php')
-rw-r--r-- | app/Helper/Task.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/Helper/Task.php b/app/Helper/Task.php index 500b8a89..d2c59ee9 100644 --- a/app/Helper/Task.php +++ b/app/Helper/Task.php @@ -12,6 +12,14 @@ use Kanboard\Core\Base; */ class Task extends Base { + /** + * Local cache for project columns + * + * @access private + * @var array + */ + private $columns = array(); + public function getColors() { return $this->color->getList(); @@ -65,4 +73,13 @@ class Task extends Base return $html; } + + public function getProgress($task) + { + if (! isset($this->columns[$task['project_id']])) { + $this->columns[$task['project_id']] = $this->board->getColumnsList($task['project_id']); + } + + return $this->task->getProgress($task, $this->columns[$task['project_id']]); + } } |