Comment 6 for bug 1334576

Revision history for this message
Niranjan (niranjan528) wrote :

URL: https://bugs.launchpad.net/mahara/+bug/1334576

Bug description: Allowing admin setting for internal notification expiry.

Environment to be tested: Master
Browser to be tested: Any browser

Precondition:
1. A user with 'Site admin' access should exist.
2. Notifications in the ‘Site admin’ account are not set to ‘None’.
3. ‘Site admin’ should have existing system generated emails in the inbox with the following notification types,
-Page access notifications.
-Watch list notifications.
-Institution messages.
4. Make the changes in the database with the following command, so that the notifications are older than 2 days but not as old as
182 days.

 “update notification_internal_activity set ctime = '2017-11-02 12:13:14';”

Steps to reproduce:

1. Log in as a site admin user.
2. Navigate to Administration menu > Configure site > Site options
3. Click the ‘Notification settings’ panel.

Expected result: A new field ‘Internal notification expiry’ should be present and the default days should be displayed as ‘182’.

4. Click the ‘Help’ icon.

Expected result: The following text should be displayed

The following notification types will be deleted from your inbox after the specified days have elapsed:
-Page access notifications
-Watchlist notifications
-Institution messages

5. Change the ‘Internal notification expiry’ to ‘2’ days.
6. Click the ‘Update site options’ button.
7. Run the cron manually by adding /lib/cron.php to the end of the www root of your site.
8. Type the URL of your Mahara site in the browser's address bar as you'll be on a blank page only once the cron finished running.

Note: Refreshing the page wouldn't help as the URL would still be the cron URL and thus you wouldn't actually get to a better page.

9. Navigate to User menu > Inbox.

Expected result: All the system generated emails which are older than 2 days should not be displayed.