← Back to team overview

mahara-contributors team mailing list archive

[Bug 916998] [NEW] Bulk deletion fails for users with personal messages with replies

 

Public bug reported:

When a user is deleted, an attempt is made to delete all
notification_internal_activity records for that user.  This attempt can
fail, because in the case of personal message threads, other rows in
notification_internal_activity can point to the records we are trying to
delete, resulting in a foreign key error.

This error occurs outside the db transaction in delete_user(), so
usually this bug doesn't stop users from being deleted, it stops their
internal notifications from being deleted.  In bulk delete operations,
all the calls to delete_user are wrapped in a transaction, so deletion
fails.

** Affects: mahara
     Importance: Medium
     Assignee: Richard Mansfield (richard-mansfield)
         Status: In Progress

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/916998

Title:
  Bulk deletion fails for users with personal messages with replies

Status in Mahara ePortfolio:
  In Progress

Bug description:
  When a user is deleted, an attempt is made to delete all
  notification_internal_activity records for that user.  This attempt
  can fail, because in the case of personal message threads, other rows
  in notification_internal_activity can point to the records we are
  trying to delete, resulting in a foreign key error.

  This error occurs outside the db transaction in delete_user(), so
  usually this bug doesn't stop users from being deleted, it stops their
  internal notifications from being deleted.  In bulk delete operations,
  all the calls to delete_user are wrapped in a transaction, so deletion
  fails.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/916998/+subscriptions


Follow ups

References