deck icon indicating copy to clipboard operation
deck copied to clipboard

notification on board deletion

Open leguennec-meae opened this issue 1 year ago • 0 comments

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:

  1. User B configure notifications with deck

  2. User A creates a board and shares it to B

  3. User A deletes the board

  4. wait until the board is deleted from database (duno what are the triggers) plus the activity_mq (including the delete notification) isn't processed

  5. 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 <>

  1. /lib/public/AppFramework/Db/QBMapper.php line 362 OCP\AppFramework\Db\QBMapper->findOneQuery()
  2. /apps-meae/deck/lib/Db/BoardMapper.php line 92 OCP\AppFramework\Db\QBMapper->findEntity()
  3. /apps-meae/deck/lib/Service/PermissionService.php line 198 OCA\Deck\Db\BoardMapper->find()
  4. /apps-meae/deck/lib/Service/PermissionService.php line 111 OCA\Deck\Service\PermissionService->getBoard()
  5. /apps-meae/deck/lib/Service/PermissionService.php line 160 OCA\Deck\Service\PermissionService->getPermissions()
  6. /apps-meae/deck/lib/Activity/ActivityManager.php line 571 OCA\Deck\Service\PermissionService->checkPermission()
  7. /apps-meae/deck/lib/Activity/DeckProvider.php line 114 OCA\Deck\Activity\ActivityManager->canSeeBoardActivity()
  8. /apps/activity/lib/MailQueueHandler.php line 468 OCA\Deck\Activity\DeckProvider->parse()
  9. /apps/activity/lib/MailQueueHandler.php line 368 OCA\Activity\MailQueueHandler->parseEvent()
  10. /apps/activity/lib/MailQueueHandler.php line 165 OCA\Activity\MailQueueHandler->sendEmailToUser()
  11. /apps/activity/lib/BackgroundJob/EmailNotification.php line 60 OCA\Activity\MailQueueHandler->sendEmails()
  12. /lib/private/BackgroundJob/Job.php line 54 OCA\Activity\BackgroundJob\EmailNotification->run()
  13. /lib/private/BackgroundJob/TimedJob.php line 60 OC\BackgroundJob\Job->execute()
  14. /cron.php line 152 OC\BackgroundJob\TimedJob->execute()

at 2024-03-07T10:20:14+00:00

leguennec-meae avatar Mar 07 '24 11:03 leguennec-meae