Skip to content

[HOLD for payment 2024-08-02] [Payment card / Subscription] - Subcriptions leads to not here page after Control workspace is deleted #45720

Closed

Description

@lanitochka17

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 18, 2024
  2. melvin-bot commented on Jul 18, 2024

    @melvin-bot

    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.

  3. lanitochka17 commented on Jul 18, 2024

    @lanitochka17
    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

  4. etCoderDysto commented on Jul 18, 2024

    @etCoderDysto
    Contributor

    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

  5. melvin-bot commented on Jul 22, 2024

    @melvin-bot

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

  6. OfstadC commented on Jul 22, 2024

    @OfstadC
    Contributor

    Looking at this now

  7. OfstadC commented on Jul 22, 2024

    @OfstadC
    Contributor

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

  8. etCoderDysto commented on Jul 22, 2024

    @etCoderDysto
    Contributor

    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.

  9. OfstadC commented on Jul 23, 2024

    @OfstadC
    Contributor

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

  10. kavimuru commented on Jul 23, 2024

    @kavimuru

    @OfstadC Still reproducible by the tester

    bandicam.2024-07-24.00-20-06-037.mp4
  11. OfstadC commented on Jul 23, 2024

    @OfstadC
    Contributor

    Thanks @kavimuru !

  12. 27 remaining items

  13. OfstadC commented on Jul 31, 2024

    @OfstadC
    Contributor

    @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 ❤️

  14. added and removed on Aug 1, 2024
  15. melvin-bot commented on Aug 2, 2024

    @melvin-bot

    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
  16. adelekennedy commented on Aug 2, 2024

    @adelekennedy
    Contributor

    Sent @rojiphil offer via Upwork

  17. rojiphil commented on Aug 3, 2024

    @rojiphil
    Contributor
    • [@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

  18. rojiphil commented on Aug 3, 2024

    @rojiphil
    Contributor

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

  19. adelekennedy commented on Aug 5, 2024

    @adelekennedy
    Contributor

    Payment made @rojiphil!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions