Skip to content

Organization Admin - Add badges to project list

Zack Cuddy requested to merge 442457-add-project-list-badges into master

What does this MR do and why?

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

This change adds badges to the Project list in the Organization Admin. The badges are archived and pending deletion.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Before Screenshot_2024-02-27_at_3.08.43_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 two test projects (be sure to do this under an existing group)
  2. Mark one project for deletion
    a. Navigate to project
    b. Settings -> General in side bar
    c. Expand Advanced tab
    d. Click delete project button and follow instructions
    e. Project should be marked for deletion (noted by banner on project overview)
  3. Mark other project as archived
    a. Navigate to project
    b. Settings -> General in side bar
    c. Expand Advanced tab
    d. Click archive project
    e. Project should be marked as archived/read-only (noted by banner on project overview)
  4. Navigate to the GDK home page ex: 127.0.0.1:3000/
  5. Click Organizations in the sidebar
  6. Click the Default Organization
  7. Click the Manage > Groups and projects in the sidebar
  8. Switch list to Projects in the dropdown
  9. Ensure badges appear correctly for the projects you just acted on

Related to #442457 (closed)

Edited by Zack Cuddy

Merge request reports