Skip to content

[HOLD for payment 2024-07-24] [HOLD for payment 2024-07-10] iOS - Hold - Back button on transaction thread returns to Hold - Reason page after holding it #44423

Closed

Description

@m-natarajan

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


issue found when validating #43618
Version Number: 9.0.2-0
Reproducible in staging?: y
Reproducible in production?: n
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: applause internal team
Slack conversation:

Action Performed:

  1. Launch New Expensify app.
  2. Go to workspace chat.
  3. Submit an expense.
  4. Go to transaction thread.
  5. Tap 3-dot menu > Hold.
  6. Enter reason > Save.
  7. Tap on the back button.

Expected Result:

Back button on transaction thread will not return to Hold - Reason page.

Actual Result:

Back button on transaction thread returns to Hold - Reason page after holding the expense.

Workaround:

unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6524578_1719351617865.RPReplay_Final1719351372.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @strepanier03

Activity

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

    @melvin-bot

    Triggered auto assignment to @strepanier03 (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. melvin-bot commented on Jun 26, 2024

    @melvin-bot

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

  4. github-actions commented on Jun 26, 2024

    @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.
  5. m-natarajan commented on Jun 26, 2024

    @m-natarajan
    Author

    @hayata-suenaga FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  6. m-natarajan commented on Jun 26, 2024

    @m-natarajan
    Author

    We think that this bug might be related to #wave-collect - Release 1

  7. bernhardoj commented on Jun 26, 2024

    @bernhardoj
    Contributor

    Proposal

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

    Pressing back button after hold arrived at the hold reason page again.

    What is the root cause of that problem?

    After submitting the hold reason, we navigate to the backTo param.

    const navigateBack = () => {
    Navigation.navigate(backTo);
    };

    backTo in this case is the transaction thread report. It should navigate back to the transaction thread because it exists on the stack, but the backTo route keeps being pushed to the nav stack because it's detected that the params of the backTo route is different with the params of the topmost central pane.

    if (isCentralPaneName(action.payload.name) && (isTargetScreenDifferentThanCurrent || areParamsDifferent)) {

    If the transaction thread report route is /r/123, then the backTo is also /r/123, but somehow the comparison fails.

    const areParamsDifferent =
    actionParams?.screen === SCREENS.REPORT
    ? getTopmostReportId(rootState) !== getTopmostReportId(stateFromPath)
    : !shallowCompare(
    omitBy(topmostCentralPaneRoute?.params as Record<string, unknown> | undefined, (value) => value === undefined),
    omitBy(actionParams?.params as Record<string, unknown> | undefined, (value) => value === undefined),
    );

    const actionParams: ActionPayloadParams = action.payload.params;

    First, the actionParams?.screen === SCREENS.REPORT returns false. Second, the shallowCompare also returns false. That's because both actionParams?.screen and actionParams?.params are undefined. This happened after we simplify the root navigator.

    Report screen was previously inside a CentralPaneNavigator, but it's not anymore now.

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

    Replace the usages of actionParams?.screen with action.payload.name and actionParams?.params with action.payload.params.

    const isTargetScreenDifferentThanCurrent = !!(!topmostCentralPaneRoute || topmostCentralPaneRoute.name !== (actionParams?.screen ?? action.payload.name));
    const areParamsDifferent =
    actionParams?.screen === SCREENS.REPORT
    ? getTopmostReportId(rootState) !== getTopmostReportId(stateFromPath)
    : !shallowCompare(
    omitBy(topmostCentralPaneRoute?.params as Record<string, unknown> | undefined, (value) => value === undefined),
    omitBy(actionParams?.params as Record<string, unknown> | undefined, (value) => value === undefined),
    );

    if (actionParams?.screen === SCREENS.SEARCH.CENTRAL_PANE && actionParams?.params && policyID) {
    (actionParams.params as Record<string, string | undefined>).policyIDs = policyID;
    }

  8. 8 remaining items

  9. luacmartins commented on Jun 27, 2024

    @luacmartins
    Contributor

    This was fixed by #44444 and CPed to staging. We're good to close since it was a regression.

  10. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jul 3, 2024
  11. changed the title [-] iOS - Hold - Back button on transaction thread returns to Hold - Reason page after holding it[/-] [+][HOLD for payment 2024-07-10] iOS - Hold - Back button on transaction thread returns to Hold - Reason page after holding it[/+] on Jul 3, 2024
  12. melvin-bot commented on Jul 3, 2024

    @melvin-bot

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

  13. melvin-bot commented on Jul 3, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 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 2024-07-10. 🎊

  14. melvin-bot commented on Jul 3, 2024

    @melvin-bot

    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:

    • [@luacmartins] The PR that introduced the bug has been identified. Link to the PR:
    • [@luacmartins] 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:
    • [@luacmartins] A discussion in #expensify-bugs 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:
    • [@luacmartins] Determine if we should create a regression test for this bug.
    • [@luacmartins] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. changed the title [-][HOLD for payment 2024-07-10] iOS - Hold - Back button on transaction thread returns to Hold - Reason page after holding it[/-] [+][HOLD for payment 2024-07-24] [HOLD for payment 2024-07-10] iOS - Hold - Back button on transaction thread returns to Hold - Reason page after holding it[/+] on Jul 17, 2024
  16. melvin-bot commented on Jul 17, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 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 2024-07-24. 🎊

  17. melvin-bot commented on Jul 17, 2024

    @melvin-bot

    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:

    • [@luacmartins] The PR that introduced the bug has been identified. Link to the PR:
    • [@luacmartins] 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:
    • [@luacmartins] A discussion in #expensify-bugs 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:
    • [@luacmartins] Determine if we should create a regression test for this bug.
    • [@luacmartins] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@strepanier03] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
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.EngineeringWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions