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 2023-11-02] [$500] IOU - The message "Only visible to you" does not disappear when editing details #29552

Closed
6 tasks done
lanitochka17 opened this issue Oct 13, 2023 · 18 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

@lanitochka17
Copy link

lanitochka17 commented Oct 13, 2023

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.83-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
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:

Issue found when executing PR #29961

Action Performed:

Action Performed:
Prerequisites:
For scanning, you can use a personal receipt file or download a test file here https://drive.google.com/file/d/1qz7afTHBUD-Shr0EeJ0pR0MYbbe2Euia/view?usp=drive_link

  1. Open New Expensify app
  2. Log in with the employee's login
  3. Click on the FAB button
  4. Click on 'Request Money'
  5. Choose 'Scan' and add a receipt
  6. Choose a workspace
  7. Save money request
  8. While the receipt is scanning - navigate to the request conversation
  9. Manually edit the merchant field
  10. Navigate to the report conversation

Expected Result:

The message "Only visible to you" should immediately disappear after manually editing the receipt scan details

Actual Result:

The message "Only visible to you" does not disappear when manually editing receipt scan details, or it disappears but with a long time delay
Reproduce on Desktop, Android, iOS - the message disappears within 5 to 10 minutes(Once in a while it doesn't disappear and stays.). Web, mWeb the message disappears within 5 to 10 seconds

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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Bug6235605_1697187423372.Recording__526.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~014e02465a0adc8bf8
  • Upwork Job ID: 1712974605700993024
  • Last Price Increase: 2023-10-13
  • Automatic offers:
    • aimane-chnaif | Reviewer | 27258427
    • tienifr | Contributor | 27258430
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 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

@bfitzexpensify bfitzexpensify added the External Added to denote the issue can be worked on by a contributor label Oct 13, 2023
@melvin-bot melvin-bot bot changed the title IOU - The message "Only visible to you" does not disappear when editing details [$500] IOU - The message "Only visible to you" does not disappear when editing details Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

Job added to Upwork: https://www.upwork.com/jobs/~014e02465a0adc8bf8

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

melvin-bot bot commented Oct 13, 2023

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

@tienifr
Copy link
Contributor

tienifr commented Oct 14, 2023

Proposal

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

The message "Only visible to you" does not disappear when manually editing receipt scan details, or it disappears but with a long time delay

What is the root cause of that problem?

When we create a scan money request, we'll mark the money request report action as whisper action here. When we edit the merchant field in money request, we'll stop the smart scan here. If the smart scan is stopped, the money request report action should no longer be a whisper and should be visible to other users.

However:

  1. We're not setting the optimistic data in front-end to mark the money request report action as not whisper here (we should clear the whisperedToAccountIDs field)
  2. The back-end is currently slow to update the whisperedToAccountIDs via Pusher/back-end DB, so even when we reload, sometimes the report action still remains as whisper action

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

  1. Update the optimistic data in front-end to mark the money request report action as not whisper here
    By adding here
const isScanning = TransactionUtils.hasReceipt(updatedTransaction) && TransactionUtils.isReceiptBeingScanned(updatedTransaction);

And here

...(!isScanning ? 
            [{
                onyxMethod: Onyx.METHOD.MERGE,
                key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${iouReport.reportID}`,
                value: {
                    [transactionThread.parentReportActionID]: {
                        whisperedToAccountIDs: []
                    },
                },
            },
            {
                onyxMethod: Onyx.METHOD.MERGE,
                key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${iouReport.parentReportID}`,
                value: {
                    [iouReport.parentReportActionID]: {
                        whisperedToAccountIDs: []
                    },
                },
            }
        ] : [])

We need to restore the data properly in failure data as well.

  1. Fix back-end so that it clears the whisperedToAccountIDs immediately as soon as the receipt status is marked as open, aka it's no longer scanning. So when we edit the merchant field in money request, it will update the money request report action as not whisper correctly in other devices.

What alternative solutions did you explore? (Optional)

NA

@melvin-bot melvin-bot bot added the Overdue label Oct 16, 2023
@bfitzexpensify
Copy link
Contributor

How does @tienifr's proposal look @aimane-chnaif?

@melvin-bot melvin-bot bot removed the Overdue label Oct 17, 2023
@aimane-chnaif
Copy link
Contributor

@tienifr's proposal looks good.
🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

Triggered auto assignment to @Gonals, 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 Oct 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

📣 @aimane-chnaif 🎉 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

@melvin-bot
Copy link

melvin-bot bot commented Oct 18, 2023

📣 @tienifr 🎉 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 📖

@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @tienifr got assigned: 2023-10-18 12:27:57 Z
  • when the PR got merged: 2023-10-25 14:47:22 UTC
  • days elapsed: 5

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 26, 2023
@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Oct 26, 2023
@melvin-bot melvin-bot bot changed the title [$500] IOU - The message "Only visible to you" does not disappear when editing details [HOLD for payment 2023-11-02] [$500] IOU - The message "Only visible to you" does not disappear when editing details Oct 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 26, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 26, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.91-8 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 2023-11-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:

@melvin-bot
Copy link

melvin-bot bot commented Oct 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:

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

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 2, 2023
@bfitzexpensify
Copy link
Contributor

Just noting that I'm going to consider this eligible for the #urgency bonus since the hold up was around a discussion as to whether or not we wanted to fix the back-end before fixing this.

Payments made.

@aimane-chnaif please complete the BZ checklist when you get a chance - thanks!

@aimane-chnaif
Copy link
Contributor

No regression. Just not considered when implement scan request first time.

Regression Test Proposal

  1. Go to FAB > Request money
  2. Select Scan tab and add a receipt
  3. Choose a workspace
  4. Confirm request
  5. While the receipt is scanning, navigate to transaction detail
  6. Manually edit the merchant field
  7. Navigate to the expense report
  8. Verify that whisper "Only visible to you" message no longer shows in money request preview

@melvin-bot melvin-bot bot added the Overdue label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 7, 2023

@Gonals, @bfitzexpensify, @aimane-chnaif, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick!

@bfitzexpensify
Copy link
Contributor

Regression steps look good. Proposed in https://github.com/Expensify/Expensify/issues/334069.

We're all done here, thanks everyone.

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

5 participants