Skip to content

[$500] IOU - IOU report is duplicated in LHN after emptying Merchant field and saving it #26205

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. Go to staging.new.expensify.com
  2. Request money from another use
  3. Click on IOU preview two times to enter detail page
  4. Click on the merchant
  5. Empty the merchant and click Save

Expected Result:

IOU report is not duplicated in LHN

Actual Result:

IOU report is now duplicated in LHN. The duplicate disappears after the page is refreshed

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.58-1

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

20230829_124323.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a14404ef51543e9e
  • Upwork Job ID: 1697289310359842816
  • Last Price Increase: 2023-09-07

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 @garrettmknight (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. StevenKKC commented on Aug 29, 2023

    @StevenKKC
    Contributor

    Proposal

    Please state again the problem we are trying to solve in this issue.

    IOU report is duplicated in LHN after emptying Merchant field and saving it.

    What is the cause of this issue?

    After emptying merchant field and saving it, BE returns error as below.
    Screenshot 2023-08-29 151043

    So the following failureData is merged.

    App/src/libs/actions/IOU.js

    Lines 1020 to 1038 in 766dd65

    const failureData = [
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${transactionThread.reportID}`,
    value: {
    [updatedReportAction.reportActionID]: updatedReportAction,
    },
    },
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`,
    value: transaction,
    },
    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.report}`,
    value: iouReport,
    },
    ];

    But iouReport.report is undefined (this should be a typo), so report_undefined will be merged into Onyx.
    Because report_undefined's content is just same with iouReport, so this will be displayed in LHN.
    Therefore, IOU report is duplicated.

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

    Merchant field should not be empty and this is fixed by #26373.
    We only need to change iouReport.report to iouReport.reportID in this line.

    What alternative solutions have you investigated? (Optional)

    None.

  5. garrettmknight commented on Aug 31, 2023

    @garrettmknight
    Contributor

    Might be related to #24608 (comment)

  6. luacmartins commented on Aug 31, 2023

    @luacmartins
    Contributor

    I don't think this issue is related to #24608 (comment)

  7. garrettmknight commented on Aug 31, 2023

    @garrettmknight
    Contributor

    Cool, reproduced and I'll open it up!

  8. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Aug 31, 2023
  9. changed the title [-]IOU - IOU report is duplicated in LHN after emptying Merchant field and saving it[/-] [+][$500] IOU - IOU report is duplicated in LHN after emptying Merchant field and saving it[/+] on Aug 31, 2023
  10. melvin-bot commented on Aug 31, 2023

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

    @melvin-bot

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

  13. 29 remaining items

  14. garrettmknight commented on Oct 11, 2023

    @garrettmknight
    Contributor

    @StevenKKC / @jjcoffee sorry for the wait on this one, slipped through the cracks with the 'Reviewing' label on it. Since this was such a small change, I'm going to forgo the urgency bonus.

    Summarizing payments for this issue:

    Upwork job: https://www.upwork.com/en-gb/ab/applicants/1697289310359842816/job-details

  15. garrettmknight commented on Oct 11, 2023

    @garrettmknight
    Contributor

    @StevenKKC Going to move this to monthly while your Upwork account gets sorted out. Ping me when it does and I'll complete payment.

  16. StevenKKC commented on Oct 12, 2023

    @StevenKKC
    Contributor

    @garrettmknight I am afraid to let you know that My Upwork account is suspended so I couldn't get paid with my account. May I send proposal with my friend's account?

  17. melvin-bot commented on Oct 25, 2023

    @melvin-bot

    @puneetlath, @garrettmknight, @jjcoffee, @StevenKKC Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  18. garrettmknight commented on Oct 25, 2023

    @garrettmknight
    Contributor

    Hey @StevenKKC we're only able to pay through your account since it's verified by Upwork. Once you've got your Upwork account working again I'll pay.

  19. melvin-bot commented on Dec 22, 2023

    @melvin-bot

    @puneetlath, @garrettmknight, @jjcoffee, @StevenKKC, this Monthly task hasn't been acted upon in 6 weeks; closing.

    If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

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.MonthlyKSv2Not a priorityReviewingHas a PR in review

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions