-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
fix: Split - App does not throw an error when saving the empty merchant field. #45371
fix: Split - App does not throw an error when saving the empty merchant field. #45371
Conversation
…nt field. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
@c3024, do we also need to remove |
@@ -63,7 +63,7 @@ function IOURequestStepMerchant({ | |||
const merchant = ReportUtils.getTransactionDetails(isEditingSplitBill && !isEmptyObject(splitDraftTransaction) ? splitDraftTransaction : transaction)?.merchant; | |||
const isEmptyMerchant = merchant === '' || merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT; | |||
|
|||
const isMerchantRequired = ReportUtils.isExpenseRequest(report) || transaction?.participants?.some((participant) => !!participant.isPolicyExpenseChat); | |||
const isMerchantRequired = ReportUtils.isPolicyExpenseChat(report) || transaction?.participants?.some((participant) => !!participant.isPolicyExpenseChat); |
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.
Is isExpenseRequest
always true
(false
) when isPolicyExpenseChat
is true
(false
)? It is not obvious for me from the function definitions.
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.
Is isExpenseRequest always true (false) when isPolicyExpenseChat is true (false)? It is not obvious for me from the function definitions.
Could you pls explain, what do you mean by this?
isPolicyExpenseChat
is only true for Policy Expenses and isExpenseRequest
is true for all expenses IG.
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.
I was asking if we are sure of removing it safely without a regression. Looks like we gotta retain the isExpenseRequest
condition as well.
Here is a regression I found if we remove it.
- Submit two expenses in a workspace chat
- Click on the Report Preview
- Click on one of the expenses
- Click on merchant
- Remove the text in the merchant field and save
- It is saved and modal dismissed (this is a regression)
merchantPossibleRegression.mp4
We cannot remove it. This might not be required for split expense but it is required in other cases. This is one of the cases where I found this is required. Prerequisite: User has no workspaces
|
Yes, thats what I was thinking. I was confused due to slack convo . |
@@ -63,7 +63,7 @@ function IOURequestStepMerchant({ | |||
const merchant = ReportUtils.getTransactionDetails(isEditingSplitBill && !isEmptyObject(splitDraftTransaction) ? splitDraftTransaction : transaction)?.merchant; | |||
const isEmptyMerchant = merchant === '' || merchant === CONST.TRANSACTION.PARTIAL_TRANSACTION_MERCHANT; | |||
|
|||
const isMerchantRequired = ReportUtils.isExpenseRequest(report) || transaction?.participants?.some((participant) => !!participant.isPolicyExpenseChat); | |||
const isMerchantRequired = ReportUtils.isPolicyExpenseChat(report) || transaction?.participants?.some((participant) => !!participant.isPolicyExpenseChat); |
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.
I was asking if we are sure of removing it safely without a regression. Looks like we gotta retain the isExpenseRequest
condition as well.
Here is a regression I found if we remove it.
- Submit two expenses in a workspace chat
- Click on the Report Preview
- Click on one of the expenses
- Click on merchant
- Remove the text in the merchant field and save
- It is saved and modal dismissed (this is a regression)
merchantPossibleRegression.mp4
Reviewer Checklist
Screenshots/VideosAndroid: NativemerchantAndroid.mp4Android: mWeb ChromemerchantAndroidmWeb.mp4iOS: NativemerchantiOS.mp4iOS: mWeb SafarimerchantiOSmWeb.mp4MacOS: Chrome / SafarimerchantChrome.mp4MacOS: DesktopmerchantDesktop.mp4 |
Should there be a specific step that the request fails here in between these steps? |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Nope, it can be tested without failure. Recording videos, will be added in few minutes. |
@c3024, recordings added. |
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.
LGTM!
✋ 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/Julesssss in version: 9.0.7-3 🚀
|
🚀 Cherry-picked to staging by https://github.com/thienlnam in version: 9.0.7-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.7-8 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.8-6 🚀
|
Details
Fixed Issues
$ #45180
PROPOSAL: #45180 (comment)
Tests
This field is required.
error appears below merchant input and RHP is not closed.Offline tests
This field is required.
error appears below merchant input and RHP is not closed.QA Steps
This field is required.
error appears below merchant input and RHP is not closed.PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.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)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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_native.mp4
Android: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4