Skip to content

Add banner to inactive projects

Robert Hunt requested to merge 357375-add-banner-to-inactive-projects into master

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 image
On its own image
On another page image

How to set up and validate locally

  1. Enable the :inactive_projects_deletion feature flag: echo "Feature.enable(:inactive_projects_deletion)" | rails c
  2. 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
  3. 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
  4. 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.

Related to #357375

Edited by Robert Hunt

Merge request reports