Skip to content

Organizations Users - Add Badge format

Zack Cuddy requested to merge 409313_04-update-organizations-users-graphql into master

What does this MR do and why?

Work towards #409313 (closed)
Full implementation !135502 (merged)

This change updates the Organizations Users query to handle the following:

  1. Create OrganizationUserBadgeType to process badges into the format the FE needs.

This change is behind a feature flag (:ui_for_organizations)

Screenshots or screen recordings

Before After
Before Screenshot_2023-11-02_at_11.09.17_AM

How to set up and validate locally

  1. Enable FF in rails c Feature.enable(:ui_for_organizations)
  2. Add users to the default organization via rails c
    • Organizations::OrganizationUser.create!(user_id: 1, organization_id: 1)
    • Organizations::OrganizationUser.create!(user_id: 2, organization_id: 1)
    • Organizations::OrganizationUser.create!(user_id: 3, organization_id: 1)
  3. Go to Default Organization path (http://127.0.0.1:3000/-/organizations/default)
  4. In left nav, click Manage => Users
  5. Ensure JSON blob is painted to screen and badge key on root has correct badges like in the above After screenshot.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Zack Cuddy

Merge request reports