From 9ef94328796b738d4f679e2c12514137cc64f754 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 @@ class TrelloJsonService extends ABoardImportService { $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 @@ class TrelloJsonService extends ABoardImportService { 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 f7b44af364bf2e184ae0b43d0d8e5cbbb20228fc 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 @@ class TrelloJsonService extends ABoardImportService { 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; }