Propagate billable flag through split expense flow#84600
Conversation
When a billable expense is split, the billable property was not being propagated to the split transactions. This adds billable to the SplitExpense type and ensures it is passed through initSplitExpenseItemData and the splits API parameter array, mirroring the existing reimbursable pattern. Co-authored-by: Bernhard Owen Josephus <bernhardoj@users.noreply.github.com>
|
I created this PR from an upstream branch since I don't have push access to your fork. To take ownership of this branch and be able to push updates, run: Then you can close this PR and open a new one from your fork. |
|
The failing check ( Analysis: The failure is in
This PR only modifies Evidence: The timeout and unmounted renderer errors are characteristic of a flaky UI test that renders the full Retrying the workflow should resolve this. |
|
@MelvinBot please merge with the main branch and then mark this PR as ready for review |
…gInSplitExpenses Co-authored-by: Bernhard Owen Josephus <bernhardoj@users.noreply.github.com>
|
@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
Done! I've merged |
|
The failing check Analysis: The Android build failed because an external Maven repository ( Evidence: This PR only modifies |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safariweb.mp4 |
|
@MelvinBot please merge with the |
…gInSplitExpenses Co-authored-by: Bernhard Owen Josephus <bernhardoj@users.noreply.github.com>
|
Done! I've merged |
|
@cristipaval Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🚧 @cristipaval has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/cristipaval in version: 9.3.49-0 🚀
Bundle Size Analysis (Sentry): |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.3.49-2 🚀
|
Explanation of Change
When a billable expense is split using "More > Split", the resulting split transactions lose the
billableflag and appear as non-billable. This happens because thebillableproperty is not propagated through the split expense data pipeline, while the parallelreimbursableproperty is correctly propagated everywhere.The
billableflag is briefly visible after splitting (because optimistic data atSplit.ts:1185does set it), but disappears when the server response overwrites it — sincebillablewas never sent in the API parameters, the server returnsbillable: false.This PR adds
billableto three locations, mirroring the existingreimbursablepattern:SplitExpensetype definition (so the field can be stored)initSplitExpenseItemData(sobillableis read from the original transaction)splitsAPI parameter mapping inupdateSplitTransactions(sobillableis sent to the backend)The backend
SplitTransactionSplitParamalready supportsbillable— it just was never populated by the frontend.Fixed Issues
$ #82908
PROPOSAL: #82908 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
N/A - No UI changes, data-only fix
Android: mWeb Chrome
N/A - No UI changes, data-only fix
iOS: Native
N/A - No UI changes, data-only fix
iOS: mWeb Safari
N/A - No UI changes, data-only fix
MacOS: Chrome / Safari
N/A - No UI changes, data-only fix