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 2024-02-09] [$500] Distance - Total amount is not updated after changing distance and returning via back icon #35590

Closed
6 tasks done
lanitochka17 opened this issue Feb 1, 2024 · 19 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Feb 1, 2024

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: 1.3.45-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4265266
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Go to workspace chat
  2. Create a distance request
  3. Navigate to request details page
  4. Tap Distance
  5. Change the distance and save it
  6. Tap back icon on the top left (important, not the header subtitle)

Expected Result:

Total amount is updated

Actual Result:

Total amount is not updated.

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

Bug6364027_1706818123726.Screen_Recording_20240202_001841_New_Expensify.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01daeb8b761f9850c4
  • Upwork Job ID: 1753187420609814528
  • Last Price Increase: 2024-02-01
  • Automatic offers:
    • aimane-chnaif | Contributor | 28136422
@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Feb 1, 2024
Copy link
Contributor

github-actions bot commented Feb 1, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented Feb 1, 2024

Triggered auto assignment to @deetergp (Engineering), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave5
CC @dylanexpensify

@deetergp
Copy link
Contributor

deetergp commented Feb 1, 2024

I was not able to reproduce this on Desktop or Web (Mac) but did see it in iOS.

@deetergp deetergp added the External Added to denote the issue can be worked on by a contributor label Feb 1, 2024
@melvin-bot melvin-bot bot changed the title Distance - Total amount is not updated after changing distance and returning via back icon [$500] Distance - Total amount is not updated after changing distance and returning via back icon Feb 1, 2024
Copy link

melvin-bot bot commented Feb 1, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 1, 2024
Copy link

melvin-bot bot commented Feb 1, 2024

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

@deetergp
Copy link
Contributor

deetergp commented Feb 2, 2024

This being an edge case and since it has a workaround (clicking on the header subtitle) I think we can probably remove the blocker label and treat it like a regular bug with daily importance. We should still try to figure out which PR caused it.

@bernhardoj
Copy link
Contributor

Proposal

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

The money request total doesn't update after updating the distance waypoints (or simply updating the amount).

What is the root cause of that problem?

This is another regression from #30168. The total amount depends on the report total field,

const {totalDisplaySpend, nonReimbursableSpend, reimbursableSpend} = ReportUtils.getMoneyRequestSpendBreakdown(report);

const formattedTotalAmount = CurrencyUtils.convertToDisplayString(totalDisplaySpend, report.currency, ReportUtils.hasOnlyDistanceRequestTransactions(report.reportID));

but the component didn't rerender when the total was updated because we didn't include it on the memoization check in both ReportScreen and ReportActionsView.

The reason it works fine when pressing the header subtitle is because it navigates to a new page/screen.

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

Add report.total to the memo check.

What alternative solutions did you explore? (Optional)

Subscribe to report onyx in MoneyReportView.

@aimane-chnaif
Copy link
Contributor

please assign @hurali97 and me here

@hurali97
Copy link
Contributor

hurali97 commented Feb 2, 2024

@aimane-chnaif Do you want me to raise a PR for this or @bernhardoj who has shared the proposal ?

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented Feb 2, 2024

@hurali97 yes if you can. Partial compensation will go to @bernhardoj anyway

EDIT: we ended up comparing full object so @bernhardoj's solution was not used.

@hurali97
Copy link
Contributor

hurali97 commented Feb 2, 2024

On it 👍

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

melvin-bot bot commented Feb 2, 2024

📣 @cubuspl42 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Feb 2, 2024

📣 @aimane-chnaif 🎉 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 📖

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Hourly KSv2 labels Feb 2, 2024
@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Feb 2, 2024
@mountiny
Copy link
Contributor

mountiny commented Feb 2, 2024

Resolved

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 2, 2024
@melvin-bot melvin-bot bot changed the title [$500] Distance - Total amount is not updated after changing distance and returning via back icon [HOLD for payment 2024-02-09] [$500] Distance - Total amount is not updated after changing distance and returning via back icon Feb 2, 2024
Copy link

melvin-bot bot commented Feb 2, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 2, 2024
Copy link

melvin-bot bot commented Feb 2, 2024

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

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 9, 2024
Copy link

melvin-bot bot commented Feb 9, 2024

Issue is ready for payment but no BZ is assigned. @jliexpensify you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

@aimane-chnaif
Copy link
Contributor

No payment required here. This can be closed.

@mountiny mountiny closed this as completed Feb 9, 2024
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 Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants