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

[Awaiting Payment 2024-09-19][$250] [HIGH] Invoicing V1 - Archive B2B invoice room when the receiver workspace is deleted #47170

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

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 9, 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.18-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: N/A
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • User A is an admin of his workspace
  • User B is an admin of his workspace
  1. Go to staging.new.expensify.com
  2. [User A] Send an invoice to User B
  3. [User B] Go to invoice chat
  4. [User B] Click pay button > Pay the invoice as business > Pay elsewhere
  5. [User B] Delete all the workspaces
  6. [User A] Send another invoice
  7. [User A] Click on the invoice preview

Expected Result:

Send invoice option should be hidden for User A because User B is no longer an admin of his workspace

Actual Result:

User A can still send invoice to User B after User B deletes all the workspaces, which results in error.

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

Add any screenshot/video evidence

Bug6566699_1723211569129.20240809_214105.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01903a726126738169
  • Upwork Job ID: 1829110835274275153
  • Last Price Increase: 2024-08-29
Issue OwnerCurrent Issue Owner: @
@lanitochka17 lanitochka17 added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels Aug 9, 2024
Copy link

melvin-bot bot commented Aug 9, 2024

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

Copy link
Contributor

github-actions bot commented Aug 9, 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.

@rlinoz
Copy link
Contributor

rlinoz commented Aug 9, 2024

@lanitochka17 do you have the prod behavior by any chance?

@rlinoz
Copy link
Contributor

rlinoz commented Aug 9, 2024

Hmmm did we just add the pay as business to invoices?

@rlinoz
Copy link
Contributor

rlinoz commented Aug 9, 2024

We added it here #44970, I think we should do something on the backend, let me check if we are already planning something.

@rlinoz
Copy link
Contributor

rlinoz commented Aug 9, 2024

There is a section for it in the doc, but I don't see an issue for it. Anyway I am removing the Web-E deploy blocker label then.

@rlinoz rlinoz removed the DeployBlocker Indicates it should block deploying the API label Aug 9, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Aug 9, 2024

@cristipaval cristipaval added Daily KSv2 and removed Hourly KSv2 DeployBlockerCash This issue or pull request should block deployment labels Aug 9, 2024
@cristipaval cristipaval assigned cristipaval and unassigned rlinoz Aug 9, 2024
@cristipaval cristipaval changed the title Invoice - Sender can send invoice after receiver deletes all workspaces, which causes error Invoicing V1 - Archive B2B invoice room when the receiver workspace is deleted Aug 9, 2024
@melvin-bot melvin-bot bot added the Overdue label Aug 12, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

@cristipaval Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Aug 14, 2024

@cristipaval Huh... This is 4 days overdue. Who can take care of this?

@cristipaval
Copy link
Contributor

Work in progress

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Aug 16, 2024
@cristipaval
Copy link
Contributor

Same, WIP.

@melvin-bot melvin-bot bot removed the Overdue label Aug 19, 2024
@cristipaval cristipaval changed the title Invoicing V1 - Archive B2B invoice room when the receiver workspace is deleted [HIGH] Invoicing V1 - Archive B2B invoice room when the receiver workspace is deleted Aug 20, 2024
@cristipaval
Copy link
Contributor

So you need to:

  1. Send an invoice to a user who is an admin of their primary workspace
  2. Pay as business (so that the invoice room is upgraded to b2b)
  3. Now the receiver deletes the workspace and the invoice room is archived
  4. The sender now opens the invoice room (which is archived).
  5. The App crashes

@rezkiy37
Copy link
Contributor

So you need to:

  1. Send an invoice to a user who is an admin of their primary workspace
  2. Pay as business (so that the invoice room is upgraded to b2b)
  3. Now the receiver deletes the workspace and the invoice room is archived
  4. The sender now opens the invoice room (which is archived).
  5. The App crashes

@cristipaval The staging does not crash for me, but I can send invoices to the archived invoice room. I will fix this because the app attaches the incorrect reportID.

Details

1.mp4
2.mp4

@jjcoffee
Copy link
Contributor

Should we also fix the missing reportArchiveReasons.invoiceReceiverPolicyDeleted translation as part of this? It causes a crash on dev and an ugly string that displays in the archived room.

image

@rezkiy37
Copy link
Contributor

@jjcoffee Yes, I am fixing it in the scope of the upcoming PR.

@rezkiy37
Copy link
Contributor

Actively working on the issue.

@melvin-bot melvin-bot bot added the Overdue label Sep 2, 2024
@rezkiy37
Copy link
Contributor

rezkiy37 commented Sep 2, 2024

Discussing with @cristipaval in Slack.

@melvin-bot melvin-bot bot removed the Overdue label Sep 2, 2024
@rezkiy37
Copy link
Contributor

rezkiy37 commented Sep 3, 2024

Hey!
I will be OOO from 04.09 (afternoon) till 09.09. I will continue to work on this one once I am back.

@isabelastisser
Copy link
Contributor

Thanks for the update!

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label Sep 4, 2024
@rezkiy37
Copy link
Contributor

rezkiy37 commented Sep 4, 2024

Hey!
I've opened the PR (#48275) for review because the app's side is ready. One small backend improvement left. Discussion in Slack.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Sep 4, 2024
@jjcoffee
Copy link
Contributor

@isabelastisser Looks like @cristipaval is on parental leave at the moment, is it possible to get another engineer assigned to review the PR?

@isabelastisser
Copy link
Contributor

@rlinoz, any chance you can review the PR since Cristi is on leave? TIA!

@rlinoz
Copy link
Contributor

rlinoz commented Sep 10, 2024

Sure, on it.

@rlinoz rlinoz self-assigned this Sep 11, 2024
@rlinoz
Copy link
Contributor

rlinoz commented Sep 13, 2024

This has been deployed to prod #48275 (comment)

@rlinoz rlinoz added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Sep 13, 2024
@rlinoz rlinoz changed the title [$250] [HIGH] Invoicing V1 - Archive B2B invoice room when the receiver workspace is deleted [Awaiting Payment 2024-09-19][$250] [HIGH] Invoicing V1 - Archive B2B invoice room when the receiver workspace is deleted Sep 13, 2024
@jjcoffee
Copy link
Contributor

jjcoffee commented Sep 19, 2024

Since this is a CRITICAL feature for invoicing, I believe it also qualifies for $500 compensation, as on the other critical invoicing issues I worked on. cc @isabelastisser

image

@jjcoffee
Copy link
Contributor

Regression Test Proposal

  1. User A: Send an invoice to user B.
  2. User B: Open the invoice and select to Pay as business. The invoice room will be upgraded to a B2B invoice room.
  3. User B: Delete the workspace.
  4. User A and User B: Open the invoice room and verify that the footer message is This chat is no longer active because ${policyName} is no longer an active workspace.
  5. User A: Send another invoice to user B from the same workspace.
  6. User A and user B: Verify that the app creates a new invoice room.

Do we agree 👍 or 👎

@isabelastisser
Copy link
Contributor

Thanks, @jjcoffee! Offer sent in Upwork.

@isabelastisser
Copy link
Contributor

All set!

@jjcoffee
Copy link
Contributor

@isabelastisser Offer accepted, thanks!

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

No branches or pull requests

6 participants