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
Version Number: 9.3.34.0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#82948 Email or phone of affected tester (no customers):ibellicotest+2250@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Money Requests
Action Performed:
Prerequisite: Account has Self DM.
Open the Expensify app.
Navigate to Self DM.
Create two manual expenses without category.
Navigate to "Reports" > "Expenses"
Select both expenses, tap on dropdown menu and select "Edit Multiple"
Edit some of the available fields (For example: Merchant and description), but leave "Category" field unedited.
Save the editions.
Note that a "Missing Category" error, appears on expenses after the editions are applied.
Expected Result:
"Missing Category" error shouldn´t be visible on unreported expenses.
Actual Result:
"Missing Category" error, appears on unreported expenses after editing other fields and leaving "Category" unedited.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #82948 - "Reapply "Feat: bulk edit multiple"" by @pasyukevich (High confidence) Related Issues: None
Recommendation: REVERT
PR #82948 introduces bulk edit functionality but has a critical bug in how it handles unreported expenses from Self DMs. The PR should be reverted to unblock the deploy.
Labels: No label changes needed - keeping DeployBlockerCash as this is a frontend bug affecting the App
Detailed Analysis
Evidence
The issue occurs when bulk editing unreported expenses that were created in a Self DM:
User creates expenses in Self DM without category
Views them in Reports > Expenses (unreported expenses view)
Bulk edits other fields (merchant, description) but leaves category unchanged
"Missing Category" error incorrectly appears
PR #82948 introduced the updateMultipleMoneyRequests function which performs bulk edits. The issue is reproducible only in staging where this PR is deployed, and the issue description explicitly links to this PR.
Verification
I verified that PR #82948 modifies src/libs/actions/IOU/index.ts, which contains the bulk edit logic. The changes include:
New updateMultipleMoneyRequests function (line 13979+)
New violation calculation logic for bulk edits
Root Cause
The bug is in /home/runner/_work/App/App/src/libs/actions/IOU/index.ts at line 14156:
ViolationsUtils.getViolationsOnyxData(updatedTransaction,optimisticViolations,policy,policyTagList,policyCategories??{},hasDependentTags(policy,policyTagList),isInvoiceReportReportUtils(iouReport),isSelfDM(iouReport),// <-- LINE 14156: This is the problemiouReport,isFromExpenseReport,)
The Problem:
Unreported expenses have transaction.reportID = "0" (CONST.REPORT.UNREPORTED_REPORT_ID)
At line 13997, iouReport = reports?.["report_0"] which is undefined (no report exists with ID "0")
isSelfDM(undefined) returns false
getViolationsOnyxData in ViolationsUtils.ts (line 385-386) then adds a "missingCategory" violation because:
The policy requires categories
Category is not set
It thinks its NOT a Self DM (because isSelfDM param is false)
Why This Matters:
Self DM expenses should NOT show "missing category" violations even if the policy requires categories. The code loses the Self DM context for unreported expenses, incorrectly applying violation rules.
Technical Details
The violation logic in /home/runner/_work/App/App/src/libs/Violations/ViolationsUtils.ts (lines 384-387) states:
// Add missingCategory violation if category is required and not setif(!hasMissingCategoryViolation&&policyRequiresCategories&&!categoryKey&&!isSelfDM){newTransactionViolations.push({name: missingCategory,type: CONST.VIOLATION_TYPES.VIOLATION,showInReview: true});}
The !isSelfDM check should prevent this violation for Self DM expenses, but it fails because the Self DM context is lost for unreported expenses.
Please re-state the problem that we are trying to solve in this issue.
When users bulk-edit unreported expenses (e.g., editing only Merchant and Description) but leave the "Category" field untouched, a "Missing Category" error/violation appears on the expenses after saving. This error should not appear on unreported expenses that never had it before.
What is the root cause of that problem?
There is an asymmetry between expense creation and bulk edit regarding violation computation for unreported expenses.
if(policy){// <-- No UNREPORTED_REPORT_ID check!
...
optimisticData.push(ViolationsUtils.getViolationsOnyxData(updatedTransaction,optimisticViolations,
...
isSelfDM(iouReport),// returns false for unreported expenses
...
),);}
When any field is bulk-edited, ViolationsUtils.getViolationsOnyxData() runs on the full transaction. For unreported expenses without a category, it evaluates (ViolationsUtils.ts:385):
policyRequiresCategories is true (policy has categories enabled)
categoryKey is falsy (expense had no category)
isSelfDM is false (because iouReport is undefined for unreported expenses — reports?.[report_0] resolves to undefined)
hasMissingCategoryViolation is false (violations were empty since creation skipped them)
This results in a fresh missingCategory violation being optimistically added even though category was never edited.
What changes do you think we should make in order to solve the problem?
Add the UNREPORTED_REPORT_ID guard to the violation computation block in updateMultipleMoneyRequests at src/libs/actions/IOU/index.ts:14136, consistent with the creation-time behavior:
This ensures unreported expenses skip optimistic violation computation during bulk edit, matching the intentional behavior established at creation time.
What alternative solutions did you explore? (Optional)
An alternative would be to fix the isSelfDM check for unreported expenses by looking up the Self DM report directly rather than deriving it from iouReport (which is undefined when reportID is '0'). However, this would change the existing design decision that unreported expenses should not compute violations at all, so the guard approach is more consistent.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
Activity
melvin-bot commentedon Mar 10, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #82948
melvin-bot commentedon Mar 10, 2026
💬 A slack conversation has been started in #expensify-open-source
melvin-bot commentedon Mar 10, 2026
Triggered auto assignment to @trjExpensify (
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.github-actions commentedon Mar 10, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon Mar 10, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #82948 - "Reapply "Feat: bulk edit multiple"" by @pasyukevich (High confidence)
Related Issues: None
Recommendation: REVERT
PR #82948 introduces bulk edit functionality but has a critical bug in how it handles unreported expenses from Self DMs. The PR should be reverted to unblock the deploy.
Labels: No label changes needed - keeping DeployBlockerCash as this is a frontend bug affecting the App
Detailed Analysis
Evidence
The issue occurs when bulk editing unreported expenses that were created in a Self DM:
PR #82948 introduced the
updateMultipleMoneyRequestsfunction which performs bulk edits. The issue is reproducible only in staging where this PR is deployed, and the issue description explicitly links to this PR.Verification
I verified that PR #82948 modifies
src/libs/actions/IOU/index.ts, which contains the bulk edit logic. The changes include:updateMultipleMoneyRequestsfunction (line 13979+)Root Cause
The bug is in
/home/runner/_work/App/App/src/libs/actions/IOU/index.tsat line 14156:The Problem:
transaction.reportID = "0"(CONST.REPORT.UNREPORTED_REPORT_ID)iouReport = reports?.["report_0"]which isundefined(no report exists with ID "0")isSelfDM(undefined)returnsfalsegetViolationsOnyxDatain ViolationsUtils.ts (line 385-386) then adds a "missingCategory" violation because:isSelfDMparam isfalse)Why This Matters:
Self DM expenses should NOT show "missing category" violations even if the policy requires categories. The code loses the Self DM context for unreported expenses, incorrectly applying violation rules.
Technical Details
The violation logic in
/home/runner/_work/App/App/src/libs/Violations/ViolationsUtils.ts(lines 384-387) states:The
!isSelfDMcheck should prevent this violation for Self DM expenses, but it fails because the Self DM context is lost for unreported expenses.MelvinBot commentedon Mar 10, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When users bulk-edit unreported expenses (e.g., editing only Merchant and Description) but leave the "Category" field untouched, a "Missing Category" error/violation appears on the expenses after saving. This error should not appear on unreported expenses that never had it before.
What is the root cause of that problem?
There is an asymmetry between expense creation and bulk edit regarding violation computation for unreported expenses.
At creation time (
src/libs/actions/IOU/index.ts:2629-2631), violation computation is explicitly skipped for unreported expenses:At bulk edit time (
src/libs/actions/IOU/index.ts:14136), theUNREPORTED_REPORT_IDguard is missing:When any field is bulk-edited,
ViolationsUtils.getViolationsOnyxData()runs on the full transaction. For unreported expenses without a category, it evaluates (ViolationsUtils.ts:385):All conditions are met because:
policyRequiresCategoriesis true (policy has categories enabled)categoryKeyis falsy (expense had no category)isSelfDMis false (becauseiouReportisundefinedfor unreported expenses —reports?.[report_0]resolves toundefined)hasMissingCategoryViolationis false (violations were empty since creation skipped them)This results in a fresh
missingCategoryviolation being optimistically added even though category was never edited.What changes do you think we should make in order to solve the problem?
Add the
UNREPORTED_REPORT_IDguard to the violation computation block inupdateMultipleMoneyRequestsatsrc/libs/actions/IOU/index.ts:14136, consistent with the creation-time behavior:Change the condition from:
to:
This ensures unreported expenses skip optimistic violation computation during bulk edit, matching the intentional behavior established at creation time.
What alternative solutions did you explore? (Optional)
An alternative would be to fix the
isSelfDMcheck for unreported expenses by looking up the Self DM report directly rather than deriving it fromiouReport(which isundefinedwhenreportIDis'0'). However, this would change the existing design decision that unreported expenses should not compute violations at all, so the guard approach is more consistent.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.IuliiaHerets commentedon Mar 10, 2026
Chrome / 9.3.34-1 and Samsung A52 / Android 14
No Edit Multiple option
Screen.Recording.2026-03-10.at.19.07.13.mp4
bulk.select.mp4
marcaaron commentedon Apr 3, 2026
Fixed in #84756