Skip to content

[Due for payment 2025-04-07] [$250] Reports - "To" field does not show recipient after submitting track expense to other user #57733

Closed

Description

@IuliiaHerets

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.1.8-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): applausetester+ps309@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Search

Action Performed:

Precondition:

  • Account has self DM.
  1. Go to staging.new.expensify.com
  2. Go to self DM.
  3. Track a manual expense.
  4. Go to Reports.
  5. Click on the track expense in Step 3.
  6. Click on the report header.
  7. Click Submit it to someone.
  8. Select a user.
  9. On the confirmation page, enter a merchant.
  10. Submit the expense.

Expected Result:

"To" field will update and display the recipient after submitting the expense.

Actual Result:

Merchant field is updated, but "To" field stills display the current user instead of recipient.
It only updates and displays the recipient after switching report status or refreshing the page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6760579_1741064288210.20250304_125255.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021896958133996103336
  • Upwork Job ID: 1896958133996103336
  • Last Price Increase: 2025-03-11
  • Automatic offers:
    • mkzie2 | Contributor | 106615973
Issue OwnerCurrent Issue Owner: @sakluger

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Mar 4, 2025
  2. melvin-bot commented on Mar 4, 2025

    @melvin-bot

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

  3. mkzie2 commented on Mar 4, 2025

    @mkzie2
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-03-10 16:20:00 UTC.

    Proposal

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

    Merchant field is updated, but "To" field stills display the current user instead of recipient.
    It only updates and displays the recipient after switching report status or refreshing the page.

    What is the root cause of that problem?

    We have the logic to retrigger the Search API to update the latest data whenever there're new transactions or report actions if the query type is expense or chat respectively.

    // Check if there is a change in the transactions or report actions list
    if ((!isChat && hasTransactionsIDsChange) || (isChat && hasReportActionsIDsChange)) {

    // Trigger the search
    SearchActions.search({queryJSON, offset});

    But when you convert the track expense, new report actions will be created while no new transactions will, and as the query type is currently expense, the above logic will not trigger.

    ❓One another question: Why is the merchant or category updated, but not to?

    We have the logic here to update the snapshot data based on original data. For example, a normal transactions_123 update would also update snapshot_abc.data.transactions_123. Note that this only update whichever keys are in the transactions_123. For example, the merchant key exists in transactions type so its value would definitely be updated in snapshot.

    However, in this case, the managerID key exists in snapshot data but not in transactions type. The managerID key is only evaluated and returned by the BE's Search API. So it would NOT be updated to snapshot by updateSnapshots function. And this key is used to display the receiver (to) field.

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

    We can remove the query type check isChat.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    Update the useSearchHighlightAndScrollTest to make Search call independent of query type.

    What alternative solutions did you explore? (Optional)

    NA

  4. moved this to Bugs and Follow Up Issues in #expensify-bugson Mar 4, 2025
  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Mar 4, 2025
  6. changed the title [-]Reports - "To" field does not show recipient after submitting track expense to other user[/-] [+][$250] Reports - "To" field does not show recipient after submitting track expense to other user[/+] on Mar 4, 2025
  7. melvin-bot commented on Mar 4, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Mar 4, 2025
  9. melvin-bot commented on Mar 4, 2025

    @melvin-bot

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

  10. jayeshmangwani commented on Mar 5, 2025

    @jayeshmangwani
    Contributor

    We can remove the query type check isChat.

    @mkzie2 Thanks for the proposal! But could you please elaborate more on why we added isChat query type check and why it's not needed now, so we can remove it accordingly?

  11. mkzie2 commented on Mar 6, 2025

    @mkzie2
    Contributor

    @jayeshmangwani That was added in #53482 just as an optimization given the dependency between the update type and query type (i.e. reportActions updates are coupled with chat query type while transactions ones are coupled with the rest). But now we can see that dependency might not be correct in this specific case (convert track expense). There's no drawback of removing the isChat check as fas as I've tested.

  12. 27 remaining items

  13. changed the title [-][$250] Reports - "To" field does not show recipient after submitting track expense to other user[/-] [+][Due for payment 2025-04-07] [$250] Reports - "To" field does not show recipient after submitting track expense to other user[/+] on Mar 31, 2025
  14. melvin-bot commented on Mar 31, 2025

    @melvin-bot

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

  15. melvin-bot commented on Mar 31, 2025

    @melvin-bot

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

    If no regressions arise, payment will be issued on 2025-04-07. 🎊

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

  16. melvin-bot commented on Mar 31, 2025

    @melvin-bot

    @jayeshmangwani @sakluger @jayeshmangwani The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  17. jayeshmangwani commented on Apr 7, 2025

    @jayeshmangwani
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: Fix - Web - Search - New messages are not updated automatically in chats section #53482 (comment)

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: N/A

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal

    Preconditions:

    • Ensure the account has a self-DM.
    1. Navigate to your self-DM.
    2. Track a manual expense.
    3. Go to the Reports tab.
    4. Click on the tracked expense from Step 2.
    5. Click on the report header.
    6. Select Submit it to someone.
    7. Choose a user to submit the expense to.
    8. On the confirmation page, enter a merchant.
    9. Submit the expense.
    10. Go to the Search page and verify that the To field has been updated.

    Do we agree 👍 or 👎

  18. sakluger commented on Apr 7, 2025

    @sakluger
    Contributor

    Summarizing payment on this issue:

    Contributor: @mkzie2 $250, paid via Upwork
    Contributor+: @jayeshmangwani $250, please request on Newdot

  19. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Apr 7, 2025
  20. garrettmknight commented on Apr 10, 2025

    @garrettmknight
    Contributor

    $250 approved for @jayeshmangwani

  21. QichenZhu commented on Aug 25, 2026

    @QichenZhu
    Contributor

    This is related to issue #98048, which was fixed by PRs #98558 and #98752. See details here.

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 contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions