Add field for user count

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2018-06-13 18:56:24 +02:00
parent 344ed6d928
commit 7b230d567e
2 changed files with 3 additions and 1 deletions

View File

@@ -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');
}

View File

@@ -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);
}