osf.io
osf.io copied to clipboard
[ENG-2280] Adds storage limit status messaging to file notifications
Purpose
Notifies admins on a given project if the project is approaching or over OSF Storage limits. This is necessary because admin contributors may not see initially see or be notified if the project is approaching OSF Storage limits.
Changes
- Adds storage_limit_context as a part of the context sent to
file_updated.html.mako
- Updates
file_updated.html.mako
to use storage_limit_context to selectively show storage usage messaging
QA Notes
- Verify that upon file actions, the file notification provides the appropriate storage usage messaging:
- approaching storage caps vs over storage caps
- messaging for public vs private projects
What are the areas of risk?
- Because of the way in which storage usage is calculated and cached, we may see instances of the storage usage messaging either being relevant to the state of the project prior to the file change but no longer being accurate or instances of no storage usage messaging because the storage usage has not been calculated before the code that stores these emails runs.
Any concerns/considerations/questions that development raised?
- I added messaging for when the project is over the storage limit as well as approaching (approaching is what the ticket requested); there is conversation in the product-consults flow around the desirability of this addition.
Documentation
N/A
Side Effects
N/A
Ticket
Example of storage usage messaging for a private project approaching storage limits:
Example of storage usage messaging for a public project approaching storage limits:
The messaging if the project is over storage limits, as opposed to approaching, is similar but replaces the 'approaching' with 'over' to be something like:
This <public/private> project is over the...