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-25] [$500] [Wave 6: Workspace Chats] IOU - Chat with IOU shows "This is beginning" in LHN after login and no Pay elsewhere in IOU preview #32658

Closed
6 tasks done
lanitochka17 opened this issue Dec 7, 2023 · 84 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 7, 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: 1.4.9-2
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:

Precondition: User has received IOU request

  1. Log out
  2. Log in
  3. Open the chat with IOU request

Expected Result:

The chat preview in LHN will show the latest IOU action
After opening the chat, the IOU preview shows Pay elsewhere

Actual Result:

The chat preview in LHN shows "This is the beginning of" instead of the latest IOU action
After opening the chat, the IOU preview does not show Pay elsewhere unless the IOU report is visited and user returns to the main chat

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

Add any screenshot/video evidence

Bug6304418_1701953266666.20231207_160647.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ff0e7b70f9f8b4d4
  • Upwork Job ID: 1732753199542329344
  • Last Price Increase: 2023-12-07
  • Automatic offers:
    • cubuspl42 | Reviewer | 28080970
    • paultsimura | Contributor | 28080971
@lanitochka17 lanitochka17 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 Dec 7, 2023
@melvin-bot melvin-bot bot changed the title IOU - Chat with IOU shows "This is beginning" in LHN after login and no Pay elsewhere in IOU preview [$500] IOU - Chat with IOU shows "This is beginning" in LHN after login and no Pay elsewhere in IOU preview Dec 7, 2023
Copy link

melvin-bot bot commented Dec 7, 2023

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

Copy link

melvin-bot bot commented Dec 7, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01ff0e7b70f9f8b4d4

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

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

Copy link

melvin-bot bot commented Dec 7, 2023

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

@paultsimura
Copy link
Contributor

paultsimura commented Dec 7, 2023

Proposal

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

After login, the report previews. are displayed incorrectly.

What is the root cause of that problem?

This seems like a BE issue: on the OpenApp request, only chat reports are loaded. As a result, the ReportPreview actions show invalid data, since the IOU Reports are absent from Onyx.
This might be a side-effect of #29593

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

This should be fixed on the BE side by either loading all the accessible reports on OpenApp, or by modifying the OpenReport API response to return not only the requested report but also all the associated IOU Reports (or even all the child reports).

To fix this solely on the FE side, we can add an OpenReport call on the ReportPreview actions if the IOU reports are missing. This will fetch the report from BE once the report action is mounted:

    useEffect(() => {
        if (lodashHas(props.iouReport, 'reportID')) {
            return;
        }

        Report.openReport(props.iouReportID);
    }, []);

What alternative solutions did you explore? (Optional)

@cubuspl42
Copy link
Contributor

@paultsimura Thank you for investigating this!

🎀 👀 🎀

Copy link

melvin-bot bot commented Dec 8, 2023

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

@cubuspl42
Copy link
Contributor

@thienlnam Would you give it a look?

@thienlnam thienlnam added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Dec 8, 2023
Copy link

melvin-bot bot commented Dec 8, 2023

Current assignee @cubuspl42 is eligible for the Internal assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added the Overdue label Dec 11, 2023
@trjExpensify
Copy link
Contributor

CC: @puneetlath @rezkiy37 @situchan as well for the hunch it might be related to #29593

@melvin-bot melvin-bot bot removed the Overdue label Dec 11, 2023
@rezkiy37
Copy link
Contributor

CC: @puneetlath @rezkiy37 @situchan as well for the hunch it might be related to #29593

AFAIK, we didn't touch policy expense report chats.

@trjExpensify
Copy link
Contributor

This looks like it's a preview of an iouReport inside a DM. Not a preview of an expenseReport inside a policyExpenseChat (A.K.A "workspace chat").

@puneetlath
Copy link
Contributor

Adding this to the wave6 project as critical so that someone can investigate. cc @greg-schroeder

@greg-schroeder greg-schroeder changed the title [$500] IOU - Chat with IOU shows "This is beginning" in LHN after login and no Pay elsewhere in IOU preview [$500] [Wave 6: Workspace Chats] IOU - Chat with IOU shows "This is beginning" in LHN after login and no Pay elsewhere in IOU preview Dec 12, 2023
Copy link

melvin-bot bot commented Jan 11, 2024

@cubuspl42, @yuwenmemon, @paultsimura, @trjExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@paultsimura

This comment was marked as resolved.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Overdue Daily KSv2 labels Jan 11, 2024
@paultsimura
Copy link
Contributor

Thanks. The PR is ready for review: #33981

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 18, 2024
@melvin-bot melvin-bot bot changed the title [$500] [Wave 6: Workspace Chats] IOU - Chat with IOU shows "This is beginning" in LHN after login and no Pay elsewhere in IOU preview [HOLD for payment 2024-01-25] [$500] [Wave 6: Workspace Chats] IOU - Chat with IOU shows "This is beginning" in LHN after login and no Pay elsewhere in IOU preview Jan 18, 2024
Copy link

melvin-bot bot commented Jan 18, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 18, 2024
Copy link

melvin-bot bot commented Jan 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.26-2 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-25. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jan 18, 2024

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:

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

@trjExpensify
Copy link
Contributor

👋 checklist time ahead of tomorrow!

@cubuspl42
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR:
  • 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:
  • 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:
    • No need for additional discussion
  • Determine if we should create a regression test for this bug.
    • Up to the QA team
  • 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.
    • Ensure that you have a 1:1 chat report where an IOU Preview is the last action
    • Log out
    • Log in
    • Verify that the summary text in the LHN for the mentioned report is "{userDisplayName} owes {amount}"

@cubuspl42
Copy link
Contributor

cubuspl42 commented Jan 25, 2024

@paultsimura believe that the "QA Steps" in your PR weren't up-to-date when we merged. My oversight. What do you think of the steps I suggested above?

@paultsimura
Copy link
Contributor

"QA Steps" in your PR weren't up-to-date when we merged

@cubuspl42 I was working on the PR for this issue. Are we talking about this one, or there's another? 🤔

@cubuspl42
Copy link
Contributor

Sorry, I had Bernard's PR open in another tab and I confused usernames

@paultsimura
Copy link
Contributor

Log out
Log in
Open a chat with an IOU Report (but don't open the IOU Report itself).
Verify that the report shows a correct message of "{user} owes {amount}" format in LHN

These are the steps from my PR. It's pretty similar to the ones you've added IMO. Would you prefer me to change it anyway?

@cubuspl42
Copy link
Contributor

cubuspl42 commented Jan 25, 2024

I'm just confirming that the latest are correct. In the one you quoted, we don't focus on the fact that IOU has to be the last item in the chat log. But I guess that updating the QA Steps on the PR wouldn't hurt 🤷‍♂️

@paultsimura
Copy link
Contributor

paultsimura commented Jan 25, 2024

Oh, I missed that, thanks. Updated now.

@trjExpensify
Copy link
Contributor

Confirming payments as follows:

@trjExpensify
Copy link
Contributor

Settled up!

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. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
No open projects
Development

No branches or pull requests