You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for Payment 2026-03-17][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount #67173
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: v9.1.86-2 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:https://github.com/Expensify/Expensify/issues/495513 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: Windows 11 Pro - Chrome App Component: Other
Action Performed:
Pre-conditions: Have a workspace with Delay submissions set manually and Add approvals set with an approver.
Navigate to staging.new.expensify.com
Create a scan receipt that is missing the amount and not missing the merchant
After the scan is complete, submit the expense
[Approver] Verify that after submitting, the approve button doesn't appear
Expected Result:
After submitting, the approve button doesn't appear.
Actual Result:
The approve button is present after submitting a scan expense with a missing amount.
🚨 Edited by proposal-police: This proposal was edited at 2025-07-31 10:44:12 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The approve button is present after submitting a scan expense with a missing amount.
What is the root cause of that problem?
We don't have the logic to prevent the approve action if we only have the scan request with missing value. We only check the pending card transactions.
We should do the same for secondary action and preview action. We can also do this for submit action, but the submit action is a bit different, I tested and we only don't allow submitting if the scan request is missing both amount and merchant.
To fix the next step, we can check if all transactions are pending card or scanning transaction, and we can display an optimistic next step Waiting for you to fix the issue(s) the same as buildOptimisticNextStepForPreventSelfApprovalsEnabled
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update ReportPrimaryActionUtils test accordingly for approve action to verify the approve action isn't inclued if all transactions are pending or scan request without amount.
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]Web - Expense - Approve button is present after submitting a scan expense with missing amount[/-][+][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/+]on Jul 28, 2025
Thanks for your proposals !
All proposals look good
But we need to fix also an issue when we have Waiting for you to approve expense(s) message
And in this case we need to show Waiting for you to fix the issue(s) message because we still won't be able to approve until we fix the amount
changed the title [-][Hold][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/-][+][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/+]on Mar 17, 2026
Here is one regression, but since the requirements for the PR have changed several times, as a result of which the PR has been delayed, I think it will be better to leave the price unchanged
changed the title [-][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/-][+][Due for Payment 2026-03-17][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/+]on Mar 17, 2026
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Jul 25, 2025
Triggered auto assignment to @OfstadC (
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.mkzie2 commentedon Jul 25, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-07-31 10:44:12 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The approve button is present after submitting a scan expense with a missing amount.
What is the root cause of that problem?
We don't have the logic to prevent the approve action if we only have the scan request with missing value. We only check the pending card transactions.
App/src/libs/ReportPrimaryActionUtils.ts
Lines 129 to 131 in 9a1f97f
What changes do you think we should make in order to solve the problem?
We can use
isPendingCardOrScanningTransactionto check if every transactions are pending card or scan request without amount like we do hereApp/src/libs/ReportPrimaryActionUtils.ts
Lines 129 to 131 in 9a1f97f
We should do the same for secondary action and preview action. We can also do this for submit action, but the submit action is a bit different, I tested and we only don't allow submitting if the scan request is missing both amount and merchant.
To fix the next step, we can check if all transactions are pending card or scanning transaction, and we can display an optimistic next step
Waiting for you to fix the issue(s)the same asbuildOptimisticNextStepForPreventSelfApprovalsEnabledApp/src/components/MoneyReportHeader.tsx
Line 323 in 54db848
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update
ReportPrimaryActionUtilstest accordingly for approve action to verify the approve action isn't inclued if all transactions are pending or scan request without amount.What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
samranahm commentedon Jul 25, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-08-01 10:02:48 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - Expense - Approve button is present after submitting a scan expense with missing amount
What is the root cause of that problem?
We are currently not checking the report total and return true if the report is processing here
App/src/libs/ReportPrimaryActionUtils.ts
Lines 139 to 141 in 4f305ce
What changes do you think we should make in order to solve the problem?
we should explicitly check the report total with
report?.total === 0here
App/src/libs/ReportPrimaryActionUtils.ts
Lines 125 to 127 in 4f305ce
like we did in
isSubmitActionhereApp/src/libs/ReportSecondaryActionUtils.ts
Lines 130 to 132 in 4f305ce
NextStepUtilaWhat specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We should update the
ReportPrimaryActionUtilsTestto include this checkWhat alternative solutions did you explore? (Optional)
we can add this check in final return
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
[-]Web - Expense - Approve button is present after submitting a scan expense with missing amount[/-][+][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/+]melvin-bot commentedon Jul 28, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021949894641800532742
melvin-bot commentedon Jul 28, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (
External)ZhenjaHorbach commentedon Jul 31, 2025
Thanks for your proposals !
All proposals look good
But we need to fix also an issue when we have Waiting for you to approve expense(s) message
And in this case we need to show Waiting for you to fix the issue(s) message because we still won't be able to approve until we fix the amount
Could you update your proposals ?
34 remaining items
[-][Hold][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/-][+][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/+]melvin-bot commentedon Mar 17, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)mallenexpensify commentedon Mar 17, 2026
@jasperhuangg , @ZhenjaHorbach mentioned
Do you agree?
[-][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/-][+][Due for Payment 2026-03-17][$250] Web - Expense - Approve button is present after submitting a scan expense with missing amount[/+]jasperhuangg commentedon Mar 17, 2026
I'm fine with that, checking with @trjExpensify since he was helping to do the product review which surfaced most of the requirements changes.
trjExpensify commentedon Mar 17, 2026
Yeah, fine with that. These two issues came throughout the course of this one which had an impact on it to iron out the actual expected behaviour:
https://github.com/Expensify/Expensify/issues/531162
#70112
mallenexpensify commentedon Mar 17, 2026
Payment Summary
Contributor: @mkzie2 paid $250 via Upwork
Contributor+: @ZhenjaHorbach due $250 via NewDot
^ Test case created
Thanks y'all!
garrettmknight commentedon Mar 18, 2026
$250 approved for @ZhenjaHorbach