-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[Hold #31411] [$500] Scan - None not displayed in merchant while offline & after adding amount & going online #32552
Comments
Triggered auto assignment to @trjExpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~015c62fdfd300d1084 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Merchant is not set to What is the root cause of that problem?We do not set the What changes do you think we should make in order to solve the problem?When creating an optimistic transaction, we should check if it's a scan transaction, and if so – set "none" instead of the default "Request" in the merchant (using constants and polishing the code a bit, but the idea is understandable): merchant: merchant || (!!receipt?.state ? '(none)' : CONST.TRANSACTION.DEFAULT_MERCHANT), App/src/libs/TransactionUtils.ts Line 69 in 030cfe1
Note: There is another issue happening – the optimistic transaction report gets replaced when coming back online, which leads to an error if the request created online optimistically is opened when coming back online. It will be fixed in #31411 – asked and got a confirmation here. Therefore, we may want to hold this issue until that one is done. What alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
It's to fix this issue #28380 where BE response will return Request if the merchant is empty, so we align the optimistic data with the BE response. But now, the BE response return (none) if the merchant sent to the API is empty.
However, as we optimistically set the merchant to Request, the error won't show. What changes do you think we should make in order to solve the problem?The merchant will detect (none) as an empty merchant, so my suggestion is to make sure whether it's expected that the BE now returns (none) for an empty merchant or it should be Request like in #29118. If it's expected that it now returns (none), we can revert #29118 and adjust the code a little bit by replacing the empty string with (none). -const defaultMerchant = !receipt || Object.keys(receipt).length === 0 ? CONST.TRANSACTION.DEFAULT_MERCHANT : '';
+const defaultMerchant = !receipt || Object.keys(receipt).length === 0 ? CONST.TRANSACTION.DEFAULT_MERCHANT : CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT;
merchant: merchant || defaultMerchant, |
@mountiny given the changes you're making, is this issue going to be obsolete? |
I am not 100% sure, this Pr is handling the manual requests only not the scan case #32222 I think the solutions from @paultsimura and @bernhardoj are valid for this problem |
I replied in the linked issue, but sharing here for visibility: we're in the process of updating the RequestMoney end point to accept and use the new parameters transactionThreadReportID and createdReportActionIDForThread. If this is the only cause of the issue, I suggest adding a hold until that's done |
It's not the root cause, but it's causing some trouble with testing the offline-online transition. The issue will still require fixing and the proposals are relevant. |
Cool, so do we want to hold and ask for proposals after that or continue with soliciting proposals in the meantime and then hold the imp on that? |
I think we can hold for the changes linked above and then check if the issue is still the same and choose proposals. |
Cool, done! |
Still held. |
Still held on #31411 |
No change, Melvy boy! |
Still held on #31411. |
Still held, PR should be coming soon! |
No change! |
@trjExpensify Yes that's right. |
Sounds good! |
@trjExpensify The PR was deployed to staging.
@trjExpensify For the expected result, could you please verify it ? why the red dot should be shown when we change the amount in offline mode while the request is scanning? |
I don't think this is a valid bug anymore.
Going to close it out! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Found when executing PR: #31897
Version Number: 1.4.8-1
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:
"None" is displayed in the Merchant field while offline and after adding amount and going online, the red dot is shown
Actual Result:
"Request" is displayed in the Merchant field offline and after adding the amount and returning online, the red dot is not shown unlike in the online flow.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6302703_1701837443776.video_2023-12-05_23-28-40.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: