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-10-25] [$250] [Dupe detect] Not here page opens when opening distance receipt from another workspace #50107

Closed
6 tasks done
IuliiaHerets opened this issue Oct 2, 2024 · 34 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 2, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.43-3
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create two workspaces.
  3. Submit a distance expense in the first workspace chat.
  4. Submit the same distance expense in the second workspace chat.
  5. Submit another expense to the second workspace chat (as we cannot review duplicates when there is only one expense).
  6. Go to transaction thread of the second expense in Step 4.
  7. Click Review duplicates.
  8. Click on the second distance expense preview (to make Keep this one button appear).
  9. Click browser back button.
  10. Click Keep this one on the second expense preview.
  11. Click on the receipt on the confirmation page.

Expected Result:

The receipt opens without issue.

Actual Result:

Not here page opens when opening distance receipt from another workspace in full screen.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6622310_1727885989783.20241003_001259.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021842274975898423185
  • Upwork Job ID: 1842274975898423185
  • Last Price Increase: 2024-10-04
  • Automatic offers:
    • rojiphil | Reviewer | 104346977
    • nkdengineer | Contributor | 104346978
Issue OwnerCurrent Issue Owner: @joekaufmanexpensify
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 2, 2024
Copy link

melvin-bot bot commented Oct 2, 2024

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

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-control

@IuliiaHerets
Copy link
Author

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

@nkdengineer
Copy link
Contributor

Proposal

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

Not here page opens when opening distance receipt from another workspace in full screen.

What is the root cause of that problem?

Here we are calculating shouldShowNotFoundPage based on moneyRequestReportID and transaction?.reportID and will show NotFoundPage when they are different

const shouldShowNotFoundPage = isTrackExpenseReport || transaction?.reportID === CONST.REPORT.SPLIT_REPORTID ? !transaction : (moneyRequestReportID ?? '-1') !== transaction?.reportID;

But in case review duplicates with expsense in another workspace, it is no longer true because this transaction does not belong to the same report so moneyRequestReportID will calculate wrong

const moneyRequestReportID = ReportUtils.isMoneyRequestReport(report) ? report?.reportID : report?.parentReportID;

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

  1. We should add new route param like isFromReviewDuplicates for route TRANSACTION_RECEIPT here
    TRANSACTION_RECEIPT: {
        route: 'r/:reportID/transaction/:transactionID/receipt',
        getRoute: (reportID: string, transactionID: string, readonly = false, isFromReviewDuplicates = false) => `r/${reportID}/transaction/${transactionID}/receipt${readonly ? '?readonly=true' : ''}${isFromReviewDuplicates ? '?isFromReviewDuplicates=true' : ''}` as const,
    },
  1. Use this param when calculating shouldShowNotFoundPage here
    const shouldShowNotFoundPage = isTrackExpenseReport || transaction?.reportID === CONST.REPORT.SPLIT_REPORTID || isFromReviewDuplicates ? !transaction : (moneyRequestReportID ?? '-1') !== transaction?.reportID;
  1. We can pass isFromReviewDuplicates from Transaction Duplicate confirmation page here

<MoneyRequestView
report={report}
shouldShowAnimatedBackground={false}
readonly
updatedTransaction={transaction as OnyxEntry<Transaction>}
/>

What alternative solutions did you explore? (Optional)

@joekaufmanexpensify
Copy link
Contributor

I can reproduce this, but not sure if dupe detection across multiple workspaces is supposed to be a thing.

@joekaufmanexpensify
Copy link
Contributor

Discussing

@joekaufmanexpensify
Copy link
Contributor

Confirmed this is possible, but only for the submitter. Given the submitter can view the expense when resolving dupes, feels correct they should be able to view the receipt.

@joekaufmanexpensify joekaufmanexpensify added the External Added to denote the issue can be worked on by a contributor label Oct 4, 2024
@melvin-bot melvin-bot bot changed the title Dupe detect - Not here page opens when opening distance receipt from another workspace [$250] Dupe detect - Not here page opens when opening distance receipt from another workspace Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

@pecanoro pecanoro self-assigned this Oct 4, 2024
Copy link

melvin-bot bot commented Oct 8, 2024

@rojiphil, @pecanoro, @joekaufmanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Oct 8, 2024
@joekaufmanexpensify
Copy link
Contributor

@rojiphil could you review the above proposal?

@rojiphil
Copy link
Contributor

rojiphil commented Oct 9, 2024

@nkdengineer proposal LGTM i.e. using a new route param isFromReviewDuplicates to prevent shouldShowNotFoundPage from becoming true will help resolve this issue.
🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

Current assignee @pecanoro is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@pecanoro
Copy link
Contributor

pecanoro commented Oct 9, 2024

Assigning @nkdengineer to the issue!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

📣 @rojiphil 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Oct 9, 2024

📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Oct 10, 2024
@pecanoro pecanoro changed the title [$250] Dupe detect - Not here page opens when opening distance receipt from another workspace [$250] [Dupe detect] Not here page opens when opening distance receipt from another workspace Oct 11, 2024
@joekaufmanexpensify
Copy link
Contributor

PR in review

Copy link

melvin-bot bot commented Oct 17, 2024

⚠️ 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.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] [Dupe detect] Not here page opens when opening distance receipt from another workspace [HOLD for payment 2024-10-25] [$250] [Dupe detect] Not here page opens when opening distance receipt from another workspace Oct 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 18, 2024
Copy link

melvin-bot bot commented Oct 18, 2024

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

Copy link

melvin-bot bot commented Oct 18, 2024

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

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

Copy link

melvin-bot bot commented Oct 18, 2024

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:

  • [@rojiphil] The PR that introduced the bug has been identified. Link to the PR:
  • [@rojiphil] 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:
  • [@rojiphil] 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:
  • [@rojiphil] Determine if we should create a regression test for this bug.
  • [@rojiphil] 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.
  • [@joekaufmanexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@joekaufmanexpensify
Copy link
Contributor

@nkdengineer @rojiphil was the regression notice above legit?

@rojiphil
Copy link
Contributor

was the regression notice above legit?

Yes @joekaufmanexpensify. That is correct.

@joekaufmanexpensify
Copy link
Contributor

Got it. TY for confirming!

@joekaufmanexpensify
Copy link
Contributor

@rojiphil can you also handle the BZ checklist so we can process payment in a few days?

@rojiphil
Copy link
Contributor

  • [@rojiphil] The PR that introduced the bug has been identified. Link to the PR: Offending PR
  • [@rojiphil] 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: Added comment
  • [@rojiphil] 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: Not Required. Existing checklist is good enough to capture such issues.
  • [@rojiphil] Determine if we should create a regression test for this bug. : Yes. We can
  • [@rojiphil] 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.

Steps:

  1. Create two workspaces.
  2. Submit a distance expense in the first workspace chat.
  3. Submit the same distance expense in the second workspace chat.
  4. Submit another expense to the second workspace chat (as we cannot review duplicates when there is only one expense).
  5. Go to transaction thread of the second expense in Step 4.
  6. Click Review duplicates.
  7. Click on the second distance expense preview (to make Keep this one button appear).
  8. Click on the receipt on the confirmation page.
  9. Verify that: The receipt opens without issue.

@rojiphil
Copy link
Contributor

can you also handle the BZ checklist so we can process payment in a few days?

@joekaufmanexpensify BZ Checklist is done.

@joekaufmanexpensify
Copy link
Contributor

Regression test issue is here.

@joekaufmanexpensify
Copy link
Contributor

Checklist is complete. All set to issue payment!

@joekaufmanexpensify
Copy link
Contributor

We need to pay:

  • @nkdengineer $125 for PR via Upwork (50% penalty for regression)
  • @rojiphil $125 for C+ via Upwork (50% penalty for regression)

@joekaufmanexpensify
Copy link
Contributor

@nkdengineer $125 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@rojiphil $125 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

Upwork job closed.

@joekaufmanexpensify
Copy link
Contributor

All set, thanks everyone!

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests

5 participants