Fix(Subscription Sync): hide button legacy/offline

What does this MR do and why?

Describe in detail what your merge request does and why.

This MR fixes an issue where the sync button would always show, so it no longer shows for legacy and offline licenses, as they are not able to sync the subscription.

This bug emerged when the "type" field was removed from the subscription details card here: !103983 (diffs).

Screenshots or screen recordings

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

//////////////////////LicenseType////////////////////// Before After
Legacy License Screenshot_2023-03-07_at_17.29.16 Screenshot_2023-03-07_at_17.28.59
Cloud License Screenshot_2023-03-07_at_17.29.51 Screenshot_2023-03-07_at_17.30.09

How to set up and validate locally

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

Local test

  1. Visit http://127.0.0.1:3000/admin/subscription
  2. Apply this patch and comment in the online cloud license: test-different-licenses.patch
  3. Update the license type to see the sync button hide/show for different types

Actual test

  1. Visit http://127.0.0.1:3000/admin/subscription
  2. Make sure to have CustomersDot set up with Zuora to create a legacy license (Cloud License = No), offline license (Cloud License = Offline), and an online cloud license (Cloud License = Yes). You can follow the instructions here (a bit out-dated, but still works): https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/doc/resource_videos.md
  3. For each subscription, find the license file or activation code in the email that gets generated from the purchase or find it in CustomersDot http://localhost:5000/ and add it to your instance.
  4. Apply the different license types to see the sync button hide/show for different types

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: customers-gitlab-com#5318 (closed)

Edited by Michael Lunøe

Merge request reports

Loading