Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-12-05] [$250] Track expense - Back button does not return to confirmation page after clicking workspace name #52398

Closed
6 of 8 tasks
lanitochka17 opened this issue Nov 12, 2024 · 19 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Nov 12, 2024

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.0.60-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): applausetester+0080989@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • User has at least one workspace
  1. Go to staging.new.expensify.com
  2. Go to self DM
  3. Track a manual expense
  4. Go to Search
  5. Click on the track expense
  6. Click on the report header
  7. Click Share it with my accountant
  8. Select a workspace
  9. On confirmation page, click on the workspace under "To"
  10. Click RHP back button

Expected Result:

App will return to confirmation page

Actual Result:

App returns to expense details page

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6662554_1731420427649.20241112_220132.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021856400727068529748
  • Upwork Job ID: 1856400727068529748
  • Last Price Increase: 2024-11-12
Issue OwnerCurrent Issue Owner: @isabelastisser
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

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

@daledah
Copy link
Contributor

daledah commented Nov 12, 2024

Proposal

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

App returns to expense details page

What is the root cause of that problem?

Currently, we use Navigation.goBack(backTo) to handle clicking the back button and it'll navigate the wrong route

<HeaderWithBackButton
title={translate('common.details')}
onBackButtonPress={() => Navigation.goBack(backTo)}
/>

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

We should update this to use Navigation.navigate(backTo)

                <HeaderWithBackButton
                    title={translate('common.details')}
                    onBackButtonPress={() => Navigation.navigate(backTo)}
                />

What alternative solutions did you explore? (Optional)

@bernhardoj
Copy link
Contributor

Proposal

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

Going back from the workspace details page RHP doesn't go back to the confirm page.

What is the root cause of that problem?

From the OP steps, we can see that the user opens a report RHP then press the header which opens a report details.

nav stack: [report RHP, report details]

When the sure arrives at the IOU confirm page then press the workspace, it will navigate to the workspace details page.

Navigation.navigate(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(option.reportID, activeRoute));

But because we use NAVIGATE, it will go back to the report details that is already in the stack. So, going back will leads to the report RHP instead with the updated params.

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

Use PUSH instead of NAVIGATE, so a new details is always added when we open it from the IOU confirm page.

const navigateToReportOrUserDetail = (option: MoneyRequestConfirmationListItem) => {
const activeRoute = Navigation.getActiveRoute();
if (option.isSelfDM) {
Navigation.navigate(ROUTES.PROFILE.getRoute(currentUserPersonalDetails.accountID, activeRoute));
return;
}
if (option.accountID) {
Navigation.navigate(ROUTES.PROFILE.getRoute(option.accountID, activeRoute));
} else if (option.reportID) {
Navigation.navigate(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(option.reportID, activeRoute));
}
};

if (option.isSelfDM) {
    Navigation.navigate(ROUTES.PROFILE.getRoute(currentUserPersonalDetails.accountID, activeRoute), 'PUSH');
    return;
}

if (option.accountID) {
    Navigation.navigate(ROUTES.PROFILE.getRoute(option.accountID, activeRoute), 'PUSH');
} else if (option.reportID) {
    Navigation.navigate(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(option.reportID, activeRoute), 'PUSH');
}

@isabelastisser isabelastisser added External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Nov 12, 2024
@melvin-bot melvin-bot bot changed the title Track expense - Back button does not return to confirmation page after clicking workspace name [$250] Track expense - Back button does not return to confirmation page after clicking workspace name Nov 12, 2024
Copy link

melvin-bot bot commented Nov 12, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021856400727068529748

Copy link

melvin-bot bot commented Nov 12, 2024

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

Copy link

melvin-bot bot commented Nov 18, 2024

@allroundexperts, @isabelastisser Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Nov 18, 2024
@isabelastisser
Copy link
Contributor

@allroundexperts, can you please review the proposals above? Thanks!

@allroundexperts
Copy link
Contributor

Thanks for the proposals everyone!

I think I'd agree that we should use a PUSH instead of a navigate as suggested by @bernhardoj. Let's go with there proposal.

🎀 👀 🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Nov 18, 2024
Copy link

melvin-bot bot commented Nov 18, 2024

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

@muttmuure muttmuure moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Nov 19, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 19, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 20, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @allroundexperts

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 28, 2024
@melvin-bot melvin-bot bot changed the title [$250] Track expense - Back button does not return to confirmation page after clicking workspace name [HOLD for payment 2024-12-05] [$250] Track expense - Back button does not return to confirmation page after clicking workspace name Nov 28, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 28, 2024
Copy link

melvin-bot bot commented Nov 28, 2024

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

Copy link

melvin-bot bot commented Nov 28, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.67-9 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-12-05. 🎊

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

Copy link

melvin-bot bot commented Nov 28, 2024

@allroundexperts @isabelastisser @allroundexperts 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]

@allroundexperts
Copy link
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
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on both staging and production
  • 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: I was not able to point to the exact PR which caused this because the change history got removed due to the migration to typescript. This existed for quite some time.

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

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

  • User has at least one workspace

Test:

  1. Go to self DM and Track a manual expense
  2. Go to Search and press on the tracked expense
  3. Press on the report header and press "Share it with my accountant"
  4. Select a workspace and on the confirmation page, click on the workspace under "To"
  5. Press back

Verify you are navigated back to the confirm page

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 5, 2024
Copy link

melvin-bot bot commented Dec 5, 2024

Payment Summary

Upwork Job

BugZero Checklist (@isabelastisser)

  • 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/1856400727068529748/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@bernhardoj
Copy link
Contributor

Requested in ND.

@isabelastisser
Copy link
Contributor

Payment summary:

Reviewer: @allroundexperts owed $250 via NewDot C+ PENDING
Reviewer: @bernhardoj owed $250 via NewDot - proposal PENDING

@isabelastisser
Copy link
Contributor

All set!

@github-project-automation github-project-automation bot moved this from Bugs and Follow Up Issues to Done in [#whatsnext] #expense Dec 5, 2024
@JmillsExpensify
Copy link

$250 approved for @bernhardoj

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
Status: Done
Development

No branches or pull requests

7 participants