Reviewed: https://reviews.mahara.org/c/mahara/+/13564 Committed: https://git.mahara.org/mahara/mahara/commit/b28a115a42659bd073008b354fa33fd0f60ae1ad Submitter: "Robert Lyon <robe...@catalyst.net.nz>" Branch: 22.04_DEV
commit b28a115a42659bd073008b354fa33fd0f60ae1ad Author: Robert Lyon <robe...@catalyst.net.nz> Date: Thu Dec 22 14:48:59 2022 +1300 Bug 1998860: watchlist_queue needs cleanup on usr/view/block delete If one was to delete a usr/view/block that referenced in the watchlist_queue then we get an error Change-Id: I612ade99363625cbb4c8f85d9ed4c3c429c32efd Signed-off-by: Robert Lyon <robe...@catalyst.net.nz> (cherry picked from commit 6a35e7d81f860eb2ee8c21ef6a33ceea618fa025) -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: mahara-contributors https://bugs.launchpad.net/bugs/1998860 Title: Problems with deleting a page / person when page is on a watchlist Status in Mahara: Fix Committed Status in Mahara 21.10 series: Fix Committed Status in Mahara 22.04 series: Fix Committed Status in Mahara 22.10 series: Fix Committed Status in Mahara 23.04 series: Fix Committed Bug description: There are couple of issues around watchlists and queued items To test - problem one: 1) Create a site and add some people to it 2) Create a group and add some people as members 3) As group creator add a page to the group and add a block to the page 4) Masquerade as another group member and view the page - add page to watchlist 5) As this group member edit the page and add a block 6) Then straight away delete the block and go to the group portfolios page and delete the page (do this quickly to beat cron) You get an error: ERROR: update or delete on table "view" violates foreign key constraint "watcqueu_vie_fk" on table "watchlist_queue" This is because when you edit a page that is being watched the watchlist_queue table gets populated with changes and when you delete the block the line isn't removed from the watchlist_queue just the block ID (as it is still a valid view change - the block deletion) so when you try and delete the page it's still referenced. We need to remove the reference on page deletion To test - problem two: 1-5) The same steps as above 6) Stop masquerading as other person and delete person Person deletes successfully but they are still referenced in the watchlist_queue table - we need to remove those references on person deletion so we don't try and send a notification to a deleted person To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1998860/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp