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

[Due for payment 2025-02-18] [$250] Taxes - Tax name disappears in name editor when the tax name has < symbol #54565

Closed
8 tasks done
IuliiaHerets opened this issue Dec 25, 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 External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Dec 25, 2024

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: 9.0.78-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.0 / Chrome
App Component: Workspace Settings

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Taxes.
  3. Click Add rate.
  4. Click Name.
  5. Enter "Mileage < 1400 cc" and save it.
  6. Enter a rate.
  7. Save the new rate.
  8. Click on the new rate.
  9. Click Name.

Expected Result:

Name field will show the complete tax rate name "Mileage < 1400 cc".

Actual Result:

Name field only shows "Mileage ". Anything behind < is gone.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6702036_1735123824870.20241225_184710.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021873766721283552899
  • Upwork Job ID: 1873766721283552899
  • Last Price Increase: 2025-01-13
  • Automatic offers:
    • etCoderDysto | Contributor | 105781153
Issue OwnerCurrent Issue Owner: @bfitzexpensify
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 25, 2024
Copy link

melvin-bot bot commented Dec 25, 2024

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

@etCoderDysto
Copy link
Contributor

etCoderDysto commented Dec 25, 2024

Edited by proposal-police: This proposal was edited at 2024-12-25 15:19:57 UTC.

Proposal

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

Taxes - Tax name disappears in name editor when the tax name has < symbol

What is the root cause of that problem?

Here we are using htmlToMarkdown on the tax rate name. And the characters after '<' will be removed.

const [name, setName] = useState(() => Parser.htmlToMarkdown(currentTaxRate?.name ?? ''));

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

Since the input doesn't accept html format, and currentTaxRate?.name is not in html format we should remove htmlToMarkdown, and pass currentTaxRate?.name ?? '' directly to the useState.

 const [name, setName] = useState(currentTaxRate?.name ?? '');

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

What alternative solutions did you explore? (Optional)

@bfitzexpensify bfitzexpensify moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 25, 2024
@twilight2294
Copy link
Contributor

Proposal

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

Tax name disappears in name editor when the tax name has < symbol

What is the root cause of that problem?

This conversion of html to markdown was added as part of #38208, but here instead of markdown they wanted to convert html > text using htmlToText:

htmlToText(htmlString: string, extras?: Extras): string {

So in the code below we use htmlToMarkdown which causes the text to get parsed as markdown:

const [name, setName] = useState(() => Parser.htmlToMarkdown(currentTaxRate?.name ?? ''));

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

We should use htmlToText instead of htmlToMarkdown and this bug will be solved correctly.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A this is a UI bug and not functional

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Overdue label Dec 30, 2024
@bfitzexpensify bfitzexpensify added the External Added to denote the issue can be worked on by a contributor label Dec 30, 2024
Copy link

melvin-bot bot commented Dec 30, 2024

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

@melvin-bot melvin-bot bot changed the title Taxes - Tax name disappears in name editor when the tax name has < symbol [$250] Taxes - Tax name disappears in name editor when the tax name has < symbol Dec 30, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 30, 2024
Copy link

melvin-bot bot commented Dec 30, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Dec 30, 2024
Copy link

melvin-bot bot commented Jan 3, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Jan 3, 2025
@Tony-MK
Copy link
Contributor

Tony-MK commented Jan 3, 2025

Proposal

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

Taxes - Tax name disappears in name editor when the tax name has < symbol

What is the root cause of that problem?

Since the tax has an unclosed < character, Parser.htmlToMarkdown replaces HTML with markdown elements and will delete any text beyond the < character.

const [name, setName] = useState(() => Parser.htmlToMarkdown(currentTaxRate?.name ?? ''));

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

Let's use Parser.replace to replace markdown with HTML elements like the NewTaskDescriptionPage, NewTaskDetailsPage and others.

const [name, setName] = useState(() => Parser.htmlToMarkdown(Parser.replace(currentTaxRate?.name ?? ''));

Copy link

melvin-bot bot commented Jan 6, 2025

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@alitoshmatov
Copy link
Contributor

Thank you all for proposals, I do think there is no point of parsing the text from html to simple text. We should really just remove parsing logic. So @etCoderDysto proposals look good.

Before I approve this can you @twilight2294 @Tony-MK point out any use case that requires parsing?

@melvin-bot melvin-bot bot removed the Overdue label Jan 6, 2025
@Tony-MK
Copy link
Contributor

Tony-MK commented Jan 7, 2025

Before I approve this can you @twilight2294 @Tony-MK point out any use case that requires parsing?

I haven't found any case so I think you can continue.

Copy link

melvin-bot bot commented Jan 8, 2025

@bfitzexpensify @alitoshmatov this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@twilight2294
Copy link
Contributor

Before I approve this can you @twilight2294 @Tony-MK point out any use case that requires parsing?

Yes, the cases where we import taxes from the integrations!

@melvin-bot melvin-bot bot added the Overdue label Jan 10, 2025
@etCoderDysto
Copy link
Contributor

Yes, the cases where we import taxes from the integrations!

@twilight2294 can you please help me reproduce the issue you mentioned. When I connect a workspace to quickbooks it is only importing tags and report fields.

Screenshot 2025-01-10 at 10 43 19 in the morning

Copy link

melvin-bot bot commented Jan 10, 2025

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

@twilight2294
Copy link
Contributor

can you please help me reproduce the issue you mentioned. When I connect a workspace to quickbooks it is only importing tags and report fields.

There are other integrations too, for those cases

@etCoderDysto
Copy link
Contributor

There are other integrations too, for those cases

It would be nice if you can share specific steps to validate if tax rate name from any of the integration has html format.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 20, 2025
Copy link

melvin-bot bot commented Jan 20, 2025

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

@danieldoglas
Copy link
Contributor

@etCoderDysto assigned

@etCoderDysto
Copy link
Contributor

@alitoshmatov PR is ready for review

@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 11, 2025
@melvin-bot melvin-bot bot changed the title [$250] Taxes - Tax name disappears in name editor when the tax name has < symbol [Due for payment 2025-02-18] [$250] Taxes - Tax name disappears in name editor when the tax name has < symbol Feb 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

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 11, 2025
Copy link

melvin-bot bot commented Feb 11, 2025

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

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

Copy link

melvin-bot bot commented Feb 11, 2025

@alitoshmatov @bfitzexpensify @alitoshmatov The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 17, 2025
@bfitzexpensify
Copy link
Contributor

Payment to @etCoderDysto complete

@alitoshmatov, please complete the BZ checklist

@alitoshmatov
Copy link
Contributor

alitoshmatov commented Feb 18, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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: https://github.com/Expensify/App/pull/38208/files#r1959606377

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

I don't think regression is needed here

@alitoshmatov
Copy link
Contributor

Requested payment in ND

@melvin-bot melvin-bot bot added the Overdue label Feb 21, 2025
@JmillsExpensify
Copy link

Can I get a payment summary?

@bfitzexpensify
Copy link
Contributor

Payment summary:

@alitoshmatov due $250 via ND manual request

@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Feb 21, 2025
@melvin-bot melvin-bot bot removed the Overdue label Feb 21, 2025
@JmillsExpensify
Copy link

$250 approved for @alitoshmatov

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 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

8 participants