Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2025-02-06] [HOLD for payment 2025-01-21] Add plan changes to Subscriptions #52588

Closed
garrettmknight opened this issue Nov 14, 2024 · 64 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2

Comments

@garrettmknight
Copy link
Contributor

garrettmknight commented Nov 14, 2024

Part of the Workspace Downgrades project

Main issue: https://github.com/Expensify/Expensify/issues/399936
Project: Workspace Downgrades

Feature Description

  1. Update the Your plan section of the Subscriptions page to show both plan types with the current, highest plan type the account is an admin of highlighted/selected.
  2. If the user selects the other plan type, we'll check whether they're an admin on one or more workspaces:
  • If they're only an admin of one workspace we can just upgrade or downgrade that workspace from here we'll:
    • If the user is on Collect and selects Control, we'll launch the Upgrade RHP
    • If the user is on Control and selects Collect, we'll launch the Downgrade RHP
  • If they're an admin on multiple workspaces, they'll need to upgrade or downgrade their workspaces individually:
    • If the user is on Collect and selects Control, we'll launch an RHP directing the user to workspaces to upgrade
    • If the user is on Control and selects Collect, we'll launch an RHP directing the user to workspaces to downgrade

Copy for options above in this Figma here

Manual Test Steps

Single Workspace Upgrade

  1. Create a new account
  2. Create a workspace
  3. Navigate to subscriptions
  4. Click on 'Control'
  5. Confirm Upgrade RHP opens
  6. Click 'Upgrade'
  7. Confirm your workspace has been upgraded

Single Workspace Downgrade (follow Single Workspace Upgrade steps first)

  1. Navigate to subscriptions
  2. Click on 'Collect'
  3. Confirm Downgrade RHP opens
  4. Click 'Downgrade'
  5. Confirm your workspace has been downgraded

Multi Workspace Upgrade (follow Single Workspace Upgrade + Downgrade steps first)

  1. Create an additional workspace
  2. Navigate to subscriptions
  3. Click on 'Control'
  4. Confirm Upgrade RHP opens for multi workspaces
  5. Click 'Go to Workspaces'
  6. Confirm you're sent to workspace page
  7. Upgrade a workspace
  8. Navigate back to Subscriptions and confirm 'Control' is selected

Multi Workspace Upgrade (follow Multi Workspace Upgrade steps first)

  1. Navigate to subscriptions
  2. Click on 'Collect'
  3. Confirm Downgrade RHP opens for multi workspaces
  4. Click 'Go to Workspaces'
  5. Confirm you're sent to workspace page
  6. Downgrade the Control workspace
  7. Navigate back to Subscriptions and confirm 'Collect' is selected

Automated Tests

N/A

Issue OwnerCurrent Issue Owner: @garrettmknight
@garrettmknight garrettmknight added NewFeature Something to build that is a new item. Weekly KSv2 labels Nov 14, 2024
@garrettmknight garrettmknight self-assigned this Nov 14, 2024
Copy link

melvin-bot bot commented Nov 14, 2024

Triggered auto assignment to @joekaufmanexpensify (NewFeature), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.

@JmillsExpensify
Copy link

Still very excited for this one.

@melvin-bot melvin-bot bot added the Overdue label Nov 25, 2024
@garrettmknight
Copy link
Contributor Author

Hoping to prioritize this week while things are quiet.

@melvin-bot melvin-bot bot removed the Overdue label Nov 26, 2024
@garrettmknight
Copy link
Contributor Author

garrettmknight commented Nov 28, 2024

Sweet - got a minute to work through some copy options for when the user is an admin on multiple workspaces here.

@garrettmknight garrettmknight moved this to In Progress in [#whatsnext] #convert Nov 28, 2024
@garrettmknight
Copy link
Contributor Author

Alright - OP is updated, now we're just waiting for the main issue to complete to open this one up.

@garrettmknight
Copy link
Contributor Author

Quick clarification about the HOLD here:

@carlosmiceli carlosmiceli self-assigned this Dec 11, 2024
@carlosmiceli carlosmiceli changed the title [Hold for E/E #399936] Add plan changes to Subscriptions Add plan changes to Subscriptions Dec 11, 2024
@carlosmiceli
Copy link
Contributor

@jayeshmangwani Hey Jayesh, here's another issue we need to work on to really complete the full upgrades/downgrades project. Seems like a natural progression for you to take over this issue too, let me know if there are any questions.

I do have one question for you: we need to implement a check for whether the admin manages multiple workspaces or not. Do we have a way to check for that in the FE? Probably not, but thought I'd ask. If not, what kind of changes would you need from the BE (as in, what command or response would you like to see changed and how)?

@carlosmiceli carlosmiceli added Daily KSv2 and removed Weekly KSv2 labels Dec 11, 2024
@jayeshmangwani
Copy link
Contributor

Seems like a natural progression for you to take over this issue too, let me know if there are any questions.

Yes, that sounds good. I will start working on this issue once we merge PR for the downgrade workspace UI and new downgrade API.

@carlosmiceli @garrettmknight I will also need access to Figma, as I cannot find this section in the design doc.

@jayeshmangwani
Copy link
Contributor

@carlosmiceli For the multiple workspaces admin front-end check, I think we already have a function that can be used here. The getOwnedPaidPolicies function takes all policies and a user ID, then returns all the collect and control workspaces (paid workspaces) where the user is an admin.

App/src/libs/PolicyUtils.ts

Lines 391 to 393 in ec76adc

function getOwnedPaidPolicies(policies: OnyxCollection<Policy> | null, currentUserAccountID: number): Policy[] {
return Object.values(policies ?? {}).filter((policy): policy is Policy => isPolicyOwner(policy, currentUserAccountID ?? -1) && isPaidGroupPolicy(policy));
}

@carlosmiceli
Copy link
Contributor

Boom! Looks like we're good here @garrettmknight 💪
@jayeshmangwani great news, we're waiting for the final BE review and we're good to go, will report as soon as it's merged 👍

@jayeshmangwani
Copy link
Contributor

will report as soon as it's merged 👍

Thanks 🙌

@carlosmiceli
Copy link
Contributor

BE is merged 🙌

@melvin-bot melvin-bot bot added the Overdue label Dec 16, 2024
@carlosmiceli
Copy link
Contributor

Small BE change requested by our contributors has both PRs in review, which should completely unblock @jayeshmangwani from completing the plan page work.

@melvin-bot melvin-bot bot removed the Overdue label Dec 16, 2024
@carlosmiceli
Copy link
Contributor

Both BE PRs have been merged.

@jayeshmangwani
Copy link
Contributor

@garrettmknight, currently, we show the text Are you sure you want to downgrade and remove your configurations? **This cannot be undone**. above the 'Go to Workspaces' button. Should we hide it in the case of multiple workspaces and only show it for a single workspace, or should we remove this text altogether?

Image

@garrettmknight
Copy link
Contributor Author

I think we can remove the 'this cannot be undone' warning - they'll see it when they downgrade the workspaces individually.

Here's the upgrade copy:

Unlock our most powerful features, including:
- Advanced accounting connections (NetSuite, Sage Intacct, and more)
- Smart expense rules
- Multi-level approval workflows
- Enhanced security controls

The Control plan starts at $9 per active member per month. Learn more about our [plans and pricing](https://help.expensify.com/articles/new-expensify/billing-and-subscriptions/Plan-types-and-pricing).


To upgrade, click **Go to Workspaces**, select a workspace, and change the plan type to **Control**.

@jayeshmangwani
Copy link
Contributor

Thanks for the copies

@melvin-bot melvin-bot bot added the Overdue label Jan 27, 2025
Copy link

melvin-bot bot commented Jan 27, 2025

@carlosmiceli, @garrettmknight, @jayeshmangwani Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@garrettmknight
Copy link
Contributor Author

@jayeshmangwani let me know when you've got that PR up.

@melvin-bot melvin-bot bot removed the Overdue label Jan 27, 2025
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 28, 2025
@jayeshmangwani
Copy link
Contributor

@garrettmknight @DylanDylann Opened a PR to update the copies, but we still need confirmation for the Spanish version, which we raised on Slack.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jan 30, 2025
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2025-01-21] Add plan changes to Subscriptions [HOLD for payment 2025-02-06] [HOLD for payment 2025-01-21] Add plan changes to Subscriptions Jan 30, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 30, 2025
Copy link

melvin-bot bot commented Jan 30, 2025

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jan 30, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.91-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2025-02-06. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 30, 2025

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@jayeshmangwani] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [@garrettmknight] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Jan 31, 2025
@garrettmknight
Copy link
Contributor Author

No BZ necessary, adding QA for the project.

@github-project-automation github-project-automation bot moved this from In Progress to Done in [#whatsnext] #convert Feb 3, 2025
@DylanDylann
Copy link
Contributor

@garrettmknight @carlosmiceli If there are no tasks anymore. I think we are ready to handle the payment for this entire project.

cc @jayeshmangwani

@jayeshmangwani
Copy link
Contributor

Agreed with Dylan—there are no pending tasks for this project.

@garrettmknight
Copy link
Contributor Author

Yep! On my todo list. Do you two happen to have a list of issues you completed handy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production NewFeature Something to build that is a new item. Reviewing Has a PR in review Weekly KSv2
Projects
Development

No branches or pull requests

10 participants