[HOLD for payment 2024-12-07] [$250] No RBR on Subscription row in the LHN in settings if the free trial has expired
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] 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:
- Open an account who free trial has expired
- 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
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
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 Owner
Current Issue Owner: @zanyrenney
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.
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
https://github.com/Expensify/App/blob/6ba2c9782d4b2169a3407e6daf4bf3d9f7ef9f4a/src/pages/settings/InitialSettingsPage.tsx#L198
https://github.com/Expensify/App/blob/6ba2c9782d4b2169a3407e6daf4bf3d9f7ef9f4a/src/libs/SubscriptionUtils.ts#L356-L358
What changes do you think we should make in order to solve the problem?
Simply we only need to add isError=true here
https://github.com/Expensify/App/blob/6ba2c9782d4b2169a3407e6daf4bf3d9f7ef9f4a/src/libs/SubscriptionUtils.ts#L272-L274
Noted: We should check again with another case that we need to RBR
What alternative solutions did you explore? (Optional)
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:
https://github.com/Expensify/App/blob/04d85d858d0a66e16ed304b257282ddda7864c87/src/pages/settings/InitialSettingsPage.tsx#L198 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:
https://github.com/Expensify/App/blob/04d85d858d0a66e16ed304b257282ddda7864c87/src/pages/settings/Subscription/CardSection/CardSection.tsx#L68
We will get the defaultCard from fundList, same like we do in cardSection:
https://github.com/Expensify/App/blob/04d85d858d0a66e16ed304b257282ddda7864c87/src/pages/settings/Subscription/CardSection/CardSection.tsx#L54
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)
Job added to Upwork: https://www.upwork.com/jobs/~021858434959504168009
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hungvu193 (External)
Thanks for the proposals, everyone. @daledah 's proposal here is straightforward.
π π π C+ reviewed.
Current assignee @cristipaval is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
π£ @daledah π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@cristipaval @hungvu193 are you sure that is what we want? if you see the image in the OP, the BRB is for Outdated payment info for cards and not for POLICY_OWNER_WITH_AMOUNT_OWED_OVERDUE,
Also if you see the getBillingStatus:
https://github.com/Expensify/App/blob/bd6c90d8493baf70d61937188c94815650f18988/src/pages/settings/Subscription/CardSection/utils.ts#L35-L58
We show errors for all kinds of card errors and not just POLICY_OWNER_WITH_AMOUNT_OWED_OVERDUE. can you please reasses the proposals ?
@daledah can you please hold off the PR for a bit, let try to fix the bug at root .
Also the error is not for subscription status, but rather a card error, where we show a RBR for each case
Hey @twilight2294, I think your explanation makes sense. However during the proposals review process, here's what I thought:
-
getBillingStatusalso used thesubscriptionStatusfromSubscriptionUtils.getSubscriptionStatus();. -
hasSubscriptionRedDotErrorreturngetSubscriptionStatus()?.isError ?? false;which is the error for the wholeSubscriptionpage not only for one specific case and it was also intentional of the Author who implemented failed billing scenarios banner feature. -
getBillingStatusretrieves billing details, whilehasSubscriptionRedDotErrorindicates the current subscription status, including billing status.
Overall, I'm still aligned with my decision above, we should update the hasSubscriptionRedDotError logic instead of getBillingStatus.
@hungvu193 PR is ready.
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.68-7 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/52742
If no regressions arise, payment will be issued on 2024-12-07. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @hungvu193 requires payment through NewDot Manual Requests
- @daledah requires payment automatic offer (Contributor)
- @allgandalf requires payment (Needs manual offer from BZ)
@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]
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 π
Source of bug:
- [ ] 1a. Result of the original design (eg. a case wasn't considered)
- [x] 1b. Mistake during implementation
- [ ] 1c. Backend bug
- [ ] 1z. Other:
Where bug was reported:
- [x] 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
- [x] 3d. QA
- [ ] 3z. Other:
-
[x] [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
-
[x] [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
-
[x] [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:
- Open an account with free trial expired
- Go to settings > Subscription
- Verify that: RBR is displayed on LHN
Do we agree π or π
@hungvu193, @cristipaval, @zanyrenney, @daledah Whoops! This issue is 2 days overdue. Let's get this updated quick!
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)
$250 approved for @hungvu193
@allgandalf invited you for the bug bounty here- https://www.upwork.com/jobs/~021867267566328938332
Paid @allgandalf $50 via upwork too!