deck
deck copied to clipboard
notification on board deletion
Describe the bug email notifications on board deletion fail because "BoardMapper->find()" can't find the deleted board.
This exception cancel the mail generation for users, who can't receive emails notifications anymore unless we delete the pending "board_delete" entry in the "activity_mq" table.
To Reproduce Steps to reproduce the behavior:
-
User B configure notifications with deck
-
User A creates a board and shares it to B
-
User A deletes the board
-
wait until the board is deleted from database (duno what are the triggers) plus the activity_mq (including the delete notification) isn't processed
-
See error
Expected behavior
- the delete notifications should consider deleted boards or
- the function "Db/BoardMapper.php->findToDelete()" should not list boards where references are still in "activity_mq" table.
Logs
Nextcloud log (data/nextcloud.log)
[activity] Erreur: OCP\AppFramework\Db\DoesNotExistException: Did expect one result but found none when executing: query "SELECT * FROM *PREFIX*deck_boards WHERE (id = :dcValue2) AND (deleted_at = :dcValue1) ORDER BY id ASC"; at <
- /lib/public/AppFramework/Db/QBMapper.php line 362 OCP\AppFramework\Db\QBMapper->findOneQuery()
- /apps-meae/deck/lib/Db/BoardMapper.php line 92 OCP\AppFramework\Db\QBMapper->findEntity()
- /apps-meae/deck/lib/Service/PermissionService.php line 198 OCA\Deck\Db\BoardMapper->find()
- /apps-meae/deck/lib/Service/PermissionService.php line 111 OCA\Deck\Service\PermissionService->getBoard()
- /apps-meae/deck/lib/Service/PermissionService.php line 160 OCA\Deck\Service\PermissionService->getPermissions()
- /apps-meae/deck/lib/Activity/ActivityManager.php line 571 OCA\Deck\Service\PermissionService->checkPermission()
- /apps-meae/deck/lib/Activity/DeckProvider.php line 114 OCA\Deck\Activity\ActivityManager->canSeeBoardActivity()
- /apps/activity/lib/MailQueueHandler.php line 468 OCA\Deck\Activity\DeckProvider->parse()
- /apps/activity/lib/MailQueueHandler.php line 368 OCA\Activity\MailQueueHandler->parseEvent()
- /apps/activity/lib/MailQueueHandler.php line 165 OCA\Activity\MailQueueHandler->sendEmailToUser()
- /apps/activity/lib/BackgroundJob/EmailNotification.php line 60 OCA\Activity\MailQueueHandler->sendEmails()
- /lib/private/BackgroundJob/Job.php line 54 OCA\Activity\BackgroundJob\EmailNotification->run()
- /lib/private/BackgroundJob/TimedJob.php line 60 OC\BackgroundJob\Job->execute()
- /cron.php line 152 OC\BackgroundJob\TimedJob->execute()
at 2024-03-07T10:20:14+00:00