When quota notification threshold is changed, send notifications to users who are now over threshold

Bug #1367539 reported by Aaron Wells on 2014-09-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Low
Robert Lyon
1.10
Low
Robert Lyon
15.04
Low
Robert Lyon

Bug Description

Bug 1307935 sends notifications to users when they go over a threshold near their quota. But if you change the threshold, then users who are already over the new threshold receive no notification.

This patch makes it so that when you change the threshold, users who are now over the threshold will receive a notification.

Eduardo (o-eduardo) wrote :

Tested on "1.10.0dev (2014091800)" AND "master" branch. With or without the patch, the user still do not receive a new notification after the admin changed the quota threshold. Below are the steps that I did.

Logged in as admin.
Go to Administration
Go to Users
Add User called “Jen”
Set up File quota to “10” MB
Create User
Go to Extensions
Plugin type: artefact → File (Configuration)
Default user quota
Set user Quota notification threshold to “50%”
Save settings
Log out as admin
Log in as user “Jen”
Go to Content
Go to Files
Add File until user pass their threshold quota above “60%”
Check email for notification of File storage almost full
Log out as user “Jen”
Log in as admin
Go to Administration
Go to Extensions
Plugin type: artefact → File (Configuration)
Default user quota
Set user Quota notification threshold to “55%”
Save settings
Check email for notification of File storage almost full
No new email.

Robert Lyon (robertl-9) wrote :

Hi Eduardo

The way the system works is you only get one email to alert you that you are over the threshold until you delete stuff to be under the threshold again (or if your account quota is increased enough so you are under threshold again).

So to test this follow your steps as above but when it comes to the "Jen" user adding files until over threshold - after getting email delete some files until below threshold again - then login as admin and adjust the threshold lower so "Jen" is above the threshold again.

This time it should send message again.

Cheers

Robert

Eduardo (o-eduardo) wrote :

Tested with Postgres 9, do not have mySQL set up on my computer and tested with Mahara version 1.11.0dev (2014092500). Below is my full testing method:

1. Logged in as admin.
2. Go to Administration
3. Go to Users → Create user “Jen”
4. Set up File quota to “10” MB
5. Create User
6. Go to Extensions → Plugin type: artefact → File (Configuration) → Default user quota
7. Set Quota notification threshold to “50%”
8. Save settings
9. Log out as admin
10. Log in as “Jen”
11.Go to Content → Files
12. Add File until user is over their threshold quota above “50%”
13. Check email for notification of File storage almost full for Jen.
14. Delete Files until user threshold quota is below “50%” but has at least 2.6 MB of file quota used.
15. Log out as user “Jen”
16. Log in as admin
17. Go to Administration
18. Go to Extensions → Plugin type: artefact → File (Configuration) → Default user quota
19. Set Quota notification threshold to “25%”
20. Save settings
21. Check email for notification of File storage almost full for Jen. → Passed

Reviewed: https://reviews.mahara.org/3709
Committed: http://gitorious.org/mahara/mahara/commit/5859101bc9087e9a8243299ba9ef585bff7e976d
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 5859101bc9087e9a8243299ba9ef585bff7e976d
Author: Robert Lyon <email address hidden>
Date: Mon Sep 22 12:53:49 2014 +1200

Moving the upgrade call to be later (Bug #1367539)

As a later fixed backported and released stops this from running
so I've meved it to have a later date but to be before the upgrade
date in patch 3315.

Change-Id: I072e7d1b9e466b317d386de1103f412aaf84f0c2
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/3315
Committed: http://gitorious.org/mahara/mahara/commit/c0af31896b364366c32f23953d83d4872a7b1531
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit c0af31896b364366c32f23953d83d4872a7b1531
Author: Robert Lyon <email address hidden>
Date: Tue May 6 14:14:09 2014 +1200

Update quota notify limit alerts users if they are now over threshold

Bug 1367539

When the admin adjusts the quota notify threshold limit the system
alerts any users that are now over limit that haven't been already
alerted on previous limit

Change-Id: I1d99b88336ef3be50dfa3b1453e9e351c701d739
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Patch for "1.10_STABLE" branch: https://reviews.mahara.org/3799

Reviewed: https://reviews.mahara.org/3799
Committed: http://gitorious.org/mahara/mahara/commit/c40e4c4cf1e9ff9798c2acb93a460140f2d2bf0f
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit c40e4c4cf1e9ff9798c2acb93a460140f2d2bf0f
Author: Robert Lyon <email address hidden>
Date: Mon Sep 22 12:53:49 2014 +1200

Moving the upgrade call to be later (Bug #1367539)

As a later fixed backported and released stops this from running
so I've meved it to have a later date but to be before the upgrade
date in patch 3315.

Change-Id: I072e7d1b9e466b317d386de1103f412aaf84f0c2
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/3800
Committed: http://gitorious.org/mahara/mahara/commit/951d719705c25b839dcabc8c3c6580099561679d
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.10_STABLE

commit 951d719705c25b839dcabc8c3c6580099561679d
Author: Robert Lyon <email address hidden>
Date: Tue May 6 14:14:09 2014 +1200

Update quota notify limit alerts users if they are now over threshold

Bug 1367539

When the admin adjusts the quota notify threshold limit the system
alerts any users that are now over limit that haven't been already
alerted on previous limit

Change-Id: I1d99b88336ef3be50dfa3b1453e9e351c701d739
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/4358
Committed: http://gitorious.org/mahara/mahara/commit/ddf582114bfa1a3251d8241614843e35673a763b
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit ddf582114bfa1a3251d8241614843e35673a763b
Author: Eduardo Schicker <email address hidden>
Date: Thu Mar 5 15:04:39 2015 +1300

Behat Test: Quota notification (Bug 1367539)

I turned this into a scenario outline instead. It's a way better way of tetsing multiple cases that need the DB
cleared inbetween runs.
Clearning the DB just made sure that the notification message was appearing for each separate quota change.

Change-Id: Ib2e130161033aab39dfefd48a9ad1448a8254219
Signed-off-by: Jinelle Foley-Barnes <email address hidden>

Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
tags: added: behat has-behat

Reviewed: https://reviews.mahara.org/8808
Committed: https://git.mahara.org/mahara/mahara/commit/9eefc1c84dc98079844390bb56f7f89f3c5f5ce3
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: master

commit 9eefc1c84dc98079844390bb56f7f89f3c5f5ce3
Author: Robert Lyon <email address hidden>
Date: Thu Apr 19 16:00:22 2018 +1200

Bug 1765264: Group id not needed to be array for group_get_admin_ids()

A mistake made in the patch for Bug 1367539

behatnotneeded

Change-Id: If0b27c356887483532693153f0b8936b7d12eb14
Signed-off-by: Robert Lyon <email address hidden>

Mahara Bot (dev-mahara) wrote :

Patch for "17.10_STABLE" branch: https://reviews.mahara.org/9498

Reviewed: https://reviews.mahara.org/9498
Committed: https://git.mahara.org/mahara/mahara/commit/cba094b56b9333dacbb2e19839561577d6162d4e
Submitter: Cecilia Vela Gurovic (<email address hidden>)
Branch: 17.10_STABLE

commit cba094b56b9333dacbb2e19839561577d6162d4e
Author: Robert Lyon <email address hidden>
Date: Thu Apr 19 16:00:22 2018 +1200

Bug 1765264: Group id not needed to be array for group_get_admin_ids()

A mistake made in the patch for Bug 1367539

behatnotneeded

Change-Id: If0b27c356887483532693153f0b8936b7d12eb14
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9eefc1c84dc98079844390bb56f7f89f3c5f5ce3)

Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/9497
Committed: https://git.mahara.org/mahara/mahara/commit/f7676dbd11500e76450c80d16f335b6911e72b2b
Submitter: Robert Lyon (<email address hidden>)
Branch: 18.04_STABLE

commit f7676dbd11500e76450c80d16f335b6911e72b2b
Author: Robert Lyon <email address hidden>
Date: Thu Apr 19 16:00:22 2018 +1200

Bug 1765264: Group id not needed to be array for group_get_admin_ids()

A mistake made in the patch for Bug 1367539

behatnotneeded

Change-Id: If0b27c356887483532693153f0b8936b7d12eb14
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 9eefc1c84dc98079844390bb56f7f89f3c5f5ce3)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers