Group collection notifications are sent per page

Bug #1926247 reported by Lisa Seeto
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Doris Tam
21.10
Fix Released
High
Unassigned
22.04
Fix Released
High
Doris Tam

Bug Description

When a collection is shared with a group, the members of the group are receiving a notification per page access. They should be getting a single notification for the entire collection.

The number of notifications sent is related to the activity_queue table rows for that type and collection. For a personal portfolio, the rows are written when the pages are added to the collection on collection/views.php where we "Add pages to collection"- we make sure that if there is already a entry in the table that matches the type and the collection id we don't add any extra ones. Group portfolios seem to have a different workflow in that each individual page is added as a row to the table on creation and not just when it adds to a collection later on. This will need to be investigated to see where we can avoid adding extra rows to the table that will produce page access notifications instead of collection access notifications.

Steps to test:
1. Log in as admin to a site with at least a few other accounts
2. Create a group (can be 'controlled' membership) and add some other accounts
3. Create a group page, then another and then add them to a collection
4. Set the access to all members of the group and save
5. Run the cron and receive the notifications
Expected results:
All members of the group receive one notification to the collection
Actual results:
All members receive notifications based on the pages within the collection.

no longer affects: mahara/20.10
no longer affects: mahara/20.04
no longer affects: mahara/21.04
Changed in mahara:
status: New → Confirmed
importance: Undecided → High
milestone: none → 21.10.0
Revision history for this message
Doris Tam (doristam) wrote (last edit ):

Group notifications are sent per page...
    • No, when a collection is shared with a group. One notification is sent to all members of the group.
    • No, when a collection is shared by a group. One notification is sent to all members of the group.
    • Yes, when a collection is copied into a group.
    • Yes, when a group collection is auto-created through creating a plan based off a template plan that comes with an assigned task page. The assigned page is copied and a collection is created for it.

Replicate steps to get notification for each view when a collection is copied into a group:
    1. Create a group.
    2. Create and add a member to the group.
    3. Create a personal collection with two pages saved with these settings: Allow copying (Yes).
    4. Copy the personal collection into the group.

Instructions for when a collection is auto-created through using a personal plan attached to to a task page as a template for group plans: the collection pages are not connected to the original collection.
    1. Create a collection with three pages.
    2. Create an independent page.
    3. Create a group and add five members.
    4. Create a personal plan with these settings:
        1. Assignment tasks (Yes).
        2. Template (Yes).
    5. Create a task for the plan with these settings:
        1. Select your independent page to be the ‘Task page’.
        2. Select your three-page collection to be the ‘Assignment portfolio’.
    6. In your group, create a new plan from your personal plan template.
    7. Check that once the template is applied, ‘Assignment tasks’ setting is ‘Yes’.
    8. Press save.
    9. Run the cron to update the time for the next run.

Expected for copy: Each group member receives one notification per collection copied into the group.

Expected for plan template: Each group member receives one notification for the new group plan’s task’s ‘Assignment portfolio’.

Actual: for both cases, a notification is sent for each view.
It seems like both these cases are going through a similar case and solving one may solve the other.

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

Changed in mahara:
status: Confirmed → In Progress
Doris Tam (doristam)
Changed in mahara:
assignee: nobody → Doris Tam (doristam)
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "main" branch: https://reviews.mahara.org/12127

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 21.10.0 → 22.04.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12127
Committed: https://git.mahara.org/mahara/mahara/commit/5bc1e5e972f89be679123d4087d683884716d162
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit 5bc1e5e972f89be679123d4087d683884716d162
Author: Doris Tam <email address hidden>
Date: Wed Aug 18 12:06:03 2021 +1200

Bug 1926247: Only send notification for one page for collections copied into a group

Change-Id: Ib60c0adebf6caee03c5fb4b67704e12c4e0383fb

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

Patch for "21.10_DEV" branch: https://reviews.mahara.org/12288

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

Reviewed: https://reviews.mahara.org/12288
Committed: https://git.mahara.org/mahara/mahara/commit/d102259e6e493fcd2445ebfca71ebcc0f7cf4a32
Submitter: Robert Lyon (<email address hidden>)
Branch: 21.10_DEV

commit d102259e6e493fcd2445ebfca71ebcc0f7cf4a32
Author: Doris Tam <email address hidden>
Date: Wed Aug 18 12:06:03 2021 +1200

Bug 1926247: Only send notification for one page for collections copied into a group

Change-Id: Ib60c0adebf6caee03c5fb4b67704e12c4e0383fb

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.