Opened 5 years ago

Closed 5 years ago

#2066 closed improve feature (fixed)

Safety Team needs tool to hide comments while they are being edited

Reported by: sitatara Owned by: Tsjoek
Priority: minor Milestone: 2.3
Component: BW Admin Keywords: comment, safety, admin
Cc: shevek

Description

The Safety Team needs a tool to hide comments from public when they violate the Terms of Use while the writer is allowed to edit it. Once the Safety Team has reviewed the new comment it should be possible to make it public again

Change History (19)

comment:1 Changed 5 years ago by Tsjoek

  • Owner set to Tsjoek
  • Status changed from new to assigned

comment:2 Changed 5 years ago by shevek

  • Milestone changed from unassigned to backlog

comment:3 Changed 5 years ago by sitatara

This will usually affect negative comments. Since they cannot be edited by members anymore, this functionality needs to include a way to make negative comments editable under certain circumstances.

I suggest that hiding and allowing to edit a comment should be two separate steps in the process.

  1. The Safety Team should be able to hide a comment while thy still discuss what's being done with it.
  2. In a second step they should have the possibility to release the comment for editing (while it's still being hidden).
  3. Once the user has edited the comment, the Safety Team can review it (for this we need some sort of "report" that a hidden comment has been edited).
  4. If the review is positive, there should be a possibility to make it visible again and to remove the editing rights from the member.

comment:4 Changed 5 years ago by Tsjoek

  • Milestone changed from backlog to 2.2

I think I'm slowly getting close to an implementation. It just won't include the report in nr 3. because that would add quite a bit of complexity and I think that this could be easily solved by already existing forms of communication (if the user edits the comment indeed, it is in his interest to notify the Safety Team of that actively so just ask him to do so).

comment:6 Changed 5 years ago by Tsjoek

Oh, and 2 new columns in the comment table to keep track of the status:

ALTER TABLE comments ADD DisplayInPublic TINYINT NOT NULL DEFAULT '1';
ALTER TABLE comments ADD AllowEdit TINYINT NOT NULL DEFAULT '0';

comment:7 Changed 5 years ago by shevek

  • Status changed from local_testing to to_alpha

comment:8 Changed 5 years ago by shevek

  • Status changed from to_alpha to testing

comment:9 Changed 5 years ago by shevek

  • Resolution set to fixed
  • Status changed from testing to closed

Checked by the SafetyTeam?. Works fine.

comment:10 Changed 5 years ago by shevek

Unfortunately it turns out it isn't working fine.

Checkout: http://alpha.bewelcome.org/members/testtube/comments/

Both comments show 'CommentEditHidden?'.

The database has DisplayInPublic? = 0 and AllowEdit? = 1 for both.

comment:11 Changed 5 years ago by sitatara

Here are the details about this bug:

When the Safety Team hides the comment that works fine. Once we allow editing it shows up on the comments pages of both members (writer and "receiver") again though (for everyone to see). It's not visible directly on the profile page but shouldn't be visible on the comments page either.

BTW, once a member edits a "hidden" comment, the other person receives a notification - even though the comment is hidden. That shouldn't happen either. Ideally that notification should only be sent out once the new comment is "unhidden" by the Safety Team.

comment:12 Changed 5 years ago by Tsjoek

https://www.gitorious.org/bewelcome/rox/commit/f9b13d2058cea5b38fb0a2c0139e9e01cd12008d

This should fix the first part of the bug, as well as an issue that appeared when a user would submit an invalid form while editing a negative comment. It showed the message that a neg cannot be edited in stead of the form that was submitted.

comment:13 Changed 5 years ago by shevek

  • Resolution fixed deleted
  • Status changed from closed to reopened

Deployed the code to alpha. To test this safetyteam rights are necessary.

comment:14 Changed 5 years ago by shevek

  • Status changed from reopened to to_alpha

comment:15 Changed 5 years ago by shevek

  • Status changed from to_alpha to testing

comment:16 Changed 5 years ago by sitatara

I just tested the changes and there is still some unexpected behavior:

When I toggle the show/hide or default editing/allow editing button and then refresh the page, the button automatically toggles again (since there is no redirect after toggling). This change should only happen when I actively click that button.

When a comment is hidden but editing is not allowed, the comment does not even show up for the writer and the Safety Team. The writer, when going to the profile of the receiver, sees an "Edit comment" entry there (in the left side bar) but no own comment. When going to the comment page of the receiver he/she sees the "Add comment" button (which should not be there). When clicking that no new comment can be written though. Expected behavior (in my opinion) would be:

  • The Safety Team can always see all comments on profiles (both on the writer's and the receiver's profile), even if a comment is hidden. It should be clear whether a comment is active or hidden.
  • The writer of a comment can always see his/her own comments, even when hidden. It should be whether the comment is active or hidden.

When a comment is hidden and editing is allowed, the tool works correctly for the writer but the Safety Team still cannot see the comment on the profile. Expected behavior would be:

  • Third parties and the receiver cannot see the comment but Safety Team and writer can.

Allowing to edit without hiding a comment seems to work as expected.

comment:17 Changed 5 years ago by Tsjoek

https://www.gitorious.org/bewelcome/rox/commit/ad7195ee4c87339bf9993ecfbaec19c59deeb7f9

Fixing all above points, including preventing notification for changes on hidden comments.

comment:18 Changed 5 years ago by shevek

  • Milestone changed from 2.2 to 2.3

Moved to 2.3.

comment:19 Changed 5 years ago by sitatara

  • Resolution set to fixed
  • Status changed from testing to closed

Tested everything and it works. Thank you, Tsjoek!

Note: See TracTickets for help on using tickets.