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

[Awaiting Sibtain payment] [HOLD for payment 2023-09-12] [$500] When Distance Request Tab is tapped, all waypoints are lost #26579

Closed
6 tasks done
hayata-suenaga opened this issue Sep 2, 2023 · 29 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

@hayata-suenaga
Copy link
Contributor

hayata-suenaga commented Sep 2, 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. Go to a workspace chat
  2. "+" button next to text composer -> Request money -> Distance request
  3. "Start" -> type and choose an address (this creates one waypoint)
  4. Click "Distance request" tab again

Expected Result:

The start waypoint should remain the same

Actual Result:

The start waypoint is cleared

Workaround:

N/A

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: v1.3.62-1
Reproducible in staging?: Yes
Reproducible in production?: No
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
Expensify/Expensify Issue URL:
Issue reported by: @b4s36t4
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693685299726929

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b0d78086aa76dc15
  • Upwork Job ID: 1698069080541106176
  • Last Price Increase: 2023-09-02
@hayata-suenaga hayata-suenaga added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 2, 2023
@hayata-suenaga hayata-suenaga self-assigned this Sep 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2023

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

@melvin-bot melvin-bot bot changed the title When Distance Request Tab is tapped, all waypoints are lost [$500] When Distance Request Tab is tapped, all waypoints are lost Sep 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2023

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

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

melvin-bot bot commented Sep 2, 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

@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2023

Triggered auto assignment to @flaviadefaria (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2023

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

@allroundexperts
Copy link
Contributor

allroundexperts commented Sep 2, 2023

Proposal

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

Tapping on the distance request resets the tab.

What is the root cause of that problem?

We're calling the onPress handler here without checking if the tab being pressed is currently focused.

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

We can trigger the onPress handler here only if isFocused is false. I don't see any reason for triggering rest of the function code if isFocused is true, so maybe we can also prevent the execution of whole function code if isFocused is true.

If we want to trigger the onPress handler but not reset the state, then we can also do this by adding the following condition here:

if (props.selectedTab === routeName) return;

Note that routeName is passed to the onTabPress handler here by the TabSelector component.

What alternative solutions did you explore? (Optional)

We can also remove this altogether if the purpose of this bug report is that we should not reset the request when any tab is clicked.

@hayata-suenaga
Copy link
Contributor Author

What alternative solutions did you explore? (Optional)
We can also remove this altogether if the purpose of this bug report is that we should not reset the request when any tab is clicked.

We still want to reset the money request information because we are sharing the data for a draft money request. If we don't clear the data when a different tab/request type is selected, draft data from the previous type might be included in the new money request.

so maybe we can also prevent the execution of whole function code if isFocused is true.

I agree let's try this approach 💯

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 2, 2023

📣 @allroundexperts Please request via NewDot manual requests for the Contributor role ($500)

@hayata-suenaga
Copy link
Contributor Author

@allroundexperts looking forward for your PR 😄

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 2, 2023
@allroundexperts
Copy link
Contributor

allroundexperts commented Sep 2, 2023

PR created #26584 @hayata-suenaga

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 3, 2023

Missed this 🙂🥲

@hayata-suenaga
Copy link
Contributor Author

@trjExpensify @allroundexperts is a C+ and they made the PR
@situchan is also a C+ and they reviewed the PR

@trjExpensify
Copy link
Contributor

Cool, assigning @situchan on the issue as well for tracking.

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 4, 2023

I have reported this issue. @hayata-suenaga

@hayata-suenaga
Copy link
Contributor Author

@b4s36t4 yep you did

Screenshot 2023-09-04 at 11 05 18 AM

@b4s36t4
Copy link
Contributor

b4s36t4 commented Sep 4, 2023

Thanks so much Hayata. 🙌

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Sep 5, 2023
@melvin-bot melvin-bot bot changed the title [$500] When Distance Request Tab is tapped, all waypoints are lost [HOLD for payment 2023-09-12] [$500] When Distance Request Tab is tapped, all waypoints are lost Sep 5, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Sep 5, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 5, 2023

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

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

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

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 Sep 5, 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:

  • [@allroundexperts / @situchan] The PR that introduced the bug has been identified. Link to the PR:
  • [@allroundexperts / @situchan] 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:
  • [@allroundexperts / @situchan] 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:
  • [@allroundexperts / @situchan] Determine if we should create a regression test for this bug.
  • [@allroundexperts / @situchan] 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.
  • [@trjExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@trjExpensify
Copy link
Contributor

👋 Can we get the checklist filled out please?

@trjExpensify
Copy link
Contributor

trjExpensify commented Sep 12, 2023

Confirming those payments due as follows, correct?

  • $50 to @b4s36t4 for the bug report
  • $750 to @allroundexperts for the fix + #urgency bonus (to be paid via NewDot)
  • $750 to @situchan for the C+ review + #urgency bonus

@situchan
Copy link
Contributor

No regression. Same tab press action was not prevented during first implementation of tab navigator.

Regression Test Proposal

  1. Open FAB > Request money
  2. Click Distance tab
  3. Enter start and finish address
  4. Click again Distance tab
  5. Verify that entered addresses are not cleared

@trjExpensify
Copy link
Contributor

Cool, thanks! I don't think we need to check for this one on every regression run, so I'm going to hold off on that test.

Offers sent on this job.

@allroundexperts
Copy link
Contributor

Cool, thanks! I don't think we need to check for this one on every regression run, so I'm going to hold off on that test.

Offers sent on this job.

@trjExpensify I get paid through the App. I think the payment summary is not correct. Shouldn't it be 750 instead?

@trjExpensify
Copy link
Contributor

@trjExpensify I get paid through the App.

Ah of course, I forgot you did. I can retract your offer no worries.

Shouldn't it be 750 instead?

Ah yes, it's 50% bonus. That's cool. I sent offers for the bounty price of $500 and then I add the bonus once accepted anyway. Modified the above though!

@trjExpensify
Copy link
Contributor

okay, just awaiting your payment now @allroundexperts!

@trjExpensify trjExpensify changed the title [HOLD for payment 2023-09-12] [$500] When Distance Request Tab is tapped, all waypoints are lost [Awaiting Sibtain payment] [HOLD for payment 2023-09-12] [$500] When Distance Request Tab is tapped, all waypoints are lost Sep 13, 2023
@allroundexperts
Copy link
Contributor

Requested the payment on ND!

@trjExpensify
Copy link
Contributor

Cool, let's close it out!

@JmillsExpensify
Copy link

$750 payment approved for @allroundexperts based on BZ summary.

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