Repository navigation
Description
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.3.80.0
Reproducible in staging?: y
Reproducible in production?: y
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
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696929897419459
Action Performed:
- Open the app
- Click on green plus and click request money->manual
- Click on select a currency
- Search 'X' and observe that there are 2 currencies (XAF, XOF) with 'FCFA' as second term
- Search with 'FCFA' and observe that it does not display XOF in results
- Remove F from start, observe that second term of XOF has space after 'F'
- Search FCFA with space after first 'F' i.e. 'F CFA' and observe that even now, XOF is not displayed
Expected Result:
Currencies should be searchable by both formats as displayed in list
Actual Result:
XOF is not searchable using it second term i.e. the text displayed after
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
Android: Native
android.native.XOF.not.searchable.by.second.term.mp4
Android: mWeb Chrome
android.chrome.XOF.not.searchable.by.second.term.mp4
iOS: Native
ios.native.XOF.not.searchable.by.second.term.mov
iOS: mWeb Safari
ios.safari.XOF.not.searchable.by.second.term.mov
MacOS: Chrome / Safari
Recording.4935.mp4
windows.chrome.XOF.not.searchable.by.second.term.mp4
MacOS: Desktop
mac.desktop.XOF.not.searchable.by.second.term.mov
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~019305a629853b75cc
- Upwork Job ID: 1712154287463485440
- Last Price Increase: 2023-10-25
- Automatic offers:
- abdulrahuman5196 | Reviewer | 27472202
- ZhenjaHorbach | Contributor | 27472206
- dhanashree-sawant | Reporter | 27472207
Activity
[-]XOF currency not searchable by its second term[/-][+][$500] XOF currency not searchable by its second term[/+]melvin-bot commentedon Oct 11, 2023
Triggered auto assignment to @laurenreidexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 11, 2023
Job added to Upwork: https://www.upwork.com/jobs/~019305a629853b75cc
melvin-bot commentedon Oct 11, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 11, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)ZhenjaHorbach commentedon Oct 11, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
XOF is not searchable using it second term i.e. the text displayed after
What is the root cause of that problem?
The main problem is that we are looking for a currency without any formatting
And in this case, it may not be correct
But logical
Because FCFA != F CFA
What changes do you think we should make in order to solve the problem?
To fix this bug we can delete all spaces from currencyOptions and searchValue when we filter options
App/src/pages/iou/IOUCurrencySelection.js
Line 108 in f557852
We can update this line like
const filteredCurrencies = _.filter(currencyOptions, (currencyOption) => searchRegex.test(currencyOption.text.replace(/\s/g, '')) || searchRegex.test(currencyOption.currencyName.replace(/\s/g, '')));App/src/pages/iou/IOUCurrencySelection.js
Line 108 in f557852
To be sure that spaces will not interfere with our search
Plus It would also be nice to format the string that we use in the search value
For this, we can update this line like
const searchRegex = new RegExp(Str.escapeForRegExp(searchValue.replace(/\s/g, '')), 'i');App/src/pages/iou/IOUCurrencySelection.js
Line 107 in f557852
Also we can use
replaceAll(' ','')to delete all spacesWhat alternative solutions did you explore? (Optional)
NA
yh-0218 commentedon Oct 11, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
XOF currency not searchable by its second term
What is the root cause of that problem?
This is currency list issue, correctly database or third party issue.
Let's check currency text again.
What changes do you think we should make in order to solve the problem?
Option1 - update currency list to 88 79 70 32 45 32 70 32 67 70 65

Option2 - replace searchRegex.test(currencyOption.text.replace(' ', ' '))
Option3 - If we need to search without space, then replace special letter to ''
Screen.Recording.2023-10-11.at.9.07.00.PM.mov
What alternative solutions did you explore? (Optional)
Vadym-33 commentedon Oct 11, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
XOF currency not searchable by its second term
What is the root cause of that problem?
This is currency list issue
XOF - F CFA convert to ascii 88 79 70 32 45 32 70 226 128 175 67 70 65
What changes do you think we should make in order to solve the problem?
we can update like this.
App/src/pages/iou/IOUCurrencySelection.js
Line 108 in f557852
What alternative solutions did you explore? (Optional)
laurenreidexpensify commentedon Oct 13, 2023
@abdulrahuman5196 a few proposals to consider here ^^
41 remaining items
Vadym-33 commentedon Nov 2, 2023
no correct decision here.
abdulrahuman5196 commentedon Nov 3, 2023
@Vadym-33 The proposal selection reason is already provided here #29345 (comment)
When multiple proposals are similar we choose the first one.
abdulrahuman5196 commentedon Nov 17, 2023
Not a regression. Seems to be the case for this particular currency from implementation.
No. Not beneficial for this minor bug.
@laurenreidexpensify
Seems melvin didn't udpate here automatically. But seems the issue is due for payment today - #30735 (comment)
[-][$500] XOF currency not searchable by its second term[/-][+][HOLD for payment 2023-11-17][$500] XOF currency not searchable by its second term[/+]laurenreidexpensify commentedon Nov 20, 2023
Payment Summary:
Bug Reporter - $50 @dhanashree-sawant payment issued in Upwork
Contributor - $500 @ZhenjaHorbach payment issued in Upwork
C+ Review - $500 @abdulrahuman5196 payment issued in Upwork