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-24] [$250] Invoices - Hold option is present in context menu before invoice report is opened #47570

Open
6 tasks done
IuliiaHerets opened this issue Aug 16, 2024 · 46 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

@IuliiaHerets
Copy link

IuliiaHerets commented Aug 16, 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: v9.0.21-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4864172
Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Send invoice.
  3. Enter amount, select any user and send the invoice.
  4. Without clicking on the invoice preview (important), right click on the invoice preview in invoice chat.
  5. Note that Hold option is present.
  6. Click on the invoice preview.
  7. Return to invoice chat.
  8. Right click on the invoice preview.
  9. Note that Hold option disappears.

Expected Result:

In Step 5, Hold option should not appear for invoice because invoices cannot be held.

Actual Result:

In Step 5, Hold option appears for invoice.
In Step 9, Hold option disappears after user opens the invoice report.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6573869_1723821203429.20240816_230930.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021839686152805650965
  • Upwork Job ID: 1839686152805650965
  • Last Price Increase: 2024-09-27
Issue OwnerCurrent Issue Owner: @VictoriaExpensify
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 16, 2024
Copy link

melvin-bot bot commented Aug 16, 2024

Triggered auto assignment to @VictoriaExpensify (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 #vip-bills

@IuliiaHerets
Copy link
Author

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

@melvin-bot melvin-bot bot added the Overdue label Aug 19, 2024
@codewaseem
Copy link
Contributor

codewaseem commented Aug 19, 2024

Edited by proposal-police: This proposal was edited at 2024-09-17 16:16:35 UTC.

Proposal

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

The hold option appears in the context menu which should not happen for invoices.

What is the root cause of that problem?

The areHoldRequirementsMet condition doesn't exclude invoice type here:

const areHoldRequirementsMet = isMoneyRequestOrReport && !ReportUtils.isArchivedRoom(transactionThreadReportID ? childReport : parentReport, parentReportNameValuePairs);

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

Making sure areHoldRequirementsMet returns false for invoice type solves this problem. Here are the changes to be made

   const isMoneyRequestOrReport = isMoneyRequestReport || isSingleTransactionView;

    const areHoldRequirementsMet =
        !isInvoiceReport && isMoneyRequestOrReport && !ReportUtils.isArchivedRoom(transactionThreadReportID ? childReport : parentReport, parentReportNameValuePairs);

Added !isInvoiceReport to areHoldRequirementsMet and removed isInvoiceReport from isMoneyRequestOrReport which is not need.

To hide the hold option from ReportDetails view, need to update the ReportUtils.canHoldUnholdReportAction function with the following


function canHoldUnholdReportAction(reportAction: OnyxInputOrEntry<ReportAction>): {canHoldRequest: boolean; canUnholdRequest: boolean} {
    if (!ReportActionsUtils.isMoneyRequestAction(reportAction)) {
        return {canHoldRequest: false, canUnholdRequest: false};
    }

    const moneyRequestReportID = ReportActionsUtils.getOriginalMessage(reportAction)?.IOUReportID ?? 0;
    const moneyRequestReport = getReportOrDraftReport(String(moneyRequestReportID));

    if (!moneyRequestReportID || !moneyRequestReport) {
        return {canHoldRequest: false, canUnholdRequest: false};
    }

    if (isInvoiceReport(moneyRequestReport)) {
        return {
            canHoldRequest: false,
            canUnholdRequest: false,
        };
    }
   ...

What alternative solutions did you explore? (Optional)

Copy link

melvin-bot bot commented Aug 19, 2024

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

@VictoriaExpensify
Copy link
Contributor

I agree this is an issue and we should fix it!

@melvin-bot melvin-bot bot removed the Overdue label Aug 20, 2024
@VictoriaExpensify VictoriaExpensify added External Added to denote the issue can be worked on by a contributor Overdue labels Aug 20, 2024
Copy link

melvin-bot bot commented Aug 20, 2024

Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

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

melvin-bot bot commented Aug 20, 2024

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

Copy link

melvin-bot bot commented Aug 23, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Aug 23, 2024
@abdulrahuman5196
Copy link
Contributor

Checking now

@melvin-bot melvin-bot bot removed the Overdue label Aug 25, 2024
@codewaseem
Copy link
Contributor

Friendly bump @abdulrahuman5196.

@abdulrahuman5196
Copy link
Contributor

Sorry checking again

@abdulrahuman5196
Copy link
Contributor

abdulrahuman5196 commented Aug 29, 2024

@VictoriaExpensify / @IuliiaHerets I don't understand the issue? Are we not supposed to show the Hold in the context menu, because if I go to the invoice view I can see the Hold option.
If we shouldn't show the Hold option in context, under what conditions we shouldn't show?

Screen.Recording.2024-08-29.at.8.29.58.PM.mov

Copy link

melvin-bot bot commented Sep 3, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Sep 3, 2024
Copy link

melvin-bot bot commented Sep 5, 2024

@abdulrahuman5196, @VictoriaExpensify Still overdue 6 days?! Let's take care of this!

@VictoriaExpensify
Copy link
Contributor

Posting to get some clarification on this one

@VictoriaExpensify
Copy link
Contributor

@mjasikowski
Copy link
Contributor

@codewaseem I've asked the team to help with creating the job, let's make sure it's up first and then you can work on the PR. Apologies, I missed the automation failing message.

@mallenexpensify mallenexpensify added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Sep 27, 2024
@melvin-bot melvin-bot bot changed the title Invoices - Hold option is present in context menu before invoice report is opened [$250] Invoices - Hold option is present in context menu before invoice report is opened Sep 27, 2024
Copy link

melvin-bot bot commented Sep 27, 2024

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

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

melvin-bot bot commented Sep 27, 2024

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

@mallenexpensify mallenexpensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 27, 2024
@mallenexpensify
Copy link
Contributor

@codewaseem please apply for the Upwork job and comment here once you have, then we'll hire you. Thx
upwork.com/jobs/~021839686152805650965

@codewaseem
Copy link
Contributor

@mallenexpensify I have applied for the Upwork job, please have a look. Thanks.

@mallenexpensify
Copy link
Contributor

Offer sent @codewaseem !

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Sep 28, 2024
@codewaseem
Copy link
Contributor

codewaseem commented Sep 28, 2024

@mallenexpensify thanks for the offer!

@abdulrahuman5196 @mjasikowski PR is ready for review. This is my first PR here, please let me know if I have missed anything.

Thanks!

@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 17, 2024
@melvin-bot melvin-bot bot changed the title [$250] Invoices - Hold option is present in context menu before invoice report is opened [HOLD for payment 2024-10-24] [$250] Invoices - Hold option is present in context menu before invoice report is opened Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

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

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

Copy link

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

  • [@abdulrahuman5196] The PR that introduced the bug has been identified. Link to the PR:
  • [@abdulrahuman5196] 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:
  • [@abdulrahuman5196] 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:
  • [@abdulrahuman5196] Determine if we should create a regression test for this bug.
  • [@abdulrahuman5196] 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.
  • [@VictoriaExpensify] 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 Overdue and removed Weekly KSv2 labels Oct 23, 2024
@VictoriaExpensify
Copy link
Contributor

Payment Summary:
Contributor: @codewaseem paid $250 via Upwork

@abdulrahuman5196 - can you please complete the checklist and I'll organise payment. TY!

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

melvin-bot bot commented Oct 24, 2024

Payment Summary

Upwork Job

BugZero Checklist (@VictoriaExpensify)

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

No branches or pull requests

6 participants