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 2024-08-02] [Payment card / Subscription] - Subcriptions leads to not here page after Control workspace is deleted #45720

Closed
6 tasks done
lanitochka17 opened this issue Jul 18, 2024 · 26 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 18, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.9-1
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new account (to have an account with no trial)
  3. Create a workspace
  4. Go to More features
  5. Toggle on Report fields
  6. Click Upgrade to upgrade to Control
  7. Go back to Account settings
  8. Click Subscriptions
  9. Note that the page opens without issue
  10. Now delete the Control workspace
  11. Go back to Account settings
  12. Click Subscriptions

Expected Result:

Subcriptions tab should disappear if it is not available when there is no Control workspace

Actual Result:

Subcriptions leads to not here page after the Control workspace is deleted

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6546397_1721320613164.20240719_002948.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @adelekennedy
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 18, 2024
Copy link

melvin-bot bot commented Jul 18, 2024

Triggered auto assignment to @OfstadC (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@OfstadC FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Jul 18, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Subcriptions leads to not here page after Control workspace is deleted

What is the root cause of that problem?

We are checking if there is privateSubscription here before adding subscription menu item to workspaceMenuItemsData. When a workspace is deleted, privateSubscription have autoRenewLastChangedDate , pendingFields and type properties. Therefore it is considered to be a truthy value and subscription item will be added to workspaceMenuItemsData.

if (privateSubscription) {
items.splice(1, 0, {
translationKey: 'allSettingsScreen.subscription',

What changes do you think we should make in order to solve the problem?

  • We should use useSubscriptionPlan(); to check if the user has active subscription (collect or control subscription)
const subscriptionPlan = useSubscriptionPlan();
  • Don't add subscription item to workspaceMenuItemsData if subscriptionPlan === null
  if (subscriptionPlan) {
            items.splice(1, 0, {
                translationKey: 'allSettingsScreen.subscription',

Note: we will add subscriptionPlan to the useMemo dependency.

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot added the Overdue label Jul 22, 2024
Copy link

melvin-bot bot commented Jul 22, 2024

@OfstadC Whoops! This issue is 2 days overdue. Let's get this updated quick!

@OfstadC
Copy link
Contributor

OfstadC commented Jul 22, 2024

Looking at this now

@melvin-bot melvin-bot bot removed the Overdue label Jul 22, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Jul 22, 2024

I don't have the option for Report Fields 🤔 so I can't reproduce.

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Jul 22, 2024

I don't have the option for Report Fields 🤔 so I can't reproduce.

You have to use expensifail account. The feature is under beta. That is why you are not seeing the feature.

@OfstadC
Copy link
Contributor

OfstadC commented Jul 23, 2024

I don't get the same result
2024-07-23_11-02-52 (1)

@kavimuru
Copy link

@OfstadC Still reproducible by the tester

bandicam.2024-07-24.00-20-06-037.mp4

@OfstadC
Copy link
Contributor

OfstadC commented Jul 23, 2024

Thanks @kavimuru !

@trjExpensify trjExpensify changed the title Subscriptions - Subcriptions leads to not here page after Control workspace is deleted [Payment card / Subscription] - Subcriptions leads to not here page after Control workspace is deleted Jul 23, 2024
@blimpich blimpich self-assigned this Jul 23, 2024
@narefyev91
Copy link
Contributor

Please assign this to me - will pick this up

@trjExpensify
Copy link
Contributor

Done!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 24, 2024
@blimpich
Copy link
Contributor

Assigning @rojiphil since they are the C+ reviewing the PR

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jul 26, 2024
@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Jul 26, 2024
@melvin-bot melvin-bot bot changed the title [Payment card / Subscription] - Subcriptions leads to not here page after Control workspace is deleted [HOLD for payment 2024-08-02] [Payment card / Subscription] - Subcriptions leads to not here page after Control workspace is deleted Jul 26, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

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

Copy link

melvin-bot bot commented Jul 26, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.12-0 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 2024-08-02. 🎊

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

  • @rojiphil requires payment (Needs manual offer from BZ)
  • @narefyev91 does not require payment (Contractor)

Copy link

melvin-bot bot commented Jul 26, 2024

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

  • [@rojiphil] The PR that introduced the bug has been identified. Link to the PR:
  • [@rojiphil] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@rojiphil] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@rojiphil] Determine if we should create a regression test for this bug.
  • [@rojiphil] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@OfstadC] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@OfstadC
Copy link
Contributor

OfstadC commented Jul 30, 2024

@rojiphil Could you please complete the checklist ? Thank you! 😃

@OfstadC
Copy link
Contributor

OfstadC commented Jul 31, 2024

I'll be OoO on 8/2 so adding another BZ team member here to issue payment on time

@OfstadC OfstadC removed their assignment Jul 31, 2024
@OfstadC OfstadC added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Jul 31, 2024
Copy link

melvin-bot bot commented Jul 31, 2024

Triggered auto assignment to @adelekennedy (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 31, 2024
@OfstadC
Copy link
Contributor

OfstadC commented Jul 31, 2024

@adelekennedy We're waiting on @rojiphil to complete BZ checklist - and then we need to issue payment on 8/2. I'll be fully offline on Friday so looping you in so we can pay this on time. Thank youuuu ❤️

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Aug 1, 2024
Copy link

melvin-bot bot commented Aug 2, 2024

Payment Summary

Upwork Job

BugZero Checklist (@adelekennedy)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants//hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@adelekennedy
Copy link

Sent @rojiphil offer via Upwork

@rojiphil
Copy link
Contributor

rojiphil commented Aug 3, 2024

  • [@rojiphil] The PR that introduced the bug has been identified. Link to the PR: Offending PR
  • [@rojiphil] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: Added comment
  • [@rojiphil] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: Not Required. Existing checklist is good enough to capture such issues.
  • [@rojiphil] Determine if we should create a regression test for this bug. : Since the changes are related to display/hide of subscription menu in LHN which is common usage, we can add a regression test.
  • [@rojiphil] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.

Test Steps
1 Create a new account (to have an account with no trial)
2 Create a workspace
3 Go to More features
4 Toggle on Report fields
5 Click Upgrade to upgrade to Control
6 Go back to Account settings
7 Click Subscriptions
8 Change subscription to "Pay-per-use"
9 Note that the page opens without issue
10 Now delete the Control workspace
11 Go back to Account settings
12 Verify that subscription is not shown anymore

@rojiphil
Copy link
Contributor

rojiphil commented Aug 3, 2024

@adelekennedy @OfstadC Completed BZ Checklist and accepted offer too. Thanks.

@melvin-bot melvin-bot bot added the Overdue label Aug 5, 2024
@adelekennedy
Copy link

Payment made @rojiphil!

@melvin-bot melvin-bot bot removed the Overdue label Aug 5, 2024
@adelekennedy
Copy link

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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
No open projects
Status: Done
Development

No branches or pull requests

9 participants