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-11-14] [$250] Track expense - Add receipt modal is missing on confirmation page when sharing with accountant #50246

Open
6 tasks done
IuliiaHerets opened this issue Oct 4, 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. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 4, 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.44-7
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5042074
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

Precondition:

  • Account has no workspace.
  1. Go to staging.new.expensify.com
  2. Go to self DM.
  3. Create a track manual expense.
  4. Click Share it with my accountant.
  5. Note that it shows Add receipt modal on the confirmation page.
  6. Close the RHP.
  7. Click Share it with my accountant.

Expected Result:

Add receipt modal should appear on the confirmation page (production behavior).

Actual Result:

Add receipt modal is missing on the confirmation page when sharing with accountant.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6624486_1728052918727.20241004_224100.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021851283420523124529
  • Upwork Job ID: 1851283420523124529
  • Last Price Increase: 2024-10-29
Issue OwnerCurrent Issue Owner: @mallenexpensify
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

Copy link

melvin-bot bot commented Oct 4, 2024

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

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 4, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Oct 4, 2024
Copy link
Contributor

github-actions bot commented Oct 4, 2024

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

@NikkiWines
Copy link
Contributor

NikkiWines commented Oct 4, 2024

Can reproduce locally ✅

Looks like PolicyUtils.isPaidGroupPolicy(policy) is intermittently returning true/false here which causes shouldShowReceiptEmptyState to switch between showing and not showing. Looking to see what might've changed with this logic recently (since that line was added 4mo ago). Maybe we're not passing the policy correctly 🤔

@nkdengineer
Copy link
Contributor

Proposal

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

Add receipt modal is missing on the confirmation page when sharing with accountant.

What is the root cause of that problem?

For some reason when we click on Share it with my accountant. the second time, the policy draft is merged to Onyx after we open the MoneyRequestConfirmationList which causes the policyDraft is not updated because the memo function here doesn't include policyDraft. If we resize the window we can see the add receipt modal will appear

prevProps.shouldDisplayReceipt === nextProps.shouldDisplayReceipt,

Screen.Recording.2024-10-04.at.23.50.48.mov

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

We should add policyDraft to the compare in memo function but because we change the logic in this fine, the best solution is to migrate this component to use useOnyx and remove withOnyx

prevProps.shouldDisplayReceipt === nextProps.shouldDisplayReceipt,

What alternative solutions did you explore? (Optional)

NA

Result

Screen.Recording.2024-10-04.at.23.57.14.mov

@NikkiWines
Copy link
Contributor

NikkiWines commented Oct 4, 2024

Confirmed this isn't currently reproducible on prod (note: the testing steps need to be adjusted so that the user only has one workspace).

Also confirmed that policy is intermittently undefined, causing shouldShowReceiptEmptyState to be false on occasion.

@Nodebrute
Copy link
Contributor

@NikkiWines the #49142 was deployed to production 4 days ago

@NikkiWines
Copy link
Contributor

yes sorry linked the wrong PR my bad

@nkdengineer
Copy link
Contributor

Confirmed this isn't currently reproducible on prod (note: the testing steps need to be adjusted so that the user only has one workspace).

Also confirmed that policy is intermittently undefined, causing shouldShowReceiptEmptyState to be false on occasion.

@NikkiWines Yes, when I logged the policyID it's changed from -1 to draft policyID but the policyDraft is not updated

@NikkiWines
Copy link
Contributor

NikkiWines commented Oct 4, 2024

Yeah, I noticed that in your proposal @nkdengineer - just as a note, technically this issue isn't external yet as we prefer to have these regressions fixed by the original PR authors.

I think it's actually a regression from #49248. Reverted the changes locally and the receipt view is consistently there.

cc: @daledah @roryabraham @blazejkustra @mkhutornyi

cc: @jasperhuangg as you're deployer

@jasperhuangg
Copy link
Contributor

Actually, I can't seem to reproduce this bug on staging anymore

Screen.Recording.2024-10-04.at.12.19.58.PM.mov

Gonna demote and add the Needs Repro label. It seems we aren't automatically selecting the workspace if you only have one.

@jasperhuangg jasperhuangg added Daily KSv2 Needs Reproduction Reproducible steps needed and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Oct 4, 2024
@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@NikkiWines
Copy link
Contributor

I'm still able to repro on staging and main

staging:
https://github.com/user-attachments/assets/6727fa55-ec16-4642-a292-aecaa6f9eefc

main:
https://github.com/user-attachments/assets/8ea8aa14-8e9a-4551-b584-e56fcd9ecbf0

The issue is fixed by #50266

Screen.Recording.2024-10-04.at.15.27.37.mov

@NikkiWines
Copy link
Contributor

Side note that this logic for the workspace selector might be too broad, as even if I only have one active policy (and several archived), I still see the workspace selector.

@jasperhuangg jasperhuangg removed the Needs Reproduction Reproducible steps needed label Oct 4, 2024
@NikkiWines NikkiWines removed the Awaiting Payment Auto-added when associated PR is deployed to production label Oct 23, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Oct 26, 2024
@daledah
Copy link
Contributor

daledah commented Oct 26, 2024

@NikkiWines PR is ready.

@NikkiWines NikkiWines added the External Added to denote the issue can be worked on by a contributor label Oct 29, 2024
@melvin-bot melvin-bot bot changed the title Track expense - Add receipt modal is missing on confirmation page when sharing with accountant [$250] Track expense - Add receipt modal is missing on confirmation page when sharing with accountant Oct 29, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

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

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

melvin-bot bot commented Oct 29, 2024

Current assignee @eVoloshchak is eligible for the External assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 29, 2024
@NikkiWines NikkiWines added Weekly KSv2 and removed Daily KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors labels Oct 29, 2024
@mallenexpensify
Copy link
Contributor

I'm back from OOO on Nov 14th, not assigning another BZ because the PR is on staging so payment will likely be the day or two after I'm back. If one is needed please add or post in #contributor-plus to ask for one to be added, thx.

@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 7, 2024
@melvin-bot melvin-bot bot changed the title [$250] Track expense - Add receipt modal is missing on confirmation page when sharing with accountant [HOLD for payment 2024-11-14] [$250] Track expense - Add receipt modal is missing on confirmation page when sharing with accountant Nov 7, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 7, 2024
Copy link

melvin-bot bot commented Nov 7, 2024

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

Copy link

melvin-bot bot commented Nov 7, 2024

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

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

  • @eVoloshchak requires payment through NewDot Manual Requests
  • @daledah requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Nov 7, 2024

@eVoloshchak @mallenexpensify 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]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 14, 2024
Copy link

melvin-bot bot commented Nov 14, 2024

Payment Summary

Upwork Job

BugZero Checklist (@mallenexpensify)

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

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 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants