Skip to content

[Due for payment 2025-03-11] [$250] Track expense-Track options are not auto-removed from report details RHP after adding to report #57531

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.7-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 https://expensify.testrail.io/index.php?/tests/view/5659739
Email or phone of affected tester (no customers): applausetester+270205kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.expensify.com
  2. Create an unreported manual expense (Report field is none).
  3. Go to staging.new.expensify.com
  4. Go to self DM.
  5. Click on the expense created in Step 2.
  6. Click on the report header.
  7. Go back to staging.expensify.com and open the expense created in Step 2.
  8. Add a report to the expense.
  9. Go back to staging.new.expensify.com.
  10. Wait for the report to auto refresh.

Expected Result:

Track expense options will be removed from the report details page after the unreported expense is added to a report.

Actual Result:

"Submit it to someone" and "Categorize it" are not removed from the report details page after the unreported expense is added to a report.

When hovering over these options, there is no hover effect, but the options are still clickable.

When select "Submit it to someone" option and submit it to a user, app throws error.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6755938_1740641799823.20250227_153031.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021895177564455953295
  • Upwork Job ID: 1895177564455953295
  • Last Price Increase: 2025-02-27
Issue OwnerCurrent Issue Owner: @CortneyOfstad

Activity

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

    @melvin-bot

    Triggered auto assignment to @CortneyOfstad (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. bernhardoj commented on Feb 27, 2025

    @bernhardoj
    Contributor

    Proposal

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

    Track options in report details page don't disappear when the track expense is moved to workspace.

    What is the root cause of that problem?

    When we render the list of options, we already assign a key for each item.

    {menuItems.map((item) => (
    <MenuItem
    key={item.key}
    title={translate(item.translationKey)}

    However, the key for the track expense options are all the same and it's even the same as the Settings option key.

    if (shouldShowMenuItem) {
    items.push({
    key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
    translationKey: 'common.settings',
    icon: Expensicons.Gear,
    isAnonymousAction: false,
    shouldShowRightIcon: true,
    action: () => {
    Navigation.navigate(ROUTES.REPORT_SETTINGS.getRoute(report?.reportID, backTo));
    },
    });
    }
    if (isTrackExpenseReport && !isDeletedParentAction) {
    const actionReportID = getOriginalReportID(report.reportID, parentReportAction);
    const whisperAction = getTrackExpenseActionableWhisper(iouTransactionID, moneyRequestReport?.reportID);
    const actionableWhisperReportActionID = whisperAction?.reportActionID;
    items.push({
    key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
    translationKey: 'actionableMentionTrackExpense.submit',
    icon: Expensicons.Send,
    isAnonymousAction: false,
    shouldShowRightIcon: true,
    action: () => {
    createDraftTransactionAndNavigateToParticipantSelector(iouTransactionID, actionReportID, CONST.IOU.ACTION.SUBMIT, actionableWhisperReportActionID);
    },
    });
    items.push({
    key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
    translationKey: 'actionableMentionTrackExpense.categorize',
    icon: Expensicons.Folder,
    isAnonymousAction: false,
    shouldShowRightIcon: true,
    action: () => {
    createDraftTransactionAndNavigateToParticipantSelector(iouTransactionID, actionReportID, CONST.IOU.ACTION.CATEGORIZE, actionableWhisperReportActionID);
    },
    });
    items.push({
    key: CONST.REPORT_DETAILS_MENU_ITEM.SETTINGS,
    translationKey: 'actionableMentionTrackExpense.share',
    icon: Expensicons.UserPlus,
    isAnonymousAction: false,
    shouldShowRightIcon: true,
    action: () => {
    createDraftTransactionAndNavigateToParticipantSelector(iouTransactionID, actionReportID, CONST.IOU.ACTION.SHARE, actionableWhisperReportActionID);
    },
    });
    }

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

    We need to assign a unique key to each track expense option.

    • submit
    • categorize
    • share

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

    I think we can test by rendering the ReportDetailsPage and pass it a self DM track report, then update the report to workspace expense report and verify the track expense options are gone.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 27, 2025
  5. changed the title [-]Track expense-Track options are not auto-removed from report details RHP after adding to report[/-] [+][$250] Track expense-Track options are not auto-removed from report details RHP after adding to report[/+] on Feb 27, 2025
  6. melvin-bot commented on Feb 27, 2025

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

    @melvin-bot

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

  9. CortneyOfstad commented on Feb 27, 2025

    @CortneyOfstad
    Contributor

    Hi @hungvu193! We have a proposal above when you have a chance — thanks!

  10. hungvu193 commented on Feb 28, 2025

    @hungvu193
    Contributor

    Thanks @bernhardoj, your proposal here looks good and tests well.

    Test
    Screen.Recording.2025-02-28.at.09.34.58.mov

    🎀 👀 🎀 C+ reviewed

  11. melvin-bot commented on Feb 28, 2025

    @melvin-bot

    Triggered auto assignment to @carlosmiceli, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  12. 8 remaining items

  13. changed the title [-][$250] Track expense-Track options are not auto-removed from report details RHP after adding to report[/-] [+][Due for payment 2025-03-11] [$250] Track expense-Track options are not auto-removed from report details RHP after adding to report[/+] on Mar 4, 2025
  14. melvin-bot commented on Mar 4, 2025

    @melvin-bot

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

  15. melvin-bot commented on Mar 4, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.8-1 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-03-11. 🎊

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

    • @hungvu193 requires payment through NewDot Manual Requests
    • @bernhardoj requires payment through NewDot Manual Requests
  16. melvin-bot commented on Mar 4, 2025

    @melvin-bot

    @hungvu193 @CortneyOfstad @hungvu193 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. hungvu193 commented on Mar 10, 2025

    @hungvu193
    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: https://github.com/Expensify/App/pull/51951/files#r1986728102

    • [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.

    Test:

    1. Go to staging.expensify.com
    2. Create an unreported manual expense (Report field is none).
    3. Go to staging.new.expensify.com
    4. Go to self DM.
    5. Click on the expense created in Step 2.
    6. Click on the report header.
    7. Go back to staging.expensify.com and open the expense created in Step 2.
    8. Add a report to the expense.
    9. Go back to staging.new.expensify.com.
    10. Wait for the report to auto-refresh.
    11. Verify that Track options are removed from details RHP.

    Do we agree 👍 or 👎

  18. melvin-bot commented on Mar 11, 2025

    @melvin-bot

    Payment Summary

    Upwork Job

    BugZero Checklist (@CortneyOfstad)

    • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
    • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1895177564455953295/hired)
    • I have paid out the Upwork contracts or cancelled the ones that are incorrect
    • I have verified the payment summary above is correct
  19. garrettmknight commented on Mar 11, 2025

    @garrettmknight
    Contributor

    $250 approved for @hungvu193

  20. CortneyOfstad commented on Mar 11, 2025

    @CortneyOfstad
    Contributor

    Payment Summary

    Regression Test

    https://github.com/Expensify/Expensify/issues/479507

  21. bernhardoj commented on Mar 12, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  22. JmillsExpensify commented on Mar 12, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

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

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions