Skip to content

Review duplicates - Nothing happens after clicking Confirm when second expense is selected #59970

Closed

Description

@mitarachim

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.26-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
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): jsdjosjojisodjosdj@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Money Requests

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit two expenses with the same amount and merchant.
  4. Go to transaction thread of the second expense.
  5. Click Review duplicates.
  6. Click Keep on this on the second expense in the list (important).
  7. Click Confirm.

Expected Result:

After clicking Confirm button, RHP will dismiss.

Actual Result:

Nothing happens after clicking Confirm button when the second expense is selected.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6797723_1744249029643.20250410_091838.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @VickyStash

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    DeployBlockerCashThis issue or pull request should block deployment
    on Apr 10, 2025
  2. melvin-bot commented on Apr 10, 2025

    @melvin-bot

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

  3. melvin-bot commented on Apr 10, 2025

    @melvin-bot

    Triggered auto assignment to @twisterdotcom (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 Apr 10, 2025

    @melvin-bot

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

  5. github-actions commented on Apr 10, 2025

    @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.
  6. thelullabyy commented on Apr 10, 2025

    @thelullabyy
    Contributor

    🚨 Edited by proposal-police: This proposal was edited at 2025-04-10 04:03:01 UTC.

    Proposal

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

    • Nothing happens after clicking Confirm button when the second expense is selected.

    What is the root cause of that problem?

    • We skip the merge logic if childReportID is undefined:
      if (!reportAction?.childReportID) {

      In case of this bug, the childReportID is undefined. It is known issue:
      // In case the childReportID is not present it probably means the transaction thread was not created yet,
      // so we need to send the parentReportActionID and the transactionID to the route so we can call OpenReport correctly
      const transactionID = isMoneyRequestAction(action) ? getOriginalMessage(action)?.IOUTransactionID : CONST.DEFAULT_NUMBER_ID;
      if (!action?.childReportID && transactionID && action.reportActionID) {
      const optimisticReportID = generateReportID();
      Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(optimisticReportID, undefined, undefined, action.reportActionID, transactionID, requestReportID));
      return;
      }

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

    • We should do the same as what we did with the component above:
        const mergeDuplicates = useCallback(() => {
            if (!reportAction?.childReportID) {
                if (transactionID && reportAction.reportActionID) {
                    const optimisticReportID = ReportUtils.generateReportID();
                    IOU.mergeDuplicates(transactionsMergeParams);
                    Navigation.dismissModal();
                    InteractionManager.runAfterInteractions(() => {
                        Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(optimisticReportID, undefined, undefined, reportAction.reportActionID, transactionID, iouReport?.reportID));
                    });
                    return;
                }
                return;
            }
            if (!reportAction?.childReportID) {
                return;
            }
            Navigation.dismissModalWithReport({reportID: reportAction.childReportID});
        }, [reportAction?.childReportID, transactionsMergeParams, iouReport, transactionID]);

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

    • NA

    What alternative solutions did you explore? (Optional)

  7. mollfpr commented on Apr 10, 2025

    @mollfpr
    Contributor

    @thelullabyy What PR causing the regression?

  8. 6 remaining items

  9. VickyStash commented on Apr 10, 2025

    @VickyStash
    Contributor

    We're going to revert the offending PR.

  10. melvin-bot commented on Apr 10, 2025

    @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.

  11. rlinoz commented on Apr 10, 2025

    @rlinoz
    Contributor

    Is it possible to pass to the MergeDuplicates optimistic transaction thread report id? This way the app would know what thread report to expect and can handle correct navigation.

    It doesn't accept one right now, but seems like an easy change.

  12. VickyStash commented on Apr 10, 2025

    @VickyStash
    Contributor

    It doesn't accept one right now, but seems like an easy change.

    I guess we will need to update it not for the MergeDuplicates request only. At least for the HoldRequest as well.

  13. luacmartins commented on Apr 10, 2025

    @luacmartins
    Contributor

    This doesn't seem to be an API blocker. So I removed the label.

  14. jasperhuangg commented on Apr 10, 2025

    @jasperhuangg
    Contributor

    Retest was confirmed pass #59549 (comment)

  15. VickyStash commented on May 12, 2025

    @VickyStash
    Contributor

    This issue was a regression from the PR, which was reverted.
    Can we close it?

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.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions