Skip to content

[$250] Expense - Attendee row appears after merging from Reports when disabled in Rules #83165

Closed

Description

@jponikarchuk

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: V9.3.24-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/test-runs/TR-5897/folder/13176708/41236908/1203274341
#71244
Email or phone of affected tester (no customers): dreamnitethedragon+yydyd373@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Redminote 10S Android 13
App Component: Money Requests

Action Performed:

  1. Launch app
  2. Create workpace and enable rules
  3. Create another workspace and enable rules
  4. Create a manual expense in both workspace
  5. Open a expense
  6. Tap more - merge
  7. Select the expense and second option in all section and continue
  8. Note in confirmation page, "attendee" row is not shown
  9. Go to reports - expense
  10. Long press & select same expense (step 5) and merge selecting second option in all section and continue
  11. Note in confirmation page, "attendee" row is shown
  12. Go to inbox
  13. Open workspace chat and open same expense used in step 5
  14. Tap more - merge selecting expense & second option in all section and continue
  15. Note in confirmation page, "attendee" row is shown

Expected Result:

When Attendees section is disabled in Rules:
Attendee row should NOT be displayed across all merge entry points [Expense screen
/ Reports list (long press) ].

Behavior must be consistent regardless of navigation path.

Actual Result:

Initial merge from workspace, attendee row is not shown correctly.
When merge from report, attendee row appears incorrectly.
After that, workspace merge also shows attendee row incorrectly.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @mananjadhav
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022025645682814877857
  • Upwork Job ID: 2025645682814877857
  • Last Price Increase: 2026-02-22

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 22, 2026
  2. melvin-bot commented on Feb 22, 2026

    @melvin-bot

    @youssef-lr recently merged #71244, but they are OOO right now, so I'll auto-assign someone else.

  3. melvin-bot commented on Feb 22, 2026

    @melvin-bot

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

  4. melvin-bot commented on Feb 22, 2026

    @melvin-bot

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

  5. melvin-bot commented on Feb 22, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. github-actions commented on Feb 22, 2026

    @github-actions
    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.
  7. OSBotify commented on Feb 22, 2026

    @OSBotify
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #71244 - "[Merge] Merging tax rates" by @dominictb (High confidence)
    Related Issues: None

    Recommendation: REVERT

    The PR introduced a regression in the merge transaction flow where the policy is incorrectly determined when merging from certain entry points (reports list, search), causing the attendee row to appear even when attendee tracking is disabled in the workspace rules.

    Labels: Keeping DeployBlockerCash (Frontend bug - App PR needs to be reverted)

    📋 Detailed Analysis

    Evidence

    PR #71244 added support for merging tax rates in expense merge transactions. As part of this change, it modified how policies are passed to the MoneyRequestView component during the merge confirmation step, changing from a generic policy to targetTransactionPolicy which is determined by the useMergeTransactions hook.

    The issue is reproducible only on staging (where PR #71244 is deployed) and not on production, and the PR is directly mentioned in the issue report by the automated melvin-bot comment.

    Verification

    The bug manifests in the merge transaction confirmation page behavior:

    • Affected file: src/hooks/useMergeTransactions.ts (lines 78-80)
    • Confirmation: PR [Merge] Merging tax rates #71244 modified this file to add targetTransactionPolicy and sourceTransactionPolicy logic

    Root Cause

    In src/hooks/useMergeTransactions.ts, lines 78-80, the code overwrites the policy from Onyx when in a search context:

    // If we're on search, search snapshot policies are more up to date
    targetTransactionPolicy = currentSearchResults?.data[`${ONYXKEYS.COLLECTION.POLICY}${targetTransactionPolicyID}`];
    sourceTransactionPolicy = currentSearchResults?.data[`${ONYXKEYS.COLLECTION.POLICY}${targetTransactionPolicyID}`];

    This differs from how reports are handled (lines 76-77), which use the nullish coalescing operator ?? to fall back to Onyx data:

    targetTransactionReport = targetTransactionReport ?? currentSearchResults?.data[`${ONYXKEYS.COLLECTION.REPORT}${targetTransactionReportID}`];

    When merging from the reports list (which uses search context), if the policy is not present in currentSearchResults.data, the policy becomes undefined.

    The shouldShowAttendees function in src/libs/TransactionUtils/index.ts (line 581) returns true by default when the policy is undefined:

    return policy?.isAttendeeTrackingEnabled ?? true;

    This causes the attendee row to incorrectly appear even when attendee tracking is disabled in the workspace rules.

    Bug flow:

    1. Merge from expense screen (not search context) → policy loaded from Onyx → correct behavior
    2. Merge from reports list (search context) → policy overwritten with undefined → attendee row appears incorrectly
    3. Subsequent merges from any entry point continue showing attendee row due to persisted state
  8. 31 remaining items

  9. marufsharifi commented on Mar 1, 2026

    @marufsharifi
    Contributor

    @youssef-lr

    I submitted a proposal for this issue after the Help Wanted label was added. My proposal was reviewed, and both @hoangzinh and @mananjadhav confirmed that the identified root cause and proposed solution were correct.

    I understand from the contribution guidelines that “If you propose solutions to jobs before the Help Wanted label is applied, you do so at your own risk.” In this case, however, my proposal was made after the label had already been added.

    For that reason, it was surprising to see the issue later assigned to someone else. Since I invested time investigating and preparing the solution under the assumption that the issue was open for contribution, this situation doesn’t seem entirely fair.

    Could you please clarify the reasoning behind the reassignment and how I should proceed? I would appreciate your guidance.

    Thank you for your time and consideration.

    cc @greg-schroeder

  10. hoangzinh commented on Mar 2, 2026

    @hoangzinh
    Contributor

    For that reason, it was surprising to see the issue later assigned to someone else.

    Hi @marufsharifi. I appreciate your effort on this issue. Let me clarify this part:

    1. This issue originated from our PR: [Merge] Merging tax rates #71244. When this issue was created, it was still in the regression period.
    2. The PR at [Merge] Merging tax rates #71244 has been reverted, meaning this issue can no longer be reproduced. Consequently, we cannot work on it. To bring back [Merge] Merging tax rates #71244, we have to resolve this issue in our next PR.

    That’s why I suggested assigning this issue to me and @dominictb.

  11. melvin-bot commented on Mar 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  12. melvin-bot commented on Mar 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  13. melvin-bot commented on Mar 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  14. melvin-bot commented on Mar 13, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  15. mananjadhav commented on Mar 15, 2026

    @mananjadhav
    Collaborator

    @youssef-lr Can you unassign me from this issue?

  16. dominictb commented on Mar 24, 2026

    @dominictb
    Contributor

    PR reach prod

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions