You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[$250] [HOLD for payment 2024-05-06] Group split scan - Error appears for Merchant when clicking Split expense for the second time #40749
Version Number: 1.4.64-0 Reproducible in staging?: y Reproducible in production?: n If this was caught during regression testing, add the test name, ID and link from TestRail: n/a Logs:https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause internal team Slack conversation:
Action Performed:
Go to staging.new.expensify.com
Go to FAB > Split expense > Scan.
Create split scan expense with a few users.
In group chat, click on the split preview.
Click Split expense.
Click Split expense again.
Expected Result:
There will be no error under Merchant field because Merchant is not a requirement for non-workspace expense.
Actual Result:
Error shows up under Merchant field when clicking Split expense for the second time.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
@johncschuster FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
The second part of this condition would return true when we the merchant is empty and shouldDisplayFieldError would be set to true the first time we click on submit button because the amount field is empty.
What changes do you think we should make in order to solve the problem?
We need to add a extra && check of isMerchantRequired, so that we only set the error to true if the merchant is required:
diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx
index 99901dd261..87d605a7a5 100755
@@ -577,7 +577,7 @@ function MoneyRequestConfirmationList({
if (selectedParticipants.length === 0) {
return;
}
- if ((isMerchantRequired && isMerchantEmpty) || (shouldDisplayFieldError && TransactionUtils.isMerchantMissing(transaction ?? null))) {+ if ((isMerchantRequired && isMerchantEmpty) || (isMerchantRequired && shouldDisplayFieldError && TransactionUtils.isMerchantMissing(transaction ?? null))) {
setMerchantError(true);
return;
}
What alternative solutions did you explore? (Optional)
@GandalfGwaihir
We should modify the condition to ensure that the error is set to true only if the merchant is required. So, an additional && check for isMerchantRequired needs to be added. This adjustment ensures that the error is set only when the merchant is both required and empty:
`diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx
index 99901dd261..87d605a7a5 100755
@@ -577,7 +577,7 @@ function MoneyRequestConfirmationList({
if (selectedParticipants.length === 0) {
return;
}
@Ollyws, I see you've just been added to the list of contributors who can accept payment via NewDot. I'll go ahead and post a payment summary instead so you can be paid via that method.
Activity
melvin-bot commentedon Apr 23, 2024
Triggered auto assignment to @robertjchen (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Apr 23, 2024
Triggered auto assignment to @johncschuster (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.github-actions commentedon Apr 23, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
kavimuru commentedon Apr 23, 2024
@johncschuster FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.
kavimuru commentedon Apr 23, 2024
We think this bug might be related to #vip-split
allgandalf commentedon Apr 23, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Error appears for merchant even when it is not required for non workspace expenses
What is the root cause of that problem?
This is a regression from #38543, Here we have added a new condition to display merchant error:
App/src/components/MoneyRequestConfirmationList.tsx
Lines 580 to 582 in 64695c8
The second part of this condition would return true when we the merchant is empty and
shouldDisplayFieldErrorwould be set to true thefirst timewe click on submit button because theamountfield is empty.What changes do you think we should make in order to solve the problem?
We need to add a extra
&&check ofisMerchantRequired, so that we only set the error to true if the merchant is required:What alternative solutions did you explore? (Optional)
saifelance commentedon Apr 23, 2024
@GandalfGwaihir
We should modify the condition to ensure that the error is set to true only if the merchant is required. So, an additional && check for isMerchantRequired needs to be added. This adjustment ensures that the error is set only when the merchant is both required and empty:
`diff --git a/src/components/MoneyRequestConfirmationList.tsx b/src/components/MoneyRequestConfirmationList.tsx
index 99901dd261..87d605a7a5 100755
@@ -577,7 +577,7 @@ function MoneyRequestConfirmationList({
if (selectedParticipants.length === 0) {
return;
}
`
38 remaining items
johncschuster commentedon May 15, 2024
@Ollyws, I see you've just been added to the list of contributors who can accept payment via NewDot. I'll go ahead and post a payment summary instead so you can be paid via that method.
johncschuster commentedon May 15, 2024
Payment Summary
Contributor+: @Ollyws - $250 via Manual Request
johncschuster commentedon May 16, 2024
@robertjchen can you complete the BZ checklist above?
Ollyws commentedon May 17, 2024
Requested in ND, thanks!
JmillsExpensify commentedon May 19, 2024
$250 approved for @Ollyws
robertjchen commentedon May 20, 2024
Working through checklist
johncschuster commentedon Jun 7, 2024
Bumping this for Melvin. How's the checklist going, Robert?
robertjchen commentedon Jun 10, 2024
@johncschuster Made my assessment, and left the last item for you 👍
johncschuster commentedon Jun 10, 2024
Thanks @robertjchen! Looks like we can close this up!