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

[PAID] [$250] [Violations] Distance - Incorrect error message when distance amount is changed to smaller amount #41401

Closed
6 tasks done
izarutskaya opened this issue May 1, 2024 · 50 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 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@izarutskaya
Copy link

izarutskaya commented May 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.4.69-0
Reproducible in staging?: Y
Reproducible in production?: N
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit a distance expense.
  4. Go to transaction thread.
  5. Modify the amount to smaller than the calculated amount.

Expected Result:

The error message should correctly reflect the difference in the new amount.
It should follow Old Dot style where it shows "Expense amount differs from the calculated distance amount",

Actual Result:

When the distance amount is manually changed to the lower amount, the error message is "Amount greater than scanned receipt", which is generic and untrue.

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

Bug6467703_1714556398274.20240501_173617.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01888703ab728af885
  • Upwork Job ID: 1786179879242878976
  • Last Price Increase: 2024-05-02
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @strepanier03
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 1, 2024
Copy link

melvin-bot bot commented May 1, 2024

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

Copy link

melvin-bot bot commented May 1, 2024

Triggered auto assignment to @strepanier03 (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.

Copy link
Contributor

github-actions bot commented May 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.

@izarutskaya
Copy link
Author

Production
image (14)

@izarutskaya
Copy link
Author

@strepanier03 I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

@izarutskaya
Copy link
Author

We think this issue might be related to the #collect project.

@neonbhai
Copy link
Contributor

neonbhai commented May 1, 2024

Proposal

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

Incorrect error message when distance amount is changed to smaller amount

What is the root cause of that problem?

The modifiedAmount violation message is worded differently

modifiedAmount: 'Amount greater than scanned receipt',

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

We will change the modifiedAmount violation to the OldDot style message: Expense amount differs from the calculated distance amount

modifiedAmount: 'Amount greater than scanned receipt',

modifiedAmount: 'Expense amount differs from the calculated distance amount'

we will also change es.ts with the spanish translation

@strepanier03
Copy link
Contributor

Okay testing now, one sec.

@strepanier03
Copy link
Contributor

I'm unable to repro. Changing the amount to smaller or larger doesn't produce any error message as shown in the video. Will try a few more times to repro.

@strepanier03
Copy link
Contributor

I've lost the ability to edit the amount of the distance expense, not sure what changed but I'm stuck at the moment. I need to shift focus to some other testing so I'll circle back on this.

@francoisl
Copy link
Contributor

Violations are still in beta and this is not breaking any functionality, I'm going to remove the blocker label.

/cc @Krishna2323 @cead22, this sounds like it could potentially come from #37813 but I haven't double-checked.

@Krishna2323
Copy link
Contributor

Krishna2323 commented May 1, 2024

@francoisl, yes, you are correct, it's related to this PR. However, I believe this is probably a backend issue. The notice violations shouldn't be thrown when the request is of type 'distance.' @cead22 @JmillsExpensify, can you please confirm?

@cead22
Copy link
Contributor

cead22 commented May 2, 2024

I've lost the ability to edit the amount of the distance expense

I'm seeing the same. I think @Krishna2323 is right about the violation we're returning, but I haven't figured out what part of the code is wrong 🤔

@cead22
Copy link
Contributor

cead22 commented May 2, 2024

Ok, the code is right and calculating a modifiedAmount violation for the distance expense, but

  • We don't use the message from the backend
  • We're putting the message for this violation under the receipt every time, which isn't ideal since we have several cases
    • Expense amount differs from the calculated distance amount
    • Amount greater than card transaction
    • Amount $displayPercentVariance% greater than scanned receipt
    • Amount greater than scanned receipt

@cead22 cead22 assigned cead22 and unassigned Julesssss May 2, 2024
@strepanier03
Copy link
Contributor

I can now edit the amount again but the error doesn't populate at all when making a change to the amount, whether its larger or smaller.

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels May 28, 2024
Copy link

melvin-bot bot commented May 28, 2024

This issue has not been updated in over 15 days. @cead22, @strepanier03, @sobitneupane, @Krishna2323 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Third week)

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Jul 17, 2024
@melvin-bot melvin-bot bot changed the title [$250] [Violations] Distance - Incorrect error message when distance amount is changed to smaller amount [HOLD for payment 2024-07-24] [$250] [Violations] Distance - Incorrect error message when distance amount is changed to smaller amount Jul 17, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 17, 2024
Copy link

melvin-bot bot commented Jul 17, 2024

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

Copy link

melvin-bot bot commented Jul 17, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 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-07-24. 🎊

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

Copy link

melvin-bot bot commented Jul 17, 2024

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:

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

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Fourth week)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 23, 2024
@strepanier03
Copy link
Contributor

@Krishna2323 - I sent you an offer via Upwork, I'll keep an eye out for the acceptance notification to finish up.

@sobitneupane - I'll check in later for the checklist and once it's done I'll post the payment summary. Thanks!

@strepanier03
Copy link
Contributor

Saw you accepted so I paid and closed the contract @Krishna2323, thanks!

Copy link

melvin-bot bot commented Jul 24, 2024

Payment Summary

Upwork Job

BugZero Checklist (@strepanier03)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1786179879242878976/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@strepanier03
Copy link
Contributor

@sobitneupane - Gentle bump on the checklist when you get a chance.

@melvin-bot melvin-bot bot added the Overdue label Jul 29, 2024
@sobitneupane
Copy link
Contributor

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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

#37813

  • [@sobitneupane] 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:

Not Required.

  • [@sobitneupane] 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:

Not Required.

  • [@sobitneupane] Determine if we should create a regression test for this bug.

Yes.

  • [@sobitneupane] 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.

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Go to Submit expense > Scan > Add valid receipt > Select workspace > Submit
  2. Wait for scanning to complete, once completed edit the amount to a higher value
  3. Verify Amount greater than scanned receipt error appears below amount field
  4. Go to Submit expense > Distance > Select 2 waypoints > Select workspace > Submit
  5. Open transaction page > Wait for amount to be calculated > Edit the amount to higher value
  6. Verify Amount differs from calculated distance error appears below amount field

Do we agree 👍 or 👎

@strepanier03
Copy link
Contributor

Payment Summary

@JmillsExpensify - One payment request incoming.

@melvin-bot melvin-bot bot removed the Overdue label Jul 29, 2024
@JmillsExpensify
Copy link

$250 approved for @sobitneupane

@strepanier03
Copy link
Contributor

Thanks all, closing now.

@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #expense Jul 30, 2024
@strepanier03 strepanier03 changed the title [HOLD for payment 2024-07-24] [$250] [Violations] Distance - Incorrect error message when distance amount is changed to smaller amount [PAID] [$250] [Violations] Distance - Incorrect error message when distance amount is changed to smaller amount Jul 30, 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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Archived in project
Development

No branches or pull requests