Skip to content

[HOLD for payment 2024-03-19] [$500] Approving a report causes the workspace chat to “flash” in the LHN before disappearing #35309

Closed

Description

@m-natarajan

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.4.32-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: @JmillsExpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1706304456007449

Action Performed:

Make sure user A (submitter) and user B (approver) on a workspace with scheduled submit (e.g. delayed submission)
Have user A create a request via Request money
Have user A submit the report
As user B, user A’s workspace chat will show unread in the LHN
As user B, tap into user A’s report, approve it

Expected Result:

The workspace chat will flash unread, with GBR in the LHN, before disappearing shortly thereafter.

Actual Result:

The workspace chat shouldn’t flash unread in the LHN, with GBR applied

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

Recording.2662.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0175776c123c4a6522
  • Upwork Job ID: 1751945579555020800
  • Last Price Increase: 2024-01-29
  • Automatic offers:
    • situchan | Reviewer | 28142958
    • tienifr | Contributor | 28142959
Issue OwnerCurrent Issue Owner: @muttmuure

Activity

  1. added
    External
    Daily
    Bug
    on Jan 29, 2024
  2. changed the title [-]Approving a report causes the workspace chat to “flash” in the LHN before disappearing[/-] [+][$500] Approving a report causes the workspace chat to “flash” in the LHN before disappearing[/+] on Jan 29, 2024
  3. melvin-bot commented on Jan 29, 2024

    @melvin-bot
  4. melvin-bot commented on Jan 29, 2024

    @melvin-bot

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

  5. added
    Help Wanted
    on Jan 29, 2024
  6. melvin-bot commented on Jan 29, 2024

    @melvin-bot

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

  7. tienifr commented on Jan 29, 2024

    @tienifr
    Contributor

    Proposal

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

    The workspace chat shouldn’t flash unread in the LHN, with GBR applied

    What is the root cause of that problem?

    When approving a money request here, we're not setting hasOutstandingChildRequest to false optimistically if there's no more IOU to approve/pay. That's why the GBR will stick for a while until the backend response with the correct hasOutstandingChildRequest comes.

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

    Set hasOutstandingChildRequest to false optimistically if there's no more IOU to approve/pay (if there is, hasOutstandingChildRequest should be true. The condition is similar to here and we should check it for the REPORTPREVIEW actions (& corresponding iouReports) in the chat.

    If there's any other condition besides this one to determine hasOutstandingChildRequest, we should also include those conditions.

    We can restore hasOutstandingChildRequest to previous value in failureData as well.

    What alternative solutions did you explore? (Optional)

    NA

  8. situchan commented on Feb 1, 2024

    @situchan
    Contributor

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

  9. melvin-bot commented on Feb 1, 2024

    @melvin-bot

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

  10. 20 remaining items

  11. removed
    Reviewing
    on Mar 12, 2024
  12. melvin-bot commented on Mar 12, 2024

    @melvin-bot

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

  13. melvin-bot commented on Mar 12, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.50-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-03-19. 🎊

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

  14. melvin-bot commented on Mar 12, 2024

    @melvin-bot

    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:

    • [@situchan] The PR that introduced the bug has been identified. Link to the PR:
    • [@situchan] 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:
    • [@situchan] 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:
    • [@situchan] Determine if we should create a regression test for this bug.
    • [@situchan] 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.
    • [@muttmuure] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. added
    Daily
    and removed
    Weekly
    on Mar 18, 2024
  16. muttmuure commented on Mar 19, 2024

    @muttmuure
    Contributor

    @situchan @tienifr can you recommend a regression test

  17. added
    Weekly
    and removed
    Daily
    on Mar 19, 2024
  18. muttmuure commented on Mar 19, 2024

    @muttmuure
    Contributor

    Both are paid up

  19. situchan commented on Mar 19, 2024

    @situchan
    Contributor

    Regression Test Proposal

    Prerequisites: Make sure user A (submitter) and user B (approver) on a workspace with scheduled submit (e.g. delayed submission)

    1. Have user A create a request via Request money
    2. Have user A submit the report
    3. As user B, user A’s workspace chat will show unread in the LHN
    4. As user B, tap into user A’s report, approve it
    5. Verify that the green dot disappears immediately if there's no more IOU to approve/pay and that row doesn't flash in LHN
  20. muttmuure commented on Apr 3, 2024

    @muttmuure
    Contributor

    Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugExternalWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions