[CP Staging] Revert "Fix unable to re-split a transaction after its unreported sibling got deleted"#91549
Conversation
|
@ChavdaSachin 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a059f4f1f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const shouldShowSplitIndicator = isExpenseSplit && (hasMultipleSplits || isReportOpen); | ||
|
|
||
| if (isExpenseSplit && shouldShowSplitIndicator) { |
There was a problem hiding this comment.
Gate edit-split flow on actual multi-child splits
This condition now routes any split child on an open report into the edit-splits flow even when only one child remains, because isReportOpen can make shouldShowSplitIndicator true by itself. In the common case where one sibling was unreported/deleted, this prevents starting a fresh split from the remaining transaction and reintroduces the split-state regression (the code rebuilds a one-item edit draft keyed by the original transaction instead of creating a new split draft from the current transaction).
Useful? React with 👍 / 👎.
| report && | ||
| !(isExpenseSplit && hasMultipleSplits) && | ||
| isSplitAction(report, [firstTransaction], originalTransaction, login ?? '', currentUserAccountID, policy); | ||
| selectedTransactionsList.length === 1 && report && !isExpenseSplit && isSplitAction(report, [firstTransaction], originalTransaction, login ?? '', currentUserAccountID, policy); |
There was a problem hiding this comment.
Allow split action for dissolved split children
The bulk-actions split gate now blocks all transactions flagged as isExpenseSplit, regardless of whether sibling split children still exist. After one split half is removed, the remaining child still has split metadata, so this check hides the Split option and prevents users from re-splitting from selected-transactions actions even though the split is no longer intact.
Useful? React with 👍 / 👎.
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
(cherry picked from commit c99f3d2) (cherry-picked to staging by mountiny)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @mountiny 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! 🧪🧪
|
|
🚀 Cherry-picked to staging by https://github.com/mountiny in version: 9.3.81-0 🚀
|
|
I reviewed all changes in this PR. This is a revert of PR #91104, undoing internal code changes to split expense indicator logic, the No help site changes are required. The changes are purely internal implementation details (hook logic, split indicator conditions, test removals) and do not affect any user-facing behavior, UI labels, feature names, or workflows documented in |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.3.81-2 🚀
|
Explanation of Change
This is a straight revert of PR #91104 ("Fix unable to re-split a transaction after its unreported sibling got deleted"), which introduced a regression where editing an expense to a higher amount after removing a split from a report shows an error.
The revert undoes all changes from that PR: the modified split indicator logic, the
useHasMultipleSplitChildrenhook changes, theuseDeleteTransactionsrelaxation, and the associated tests.Fixed Issues
$ #91481
Tests
Test the linked blocker
Offline tests
N/A - this is a revert
QA Steps
Test the linked blocker
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari