Skip to content

fix(payments-next): Reinforce subgroup order - #20999

Draft
elizabeth-ilina wants to merge 1 commit into
mainfrom
PAY-3844-reinforce-subgroup-order
Draft

fix(payments-next): Reinforce subgroup order#20999
elizabeth-ilina wants to merge 1 commit into
mainfrom
PAY-3844-reinforce-subgroup-order

Conversation

@elizabeth-ilina

@elizabeth-ilina elizabeth-ilina commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Because

  • While the subgroup order appeared correct in Strapi, query showed it out-or-order, which happens from time to time

This pull request

  • Updates codebase to reinforce the order in the subgroup by adding a tier field to the offering type.
  • If both from and target offerings have a tier, uses targetTier - fromTier
  • If neither has one, falls back to array position, like before
  • If only one has one, reports to Sentry, then fall back to position
  • Strapi update PR:
  • Precondition: this was checked in Strapi dev and stage, but need to check that there's no

Issue that this pull request solves

Closes #PAY-3844

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

To test the changes, in local Strapi, I made 3 offerings, VPN, 123 Foxkeh, 123donepro.
VPN and 123 Foxkeh are tier 10, 123donepro tier 20.
VPN and 123donepro are in a subgroup, 123Foxkeh is not in any subgroup.
image

image

Tested:

  • Having vpn, purchasing 123:
    - Can successfully upgrade
    - image

  • Having 123donepro, purcahsing vpn:
    - "This subscription plan change is not supported" error page
    - image

  • Repeating above scnearios while switching the order of the subgroups in the offering to see if results were (correctly) consistent
    - image

  • Having vpn, getting foxkeh
    - foxkeh is regular checkout, since they're different subgroups

  • Having foxkeh, getting 123donepro
    - regular checkout, since they're different subgroups

  • have two offerings with the same tier in one subgroup (for ex., 123donepro and 123foxkeh make both tier 10)
    - expected: sentry error, customer just sees subscription switch invalid
    - is this expected? Or is it an existing/possible case to have two offerings with the same tier in a subgroup?

  • Key files/areas to focus on:

  • Suggested review order:

  • Risky or complex parts:

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@elizabeth-ilina
elizabeth-ilina force-pushed the PAY-3844-reinforce-subgroup-order branch 3 times, most recently from dde3b65 to 5c5dfcb Compare August 11, 2026 16:08
Because:

* While the subgroup order appeared correct in Strapi, query showed it out-or-order, which happens from time to time

This commit:

* Updates codebase to reinforce the order in the subgroup by adding Integer field

Closes #[PAY-3844](https://mozilla-hub.atlassian.net/browse/PAY-3844)
@elizabeth-ilina
elizabeth-ilina force-pushed the PAY-3844-reinforce-subgroup-order branch from 5c5dfcb to df5e216 Compare August 11, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant