Skip to content

Organizations - Delete projects from list

Zack Cuddy requested to merge 410819-delete-project-from-org-overview into master

What does this MR do and why?

Closes #410819 (closed)
Important: This change is behind a feature flag ui_for_organizations

This change adds logic to allow a user to delete a Project from an Organization list view.

Screenshots or screen recordings

Screen_Recording_2024-02-07_at_1.29.49_PM

How to set up and validate locally

Setup Organizations

  1. Access rails c
  2. Enable Feature Flag Feature.enable(:ui_for_organizations)
  3. Create the default organization and add root to it
you = User.find_by_username('root')
default_organization = Organizations::Organization.default_organization
Organizations::OrganizationUser.create!(organization_id: default_organization.id, user_id: you.id)

Testing

  1. Create a test project (or you can use an existing one)
  2. Navigate to the GDK home page ex: 127.0.0.1:3000/
  3. Click Organizations in the sidebar
  4. Click the Default Organization
  5. Click the Manage > Groups and projects in the sidebar
  6. Switch list to Projects in the dropdown
  7. Click the ... on the project you want to delete
  8. Ensure modal appears and button is disabled
  9. Enter project full name and ensure button is enabled
  10. Click delete button
  11. Ensure button switches to loading state (may be very quick)
  12. Ensure list reloads and project is now deleted

Related to #410819 (closed)

Edited by Zack Cuddy

Merge request reports