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
[$500] Scan - Unknown Merchant is shown instead of error when leaving scanning to fail in details page #34438
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Version Number: 1.4.24-7 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: Applause - Internal Team Slack conversation:
Action Performed:
Go to workspace chat.
Create a scan request with receipt that will fail the scanning.
Go to details page while it is still scanning.
Wait for it to fail.
Expected Result:
When the scanning fails, "Enter a merchant name" message will appear on Merchant row.
Actual Result:
When the scanning fails, it shows "Unknown Merchant" in Merchant field.
When user returns to the report and back to details page, "Unknown Merchant" disappears and it is replaced with "Enter a merchant name" message.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Scan - Unknown Merchant is shown instead of error when leaving scanning to fail in details page[/-][+][$500] Scan - Unknown Merchant is shown instead of error when leaving scanning to fail in details page[/+]on Jan 12, 2024
Please re-state the problem that we are trying to solve in this issue.
When the scanning fails, it shows "Unknown Merchant" in Merchant field.
When user returns to the report and back to details page, "Unknown Merchant" disappears and it is replaced with "Enter a merchant name" message.
What is the root cause of that problem?
In this case, The BE return "Unknown Merchant"
But in here don't check is transactionMerchant is "Unknown Merchant"
Please re-state the problem that we are trying to solve in this issue.
If the user is on the details page of a scan request and the scanning fails, then it shows UNKOWN MERCHANT instead of the usual error message i.e Enter a merchant name. If the user goes back and then opens the details page again, then he can see the appropriate error message.
What is the root cause of that problem?
If the scanning fails, merchant is returned as Unknown Merchant and in the MoneyRequestView.js file there is no check for that particular value.
What changes do you think we should make in order to solve the problem?
Create a new function in TransactionUtils.ts file that checks if the merchant is empty, (none) or unknown and use it in line 141 of MoneyRequestView.js file.
@kbecciv@abekkala, I need help understanding the expected result more. This PR #26155 shows the Unknown Merchant value in Merchant input and the red dot error.
Should we empty the input while showing the error or keep the Unknown Merchant value?
Another issue with the money request preview is that it briefly shows the Unknown Merchant value.
BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors
Activity
[-]Scan - Unknown Merchant is shown instead of error when leaving scanning to fail in details page[/-][+][$500] Scan - Unknown Merchant is shown instead of error when leaving scanning to fail in details page[/+]melvin-bot commentedon Jan 12, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01f64fe18fc04bd638
melvin-bot commentedon Jan 12, 2024
Triggered auto assignment to @abekkala (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 12, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr (
External)DylanDylann commentedon Jan 12, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
When the scanning fails, it shows "Unknown Merchant" in Merchant field.
When user returns to the report and back to details page, "Unknown Merchant" disappears and it is replaced with "Enter a merchant name" message.
What is the root cause of that problem?
In this case, The BE return "Unknown Merchant"
But in here don't check is transactionMerchant is "Unknown Merchant"
App/src/components/ReportActionItem/MoneyRequestView.js
Line 141 in 964548a
so the isEmptyMerchant is false
What changes do you think we should make in order to solve the problem?
App/src/components/ReportActionItem/MoneyRequestView.js
Line 141 in 964548a
we should return isEmptyMerchant is true if transactionMerchant is "Unknown Merchant"
Optional:
App/src/libs/TransactionUtils.ts
Lines 142 to 143 in 964548a
We also should update here by adding the condition to check
|| transactionMerchant === CONST.TRANSACTION.UNKNOWN_MERCHANT;What alternative solutions did you explore? (Optional)
Shubham1429 commentedon Jan 12, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
If the user is on the details page of a scan request and the scanning fails, then it shows UNKOWN MERCHANT instead of the usual error message i.e Enter a merchant name. If the user goes back and then opens the details page again, then he can see the appropriate error message.
What is the root cause of that problem?
If the scanning fails, merchant is returned as Unknown Merchant and in the MoneyRequestView.js file there is no check for that particular value.
App/src/components/ReportActionItem/MoneyRequestView.js
Line 141 in 964548a
What changes do you think we should make in order to solve the problem?
Create a new function in TransactionUtils.ts file that checks if the merchant is empty, (none) or unknown and use it in line 141 of MoneyRequestView.js file.
What alternative solutions did you explore? (Optional)
We can also just add the unknown merchant check in the existing condition.
Eg:
mollfpr commentedon Jan 12, 2024
@kbecciv @abekkala, I need help understanding the expected result more. This PR #26155 shows the
Unknown Merchantvalue in Merchant input and the red dot error.Should we empty the input while showing the error or keep the
Unknown Merchantvalue?Another issue with the money request preview is that it briefly shows the
Unknown Merchantvalue.melvin-bot commentedon Jan 15, 2024
@abekkala, @mollfpr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
abekkala commentedon Jan 17, 2024
This is expected with the SmartScan feature