From 7467cca0cc587e18b24f6ba97d5013a0ebb6c1ef Mon Sep 17 00:00:00 2001 From: mulles Date: Tue, 7 May 2024 20:50:51 +0200 Subject: [PATCH 1/2] Update TrelloJsonService.php Fixes the following issue: https://github.com/nextcloud/deck/issues/5136 By fixing the following error when running 'php occ deck:import --system=TrelloJson' Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:136 and Error: Call to a member function getUID() on string in /home/sites/site100028002/web/nextcloud.enklaave.org/apps/deck/lib/Service/Importer/Systems/TrelloJsonService.php:364 Signed-off-by: mulles --- lib/Service/Importer/Systems/TrelloJsonService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Service/Importer/Systems/TrelloJsonService.php b/lib/Service/Importer/Systems/TrelloJsonService.php index 71c897cec..e10e0906d 100644 --- a/lib/Service/Importer/Systems/TrelloJsonService.php +++ b/lib/Service/Importer/Systems/TrelloJsonService.php @@ -133,7 +133,7 @@ function (\stdClass $a) use ($trelloCard) { $cardId = $this->cards[$trelloCard->id]->getId(); $comment = new Comment(); if (!empty($this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username})) { - $actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username}->getUID(); + $actor = $this->getImportService()->getConfig('uidRelation')->{$trelloComment->memberCreator->username}; } else { $actor = $this->getImportService()->getConfig('owner')->getUID(); } @@ -361,7 +361,7 @@ private function translateColor(?string $color): string { private function replaceUsernames(string $text): string { foreach ($this->getImportService()->getConfig('uidRelation') as $trello => $nextcloud) { - $text = str_replace($trello, $nextcloud->getUID(), $text); + $text = str_replace($trello, $nextcloud, $text); } return $text; } From 1bbc19f9e0ffeee1b6d55d4aaedf0f5e44195318 Mon Sep 17 00:00:00 2001 From: mulles Date: Wed, 22 May 2024 10:28:47 +0200 Subject: [PATCH 2/2] Update TrelloJsonService.php removed trailing white space, I am sorry for that thx for your patience. Signed-off-by: mulles --- lib/Service/Importer/Systems/TrelloJsonService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Service/Importer/Systems/TrelloJsonService.php b/lib/Service/Importer/Systems/TrelloJsonService.php index e10e0906d..e6f487ba5 100644 --- a/lib/Service/Importer/Systems/TrelloJsonService.php +++ b/lib/Service/Importer/Systems/TrelloJsonService.php @@ -361,7 +361,7 @@ private function translateColor(?string $color): string { private function replaceUsernames(string $text): string { foreach ($this->getImportService()->getConfig('uidRelation') as $trello => $nextcloud) { - $text = str_replace($trello, $nextcloud, $text); + $text = str_replace($trello, $nextcloud, $text); } return $text; }