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-12-30] [$250] mWeb - Workspace - Invitation with apostrophe received by SMS is converted to uni message #51424

Closed
1 of 8 tasks
lanitochka17 opened this issue Oct 24, 2024 · 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 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 24, 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.53-0
Reproducible in staging?: Y
Reproducible in production?: Y
**If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:**N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open the staging.new.expensify.com website
  2. Tap on settings
  3. Tap on "Workspaces"
  4. Open any workspace
  5. Tap on "Members
  6. Tap on "Invite Members"
  7. Select any user that has a contact number as primary contact method
  8. Write an invitation that contains an apostrophe. (Testing´s invitation)
  9. Tap on "Invite"
  10. Wait until receiving the invitation SMS
  11. Verify that the invitation message is correctly displayed in the received SMS

Expected Result:

The SMS received with the invitation to the workspace should be displayed excatly as the user writed it, even when it has an apostrophe on it

Actual Result:

Invitation message received by SMS is converted to uni message when it contains an apostrophe

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6617613_1727457212525.UNI.mp4

View all open jobs on GitHub
Bug6617613_1727457212545!UNI

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021850952418561366923
  • Upwork Job ID: 1850952418561366923
  • Last Price Increase: 2024-11-11
  • Automatic offers:
    • NJ-2020 | Contributor | 104918187
Issue OwnerCurrent Issue Owner: @zanyrenney
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 24, 2024
Copy link

melvin-bot bot commented Oct 24, 2024

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

@lanitochka17
Copy link
Author

@zanyrenney FYI 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

@NJ-2020
Copy link
Contributor

NJ-2020 commented Oct 25, 2024

Edited by proposal-police: This proposal was edited at 2024-10-25 03:06:59 UTC.

Proposal

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

mWeb - Workspace - Invitation with apostrophe received by SMS is converted to uni message

What is the root cause of that problem?

When sending the invitation we pass the welcome note to BE with 's
Screenshot 2024-10-24 at 19 55 48
It's because we parse the welcome note using Parser.replace before sending into the BE

welcomeNote: Parser.replace(welcomeNote),

Inside Parser.replace it will replace any these symbols to html code if shouldEscapeText is true, see here and here

const htmlUnescapes = {
    '&': '&',
    '&lt;': '<',
    '&gt;': '>',
    '&quot;': '"',
    '&#x27;': "'",
    '&#x60;': '`',
    '&#32;': ' ',
};

The default of shouldEscapeText is true and while we didn't pass any option for shouldEscapeText, so it will replace those above symbols with html code

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

We should pass shouldEscapeText false

welcomeNote: Parser.replace(welcomeNote, {
    shouldEscapeText: false,
}),

What alternative solutions did you explore? (Optional)

We can also pass the shouldEscapeText false if it's mobile phone number

const parsedPhoneNumber = PhoneNumber.parsePhoneNumber(login);
const isPhoneNumber = parsedPhoneNumber.possible && !Str.isValidEmail(login);

...
welcomeNote: Parser.replace(welcomeNote, {
    shouldEscapeText: isPhoneNumber ? false : true,
}),

@zanyrenney
Copy link
Contributor

Hmm this is a weird one for sure! Quite niche but we should fix.

@zanyrenney zanyrenney added the External Added to denote the issue can be worked on by a contributor label Oct 28, 2024
@melvin-bot melvin-bot bot changed the title mWeb - Workspace - Invitation with apostrophe received by SMS is converted to uni message [$250] mWeb - Workspace - Invitation with apostrophe received by SMS is converted to uni message Oct 28, 2024
Copy link

melvin-bot bot commented Oct 28, 2024

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

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

melvin-bot bot commented Oct 28, 2024

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

@zanyrenney
Copy link
Contributor

Looking for proposals here.

Copy link

melvin-bot bot commented Oct 31, 2024

@abdulrahuman5196, @zanyrenney Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Nov 4, 2024

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

Copy link

melvin-bot bot commented Nov 4, 2024

@abdulrahuman5196, @zanyrenney 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@NJ-2020
Copy link
Contributor

NJ-2020 commented Nov 6, 2024

@abdulrahuman5196 Can you please review my proposal above ^
Thanks

@abdulrahuman5196
Copy link
Contributor

Hi, I was OOO couple of days, checking now

@melvin-bot melvin-bot bot removed the Overdue label Nov 11, 2024
@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

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

Copy link

melvin-bot bot commented Nov 15, 2024

@abdulrahuman5196, @zanyrenney Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Nov 15, 2024
@abdulrahuman5196
Copy link
Contributor

Checking now again

@melvin-bot melvin-bot bot removed the Overdue label Nov 15, 2024
@abdulrahuman5196
Copy link
Contributor

@NJ-2020 's proposal here #51424 (comment) looks good and works well.

🎀 👀 🎀
C+ Reviewed

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Dec 3, 2024
@NJ-2020
Copy link
Contributor

NJ-2020 commented Dec 3, 2024

@abdulrahuman5196 Done

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 23, 2024
@melvin-bot melvin-bot bot changed the title [$250] mWeb - Workspace - Invitation with apostrophe received by SMS is converted to uni message [HOLD for payment 2024-12-30] [$250] mWeb - Workspace - Invitation with apostrophe received by SMS is converted to uni message Dec 23, 2024
Copy link

melvin-bot bot commented Dec 23, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 23, 2024
Copy link

melvin-bot bot commented Dec 23, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.77-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 2024-12-30. 🎊

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

Copy link

melvin-bot bot commented Dec 23, 2024

@abdulrahuman5196 @zanyrenney @abdulrahuman5196 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]

@garrettmknight garrettmknight moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Dec 23, 2024
@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Dec 30, 2024
Copy link

melvin-bot bot commented Jan 2, 2025

@yuwenmemon, @abdulrahuman5196, @zanyrenney, @NJ-2020 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@NJ-2020
Copy link
Contributor

NJ-2020 commented Jan 2, 2025

This is ready for payment

@zanyrenney
Copy link
Contributor

Not quite yet @NJ-2020 @abdulrahuman5196 please can you complete the checklist here and ping me when thats done so I can issue payouts. #51424 (comment)

Thanks!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 3, 2025
@zanyrenney
Copy link
Contributor

I have DM'd @abdulrahuman5196

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

abdulrahuman5196 commented Jan 6, 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: Doesn't seem to be a direct cause of a PR.

  • [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: N/A

  • [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.

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

Test:

  1. Open Expensify app
  2. Go to settings > any workspace > members
  3. Invite member
  4. Select any user that has a contact number as primary contact method
  5. Write an invitation that contains an apostrophe e.g Testing's invitation
  6. Tap on "Invite"
  7. Wait until the invitation message is received (SMS)
  8. Verify that the invitation message is correctly displayed (SMS)

Do we agree 👍 or 👎

@abdulrahuman5196
Copy link
Contributor

@zanyrenney Sorry for the delay. Added the checklist.

@zanyrenney
Copy link
Contributor

Thank you @abdulrahuman5196

@zanyrenney
Copy link
Contributor

@zanyrenney
Copy link
Contributor

Payment summary

@abdulrahuman5196 requires payment through NewDot Manual Requests - please request 250USD
@NJ-2020 requires payment automatic offer (Contributor) PAID 250USD via upwork.

Thanks!

@github-project-automation github-project-automation bot moved this from Hold for Payment to Done in [#whatsnext] #expense Jan 7, 2025
@JmillsExpensify
Copy link

$250 approved for @abdulrahuman5196

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

6 participants