You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-07-17] [$1000] App changes emoji tax number to actual number, causing confusion for user during manual bank account connection #21065
Manually connect a bank account using routing number 074000078 and account number 12345.
Add company information and use the tax number 0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣. Click continue.
Observe that the app does not differentiate the emoji number in the tax number field from the actual numbers, causing confusion for the user. When the user goes back to the form, the app changes the emoji number to the actual number.
Expected Result:
The app should differentiate the emoji number in the tax number field from the actual numbers and display a relevant error message if an incorrect format is entered. The app should not change the emoji number to the actual number; instead, it is preferable to display an error message initially.
Actual Result:
The app changes the emoji number in the tax number field to the actual number, causing confusion for the user.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.29.2
Reproducible in staging?: yes
Reproducible in production?: yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
We call taxID.replace(CONST.REGEX.NON_NUMERIC, '') to strip out non-digit characters before testing it.
"0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣".replace(/\D/g,'')
outputs 090909090, so testing CONST.REGEX.TAX_ID.test("090909090") returns true and 0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣ is treated as valid tax id input.
What changes do you think we should make in order to solve the problem?
After checking other similar validation use cases in ValidationUtils, like isValidDebitCard and isValidSecurityCode, I find that they're not doing stripping out non-digit characters before testing regex pattern. So, in this case, I think also shouldn't strip out non-digit characters before testing regex.
changed the title [-]App changes emoji tax number to actual number, causing confusion for user during manual bank account connection[/-][+][$1000] App changes emoji tax number to actual number, causing confusion for user during manual bank account connection[/+]on Jun 21, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.38-7 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-07-17. 🎊
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
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
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:
[@parasharrajat] The PR that introduced the bug has been identified. Link to the PR:
[@parasharrajat] 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:
[@parasharrajat] 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:
[@parasharrajat] Determine if we should create a regression test for this bug.
[@parasharrajat] 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.
[@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
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:
[@parasharrajat] Determine if we should create a regression test for this bug. yes
[@parasharrajat] 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.
Regression Test Steps
Go to Settings => Workspaces => Select a Workspace => Bank account => Connect manually => Connect bank account
Fill in routing number 074000078 and account number 12345
Check the terms of use and click the continue button.
Try to enter zip codes one by one: 12️⃣345, 123456, and 123452️⃣. Verify they're all hinted as invalid zip codes.
Enter zip code 12345 and verify that it's a valid zip code
Try to enter tax IDs one by one: 0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣, 0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0, 1234567890. Verify they're all hinted as invalid tax IDs.
Enter tax ID 123456789 and verify that it's a valid tax ID
Activity
eh2077 commentedon Jun 19, 2023
Proposal
Combined proposal from #21062 (comment) to fix Zip Code issue.
Please re-state the problem that we are trying to solve in this issue.
App changes emoji tax number to actual number
What is the root cause of that problem?
The root cause of this issue is that, in method
ValidationUtils.isValidTaxIDApp/src/libs/ValidationUtils.js
Lines 434 to 436 in bee8fd3
We call
taxID.replace(CONST.REGEX.NON_NUMERIC, '')to strip out non-digit characters before testing it.outputs
090909090, so testingCONST.REGEX.TAX_ID.test("090909090")returns true and0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣9️⃣0️⃣is treated as valid tax id input.What changes do you think we should make in order to solve the problem?
After checking other similar validation use cases in ValidationUtils, like isValidDebitCard and isValidSecurityCode, I find that they're not doing stripping out non-digit characters before testing regex pattern. So, in this case, I think also shouldn't strip out non-digit characters before testing regex.
To fix this issue, we can change this line
App/src/libs/ValidationUtils.js
Line 435 in bee8fd3
to
What alternative solutions did you explore? (Optional)
N/A
melvin-bot commentedon Jun 19, 2023
Triggered auto assignment to @sonialiap (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jun 19, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)sonialiap commentedon Jun 21, 2023
😂 that is odd behavior, let's throw an error. Triaging to external
[-]App changes emoji tax number to actual number, causing confusion for user during manual bank account connection[/-][+][$1000] App changes emoji tax number to actual number, causing confusion for user during manual bank account connection[/+]melvin-bot commentedon Jun 21, 2023
Job added to Upwork: https://www.upwork.com/jobs/~018839cf0c086e82de
melvin-bot commentedon Jun 21, 2023
Current assignee @sonialiap is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Jun 21, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (
External)sonialiap commentedon Jun 21, 2023
I propose we expand this issue's scope to prevent emoji entry (i.e. throw an error) into any of the bank form fields
42 remaining items
melvin-bot commentedon Jul 10, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.38-7 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-07-17. 🎊
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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon Jul 10, 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:
eh2077 commentedon Jul 20, 2023
Friendly bump @sonialiap This is ready for payment
parasharrajat commentedon Jul 20, 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:
Regression Test Steps
Do you agree 👍 or 👎 ?
sonialiap commentedon Jul 21, 2023
Apologies for the delay! Somehow I missed this issue 🙈
@eh2077 offer sent for fix (+bonus) - paid ✔️
@tewodrosGirmaA - paid for reporting issue ✔️
@parasharrajat - to be paid for review(+bonus) via NewDot
eh2077 commentedon Jul 21, 2023
@sonialiap Accepted the offer thanks
sonialiap commentedon Jul 21, 2023
Upwork paid and request to add regression test submitted, closing
parasharrajat commentedon Jul 24, 2023
Payment requested 1500.
JmillsExpensify commentedon Jul 27, 2023
Reviewed details for @parasharrajat. This is accurate based on summary from Business Reviewer and approved for payment in NewDot.