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 2025-10-21] [$250] Expense - Review and red dot display after submit manual expense which add picture to receipt #70038
Version Number: v9.2.2-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail: Explore Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Device used: Win 11/Chrome App Component: Money Requests
Action Performed:
Precondition: Create a workspace, enable Delay submissions manually, Add approvals and Make or track payments
Please re-state the problem that we are trying to solve in this issue.
Review button and red dot display after submit manual expense which add picture to receipt, but no error message in expense detail
What is the root cause of that problem?
The issue is in the canReview function in ReportPreviewActionUtils where it uses hasAnyViolations which checks if violations exist, but doesn't consider whether those violations are visible to the current user
receiptNotSmartScanned: should be shown if all the following are true:
The user has access to the workspace
The user is not the submitter, and
The user is not a workspace admin or the report isn't open
This causes hasAnyViolations to return true (violations exist) but the submitter sees no error messages (violations not visible), resulting in the Review button showing incorrectly
What changes do you think we should make in order to solve the problem?
• Update the canReview function to check for violations that are actually visible to the current user by using the existing shouldShowViolation logic:
to do that, we need to add a helper function (can be added as a util function)
Please re-state the problem that we are trying to solve in this issue.
Expense - Review and red dot display after submit manual expense which add picture to receipt
What is the root cause of that problem?
The user was seeing a receiptNotSmartScanned violation (red dot indicator) even though they were the submitter of the expense. According to the existing shouldShowViolation logic in TransactionUtils.ts, this violation should NOT be shown to submitters:
However, the violation was still appearing in places:
Report Preview - Showing "Review" button instead of "Submit/Approve"
Left Hand Navigation (LHN) - Showing red dot indicator
Search preview
...
What changes do you think we should make in order to solve the problem?
Fix Report Preview - Showing "Review" button instead of "Submit/Approve"
Create util function for check visible vilotions for LHN
Then update condition to show violations RBR In LHN to match with report details
constpolicy=getPolicy(report.policyID);// If any report has a violation that should be visible to the current user, then it should have a RBRconstpotentialReports=Object.values(reportsByPolicyID[report.policyID]??{})??[];returnpotentialReports.some((potentialReport)=>{if(!potentialReport||isInvoiceReport(potentialReport)){returnfalse;}returnhasVisibleViolationsForLHN(potentialReport,transactionViolations,policy);});
consthasVisibleViolations=hasAnyViolations&&hasVisibleViolationsForUser(report,violations,policy,transactions);
...
// Update hasAnyViolations to use hasVisibleViolations in if statement
We need to do similar to all other places that showing error indicator
Note: We may have some minor changes and refactor which can be discussed in PR phase if needed
Before:
After:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update tests to cover this case for LHN and report preview
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.
changed the title [-]Expense - Review and red dot display after submit manual expense which add picture to receipt[/-][+][$250] Expense - Review and red dot display after submit manual expense which add picture to receipt[/+]on Sep 10, 2025
changed the title [-][$250] Expense - Review and red dot display after submit manual expense which add picture to receipt[/-][+][Due for payment 2025-10-21] [$250] Expense - Review and red dot display after submit manual expense which add picture to receipt[/+]on Oct 14, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.30-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@brunovjk@zanyrenney The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] 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: No PR directly introduced this bug; it's more of an edge case. We've updated the violation filter based on user visibility.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Test:
Create a new workspace
Create a new manual expense
Go to expnse details
Add receipt
Submit the expense
Go to expense preview and validate there is no error indicator
Go to Left Hand Navigation (LHN) and validate there is no error indicator
Go to Reports > Expenses and validate there is no error indicator
Activity
melvin-bot commentedon Sep 7, 2025
Triggered auto assignment to @zanyrenney (
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.daledah commentedon Sep 7, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Review and red dot display after submit manual expense which add picture to receipt
What is the root cause of that problem?
we have this violation when the user added the image manual
Then we will return as
falseincanApprovefunction because ofhasAnyViolationsistrueApp/src/libs/ReportPreviewActionUtils.ts
Line 102 in 2c4dcba
Additionally we are not showing the
RECEIPT_NOT_SMART_SCANNEDviolation to the submitter hereApp/src/libs/TransactionUtils/index.ts
Lines 1070 to 1072 in 2c4dcba
What changes do you think we should make in order to solve the problem?
We should also show this violation to the submitter
App/src/libs/TransactionUtils/index.ts
Lines 1070 to 1072 in 2c4dcba
Note: We can review the condition here, we can add approver, admin... in this condition depending on the decision of the internal team
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
We can write a test function for the
shouldShowViolationfunction to cover this caseWhat alternative solutions did you explore? (Optional)
abzokhattab commentedon Sep 7, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Review button and red dot display after submit manual expense which add picture to receipt, but no error message in expense detail
What is the root cause of that problem?
The issue is in the
canReviewfunction inReportPreviewActionUtilswhere it useshasAnyViolationswhich checks if violations exist, but doesn't consider whether those violations are visible to the current userApp/src/libs/ReportPreviewActionUtils.ts
Line 197 in 2c4dcba
When a submitter manually adds a receipt, a
RECEIPT_NOT_SMART_SCANNEDviolation is created but hidden from the submitter (per the design in issue [Due for payment 2025-07-23] [$500] [Auth Violations] Update client code for NewDot and Classic versions of the app to decide when to show some violations #63894:App/src/libs/TransactionUtils/index.ts
Lines 1070 to 1072 in 2c4dcba
hasAnyViolationsto returntrue(violations exist) but the submitter sees no error messages (violations not visible), resulting in the Review button showing incorrectlyWhat changes do you think we should make in order to solve the problem?
• Update the
canReviewfunction to check for violations that are actually visible to the current user by using the existingshouldShowViolationlogic:canReviewfunction use:and update this to :
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
RECEIPT_NOT_SMART_SCANNEDviolation exists but is hiddenRECEIPT_NOT_SMART_SCANNEDviolation is visibleWhat alternative solutions did you explore? (Optional)
NA
lorretheboy commentedon Sep 8, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - Review and red dot display after submit manual expense which add picture to receipt
What is the root cause of that problem?
The user was seeing a receiptNotSmartScanned violation (red dot indicator) even though they were the submitter of the expense. According to the existing shouldShowViolation logic in TransactionUtils.ts, this violation should NOT be shown to submitters:
App/src/libs/TransactionUtils/index.ts
Lines 1070 to 1072 in 27f5fc2
However, the violation was still appearing in places:
Report Preview - Showing "Review" button instead of "Submit/Approve"
Left Hand Navigation (LHN) - Showing red dot indicator
Search preview
...
What changes do you think we should make in order to solve the problem?
Create util function for check visible vilotions for LHN
App/src/libs/ReportUtils.ts
Line 8122 in 9b653ae
Then update condition to show violations RBR In LHN to match with report details
App/src/libs/ReportUtils.ts
Lines 8140 to 8153 in 9b653ae
Create function to check visible for violations for user
App/src/libs/ReportPreviewActionUtils.ts
Lines 196 to 202 in d521abf
App/src/libs/SearchUIUtils.ts
Line 1156 in c5e797a
We need to do similar to all other places that showing error indicator
Note: We may have some minor changes and refactor which can be discussed in PR phase if needed
Before:
After:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Update tests to cover this case for LHN and report preview
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.
[-]Expense - Review and red dot display after submit manual expense which add picture to receipt[/-][+][$250] Expense - Review and red dot display after submit manual expense which add picture to receipt[/+]melvin-bot commentedon Sep 10, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021965736867491332301
melvin-bot commentedon Sep 10, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (
External)23 remaining items
[-][$250] Expense - Review and red dot display after submit manual expense which add picture to receipt[/-][+][Due for payment 2025-10-21] [$250] Expense - Review and red dot display after submit manual expense which add picture to receipt[/+]melvin-bot commentedon Oct 14, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Oct 14, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.30-6 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 2025-10-21. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Oct 14, 2025
@brunovjk @zanyrenney The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
brunovjk commentedon Oct 20, 2025
BugZero Checklist:
[Contributor] 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: No PR directly introduced this bug; it's more of an edge case. We've updated the violation filter based on user visibility.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal
Test:
Do we agree 👍 or 👎
zanyrenney commentedon Oct 22, 2025
Payment summary
@abzokhattab requires payment automatic offer (Contributor) - paid via job on Upwork.
@brunovjk requires payment through NewDot Manual Requests - please request $250 via ND.
garrettmknight commentedon Oct 24, 2025
$250 approved for @brunovjk