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-04-15] [$250] Taxes - Transaction thread shows skeleton loading when saving 0.00 tax amount for second time #39701

Closed
6 tasks done
izarutskaya opened this issue Apr 5, 2024 · 34 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

@izarutskaya
Copy link

izarutskaya commented Apr 5, 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.60-8
Reproducible in staging?: Y
Reproducible in production?: N
Found when validating PR : #33927
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team

Action Performed:

Precondition:

  • User is an employee of Collect workspace with tax rates.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create a manual request with tax exempt (0%).
  4. Go to transaction thread.
  5. Click Tax amount.
  6. Save it without entering any amount.
  7. Repeat Step 5 and 6.

Expected Result:

In Step 6, when saving 0.00 tax amount, the system message will not show $NaN amount,
In Step 7, when saving 0.00 tax amount for the second time, the app will not show skeleton loading.

Actual Result:

In Step 6, $NaN is shown briefly in the system message.
In Step 7, transaction thread shows skeleton loading when saving 0.00 tax amount for second time.

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

Bug6438827_1712298111790.20240405_141500.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01091a68b65c340a6a
  • Upwork Job ID: 1776234872385998848
  • Last Price Increase: 2024-04-05
  • Automatic offers:
    • DylanDylann | Reviewer | 0
@izarutskaya izarutskaya added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 5, 2024
Copy link

melvin-bot bot commented Apr 5, 2024

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

Copy link

melvin-bot bot commented Apr 5, 2024

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

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Apr 5, 2024
Copy link
Contributor

github-actions bot commented Apr 5, 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

@bfitzexpensify 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.

@MonilBhavsar
Copy link
Contributor

Looking here...

@MonilBhavsar MonilBhavsar added the External Added to denote the issue can be worked on by a contributor label Apr 5, 2024
@melvin-bot melvin-bot bot changed the title Taxes - Transaction thread shows skeleton loading when saving 0.00 tax amount for second time [$250] Taxes - Transaction thread shows skeleton loading when saving 0.00 tax amount for second time Apr 5, 2024
Copy link

melvin-bot bot commented Apr 5, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01091a68b65c340a6a

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

melvin-bot bot commented Apr 5, 2024

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

@MonilBhavsar
Copy link
Contributor

Making it external to see if anyone has proposals as I am close to log off

@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 5, 2024

Proposal

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

In Step 6, $NaN is shown briefly in the system message.
In Step 7, transaction thread shows skeleton loading when saving 0.00 tax amount for second time.

What is the root cause of that problem?

When we try to save the tax amount while entering nothing, it's still saving the empty value (which is converted to NaN).

In this, we're not validating the currentAmount if it's tax amount form, so in case the amount is empty, it will also not validate.

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

We need to update this to

if (!currentAmount.length || (!isTaxAmountForm && isAmountInvalid(currentAmount))) {

So that the "amount empty" error will be validated in all cases, (tax amount form won't be an exception). But it will still allow tax amount to be 0 (since we still have the (!isTaxAmountForm && isAmountInvalid(currentAmount)) part)

What alternative solutions did you explore? (Optional)

NA

@MonilBhavsar
Copy link
Contributor

When we try to save the tax amount while entering nothing, it's still saving the empty value

Should we not allow saving empty value at the first place?

@nkdengineer
Copy link
Contributor

@MonilBhavsar You mean to show an error like Please enter a valid amount before continuing. right? We can do that (similar to the request amount page)

@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 5, 2024

But it will look like the tax amount is a required thing, it might confuse the users. In my proposal, the UX will be, we still dismiss the modal but we'll not save anything, which is similar to the Expected Result in the OP, and same as behavior when the tax amount exists, but unchanged.

Like if tax amount is $10 and the user edit the tax amount, then press Save, it's the same behavior.

@MonilBhavsar
Copy link
Contributor

MonilBhavsar commented Apr 5, 2024

You mean to show an error like Please enter a valid amount before continuing. right? We can do that (similar to the request amount page)

Yes, we have a text Please enter a valid amount. We can use it.

But it will look like the tax amount is a required thing, it might confuse the users

It is! User cannot save empty value. They need to enter a number ranging from 0 to maximum allowed value, calculated on basis of expense amount

@nkdengineer
Copy link
Contributor

nkdengineer commented Apr 5, 2024

Proposal updated with alternative solution that will show an error if the tax amount is empty.

@MonilBhavsar Let me know if that looks good 👍

@MonilBhavsar
Copy link
Contributor

Looks good!

One thing I noticed while reviewing. If zero is entered we don't display zero, but a placeholder. Do you want to fix it too?

Screenshot 2024-04-05 at 7 04 20 PM

@MonilBhavsar
Copy link
Contributor

And would you be please able to prioritize PR, given it is a deploy blocker?

@MonilBhavsar
Copy link
Contributor

Okay fine with that. Thanks for looking

@nkdengineer
Copy link
Contributor

Thanks, I'm working on the PR now, will raise in a bit

@cristipaval
Copy link
Contributor

Thanks for jumping into this one, @MonilBhavsar

@nkdengineer
Copy link
Contributor

@MonilBhavsar The PR is ready.

@MonilBhavsar
Copy link
Contributor

Works fine on staging! Removing blocker

Uploading Screenshot 2024-04-06 at 6.10.14 PM.png…

@MonilBhavsar MonilBhavsar removed the DeployBlockerCash This issue or pull request should block deployment label Apr 6, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 8, 2024
@melvin-bot melvin-bot bot changed the title [$250] Taxes - Transaction thread shows skeleton loading when saving 0.00 tax amount for second time [HOLD for payment 2024-04-15] [$250] Taxes - Transaction thread shows skeleton loading when saving 0.00 tax amount for second time Apr 8, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 8, 2024
Copy link

melvin-bot bot commented Apr 8, 2024

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

Copy link

melvin-bot bot commented Apr 8, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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-04-15. 🎊

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

  • @nkdengineer requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Apr 8, 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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 14, 2024
Copy link

melvin-bot bot commented Apr 15, 2024

Payment Summary

Upwork Job

BugZero Checklist (@bfitzexpensify)

  • 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/1776234872385998848/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@bfitzexpensify
Copy link
Contributor

I don't think a specific regression test is needed for this - it should be caught in regular tax testing.

Payment complete, so closing this one out.

@nkdengineer
Copy link
Contributor

Sorry @bfitzexpensify It seems I wasn't paid here, could you reopen the issue to help with this?

TIA

@bfitzexpensify
Copy link
Contributor

@nkdengineer this one was paid on April 16th - title for the Upwork job was Reviewer - [$250] Taxes - Transaction thread shows skeleton loading when saving 0.00 tax amount for second time

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

6 participants