-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$500] Scan - Unknown Merchant is shown instead of error when leaving scanning to fail in details page #34438
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01f64fe18fc04bd638 |
Triggered auto assignment to @abekkala ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.When the scanning fails, it shows "Unknown Merchant" in Merchant field. What is the root cause of that problem?In this case, The BE return "Unknown Merchant"
so the isEmptyMerchant is false What changes do you think we should make in order to solve the problem?
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 What alternative solutions did you explore? (Optional) |
ProposalPlease 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. function isEmptyMerchant(transaction: Transaction) {
return transaction.merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT || transaction.merchant === CONST.TRANSACTION.UNKNOWN_MERCHANT || transaction.merchant === ''
} What alternative solutions did you explore? (Optional)We can also just add the unknown merchant check in the existing condition. Eg: const isEmptyMerchant = transactionMerchant === '' || transactionMerchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT || transactionMerchant === CONST.TRANSACTION.UNKNOWN_MERCHANT; |
@kbecciv @abekkala, I need help understanding the expected result more. This PR #26155 shows the Should we empty the input while showing the error or keep the Another issue with the money request preview is that it briefly shows the |
This is expected with the SmartScan feature |
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: 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:
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?
Screenshots/Videos
Add any screenshot/video evidence
Bug6340066_1705060282853.bandicam_2024-01-12_02-30-06-211__1_.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: