Skip to content

[HOLD for payment 2024-01-17] [HOLD for payment 2024-01-11] [$500] Android- IOU-When user changes Stop address, the Request money amount is not updated #26946

Closed

Description

@izarutskaya

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. Launch app
  2. Tap profile icon
  3. Tap Workspaces
  4. Tap any Workspace
  5. Tap Reimbursements
  6. Tap Track distance
  7. Enter Rate and Unit
  8. Tap Save
  9. Navigate back to LHN
  10. Tap Fab
  11. Tap request money
  12. Tap distance
  13. Tap Start and select an address
  14. Tap Finish and select an address
  15. Tap Add stop
  16. Tap Finish and select an address
  17. Tap next
  18. Select a workspace
  19. Note the distance details and request money amount is correct (15.39*2=₹30.78) i. e shown as ₹30.77
  20. Tap back to distance money request page
  21. Tap Stop
  22. Replace the entered address with a new one
  23. Tap next
  24. Select a Workspace
  25. Note the distance field and request money amount (9.68*2=₹19.36)

Expected Result:

When user changes Stop address, the Request money amount should be updated based on new distance.

Actual Result:

When user changes Stop address, the Request money amount is not updated. The distance amount(15.39*2=₹30.78) before changing address is shown even after changing the address.

For new distance when address changed (9.68*2=₹19.36) , but still old amount ₹30.77 is displayed.

Workaround:

Unknown

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.65-0

Reproducible in staging?: Y

Reproducible in production?: Y

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

Bug6191115_km.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause-Internal Team / @ashimsharma10

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693984012665899

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f82f14ed7e096782
  • Upwork Job ID: 1700194911206653952
  • Last Price Increase: 2023-09-15
  • Automatic offers:
    • cubuspl42 | Reviewer | 28066262
    • DylanDylann | Contributor | 28066263
Issue OwnerCurrent Issue Owner: @CortneyOfstad

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 7, 2023
  2. melvin-bot commented on Sep 7, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 7, 2023

    @melvin-bot

    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
  4. dukenv0307 commented on Sep 7, 2023

    @dukenv0307
    Contributor

    Proposal

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

    distance - Amount isn't recalculated on changing waypoints

    What is the root cause of that problem?

    We only calculate when the amount is 0 and the request is distance. So when we edit the waypoint again, the amount is not recalculated

    const shouldCalculateDistanceAmount = props.isDistanceRequest && props.iouAmount === 0;

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

    We should always calculate the amount when the distance is changed by changing the check here to

    const shouldCalculateDistanceAmount = props.isDistanceRequest; 
    

    const shouldCalculateDistanceAmount = props.isDistanceRequest && props.iouAmount === 0;

    What alternative solutions did you explore? (Optional)

    Whenever we edit the waypoint we will reset the amount to 0 to make it re-calculate in MoneyRequestConfirmationList

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 8, 2023
  6. changed the title [-]Android- IOU-When user changes Stop address, the Request money amount is not updated[/-] [+][$500] Android- IOU-When user changes Stop address, the Request money amount is not updated[/+] on Sep 8, 2023
  7. melvin-bot commented on Sep 8, 2023

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 8, 2023
  9. melvin-bot commented on Sep 8, 2023

    @melvin-bot

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

  10. melvin-bot commented on Sep 8, 2023

    @melvin-bot

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

  11. ashimsharma10 commented on Sep 8, 2023

    @ashimsharma10
  12. jeet-dhandha commented on Sep 8, 2023

    @jeet-dhandha
    Contributor

    Proposal

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

    • Amount is not recalculated when the distance is changed.

    What is the root cause of that problem?

    • The shouldCalculateDistanceAmount flag is not set to true when the distance is changed. due to the props.iouAmount === 0 condition.

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

    • We can simply remove the shouldCalculateDistanceAmount flag and replace it with props.isDistanceRequest.

    • Keeping the shouldCalculateDistanceAmount flag doesn't make sense anymore since we are always calculating the amount when its a distance request.

    • This will solve two problems:

      • The amount will be recalculated when the distance is changed.
      • The amount will be recalculated when the rate is changed.

    What alternative solutions did you explore? (Optional)

    • N/A
  13. 130 remaining items

  14. CortneyOfstad commented on Jan 17, 2024

    @CortneyOfstad
    Contributor

    Payments have been completed!

    Payment Summary

    @cubuspl42 paid $250 as C+ (-50% due to regression) in Upwork
    @DylanDylann paid $250 as Contributor (-50% due to regression) in Upwork

  15. CortneyOfstad commented on Jan 17, 2024

    @CortneyOfstad
    Contributor

    @cubuspl42 any update on the checklist above? Thanks!

  16. ashimsharma10 commented on Jan 17, 2024

    @ashimsharma10

    @CortneyOfstad Waiting for payment.
    I'm the issue reporter.
    Thanks.

  17. CortneyOfstad commented on Jan 17, 2024

    @CortneyOfstad
    Contributor

    Thanks @ashimsharma10 — sorry about that!

    I had to create a new job post since the old one expired. I've sent you an offer here — https://www.upwork.com/jobs/~01d9cdd3e5a961ef64.

    Please let me know once you accept and I can get that paid ASAP. Thanks!

  18. jakub-trzebiatowski commented on Jan 18, 2024

    @jakub-trzebiatowski
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR:
    • 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:
    • 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:
      • No need for additional discussion
    • Determine if we should create a regression test for this bug.
      • Up to the QA team
    • 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.
      • Create new distance request
      • Fill start point and end point
      • Go to confirmation page and observe the amount field
      • Click back to the distance page and edit waypoint
      • Go to confirmation page and verify that the amount is updated
  19. CortneyOfstad commented on Jan 18, 2024

    @CortneyOfstad
    Contributor

    Thanks @cubuspl42!

    @ashimsharma10 any update on the proposal so I can get the payment processed? Thanks!

  20. ashimsharma10 commented on Jan 19, 2024

    @ashimsharma10
  21. CortneyOfstad commented on Jan 22, 2024

    @CortneyOfstad
    Contributor

    @ashimsharma10 that Upwork profile is where I sent the proposal. I just sent it again 👍

  22. CortneyOfstad commented on Jan 24, 2024

    @CortneyOfstad
    Contributor

    @ashimsharma10 sorry for the delay here — finalized the payment this morning so you're all set!

    Regression test has been created here, so this is all set to be closed!

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