Skip to content
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 for payment 2024-01-02] [$500] mWeb - Expense - Red dot in preview does not disappear after filling in Amount and Merchant manually #32256

Closed
1 of 6 tasks
izarutskaya opened this issue Nov 30, 2023 · 26 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Nov 30, 2023

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: v1.4.5-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:

  1. Navigate to staging.new.expensify.com
  2. Go to workspace chat > + > Request money > Scan.
  3. Create a scan request with a receipt that will fail smartscanning.
  4. Open expense report page while waiting for scanning to fail. (Can switch between expense report and request details page to check if it has failed).
  5. When the scanning fails, go to expense details page.
  6. Manually enter Amount and Merchant.
  7. Tap on the back button on the top right twice to return to workspace chat.

Expected Result:

The red dot on the expense preview in the main workspace chat will disappear because amount and merchant are filled manually.

Actual Result:

The red dot on the expense preview in the main workspace chat does not disappear unless the workspace chat is refreshed or revisited.

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

Bug6295530_1701322572303.Screen_Recording_20231130_121752_Chrome.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0175e10e5dd361820c
  • Upwork Job ID: 1730195296934002688
  • Last Price Increase: 2023-11-30
  • Automatic offers:
    • hoangzinh | Reviewer | 27959389
    • dukenv0307 | Contributor | 27959390
@izarutskaya izarutskaya added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 30, 2023
Copy link

melvin-bot bot commented Nov 30, 2023

Triggered auto assignment to @alexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Copy link

melvin-bot bot commented Nov 30, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0175e10e5dd361820c

@melvin-bot melvin-bot bot changed the title mWeb - Expense - Red dot in preview does not disappear after filling in Amount and Merchant manually [$500] mWeb - Expense - Red dot in preview does not disappear after filling in Amount and Merchant manually Nov 30, 2023
Copy link

melvin-bot bot commented Nov 30, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 30, 2023
Copy link

melvin-bot bot commented Nov 30, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (External)

@dukenv0307
Copy link
Contributor

dukenv0307 commented Nov 30, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

Red dot in preview does not disappear after filling in Amount and Merchant manually

What is the root cause of that problem?

When we go back to the chat report page, ReportPreview doesn't re-render because we don't subscribe transaction from Onyx

We only use iouReportID to get all transactions in hasMissingSmartscanFields to check the error.

const hasErrors = hasReceipts && ReportUtils.hasMissingSmartscanFields(props.iouReportID);

What changes do you think we should make in order to solve the problem?

In ReportPreview, we should subscribe transactions from Onyx and we can use selector to get the necessary field like error field and others

transactions: {
    key: ONYXKEYS.COLLECTION.TRANSACTION
}

We can also use memo to only re-render this component when the transactions of IOUReport of this preview are changed.

What alternative solutions did you explore? (Optional)

Screen.Recording.2023-11-30.at.19.42.56.mov

@hoangzinh
Copy link
Contributor

@dukenv0307 @alexpensify I tried to reproduce the bug, but I couldn't see any red dot after manually updating request amount + merchant.

Screen.Recording.2023-12-01.at.23.36.17.mov

I even watched the recording in GH description, but couldn't see any red dot after manually updating. Is there anything that I missed?

@dukenv0307
Copy link
Contributor

@hoangzinh You should open chat report > iou report > transaction report.

Change merchant, amount.

Back to chat report you will see the red dot in report preview doesn't disappear.

@hoangzinh
Copy link
Contributor

hoangzinh commented Dec 4, 2023

@dukenv0307 Thanks for your hints. I can reproduce the bug now. Your proposal looks good to me. You pointed out the correct root cause. And the overall solution makes sense. But I suggest we can apply onyxSubscribe technique here to subscribe to transaction's changes and recalculate ReportUtils.hasMissingSmartscanFields, therefore we don't need to load a whole transactions to each ReportPreview component and don't need to use memo.

Link to proposal #32256 (comment)

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 4, 2023

Triggered auto assignment to @jasperhuangg, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 4, 2023
Copy link

melvin-bot bot commented Dec 4, 2023

📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Dec 4, 2023

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@jasperhuangg
Copy link
Contributor

Thanks for the proposal! @dukenv0307 seems straightforward, nice job!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Dec 5, 2023
@dukenv0307
Copy link
Contributor

@hoangzinh The PR is ready for review.

@alexpensify
Copy link
Contributor

Daily Update: The PR is in the review process!

@alexpensify
Copy link
Contributor

Daily Update: The PR is moving along

@alexpensify
Copy link
Contributor

The PR is still under review.

Copy link

melvin-bot bot commented Dec 22, 2023

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@rlinoz
Copy link
Contributor

rlinoz commented Dec 22, 2023

https://github.com/Expensify/App/pull/32469/files#diff-90dbf92cac79a4d1c6199362686c19700554305c62fbbeadcaa509c3abe7e5a9R219

Missed passing props.action to areAllRequestsBeingSmartScanned

@alexpensify
Copy link
Contributor

Heads up, I will be offline from Friday, December 22, to Thursday, January 4, 2024. I will not be actively watching over this GitHub during that period. If anything urgent is needed here, please ask for help in the #expensify-open-source Slack Room-- thanks!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 26, 2023
@melvin-bot melvin-bot bot changed the title [$500] mWeb - Expense - Red dot in preview does not disappear after filling in Amount and Merchant manually [HOLD for payment 2024-01-02] [$500] mWeb - Expense - Red dot in preview does not disappear after filling in Amount and Merchant manually Dec 26, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 26, 2023
Copy link

melvin-bot bot commented Dec 26, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Dec 26, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.16-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 2024-01-02. 🎊

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:

Copy link

melvin-bot bot commented Dec 26, 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:

  • [@hoangzinh] The PR that introduced the bug has been identified. Link to the PR:
  • [@hoangzinh] 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:
  • [@hoangzinh] 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:
  • [@hoangzinh] Determine if we should create a regression test for this bug.
  • [@hoangzinh] 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.
  • [@alexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@hoangzinh
Copy link
Contributor

Regression Test Proposal

  1. Go to any Chat report
  2. Tap the Plus icon
  3. Tap Request money
  4. Tap Scan
  5. Upload an invalid receipt image
  6. Wait until the scan is complete
  7. Go to the transaction thread report of this scan request
  8. Update the amount of the request
  9. Update the merchant of the request
  10. Tap the Back button (left-arrow icon on small screen device or Device's back button) to go back to the IOU report
  11. Tap the Back button again to back to the Chat report
  12. Verify that the red dot in report preview disappears

Do we agree 👍 or 👎

@hoangzinh
Copy link
Contributor

BugZero Checklist:

@alexpensify
Copy link
Contributor

Here is the payment summary:

  • External issue reporter - N/A
  • Contributor that fixed the issue - @dukenv0307
  • Contributor+ that helped on the issue and/or PR - @hoangzinh

Upwork Job: https://www.upwork.com/jobs/~0175e10e5dd361820c

Extra Notes regarding payment: Heads up, I'm OOO until January 4, but I will log in on Wednesday, January 3, to complete this payment process pending no regression. I've confirmed that everyone here is a pending hire, so all set here for the payment date.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 Daily KSv2 labels Jan 1, 2024
@alexpensify
Copy link
Contributor

Closing - everyone has been paid via Upwork and I closed the job there. The only remaining action is to add the regression test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants