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-08-17] [$1000] Web - Country suggestion does not work with head or trail space #23727
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Go to Settings > Profile > Personal details > Home address > Country
Type any name with head or trail space
Expected Result:
Should show country suggestion if there is head or trail space
Actual Result:
Country suggestion does not work with head or trail space
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.45-8 Reproducible in staging?: y Reproducible in production?: new feature 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 Notes/Photos/Videos: Any additional supporting documentation
Please re-state the problem that we are trying to solve in this issue.
We want the country selection to work if there is a head or trail space
What is the root cause of that problem?
Here, we are not using the trimmed value of search
What changes do you think we should make in order to solve the problem?
There are 2 solutions to this
Just dealing with extra spaces: Remove the leading/trailing space from search text when filtering result and show the filtered result, this can be done using the trimmed value of searchValuehere and it will fix the bug.
But the search still feels broken as it won't work for some other search text, like when a text has extra spaces in the middle ex: United Arab Emirates. I suggest we just remove any spaces in the search text with empty string when filtering the results. This can be done with a simple regex or str.replaceAll()
Deal with extra spaces and other chars: We can remove extra spaces by the above method but some countries have
ampersand ex: St. Kitts & Nevis, St. Vincent & Grenadines
single quote ex: Côte d'Ivoire
so search values like these will fail
Keeling Islands
US Virgin Islands
Timor Leste
Kitts N
Côte dIvoire
I think we should also remove these by using some regex like /[-'().&\s]/g and when filtering we should remove these chars from the searchValue and the countries text. This will give more accurate results.
Optional:
1- we can omit/add any other chars when filtering
2- the leading/trailing and middle spaces issue is also with the <StateSelectorModal/>, we can also replace leading/trailing and middle spaces from the suggestion when searching in the same manner.
3- to optimize results, we can store the updated text of countries (replacing the chars discussed above) in state and use that when filtering results
What alternative solutions did you explore? (Optional)
👋 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:
Identify the pull request that introduced this issue and revert it.
changed the title [-][$1000] Web - Country suggestion does not work with head or trail space[/-][+][HOLD for payment 2023-08-17] [$1000] Web - Country suggestion does not work with head or trail space[/+]on Aug 10, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.52-5 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-08-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
For reference, here are some details about the assignees on this issue:
@eVoloshchakdoes not require payment (Eligable for Manual Requests)
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:
[@eVoloshchak] The PR that introduced the bug has been identified. Link to the PR:
[@eVoloshchak] 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:
[@eVoloshchak] 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:
[@eVoloshchak] Determine if we should create a regression test for this bug.
[@eVoloshchak] 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.
[@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
The PR that introduced the bug has been identified. Link to the PR: That's how it was implemented initially in 17548 Personal details push to page #21049, I wouldn't call it a regression, more of a feature/polish that wasn't implemented at the time
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: N/A
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: https://expensify.slack.com/archives/C049HHMV9SM/p1692272320271749
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
huzaifa-99 commentedon Jul 27, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
We want the country selection to work if there is a head or trail space
What is the root cause of that problem?
Here, we are not using the trimmed value of search
What changes do you think we should make in order to solve the problem?
There are 2 solutions to this
searchValuehere and it will fix the bug.But the search still feels broken as it won't work for some other search text, like when a text has extra spaces in the middle ex:
United Arab Emirates. I suggest we just remove any spaces in the search text with empty string when filtering the results. This can be done with a simple regex orstr.replaceAll()Myanmar (Burma),Cocos (Keeling) IslandsSt. Lucia,U.S Virgin IslandsCongo - Kinshasa,Congo - Brazzaville,Timor-LesteSt. Kitts & Nevis,St. Vincent & GrenadinesCôte d'Ivoireso search values like these will fail
I think we should also remove these by using some regex like
/[-'().&\s]/gand when filtering we should remove these chars from thesearchValueand the countries text. This will give more accurate results.Optional:
1- we can omit/add any other chars when filtering
2- the leading/trailing and middle spaces issue is also with the
<StateSelectorModal/>, we can also replace leading/trailing and middle spaces from the suggestion when searching in the same manner.3- to optimize results, we can store the updated text of countries (replacing the chars discussed above) in state and use that when filtering results
What alternative solutions did you explore? (Optional)
N/A
OSBotify commentedon Jul 27, 2023
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open
StagingDeployCashdeploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:melvin-bot commentedon Jul 27, 2023
Triggered auto assignment to @danieldoglas (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.danieldoglas commentedon Jul 27, 2023
This doesn't need to be a deploy blocker, so removing the hourly/deployblockercash labels and adding bug
melvin-bot commentedon Jul 27, 2023
Triggered auto assignment to @JmillsExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.39 remaining items
[-][$1000] Web - Country suggestion does not work with head or trail space[/-][+][HOLD for payment 2023-08-17] [$1000] Web - Country suggestion does not work with head or trail space[/+]melvin-bot commentedon Aug 10, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.52-5 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-08-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.
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:
melvin-bot commentedon Aug 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:
eVoloshchak commentedon Aug 17, 2023
eVoloshchak commentedon Aug 17, 2023
Regression Test Proposal
Myanmar (Burma), Cocos (Keeling) Islands-- Verify that it worksSt. Lucia, U.S Virgin Islands-- Verify that it worksCongo - Kinshasa, Congo - Brazzaville, Timor-Leste-- Verify that it worksSt. Kitts & Nevis, St. Vincent & Grenadines-- Verify that it worksAF -> Afganistan, US -> United States, DZ -> Argeliz-- Verify that it worksDo we agree 👍 or 👎
JmillsExpensify commentedon Aug 17, 2023
Payment summary for this issue:
Upwork is here: https://www.upwork.com/jobs/~01918263d8bfff6b0e. I've extended contracts to issue reporter and contributor.
@eVoloshchak You payment has been reviewed and approved for NewDot.
huzaifa-99 commentedon Aug 17, 2023
Accepted the offer @JmillsExpensify. Thanks
JmillsExpensify commentedon Aug 17, 2023
Paid out both issue reporter and contributor. Will close this issue out once I add the regression issue and process payment in NewDot.
marcaaron commentedon Aug 29, 2023
I think one can be closed? But feel free to reopen if there's anything left to do here.