Skip to content

[HOLD for payment 2023-09-29] [HOLD for payment 2023-09-27] IOU - RHP does not disappear after sending a request money #27724

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!


Action Performed:

  1. Open https://staging.new.expensify.com/
  2. Log in with any account
  3. Click on FAB
  4. Select "Request money."
  5. Complete the creation of an IOU with a user with whom there is no history of conversation
  6. Go to the conversation with the user to whom you sent the IOU
  7. Click Action menu
  8. Select "Request money" and complete it with any amount of money

Expected Result:

The RHP should close and the user should get into a conversation with the user to whom the IOU was sent

Actual Result:

RHP does not close after the IOU is completed

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.71-5

Reproducible in staging?: Yes

Reproducible in production?: No

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6205460_Recording__336.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCash
    Daily
    Bug
    on Sep 18, 2023
  2. melvin-bot commented on Sep 18, 2023

    @melvin-bot

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

  3. melvin-bot commented on Sep 18, 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
  4. OSBotify commented on Sep 18, 2023

    @OSBotify
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open StagingDeployCash deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. melvin-bot commented on Sep 18, 2023

    @melvin-bot

    Auto-assign attempt failed, all eligible assignees are OOO.

  6. jeet-dhandha commented on Sep 19, 2023

    @jeet-dhandha
    Contributor

    Proposal

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

    • On Requesting Money the page is navigating back to Manual Request page instead of report page.

    What is the root cause of that problem?

    • Here in MoneyRequestConfirmPage.js the conditions
      • _.isEmpty(props.iou.participants)
      • props.iou.amount === 0 && !props.iou.receiptPath && !isDistanceRequest
        are getting true which in turn is calling goBack() function which is navigating back to Manual Request page instead of report page.

    if (_.isEmpty(props.iou.participants) || (props.iou.amount === 0 && !props.iou.receiptPath && !isDistanceRequest) || shouldReset) {
    Navigation.goBack(ROUTES.getMoneyRequestRoute(iouType.current, reportID.current), true);
    }

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

    • We can add a ref navigatingBack and set it true when we call requestMoney function.

    const requestMoney = useCallback(

    • And we can add a check if (!navigatingBack.current) in the conditions.
    if (!navigatingBack.current && (_.isEmpty(props.iou.participants) || (props.iou.amount === 0 && !props.iou.receiptPath && !isDistanceRequest) || shouldReset)) {
        Navigation.goBack(ROUTES.getMoneyRequestRoute(iouType.current, reportID.current), true);
    }

    What alternative solutions did you explore? (Optional)

    • N/A
  7. DylanDylann commented on Sep 19, 2023

    @DylanDylann
    Contributor

    Proposal

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

    RHP does not disappear after sending a request money

    What is the root cause of that problem?

    Let's see here

    App/src/libs/actions/IOU.js

    Lines 650 to 652 in 5150f86

    resetMoneyRequestInfo();
    Navigation.dismissModal(isMoneyRequestReport ? report.reportID : chatReport.reportID);
    Report.notifyNewAction(chatReport.reportID, payeeAccountID);

    When requesting money, we clear the field on ONYX before dismissing the modal.

    And in here

    if (_.isEmpty(props.iou.participants) || (props.iou.amount === 0 && !props.iou.receiptPath && !isDistanceRequest) || shouldReset) {

    Because we clear the field before dismissing the modal, this logic will be triggered. It causes wrong navigation.

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

    App/src/libs/actions/IOU.js

    Lines 650 to 652 in 5150f86

    resetMoneyRequestInfo();
    Navigation.dismissModal(isMoneyRequestReport ? report.reportID : chatReport.reportID);
    Report.notifyNewAction(chatReport.reportID, payeeAccountID);

    In here, we should dismiss modal before clear iou field

    if (_.isEmpty(props.iou.participants) || (props.iou.amount === 0 && !props.iou.receiptPath && !isDistanceRequest) || shouldReset) {

    And in here we should check if modal.isVisible === false we will return that useEffect like that

    useEffect(() => {
            const initialModalState = getModalState();
            if (!initialModalState.isVisible) {
                return;
            }
    
    

    What alternative solutions did you explore? (Optional)

  8. DylanDylann commented on Sep 19, 2023

    @DylanDylann
    Contributor

    @laurenreidexpensify This issue is blocking other issues that relate to IOU. Could you prioritize taking a look at this?

  9. 15 remaining items

  10. AndrewGable commented on Sep 20, 2023

    @AndrewGable
    Contributor

    The regression was introduced in #26854 and this was fixed by @aimane-chnaif in #27793

  11. added
    Weekly
    Awaiting Payment
    and removed
    Weekly
    on Sep 20, 2023
  12. changed the title [-] IOU - RHP does not disappear after sending a request money[/-] [+][HOLD for payment 2023-09-27] IOU - RHP does not disappear after sending a request money[/+] on Sep 20, 2023
  13. removed
    Reviewing
    on Sep 20, 2023
  14. melvin-bot commented on Sep 20, 2023

    @melvin-bot

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

  15. melvin-bot commented on Sep 20, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.71-12 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-09-27. 🎊

    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

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  16. melvin-bot commented on Sep 20, 2023

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

    • [@AndrewGable] The PR that introduced the bug has been identified. Link to the PR:
    • [@AndrewGable] 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:
    • [@AndrewGable] 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:
    • [@AndrewGable] Determine if we should create a regression test for this bug.
    • [@AndrewGable] 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.
    • [@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  17. added
    Weekly
    and removed
    Weekly
    on Sep 22, 2023
  18. changed the title [-][HOLD for payment 2023-09-27] IOU - RHP does not disappear after sending a request money[/-] [+][HOLD for payment 2023-09-29] [HOLD for payment 2023-09-27] IOU - RHP does not disappear after sending a request money[/+] on Sep 22, 2023
  19. melvin-bot commented on Sep 22, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.72-11 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-09-29. 🎊

    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

    As a reminder, here are the bonuses/penalties that should be applied for any External issue:

    • Merged PR within 3 business days of assignment - 50% bonus
    • Merged PR more than 9 business days after assignment - 50% penalty
  20. melvin-bot commented on Sep 22, 2023

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

    • [@AndrewGable] The PR that introduced the bug has been identified. Link to the PR:
    • [@AndrewGable] 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:
    • [@AndrewGable] 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:
    • [@AndrewGable] Determine if we should create a regression test for this bug.
    • [@AndrewGable] 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.
    • [@laurenreidexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugEngineeringWeekly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions