From 67ed43a2e1f3ddccff06c413192b59000961a10d Mon Sep 17 00:00:00 2001 From: Tiago Carrondo Date: Thu, 29 Oct 2026 10:42:17 +0000 Subject: [PATCH] fix(activity): keep the subject identifier when parsing events setSubjects() replaced the event subject (e.g. label_assign) with the translated sentence. The activity app passes that subject to INotification::setSubject(), which rejects more than 64 characters, so the notifications for moving a card, adding a label, adding a description, marking as done and unarchiving were dropped with "Failed to format activity notification". The emails use the rich and parsed subjects since then, so the override is no longer needed. Fixes #8591 Co-Authored-By: Claude Opus 5.5 Signed-off-by: Tiago Carrondo --- lib/Activity/DeckProvider.php | 1 - tests/unit/Activity/DeckProviderTest.php | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Activity/DeckProvider.php b/lib/Activity/DeckProvider.php index 78017f3eb5..5ea9a4da82 100644 --- a/lib/Activity/DeckProvider.php +++ b/lib/Activity/DeckProvider.php @@ -183,7 +183,6 @@ protected function setSubjects(IEvent $event, $subject, array $parameters) { $event->setParsedSubject(str_replace($placeholders, $replacements, $subject)) ->setRichSubject($subject, $richParameters); - $event->setSubject($subject, $parameters); } private function getIcon(IEvent $event) { diff --git a/tests/unit/Activity/DeckProviderTest.php b/tests/unit/Activity/DeckProviderTest.php index 18399bc633..ed735d4f67 100644 --- a/tests/unit/Activity/DeckProviderTest.php +++ b/tests/unit/Activity/DeckProviderTest.php @@ -261,6 +261,8 @@ public function testParseObjectTypeCard() { $this->assertEquals('test string Card', $event->getParsedSubject()); $this->assertEquals('test string {card}', $event->getRichSubject()); $this->assertEquals('', $event->getMessage()); + // the subject stays the identifier: notifications reject subjects longer than 64 characters + $this->assertEquals(ActivityManager::SUBJECT_CARD_CREATE, $event->getSubject()); } public function testParseObjectTypeCardWithDiff() { @@ -312,6 +314,7 @@ public function testParseObjectTypeCardWithDiff() { $this->assertEquals('test string {card}', $event->getRichSubject()); $this->assertEquals('BCD', $event->getMessage()); $this->assertEquals('BCD', $event->getParsedMessage()); + $this->assertEquals(ActivityManager::SUBJECT_CARD_UPDATE_DESCRIPTION, $event->getSubject()); } public function testParseParamForBoard() {