-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CP Staging] Track when a split is created from global create to call proper API #32878
Conversation
@@ -192,14 +192,14 @@ function IOURequestStepConfirmation({ | |||
|
|||
// If we have a receipt let's start the split bill by creating only the action, the transaction, and the group DM if needed | |||
if (iouType === CONST.IOU.TYPE.SPLIT && receiptFile) { | |||
const existingSplitChatReportID = CONST.REGEX.NUMBER.test(reportID) ? reportID : ''; | |||
const existingSplitChatReportID = CONST.REGEX.NUMBER.test(report.reportID) ? reportID : ''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be an existing bug. reportID
is a reference to the reportID coming from the URL route, and that will always be a number. This changes the code so that it's testing if the report.reportID
belongs to an optimistic report or not, which I think is what is intended.
@tgolen if this is urgent I can jump in for a review |
@tgolen You need to update the type object of the transaction to accommodate this change. |
Thanks for this, as the PR is blocking deploy and this only triggers a warning we can handle that separately. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Test case 2 failing with #32895 |
Reviewer Checklist
Screenshots/VideosTest 1Screen.Recording.2023-12-12.at.4.25.50.PM.movTest 3Screen.Recording.2023-12-12.at.4.29.15.PM.mov |
@Julesssss Please merge this |
@johnmlee101 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. Thanks for treating this with urgency. Will merge and CP
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Track when a split is created from global create to call proper API (cherry picked from commit 4bcdcf5)
🚀 Cherry-picked to staging by https://github.com/Julesssss in version: 1.4.11-13 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.11-25 🚀
|
Details
The original intention of the
SplitBill
andSplitBillAndOpenReport
API commands was to call them depending on if the user started the request from an existing chat or from the global create menu (respectively).When I refactored things, the concept of "starting from global create" really morphed into a concept of "is this reportID in the URL from an optimistic report or a real report". I thought it would also work for the split case, but it doesn't look like it works very well.
In order to resolve the blocker with urgency, I have added a flag into the Onyx draft to indicate whether or not the request started from the global create menu or not. This results in the correct APIs being called with the correct reportID now.
Fixed Issues
$ #32853
Tests
First Test
Second Test
Third Test
Offline tests
Same as the above
QA Steps
Same as the above
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
Unable to test emulator because local development builds are broken
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop