Skip to content

[HOLD for payment 2023-09-27] [$1000] Link Request Money not work #26214

Closed

Description

@izarutskaya

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. Sign in on browser as User A
  2. Create a chat with multiple users
  3. Click the "+" green button icon in the chat and select Split Bill
  4. Copy the URL in the browser (should be https://staging.new.expensify.com/split/new) and send it to the user B
  5. Login on browser as User B -> go to chat User A
  6. Click on the link of Request Money user A just sent
  7. Enter the amount and press Next
  8. Notice the Amount page loads again

Expected Result:

Navigate to confirm the requested amount

Actual Result:

The screen to enter the amount of the Split Bill is displayed again

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: v1.3.57-5

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

Notes/Photos/Videos: Any additional supporting documentation

2023-08-26.21-12-00.mp4
Bug1.mp4
bandicam.2023-08-29.01-19-43-102.mp4

Expensify/Expensify Issue URL:

Issue reported by: @le Thi Thu Thuy

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692093712051379

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01354f2b491ad407b0
  • Upwork Job ID: 1696603285025492992
  • Last Price Increase: 2023-09-05
  • Automatic offers:
    • akamefi202 | Contributor | 26512355

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 29, 2023
  2. melvin-bot commented on Aug 29, 2023

    @melvin-bot

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

  3. melvin-bot commented on Aug 29, 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. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 29, 2023
  5. changed the title [-]Link Request Money not work[/-] [+][$1000] Link Request Money not work[/+] on Aug 29, 2023
  6. melvin-bot commented on Aug 29, 2023

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Aug 29, 2023
  8. melvin-bot commented on Aug 29, 2023

    @melvin-bot

    Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new.

  9. melvin-bot commented on Aug 29, 2023

    @melvin-bot

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

  10. akamefi202 commented on Aug 29, 2023

    @akamefi202
    Contributor

    Proposal

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

    Request money link(Manual) does not work. It opens "Manual" tab of "Money Request" page again if the user clicks "Next" button.
    https://staging.new.expensify.com/request/new/manual

    What is the root cause of that problem?

    If the user opens "Manual" tab of "Request Money" page from FAB, it will call resetMoneyRequestInfo function.

    App/src/libs/actions/IOU.js

    Lines 1760 to 1763 in cb98bec

    function startMoneyRequest(iouType, reportID = '') {
    resetMoneyRequestInfo(`${iouType}${reportID}`);
    Navigation.navigate(ROUTES.getMoneyRequestRoute(iouType, reportID));
    }

    But if the user opens the tab from link, it won't call that function. The tab will be opened directly.
    So Onyx data won't be initialized.

    if ((props.iou.amount === 0 && !props.iou.receiptPath) || shouldReset) {
    navigateBack(true);
    }

    Then if the user clicks "Next" button, the app opens Participants page.
    But it goes back to "Request Money" page immediately because of missing initialization of data.
    As a result, the user will see "Manual" tab again.

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

    const moneyRequestID = `${iouType}${reportID}`;
    const shouldReset = iou.id !== moneyRequestID;
    if (shouldReset) {
    IOU.resetMoneyRequestInfo(moneyRequestID);
    }

    I think we need to call resetMoneyRequestInfo function in the mounting of NewRequestAmountPage component.
    So the function will be called when the user opens "Manual" tab of "Request Money" page from the link and it will initialize Onyx data.

    What alternative solutions did you explore? (Optional)

    N/A

  11. bernhardoj commented on Sep 1, 2023

    @bernhardoj
    Contributor

    Pressing the Next button will initialize the data if needed, however, I see there are 2 issues here. To fix both issues, we need to confirm a few things.

    1. The Onyx update is late.
      Pressing the Next button will save the amount to the Onyx, but we already navigated to the participant page before the amount is saved.

      const navigateToNextPage = (currentAmount) => {
      const amountInSmallestCurrencyUnits = CurrencyUtils.convertToBackendAmount(Number.parseFloat(currentAmount));
      IOU.setMoneyRequestAmount(amountInSmallestCurrencyUnits);
      IOU.setMoneyRequestCurrency(currency);

      We don't want the user to skip inputting the amount, so we navigate them back.
      if ((props.iou.amount === 0 && !props.iou.receiptPath) || shouldReset) {
      navigateBack(true);
      }

      We previously had this kind of issue after updating the Onyx version and it was fixed by waiting for the Onyx merge to be completed, but looks like the solution gets reverted(?). Is there any specific reason behind the revert? @hannojg

    2. Pressing Next clears the data

      App/src/libs/actions/IOU.js

      Lines 1836 to 1844 in 5db2445

      function navigateToNextPage(iou, iouType, reportID, report) {
      const moneyRequestID = `${iouType}${reportID}`;
      const shouldReset = iou.id !== moneyRequestID;
      // If the money request ID in Onyx does not match the ID from params, we want to start a new request
      // with the ID from params. We need to clear the participants in case the new request is initiated from FAB.
      if (shouldReset) {
      resetMoneyRequestInfo(moneyRequestID);
      }

      If the ID in Onyx is not the same as the current ID, we reset the data. In our case, we didn't have any ID yet in the Onyx, so shouldReset is true. The problem here is that, if shouldReset is true we shouldn't reset all the data but only the participants and description (because pressing Next also saves the amount and the currency, resetting them will clear both). Here is how the previous code looks like.
      Fortunately, we have a plan to remove the money request reset logic. @hayata-suenaga can you confirm if we are still going with the plan? If yes, then we can just focus on the first issue above.

  12. 71 remaining items

  13. Christinadobrzyn commented on Oct 23, 2023

    @Christinadobrzyn
    Contributor

    Talking this over with @mallenexpensify I requested a refund from @akamefi202 for $750 since the final amount that should have been paid was $250 and they were paid $1000.

  14. akamefi202 commented on Oct 23, 2023

    @akamefi202
    Contributor

    @Christinadobrzyn I will do refund once I paid. It's very soon.

  15. mallenexpensify commented on Oct 23, 2023

    @mallenexpensify
    Contributor
  16. Christinadobrzyn commented on Oct 24, 2023

    @Christinadobrzyn
    Contributor

    okay monitoring the Upwork job for details about the refund - https://www.upwork.com/nx/wm/workroom/34742476/details

  17. mallenexpensify commented on Oct 25, 2023

    @mallenexpensify
    Contributor

    I paid the other issue, please leave this open til the refund here is processed, thx

  18. Christinadobrzyn commented on Oct 28, 2023

    @Christinadobrzyn
    Contributor

    @akamefi202 can you let me know when you've issued the refund? Thanks!

  19. akamefi202 commented on Oct 28, 2023

    @akamefi202
    Contributor

    @Christinadobrzyn I will do refund on Monday next week.

  20. mallenexpensify commented on Nov 3, 2023

    @mallenexpensify
    Contributor

    @akamefi202 can you please confirm the refund? it doesn't look like we've received yet. Thanks.
    image

  21. akamefi202 commented on Nov 6, 2023

    @akamefi202
    Contributor

    @Christinadobrzyn @mallenexpensify Sorry for late reply. I was OOO last week. I made the refund and I think we might close this issue now.

  22. mallenexpensify commented on Nov 6, 2023

    @mallenexpensify
    Contributor

    Thanks @akamefi202 , confirming job was refunded.
    image

    Pretty sure we're good to close this.

  23. akamefi202 commented on Nov 6, 2023

    @akamefi202
    Contributor

    @mallenexpensify @Christinadobrzyn Could you please finish the contract on Upwork too?

  24. Christinadobrzyn commented on Nov 6, 2023

    @Christinadobrzyn
    Contributor

    Thanks @mallenexpensify and @akamefi202 - I closed the contract in Upwork.

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething 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