summaryrefslogtreecommitdiff
path: root/app/Formatter
diff options
context:
space:
mode:
Diffstat (limited to 'app/Formatter')
-rw-r--r--app/Formatter/BoardFormatter.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/Formatter/BoardFormatter.php b/app/Formatter/BoardFormatter.php
index 350dde6c..df443a52 100644
--- a/app/Formatter/BoardFormatter.php
+++ b/app/Formatter/BoardFormatter.php
@@ -44,6 +44,13 @@ class BoardFormatter extends BaseFormatter implements FormatterInterface
{
$swimlanes = $this->swimlaneModel->getSwimlanes($this->projectId);
$columns = $this->columnModel->getAll($this->projectId);
+
+ if (empty($swimlanes) || empty($columns)) {
+ return array();
+ }
+
+ $this->hook->reference('formatter:board:query', $this->query);
+
$tasks = $this->query
->eq(TaskModel::TABLE.'.project_id', $this->projectId)
->asc(TaskModel::TABLE.'.position')
@@ -52,10 +59,6 @@ class BoardFormatter extends BaseFormatter implements FormatterInterface
$task_ids = array_column($tasks, 'id');
$tags = $this->taskTagModel->getTagsByTasks($task_ids);
- if (empty($swimlanes) || empty($columns)) {
- return array();
- }
-
return BoardSwimlaneFormatter::getInstance($this->container)
->withSwimlanes($swimlanes)
->withColumns($columns)