Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.49k stars 2.85k forks source link

[HOLD for payment 2024-08-13] [HOLD for payment 2024-08-09] [$250] Expense- The number of Expense Request is not updated in the Report Conversation preview #46647

Closed izarutskaya closed 2 months ago

izarutskaya commented 2 months ago

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: 9.0.15-1 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4796963 Email or phone of affected tester (no customers): sustinov@applausemail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team

Action Performed:

  1. Open https://staging.new.expensify.com/.
  2. Log in with your HT account
  3. Create WS
  4. Navigate to the WS room
  5. Send 3 manual Expense Requests to the room

Expected Result:

When a new expense is added, the Expense Request quantity should immediately update in the Report Conversation preview

Actual Result:

The number of Expense Request is not updated in the Report Conversation preview.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

https://github.com/user-attachments/assets/7d768cd5-d1e3-465d-b341-df5eda99730e

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~015476f4ee9e9cc44e
  • Upwork Job ID: 1819064522910596934
  • Last Price Increase: 2024-08-01
Issue OwnerCurrent Issue Owner: @
Issue OwnerCurrent Issue Owner: @kevinksullivan
melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @grgia (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] commented 2 months ago

Triggered auto assignment to @kevinksullivan (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.

github-actions[bot] commented 2 months ago

:wave: 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.
izarutskaya commented 2 months ago

We think this issue might be related to the #collect project.

nyomanjyotisa commented 2 months ago

Proposal

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

The number of Expense Request is not updated in the Report Conversation preview

What is the root cause of that problem?

that the useMemo hook used to calculate the allTransactions data only depends on the iouReportID. As a result, the calculation is only triggered when the iouReportID changes, but not when the underlying transactions data changes. https://github.com/Expensify/App/blob/3666caa186f9c4530a1c57176eca601768c4953c/src/components/ReportActionItem/ReportPreview.tsx#L125

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

Include transactions in the useMemo dependency array to re-triggered whenever the transactions data changes

const allTransactions = useMemo(() => TransactionUtils.getAllReportTransactions(iouReportID), [iouReportID, transactions]);

What alternative solutions did you explore? (Optional)

chiragsalian commented 2 months ago

Removing web-e blocker label. Reasoning here.

grgia commented 2 months ago

https://github.com/Expensify/App/pull/46500

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

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

grgia commented 2 months ago

Thanks for the solution @nyomanjyotisa, I've opened a PR here because it is a deploy blocker. Can you confirm a fair pay out for solution @kevinksullivan

roryabraham commented 2 months ago

fix CP'd, requested retest: https://expensify.slack.com/archives/C9YU7BX5M/p1722540773455279

isagoico commented 2 months ago

I'm not able to reproduce in the latest version v9.0.15-9 in staging (Chrome/Web): image

melvin-bot[bot] commented 2 months ago

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

melvin-bot[bot] commented 2 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.15-9 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-09. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 2 months ago

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:

melvin-bot[bot] commented 2 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.16-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-13. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 2 months ago

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:

ishpaul777 commented 2 months ago

This is good to close not payment necessary as this was a regression