From 7b230d567e8f1959b5353648f7bafa70d162d4fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 13 Jun 2018 18:56:24 +0200 Subject: [PATCH] Add field for user count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/Db/Card.php | 2 ++ lib/Service/StackService.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Db/Card.php b/lib/Db/Card.php index 9b50fdf06..21f65d79e 100644 --- a/lib/Db/Card.php +++ b/lib/Db/Card.php @@ -36,6 +36,7 @@ class Card extends RelationalEntity { protected $labels; protected $assignedUsers; protected $attachments; + protected $attachmentCount; protected $owner; protected $order; protected $archived = false; @@ -60,6 +61,7 @@ class Card extends RelationalEntity { $this->addRelation('labels'); $this->addRelation('assignedUsers'); $this->addRelation('attachments'); + $this->addRelation('attachmentCount'); $this->addRelation('participants'); $this->addResolvable('owner'); } diff --git a/lib/Service/StackService.php b/lib/Service/StackService.php index 12d988d24..30e40cc6e 100644 --- a/lib/Service/StackService.php +++ b/lib/Service/StackService.php @@ -74,7 +74,7 @@ class StackService { if (array_key_exists($card->id, $labels)) { $cards[$cardIndex]->setLabels($labels[$card->id]); } - $card->setAttachments($this->attachmentService->count($card->getId())); + $card->setAttachmentCount($this->attachmentService->count($card->getId())); } $stacks[$stackIndex]->setCards($cards); }