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 2023-06-07] [$1000] Bank Account - User goes to 'Connect manually' flow after 'Start Over' offline #18518

Closed
6 tasks done
kbecciv opened this issue May 6, 2023 · 36 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 External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented May 6, 2023

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


Action Performed:

  1. Open App, create/open workspace and start to add bank account in workspace
  2. Exits in the middle of the flow (after page 'Company Information' or 'Personal Information')
  3. Return to the flow again > Settings > Workspaces > Connect bank account
  4. Go offline
  5. Select Start Over on the page 'Almost done!'
  6. User get page page 'You appear to be offline'
  7. Go Online

Expected Result:

The flow of adding bank Account is reset. User is on the start 'Connect bank account' page.

Actual Result:

The flow of adding Bank Account is reset. User goes to goes to 'Connect manually' flow.

Workaround:

Uknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.10.2

Reproducible in staging?: yes

Reproducible in production?: yes

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6044134_BA-manual-after-start-over-offline.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01aeed1cce3edf8b8d
  • Upwork Job ID: 1659275638396211200
  • Last Price Increase: 2023-05-18
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 6, 2023
@melvin-bot melvin-bot bot added the Overdue label May 8, 2023
@Expensify Expensify deleted a comment from melvin-bot bot May 12, 2023
@Expensify Expensify deleted a comment from melvin-bot bot May 12, 2023
@greg-schroeder greg-schroeder removed their assignment May 12, 2023
@melvin-bot melvin-bot bot removed the Overdue label May 12, 2023
@Expensify Expensify deleted a comment from melvin-bot bot May 12, 2023
@Expensify Expensify deleted a comment from melvin-bot bot May 12, 2023
@greg-schroeder greg-schroeder added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels May 12, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

Triggered auto assignment to @arielgreen (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented May 12, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@greg-schroeder
Copy link
Contributor

I'm dealing with a few things and I need to re-assign this. The auto-assigner hath chosen you @arielgreen - I'm sorry about the delay on this, but I appreciate you stepping in if you're able. <3

@melvin-bot melvin-bot bot added the Overdue label May 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 15, 2023

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

@arielgreen
Copy link
Contributor

Happy to take this on @greg-schroeder ! Working on it tomorrow morning

@melvin-bot melvin-bot bot removed the Overdue label May 16, 2023
@HezekielT
Copy link
Contributor

HezekielT commented May 16, 2023

Proposal

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

Bank Account - User goes to ‘Connect manually’ flow after ‘Start Over’ in offline.

What is root cause of that problem?

Whenever there is a change in network status, we call the fetchData method which opens the correct reimbursement page based on the step by calling BankAccount.openReimbursementAccountPage() method.

componentDidUpdate(prevProps) {
if (prevProps.network.isOffline && !this.props.network.isOffline) {
this.fetchData();
}

Now if the user clicked on Start over option while being offline the this.props.reimbursementAccount will have a pending action of delete and when the user becomes online again the fetchData method will try to open reimbursement page based on this.props.reimbursementAccount that has a pending action of delete and the result contains BankAccountStep as currentStep and manual as a subStep which causes the screen to navigate to manual bank account screen.

So the problem is trying to fetch data with this.props.reimbursementAccount that is about to get deleted.

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

If reimbursementAccount has a delete pending action, there is no need to call fetchData when the network status changes from offline to online because the reimbursementAccount data will be deleted.

This can be achieved by adding a condition that checks if prevProps.reimbursementAction has a delete pending action and if it has, prevent fetchData from being called in componentDidUpdate() method as shown below.

if (prevProps.network.isOffline && !this.props.network.isOffline 
  && prevProps.reimbursementAccount.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) {
        this.fetchData();
}
  • This also ensures that we don't make unnecessary api call to the backend by preventing fetchData() from calling OpenReimbursementAccountPage

What alternative solutions did you explore? (Optional)

None

Result

working well after the fix:

user-goes-to-manual-step-offline.mov

@melvin-bot melvin-bot bot added the Overdue label May 18, 2023
@arielgreen arielgreen added the External Added to denote the issue can be worked on by a contributor label May 18, 2023
@melvin-bot melvin-bot bot changed the title Bank Account - User goes to 'Connect manually' flow after 'Start Over' offline [$1000] Bank Account - User goes to 'Connect manually' flow after 'Start Over' offline May 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 18, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01aeed1cce3edf8b8d

@melvin-bot
Copy link

melvin-bot bot commented May 18, 2023

Current assignee @arielgreen is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented May 18, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 18, 2023
@arielgreen
Copy link
Contributor

Offers sent in Upwork.

@arielgreen arielgreen removed the Bug Something is broken. Auto assigns a BugZero manager. label May 26, 2023
@arielgreen
Copy link
Contributor

Reassigning, OOO tomorrow/Monday.

@arielgreen arielgreen added the Bug Something is broken. Auto assigns a BugZero manager. label May 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 26, 2023

Triggered auto assignment to @johncschuster (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot

This comment was marked as duplicate.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 31, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Bank Account - User goes to 'Connect manually' flow after 'Start Over' offline [HOLD for payment 2023-06-07] [$1000] Bank Account - User goes to 'Connect manually' flow after 'Start Over' offline May 31, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 31, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 31, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 31, 2023

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

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented May 31, 2023

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:

  • [@mananjadhav] The PR that introduced the bug has been identified. Link to the PR:
  • [@mananjadhav] 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:
  • [@mananjadhav] 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:
  • [@mananjadhav] Determine if we should create a regression test for this bug.
  • [@mananjadhav] 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.
  • [@johncschuster / @arielgreen] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/291261

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 6, 2023
@johncschuster
Copy link
Contributor

I have issued payment. @mananjadhav, do you believe the steps in the OP are sufficient for the regression test, or do we need something else?

@mananjadhav
Copy link
Collaborator

@johncschuster Just confirming isn't it eligible for the timeline bonus? Next Tests in PR are good enough for the regression test. @flodnv wdyt?

@flodnv
Copy link
Contributor

flodnv commented Jun 8, 2023

I think it sounds good 👍

@johncschuster
Copy link
Contributor

@mananjadhav Hmm, I thought the PR was merged in 7 days. Am I wrong? I'm happy to issue a bonus, I just thought it wasn't eligible.

@mananjadhav
Copy link
Collaborator

@mananjadhav Hmm, I thought the PR was merged in 7 days. Am I wrong? I'm happy to issue a bonus, I just thought it wasn't eligible.

@johncschuster Because the checklist was completed within 3 days. Generally we focus on when the checklist is completed without further changes.

@johncschuster
Copy link
Contributor

Got it. Thank you for clearing that up! I'll get those bonuses taken care of. While I'm working on that, can you finish out the BZ checklist above, @mananjadhav?

Thank you!

@mananjadhav
Copy link
Collaborator

Thanks @johncschuster.

About the checklist yeah, I couldn't trace the offending PR. I saw this PR added the network offline check to fetch the data on switching the network. But I couldn't pinpoint if we did support offline behavior that time. The PR seems to be more than a year old.

@johncschuster
Copy link
Contributor

Ok! Bonuses have been issued 🙌

Thanks for calling that out, @mananjadhav!

I'll get a regression test GH going shortly.

@melvin-bot melvin-bot bot added the Overdue label Jun 12, 2023
@johncschuster
Copy link
Contributor

Regression test GH is live! I think we're good to close this one. 👍

@melvin-bot melvin-bot bot removed the Overdue label Jun 12, 2023
@flodnv flodnv closed this as completed Jun 12, 2023
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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants