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-10-23][$500] Send money - Extra two digits are added before the decimal point when money is sent offline #29318

Closed
6 tasks done
lanitochka17 opened this issue Oct 11, 2023 · 43 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

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 11, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.3.81-4

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

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to any chat
  3. Go offline
  4. Go to + > Send money
  5. Enter MYR 9
  6. Complete the send money request
  7. Click on the IOU preview
    Note that in the report page, it shows RM900.00 instead of RM9

Expected Result:

The sent money in report page shows the correct amount, which is RM9.00

Actual Result:

The sent money in report page shows the incorrect amount, which is RM900.00. It shows the correct amount after going online

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

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Bug6232978_1697027336866.20231011_193721.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01227f1e2615915351
  • Upwork Job ID: 1712128108884541440
  • Last Price Increase: 2023-10-11
  • Automatic offers:
    • alitoshmatov | Contributor | 27143160
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 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

@OSBotify
Copy link
Contributor

👋 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.

@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2023

Triggered auto assignment to @amyevans (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@alitoshmatov
Copy link
Contributor

alitoshmatov commented Oct 11, 2023

I am available right now, and can raise PR quickly if needed

Proposal

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

Send money - Extra two digits are added before the decimal point when money is sent offline

What is the root cause of that problem?

This is happening in all currencies. I think multiplying to 100 here is the problem, I think it is an old piece of code and I am assuming this multiplication was here to turn normal amount into currencies smallest unit by multiplying it to 100(Dollar to cent).

const optimisticTransaction = TransactionUtils.buildOptimisticTransaction(amount * 100, currency, optimisticIOUReport.reportID, comment);

Converting amount into smallest unit is happening here, so that amount is already in smallest units

const amountInSmallestCurrencyUnits = CurrencyUtils.convertToBackendAmount(Number.parseFloat(currentAmount));

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

We should remove this multiplication

What alternative solutions did you explore? (Optional)

@techievivek techievivek self-assigned this Oct 11, 2023
@techievivek
Copy link
Contributor

Taking a look at the issue and then I will review the proposal, thanks.

@amyevans
Copy link
Contributor

Thanks @techievivek! ❤️

@techievivek
Copy link
Contributor

@alitoshmatov This seems to happen even when we are online and click on the preview. Can you please quickly push a PR to fix this? I will be online to review and test it.

@techievivek techievivek added the External Added to denote the issue can be worked on by a contributor label Oct 11, 2023
@melvin-bot melvin-bot bot changed the title Send money - Extra two digits are added before the decimal point when money is sent offline [$500] Send money - Extra two digits are added before the decimal point when money is sent offline Oct 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01227f1e2615915351

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

melvin-bot bot commented Oct 11, 2023

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

@techievivek techievivek assigned alitoshmatov and unassigned Ollyws Oct 11, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2023

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

@alitoshmatov
Copy link
Contributor

@techievivek On it!

@piyushbeli

This comment was marked as abuse.

@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊

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 Oct 16, 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:

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

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Send money - Extra two digits are added before the decimal point when money is sent offline [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Send money - Extra two digits are added before the decimal point when money is sent offline Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 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-10-23. 🎊

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 Oct 16, 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:

@lschurr lschurr changed the title [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Send money - Extra two digits are added before the decimal point when money is sent offline [HOLD for payment 2023-10-23][$500] Send money - Extra two digits are added before the decimal point when money is sent offline Oct 17, 2023
@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

@amyevans, @lschurr, @techievivek, @alitoshmatov Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@amyevans
Copy link
Contributor

Went through the BZ checklist: #29318 (comment)

So all that's left is payments!

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@lschurr
Copy link
Contributor

lschurr commented Oct 23, 2023

Payment summary:

  • Bug reporter: Applause (no payment)
  • Contributor: @alitoshmatov $750 (paid in Upwork)
  • Contributor+: @situchan $750

@lschurr
Copy link
Contributor

lschurr commented Oct 23, 2023

All done!

@lschurr lschurr closed this as completed Oct 23, 2023
@situchan
Copy link
Contributor

situchan commented Nov 8, 2023

@lschurr C+ payment is pending. Can you please reopen the issue?

@lschurr
Copy link
Contributor

lschurr commented Nov 8, 2023

@situchan - @alitoshmatov was already paid in Upwork. Could you clarify what's missing?

@situchan
Copy link
Contributor

situchan commented Nov 9, 2023

@lschurr ah, @alitoshmatov was C, I was C+ for this issue
You can see author & reviewer in #29353

@lschurr
Copy link
Contributor

lschurr commented Nov 9, 2023

Ah, it looks like the automation missed that! I'll update the payment summary.

@lschurr lschurr reopened this Nov 9, 2023
@lschurr
Copy link
Contributor

lschurr commented Nov 9, 2023

Are you paid in Upwork or newdot @situchan?

@situchan
Copy link
Contributor

situchan commented Nov 9, 2023

Are you paid in Upwork or newdot @situchan?

upwork

@lschurr
Copy link
Contributor

lschurr commented Nov 9, 2023

Updated: #29318 (comment)

@lschurr
Copy link
Contributor

lschurr commented Nov 9, 2023

Could you apply here @situchan? https://www.upwork.com/jobs/~01227f1e2615915351

@situchan
Copy link
Contributor

situchan commented Nov 9, 2023

Applied

@lschurr
Copy link
Contributor

lschurr commented Nov 9, 2023

Payment issued. All set.

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

No branches or pull requests

10 participants