Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$250] Search - Expense report has transaction thread & expense previews when submitted from Search #49533

Open
3 of 6 tasks
IuliiaHerets opened this issue Sep 20, 2024 · 6 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 20, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.39-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Submit an expense to user that has no unsettled expense.
  3. Go to Search > Expenses.
  4. Click on the expense submitted in Step 2.
  5. From the report RHP, click + > Submit expense.
  6. Submit another expense.

Expected Result:

After submitting another expense from Search, app will open expense report with two expense previews.

Actual Result:

After submitting another expense from Search, app shows expense report that has transaction thread and also two expense previews.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6609873_1726832563061.20240920_193701.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021837129942878375275
  • Upwork Job ID: 1837129942878375275
  • Last Price Increase: 2024-09-20
Issue OwnerCurrent Issue Owner: @situchan
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 20, 2024
Copy link

melvin-bot bot commented Sep 20, 2024

Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-control

@IuliiaHerets
Copy link
Author

@sonialiap FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label Sep 20, 2024
@melvin-bot melvin-bot bot changed the title Search - Expense report has transaction thread & expense previews when submitted from Search [$250] Search - Expense report has transaction thread & expense previews when submitted from Search Sep 20, 2024
Copy link

melvin-bot bot commented Sep 20, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021837129942878375275

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 20, 2024
Copy link

melvin-bot bot commented Sep 20, 2024

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

@FitseTLT
Copy link
Contributor

Proposal

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

Search - Expense report has transaction thread & expense previews when submitted from Search

What is the root cause of that problem?

We are getting transactionThreadReport from prop.transactionThreadReportID here

transactionThreadReport: {
key: ({transactionThreadReportID}) => `${ONYXKEYS.COLLECTION.REPORT}${transactionThreadReportID ?? -1}`,
initialValue: {} as OnyxTypes.Report,
},

although transactionThreadReportID is properly updating to undefined on creating another expense internal bug in withOnyx doesn't allow transactionThreadReport to update so it holds its previous value and money request view will be shown along with the two request previews.

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

withOnyx is already deprecated and migrating to useOnyx solves the issue

and then get transactionThreadReport in ReportActionsView via useOnyx instead of withOnyx

        const [transactionThreadReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transactionThreadReportID ?? -1}`, {initialValue: {}});


We need to replace this with prop.transactionThreadReportID as we are using useOnyx

    if (oldProps.transactionThreadReportID !== newProps.transactionThreadReportID) {
        return false;
    }

What alternative solutions did you explore? (Optional)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: No status
Development

No branches or pull requests

4 participants