Skip to content

[Awaiting payment 2023-12-21][$500] LHN - Green dot is shown after deleting the Money request #31730

Closed

Description

@lanitochka17

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.2-0
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. Create a new workspace
  2. Go to FAB > Request Money
  3. Switch to Distance
  4. FIll the start and finish > Next
  5. Choose the newly created workspace > Request money
    Notice the green dot will appear on LHN to indicate money to be settled
  6. On the main chat in the workspace go to the IOU report
  7. Send a message (Important step)
  8. Delete the money requested.
    Notice the green dot does not disappear and there is no settle button

Expected Result:

No green dot on the LHN if there is no settle button

Actual Result:

Green dot on the LHN when there is no settle button

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

Bug6287143_1700658228992.test10_greenDot.mp4

Bug6287143_1700658228994!image

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0141106cdac1f59107
  • Upwork Job ID: 1727382476023721984
  • Last Price Increase: 2023-11-29
  • Automatic offers:
    • aimane-chnaif | Reviewer | 27989105
    • DylanDylann | Contributor | 27989107

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 22, 2023
  2. changed the title [-] LHN - Green dot is shown after deleting the Money request[/-] [+][$500] LHN - Green dot is shown after deleting the Money request[/+] on Nov 22, 2023
  3. melvin-bot commented on Nov 22, 2023

    @melvin-bot
  4. melvin-bot commented on Nov 22, 2023

    @melvin-bot

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

  5. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 22, 2023
  6. melvin-bot commented on Nov 22, 2023

    @melvin-bot

    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
  7. melvin-bot commented on Nov 22, 2023

    @melvin-bot

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

  8. DylanDylann commented on Nov 22, 2023

    @DylanDylann
    Contributor

    Proposal

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

    LHN - Green dot is shown after deleting the Money request

    What is the root cause of that problem?

    When we send a message in IOU report and then deleting the request. shouldDeleteIOUReport will be false. It caused hasOutstandingChildRequest is not updated to false. So the green dot still display

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

    We should reset hasOutstandingChildRequest to false when

    updatedReportPreviewAction.childMoneyRequestCount === 0
    

    Detail:
    IN here

    ...(shouldDeleteIOUReport

    we should add this code

    ...(updatedReportPreviewAction.childMoneyRequestCount === 0
                ? [
                      {
                          onyxMethod: Onyx.METHOD.MERGE,
                          key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport.reportID}`,
                          value: {
                              hasOutstandingIOU: false,
                              hasOutstandingChildRequest: false,
                          },
                      },
                  ]
                : []),
    

    In failure data, we also consider to reset hasOutstandingIOU and hasOutstandingChildRequest to true

    We also need to update hasOutstandingIOU and hasOutstandingChildRequest to false in BE side in this case
    More context in API: Deleting request API returns hasOutstandingIOU is true (It is incorrect) although we only use hasOutstandingChildRequest to display green dot. When go to that report, OpenReport API is called and return hasOutstandingChildRequest to true that make the green dot appear again.

    What alternative solutions did you explore? (Optional)

    We can do that by checking the amounts of the transactions

  9. kadiealexander commented on Nov 28, 2023

    @kadiealexander
    Contributor

    @aimane-chnaif any thoughts on the proposal above?

  10. 11 remaining items

  11. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Dec 6, 2023
  12. melvin-bot commented on Dec 6, 2023

    @melvin-bot

    📣 @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

  13. melvin-bot commented on Dec 6, 2023

    @melvin-bot

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

  14. added
    ReviewingHas a PR in review
    and removed on Dec 8, 2023
  15. changed the title [-][$500] LHN - Green dot is shown after deleting the Money request[/-] [+][Awaiting payment 2023-12-21][$500] LHN - Green dot is shown after deleting the Money request[/+] on Dec 20, 2023
  16. kadiealexander commented on Dec 20, 2023

    @kadiealexander
    Contributor

    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.
    • [@kadiealexander] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. kadiealexander commented on Dec 20, 2023

    @kadiealexander
    Contributor

    Payouts due:

    Upwork job is here.

  18. aimane-chnaif commented on Dec 20, 2023

    @aimane-chnaif
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: N/A This case was missed when implement delete money request
    • 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: N/A
    • 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: N/A
    • Determine if we should create a regression test for this bug. N/A as caught by 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions