Open IuliiaHerets opened 1 month ago
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.
We think that this bug might be related to #vip-bills
@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
Edited by proposal-police: This proposal was edited at 2024-09-17 16:16:35 UTC.
The hold option appears in the context menu which should not happen for invoices.
The areHoldRequirementsMet
condition doesn't exclude invoice type here:
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,
};
}
...
@VictoriaExpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!
I agree this is an issue and we should fix it!
Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External
)
@abdulrahuman5196, @VictoriaExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Checking now
Friendly bump @abdulrahuman5196.
Sorry checking again
@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?
https://github.com/user-attachments/assets/29d875cd-507c-4c32-8416-b6ada79be83b
@abdulrahuman5196, @VictoriaExpensify Huh... This is 4 days overdue. Who can take care of this?
@abdulrahuman5196, @VictoriaExpensify Still overdue 6 days?! Let's take care of this!
Posting to get some clarification on this one
Not overdue
Still getting clarification on this one!
Ok chatted about this one in #wave_Collect. We are not allowing Invoices to be held (if that changes, it will be way down the track), so yes - we should proceed with a fix for this one.
@abdulrahuman5196 - we don't really want the Hold option to appear at all for Invoices. I'm really sorry, but is the video you've linked there showing anything different to what was posted in the initial bug report? It looks like it's the same thing but, if I've missed something and you are seeing the Hold option for Invoices somewhere else, then a bug report should be created for it
bump @abdulrahuman5196
@abdulrahuman5196, @VictoriaExpensify Eep! 4 days overdue now. Issues have feelings too...
Checking now.
Ok chatted about this one in #wave_Collect. We are not allowing Invoices to be held (if that changes, it will be way down the track), so yes - we should proceed with a fix for this one.
Got it.
we don't really want the Hold option to appear at all for Invoices. I'm really sorry, but is the video you've linked there showing anything different to what was posted in the initial bug report? It looks like it's the same thing but, if I've missed something and you are seeing the Hold option for Invoices somewhere else, then a bug report should be created for it
@VictoriaExpensify
This original OP issue is happening and the bug is also happening at a different place as pointed in the below video. Should we handle it part of this issue or create separate issue for it?
https://github.com/user-attachments/assets/897ebc58-f99a-4121-985c-2e39d204bbad
Proposal Updated To hide hold option from ReportDetails view.
@abdulrahuman5196
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:
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:
Screenshots/Videos
https://github.com/user-attachments/assets/c9742567-929c-47e0-bdd2-3d8841f59354
View all open jobs on GitHub
Issue Owner
Current Issue Owner: @abdulrahuman5196