Hide deleted comments unless they're needed for context

Bug #1580499 reported by Aaron Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Aaron Wells

Bug Description

Currently when you delete a comment in Mahara, we leave a placeholder on the page that says "Comment deleted" and shows who made the comment. The idea behind this was to provide some context for subsequent comments, to indicate that people were responding to something which is no longer present.

However, this gets annoying in some cases. For instance, deletion of spam comments, or comments that were placed accidentally.

So, a compromise solution is to only display the placeholder if it's necessary for context. Specifically, if a comment is the last one on a page when it gets deleted, then we don't need to display its placeholder. Or if threaded comments are enabled, and a comment is the last one in its thread, we don't need to display its placeholder.

This should be applied recursively, so that if I delete the penultimate comment on the page, and then the last comment on the page, both wind up hidden. The comments should still be retained in the database for auditing purposes.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Because this behavior is dependent on the state of things at the time the comment is deleted, we can't calculate it as an emergent property of the existing data fields on the artefacts. So, we'll need to add an additional "hidden" column to artefact_comment_comment to track whether a comment should be hidden or not.

Hopefully having separate "hidden" and "deletedby" columns won't be too confusing for future developers.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/6467

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/6467
Committed: https://git.mahara.org/mahara/mahara/commit/8af684771f336e5266e4af6ecf59a3c1c64e536d
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 8af684771f336e5266e4af6ecf59a3c1c64e536d
Author: Aaron Wells <email address hidden>
Date: Wed May 11 20:42:10 2016 +1200

Hide deleted comments unless they're needed for context

Bug 1580499. Updating comments feature to adapt to the new
behavior, and removing redundant "feedback_configuration" feature
file.

Change-Id: Ib48cbb19f6ab9cc4937f31cef504724569680e1f

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/6591

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Thanks go to SWITCH for this new feature.

tags: added: nominatedfeature
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.