Conversation
…rted split expense is submitted"
|
@carlosmiceli 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 680a4beecc
ℹ️ 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".
| function isExpenseSplit(transaction: OnyxEntry<Transaction>, originalTransaction?: OnyxEntry<Transaction>): boolean { | ||
| const isAddedToReport = !!transaction?.reportID && transaction.reportID !== CONST.REPORT.SPLIT_REPORT_ID && transaction.reportID !== CONST.REPORT.UNREPORTED_REPORT_ID; | ||
| if (isAddedToReport) { | ||
| return false; | ||
| } | ||
|
|
||
| if (!originalTransaction) { | ||
| return !!transaction?.comment?.originalTransactionID && transaction?.comment?.source === 'split'; | ||
| } |
There was a problem hiding this comment.
Treat submitted split expenses as normal by checking reportID
With the reportID guard removed, isExpenseSplit now returns true solely based on comment.originalTransactionID/source, even after a split expense has been submitted into a real report (i.e., reportID is neither SPLIT_REPORT_ID nor UNREPORTED_REPORT_ID). In that state the split comment still exists, so this function stays true and downstream UI (e.g., amount description in MoneyRequestView and split edit actions) continues to show the “Split” label for a submitted expense. This reintroduces the regression the reverted PR was fixing: unreported split expenses that are submitted remain labeled as split when they shouldn’t be.
Useful? React with 👍 / 👎.
…el-not-removed [CP Staging] Revert "fix: Split label is not removed from Amount field when unreported split expense is submitted" (cherry picked from commit f291a84) (cherry-picked to staging by Beamanator)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.3.10-1 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.10-6 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/Beamanator in version: 9.3.11-0 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.3.12-1 🚀
|
Reverts #80010
Explanation of Change
Fixed Issues
$ #80662
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand 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