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-05] [$250] Invoices - Invoice thread (x owes y) appears in participant list when sending invoice offline #49941

Closed
6 tasks done
lanitochka17 opened this issue Sep 30, 2024 · 28 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 Sep 30, 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.41-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go offline
  3. Create a new workspace
  4. Go to workspace settings > More features
  5. Enable Invoices
  6. Go to FAB > Send invoices
  7. Send invoice to anyone in offline mode
  8. Go to FAB > Send invoices
  9. Enter amount > Next

Expected Result:

Invoice thread (report title "user owes x") should not appear in the user list

Actual Result:

Invoice thread (report title "user owes x") appears in the user list
When selecting the thread as the recipient, it ends up sending an invoice to yourself

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

Bug6619704_1727643513279.20240930_045054.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021844118840980357719
  • Upwork Job ID: 1844118840980357719
  • Last Price Increase: 2024-10-16
  • Automatic offers:
    • mkzie2 | Contributor | 104518233
Issue OwnerCurrent Issue Owner: @JmillsExpensify
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

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

@lanitochka17
Copy link
Author

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-bills

@mkzie2
Copy link
Contributor

mkzie2 commented Sep 30, 2024

Edited by proposal-police: This proposal was edited at 2023-10-05 15:00:00 UTC.

Proposal

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

Invoice report is included in send invoice participants list.

What is the root cause of that problem?

We're excluding multiple-participants reports when building invoice participants list !includeMultipleParticipantReports && !reportOption.login:

if (!isCurrentUserOwnedPolicyExpenseChatThatCouldShow && !includeMultipleParticipantReports && !reportOption.login && !shouldShowInvoiceRoom) {
continue;
}

Where an undefined reportOption.login indicates a report with multiple participants (i.e. reports with defined login has 1 participant only).

When we create the optimistic invoice report, for participants, we only include the current user account, not the receiver account:

App/src/libs/ReportUtils.ts

Lines 4352 to 4356 in b76fb45

participants: {
[currentUserAccountID ?? -1]: {
notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
},
},

That makes the invoice report be misunderstood as report with only 1 participant while it is supposed to be multiple (compared to actual BE response). And thus be included in invoice participants list.

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

Add receiverAccountID to the optimistic invoice report's participants above.

participants: {
    [currentUserAccountID ?? -1]: {
        notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
    },
    [receiverAccountID]: {
        notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN,
    },
},

@melvin-bot melvin-bot bot added the Overdue label Oct 2, 2024
Copy link

melvin-bot bot commented Oct 3, 2024

@JmillsExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

Copy link

melvin-bot bot commented Oct 7, 2024

@JmillsExpensify 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

Copy link

melvin-bot bot commented Oct 9, 2024

@JmillsExpensify 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@JmillsExpensify JmillsExpensify added the External Added to denote the issue can be worked on by a contributor label Oct 9, 2024
@melvin-bot melvin-bot bot changed the title Invoices - Invoice thread (x owes y) appears in participant list when sending invoice offline [$250] Invoices - Invoice thread (x owes y) appears in participant list when sending invoice offline Oct 9, 2024
Copy link

melvin-bot bot commented Oct 9, 2024

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

@melvin-bot melvin-bot bot added 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

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

@JmillsExpensify
Copy link

Opened up to external

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

melvin-bot bot commented Oct 14, 2024

@JmillsExpensify @rushatgabhane this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Oct 14, 2024
Copy link

melvin-bot bot commented Oct 15, 2024

@JmillsExpensify, @rushatgabhane Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Oct 16, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@JmillsExpensify
Copy link

Still the same. Waiting for proposals

@mkzie2
Copy link
Contributor

mkzie2 commented Oct 16, 2024

@rushatgabhane Can you review my proposal #49941 (comment)?

Copy link

melvin-bot bot commented Oct 17, 2024

@JmillsExpensify, @rushatgabhane Still overdue 6 days?! Let's take care of this!

@rushatgabhane
Copy link
Member

@mkzie2's proposal LGTM 🎀 👀 🎀

Copy link

melvin-bot bot commented Oct 17, 2024

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

@Anaslancer
Copy link
Contributor

@lanitochka17 How did you pass the step of company info (name and url) at the invoice?

Copy link

melvin-bot bot commented Oct 18, 2024

📣 @Anaslancer! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@melvin-bot melvin-bot bot added Overdue and removed Help Wanted Apply this label when an issue is open to proposals by contributors labels Oct 21, 2024
Copy link

melvin-bot bot commented Oct 21, 2024

📣 @mkzie2 🎉 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 📖

Copy link

melvin-bot bot commented Oct 21, 2024

@JmillsExpensify, @arosiclair, @rushatgabhane, @mkzie2 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Overdue Daily KSv2 labels Oct 22, 2024
@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 29, 2024
@melvin-bot melvin-bot bot changed the title [$250] Invoices - Invoice thread (x owes y) appears in participant list when sending invoice offline [HOLD for payment 2024-11-05] [$250] Invoices - Invoice thread (x owes y) appears in participant list when sending invoice offline Oct 29, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 29, 2024
Copy link

melvin-bot bot commented Oct 29, 2024

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

Copy link

melvin-bot bot commented Oct 29, 2024

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

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

Copy link

melvin-bot bot commented Oct 29, 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:

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

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

Payment summary:

@JmillsExpensify
Copy link

Paid contributor via Upwork. @rushatgabhane I'm going to close this one out. I'm assuming you already have it on your radar, so please make sure that you finish the checklist and then submit an expense via Expensify.

@garrettmknight
Copy link
Contributor

$250 approved for @rushatgabhane

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