[$250] Expense-Reimbursable toggle is disabled when opening expense in Reports first time
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.2.75-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176922/test-cases/41237504 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team Bug source: Regression TC Execution Device used: MacBook Air 15.6.1 Chrome, iPhone 15 iOS 26.1 Safari App Component: Money Requests
Action Performed:
- Sign in to ND
- Create a workspace
- Navigate to the workspace chat, create two expenses, do not open them
- Open Reports tab - Expenses, click any of the two expenses from step 3
Expected Result:
Reimbursable toggle is enabled in expense details
Actual Result:
Reimbursable toggle is disabled in expense details when opening expense in Reports for the first time
Workaround:
Unknown
Platforms:
- [ ] Android: App
- [x] Android: mWeb Chrome
- [ ] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [x] MacOS: Chrome / Safari
Screenshots/Videos
https://github.com/user-attachments/assets/d1d9748e-cae5-4386-8368-9570c4028fe4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021999278343449727840
- Upwork Job ID: 1999278343449727840
- Last Price Increase: 2025-12-12
Issue Owner
Current Issue Owner: @s77rt
Triggered auto assignment to @jliexpensify (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.
Job added to Upwork: https://www.upwork.com/jobs/~021999278343449727840
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 (External)
Able to repro!
This is highly likely a backend issue , BE team should verify:
- Is
reimbursablebeing correctly serialized in the Search API response? - Should
reimbursabledefault totruewhen not explicitly set (matching frontend behavior)? - Is there a data mapping issue between the transaction table and the Search response?
Symptom
This causes the Reimbursable toggle to show the wrong value (OFF instead of ON) when:
- User creates expense with Reimbursable: ON
- User navigates to Search
- User clicks on an expense from Search results
- Frontend merges Search data (with
reimbursable: false) into the Transaction store - Toggle displays OFF instead of ON
βοΈ This makes sense: the FE logic already exists handling fallback value to true, but that only applies when the BE value is either null / undefined:
https://github.com/Expensify/App/blob/3c5a9617a3038beabbafa8c4363657586bf69155/src/libs/TransactionUtils/index.ts#L971-L976
updatedTransaction?.reimbursable is undefined in our case, and we fallback to !!transactionReimbursable = false:
https://github.com/Expensify/App/blob/3c5a9617a3038beabbafa8c4363657586bf69155/src/components/ReportActionItem/MoneyRequestView.tsx#L982-L987
Given this, I think that when opening search page & expense without having open the expense before to hydrate that variable -> we're seeing the value as false which comes from BE since FE logic already handles fallback.
I think this needs somebody from BE to look into it and address.
πππΒ C+ reviewed
Triggered auto assignment to @AndrewGable, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Can you make a backend GitHub issue following the template? I will get it added to the backlog once we have a new issue.
@AndrewGable Oh Sorry I didn't notice you are already assigned π I have already started working on this and it seems we have two issues:
- FE issue that is the
reimbursablefield is not set correctly optimistically - BE issue that is when we open a transaction thread (that does not exist i.e. it's created on request) we are not returning the linked transaction.
Ok cool, are you addressing both issues @s77rt ?
Yes, should not take long π
Update: Raised PR. Turned out that both issues are internal. PR fixes both.
@AndrewGable Whoops! This issue is 2 days overdue. Let's get this updated quick!
No payment needed for this right? Since @ikevin127 didn't review the PR?
Yes, since this is Internal only
@s77rt Whoops! This issue is 2 days overdue. Let's get this updated quick!
PR still under review (should be ready for merge)
@AndrewGable @s77rt @jliexpensify @ikevin127 this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@s77rt Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Same ^
@s77rt Eep! 4 days overdue now. Issues have feelings too...