No comment modification notification for group view

Bug #1197197 reported by Robert Lyon
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Pramith Dayananda

Bug Description

Following on from https://bugs.launchpad.net/mahara/+bug/1171310

The patch mentioned there does not allow for group administrators to be alerted when a comment is modified from private to public with activate comments & comment moderation turned on for the page

To test:
get patch from https://bugs.launchpad.net/mahara/+bug/1171310 (if not already merged into master)

1. Create a Group and make a page for it - take note of the url for the page
2. Make the page accessible to the public, and activate comments & comment moderation for the page (this is all under the Sharing tab)
3. Log in as a user not in the group and go to the page
4. Place a comment on the Page, making sure to untick the "Make public" box so that the comment is private.
5. Click the "edit" icon next to the newly created comment.
6. On the edit page, tick the "Make public" box, and click Save.

Expected result: The comment's status should be "This comment is private | You have requested that this comment be made public" and that the administrator of the group gets an email.

Outcome: no email to group administrator

Tags: feedback
Robert Lyon (robertl-9)
Changed in mahara:
importance: Undecided → Medium
status: New → Confirmed
Robert Lyon (robertl-9)
tags: added: feedback
Revision history for this message
Pramith Dayananda (pramithkm) wrote :

Hi,

I would like to investigate this one. Anything I should be aware of, please let me know.

Thanks,
Pramith.

Changed in mahara:
assignee: nobody → Pramith Dayananda (pramithkm)
Revision history for this message
Pramith Dayananda (pramithkm) wrote :

Hi,

Getting following line when I followed the steps in Bug Description.
"This comment is private - You have requested that this comment be made public."

No email received.

Pramith.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Pramith,

Since you are using a developer setup, did you check your config.php file and set emails to be sent and entered your email address as the one to send all mails to?

$cfg->sendemail = true;
$cfg->sendallemailto = '<email address hidden>';

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

P.S. You should still see the notification in your Mahara inbox.

Revision history for this message
Pramith Dayananda (pramithkm) wrote :

Hi,

With my testing I can confirm the emails are sent to the "Group admins". This is done via the "lib/activity". Thought there's a comment in the code close to activity occurred call, saying "TODO: need to notify the group admins bug #1197197".

Let me know if this needs changing.

Thanks,
Pramith.

Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi Pramith,

If you can confirm that emails are sent to group admin then can you

1) Put the commit id for the patch that fixed it here (for reference)
2) Remove the comment about this bug number from the code
3) If the fix relates to a specific bug to fix this problem (rather than being part of an unrelated fix) mark this bug a duplicate of that one

Cheers

Robert

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/7916

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

Reviewed: https://reviews.mahara.org/7916
Committed: https://git.mahara.org/mahara/mahara/commit/48fbd286491d73869176989a30937831a1f9f90e
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 48fbd286491d73869176989a30937831a1f9f90e
Author: Pramith Dayananda <email address hidden>
Date: Thu Aug 3 18:08:58 2017 +1200

Bug 1197197: Admin notification to change private comment to public

Same issue available in annotations and comments

behatnotneeded

Change-Id: I7d394882833508e905777e01beb37f60bd4a06ce

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 17.10.0
status: Confirmed → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
Revision history for this message
Niranjan (niranjan528) wrote :

Steps to reproduce-

Precondition: There should be existing users other than administrator.

1. Login to mahara as an admin user

2. Navigate to Main menu> Groups

3. Click on Create group and fill in all the mandatory fields.

4. Click on Save group button.

5. Now click on "Pages and collections" within the group

6. Click on Add and select page

7. Enter all the Mandatory fields and click on save button.

8. Now click on share button on the page.

9. Click on Advanced options and enable "Allow comments" and " Moderate comments"

10. Select Public from the drop down under Shared with and click on save button.

11. Logout as administrator and Login with another user who is not admin

12. At the dashboard under "Latest changes I can view" click on the page name that has been modified as admin

13. Enter some text to comment and make sure to disable "Make comment Public"

14. Click on comment

15. Click on edit button for the comment we have added at step 13

16. Now enable " Make comment Public" and click on save button.

17. Logout as a user and Login back as the admin user

Expected result: An email should be sent to Group administrator after making changes to the comment and also it should send a mail to moderate the comments

Actual Result: No email is sent to Group administrator for moderation

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.