Skip to content

Ability to filter add on eligible users by assigned seats

What does this MR do and why?

This MR implements frontend functionality to be able to sort eligible users list by assigned seat. Context here: [Duo Provisioning] Iteration 2: Add ability to ... (&14683 - closed)

The search bar takes in filter params as input and they are passed to Grpahql which will be implemented in the next step as a part of Adjust eligible users list API to return filter... (#488507 - closed).

Note:

  • backend is not implemented yet, and this functionality is behind a FF enable_add_on_users_filtering
  • Due to shift in priorities and partial implementation in the past, we will be releasing Assigned seat filtering first, prior to Project and Groups based filtering under https://gitlab.com/groups/gitlab-org/-/epics/14983+. So we momentarily limit filter option to only include Assigned seat , but keep the core codes of Project and Groups based filtering to be fully implemented at the later point of time.

Screenshots or screen recordings

Section Screenshot
Usage Quotas Screenshot 2024-09-16 at 14.43.35.png
Gitlab Duo Screenshot 2024-09-16 at 14.43.59.png

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Needs both gdk and CustomersDot running for SaaS/SM (setup guide)
  2. In Rails console, enable Code Suggestions Feature.enable(:hamilton_seat_management)
  3. In Rails console, enable the filtering FF Feature.enable(:enable_add_on_users_filtering)

To assign Code Suggestions seats to your group:

SaaS:

  1. In Rails console, add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"}
  2. In Rails console, GitlabSubscriptions::AddOnPurchase.create!(add_on: add_on, namespace: Namespace.find(<you-name-space-id>), expires_on: 21.month.from_now, quantity: 5, purchase_xid: 'A-S0002')
  3. Visit any group or project member pages such as http://localhost:3000/groups/flightjs/-/usage_quotas#code-suggestions-usage-tab

Self-managed:

  1. In Rails console, add_on = GitlabSubscriptions::AddOn.find_or_create_by!(name: "code_suggestions") {|e| e.description = "Test"}
  2. In Rails console, GitlabSubscriptions::AddOnPurchase.create!(add_on: add_on, expires_on: 21.month.from_now, quantity: 5, purchase_xid: 'A-S0002')
  3. Visit admin section's Duo area http://localhost:3000/admin/code_suggestions

Related to #488507 (closed)

Edited by Divya Mahadevan

Merge request reports

Loading