Add banner to inactive projects
What does this MR do and why?
Note: This feature requires the :inactive_projects_deletion
feature flag
This MR adds a banner to projects which have been marked as inactive and scheduled for deletion. The banner is shown to everyone across all project pages until the project is deleted or activity is recorded and the deletion is cancelled.
Screenshots or screen recordings
With other banners | |
On its own | |
On another page |
How to set up and validate locally
- Enable the
:inactive_projects_deletion
feature flag:echo "Feature.enable(:inactive_projects_deletion)" | rails c
- Enable inactive projects deletion settings using the application_settings API. Example :
http://gdk.test:3000/api/v4/application/settings?delete_inactive_projects=true&inactive_projects_send_warning_email_after_months=6&inactive_projects_delete_after_months=10&inactive_projects_min_size_mb=0
- Update the projects
last_activity_at
to after the warning email has been sent:echo "Project.update(<PROJECT_ID>, :last_activity_at => 7.months.ago)" | rails c
- Test the project has the banner shows up with the correct deletion date and the link takes you to the correct documentation
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #357375
Edited by Robert Hunt