diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-26 20:08:11 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-26 20:08:11 -0500 |
commit | 320c7971f606a0c9caa4a20bcfcbc2fe2f6c9c00 (patch) | |
tree | e25dfa34d6115296ec1ef5f1c317b9bb417b0e5e /app/Helper | |
parent | 2945097aee1c4a5ba1625ad15224574cd81a6d99 (diff) | |
parent | 648e03a8d063252e9e7d84f854da64d1e59337a1 (diff) |
Merge pull-request #1737
Diffstat (limited to 'app/Helper')
-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']]); + } } |