Skip to content

[HOLD for payment 2024-12-07] [$250] No RBR on Subscription row in the LHN in settings if the free trial has expired #52598

Closed

Description

@m-natarajan

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.62-3
Reproducible in staging?: y
Reproducible in production?: y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @allgandalf
Slack conversation (hyperlinked to channel name): Expensify bugs

Action Performed:

  1. Open an account who free trial has expired
  2. Go to settings > Subscription

Expected Result:

RBR should also be on the Subscription row in the LHN

Actual Result:

Observe that there is a RBR on the Page but not on the settings option

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Screenshot 2024-11-14 at 3 24 16 PM (1)

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021858434959504168009
  • Upwork Job ID: 1858434959504168009
  • Last Price Increase: 2024-11-18
  • Automatic offers:
    • daledah | Contributor | 104948042
Issue OwnerCurrent Issue Owner: @zanyrenney

Activity

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

    @melvin-bot

    Triggered auto assignment to @zanyrenney (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. daledah commented on Nov 14, 2024

    @daledah
    Contributor

    Proposal

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

    No RBR on Subscription row in the LHN in settings if the free trial has expired

    What is the root cause of that problem?

    We are checking the condition to show RBR in the sidebar here, it depends on function hasSubscriptionRedDotError here

    And with case POLICY_OWNER_WITH_AMOUNT_OWED_OVERDUE we didn't update isError=true

    brickRoadIndicator: !!privateSubscription?.errors || SubscriptionUtils.hasSubscriptionRedDotError() ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined,

    function hasSubscriptionGreenDotInfo(): boolean {
    return getSubscriptionStatus()?.isError === false;
    }

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

    Simply we only need to add isError=true here

    return {
    status: PAYMENT_STATUS.POLICY_OWNER_WITH_AMOUNT_OWED_OVERDUE,
    };

    Noted: We should check again with another case that we need to RBR

    What alternative solutions did you explore? (Optional)

  4. twilight2294 commented on Nov 14, 2024

    @twilight2294
    Contributor

    Proposal

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

    No RBR on Subscription row in the LHN in settings if the free trial has expired

    What is the root cause of that problem?

    On settings row, we do not check the card error for brickRoadIndicator:

    brickRoadIndicator: !!privateSubscription?.errors || SubscriptionUtils.hasSubscriptionRedDotError() ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined,

    This causes the bug as there will be no RBR for outdated payment methods.

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

    Like we do on the cardSection in subscription page , we should add a check for cards errors CardSectionUtils.getBillingStatus(translate, defaultCard?.accountData ?? {})?.isErrow in the settings page as well:

    const [billingStatus, setBillingStatus] = useState<BillingStatusResult | undefined>(CardSectionUtils.getBillingStatus(translate, defaultCard?.accountData ?? {}));

    We will get the defaultCard from fundList, same like we do in cardSection:

    const defaultCard = useMemo(() => Object.values(fundList ?? {}).find((card) => card.accountData?.additionalData?.isBillingCard), [fundList]);

    brickRoadIndicator: !!privateSubscription?.errors || SubscriptionUtils.hasSubscriptionRedDotError() || CardSectionUtils.getBillingStatus(translate, defaultCard?.accountData ?? {})?.isError ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined,

    What alternative solutions did you explore? (Optional)

  5. self-assigned this
    on Nov 15, 2024
  6. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 18, 2024
  7. melvin-bot commented on Nov 18, 2024

    @melvin-bot
  8. changed the title [-]No RBR on Subscription row in the LHN in settings if the free trial has expired[/-] [+][$250] No RBR on Subscription row in the LHN in settings if the free trial has expired[/+] on Nov 18, 2024
  9. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 18, 2024
  10. melvin-bot commented on Nov 18, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (External)

  11. 16 remaining items

  12. melvin-bot commented on Nov 30, 2024

    @melvin-bot

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

  13. melvin-bot commented on Nov 30, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.68-7 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-12-07. 🎊

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

  14. melvin-bot commented on Nov 30, 2024

    @melvin-bot

    @hungvu193 @zanyrenney @hungvu193 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  15. hungvu193 commented on Dec 9, 2024

    @hungvu193
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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:

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  16. hungvu193 commented on Dec 9, 2024

    @hungvu193
    Contributor

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: https://github.com/Expensify/App/pull/44072/files#r1875328860

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Test:

    1. Open an account with free trial expired
    2. Go to settings > Subscription
    3. Verify that: RBR is displayed on LHN

    Do we agree 👍 or 👎

  17. melvin-bot commented on Dec 11, 2024

    @melvin-bot

    @hungvu193, @cristipaval, @zanyrenney, @daledah Whoops! This issue is 2 days overdue. Let's get this updated quick!

  18. zanyrenney commented on Dec 11, 2024

    @zanyrenney
    Contributor

    payment summary

    @hungvu193 requires payment through NewDot Manual Requests - please request $250 on ND
    @daledah requires payment automatic offer (Contributor) - paid via upwork
    @allgandalf requires payment (Needs manual offer from BZ)

  19. garrettmknight commented on Dec 12, 2024

    @garrettmknight
    Contributor

    $250 approved for @hungvu193

  20. zanyrenney commented on Dec 12, 2024

    @zanyrenney
    Contributor
  21. zanyrenney commented on Dec 12, 2024

    @zanyrenney
    Contributor

    Paid @allgandalf $50 via upwork too!

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.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions