copy labels when moving cards between boards

Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
This commit is contained in:
grnd-alt
2024-08-20 11:29:11 +02:00
committed by backportbot[bot]
parent acaaccda05
commit c846880a1e
3 changed files with 38 additions and 3 deletions

View File

@@ -125,8 +125,10 @@ class DeckJsonService extends ABoardImportService {
foreach ($this->tmpCards as $sourceCard) {
foreach ($sourceCard->labels as $label) {
$cardId = $this->cards[$sourceCard->id]->getId();
$labelId = $this->labels[$label->id]->getId();
$cardsLabels[$cardId][] = $labelId;
if ($this->getImportService()->getData()->id === $label->boardId) {
$labelId = $this->labels[$label->id]->getId();
$cardsLabels[$cardId][] = $labelId;
}
}
}
return $cardsLabels;