Closed izarutskaya closed 2 weeks ago
Triggered auto assignment to @alexpensify (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.
We think this issue might be related to the #vip-split
AU-With a participant sets zero amount creating split expense displays error
We are using selectedParticipants
instead of splitParticipants
.
https://github.com/Expensify/App/blob/40a6c763fb4cefb9a15716aaeb009e83e27b8c9a/src/pages/iou/request/step/IOURequestStepConfirmation.tsx#L364
Use splitParticipants
instead of selectedParticipants
.
Edited by proposal-police: This proposal was edited at 2024-08-05 10:56:05 UTC.
AU-With a participant sets zero amount creating split expense displays error
When validating in MoneyRequestConfirmationList
, we can check if the current user has a invalid amount and if true we will throw an error, we can create a new error message for that.
if (transaction?.splitShares[currentUserPersonalDetails.accountID] && transaction?.splitShares[currentUserPersonalDetails.accountID]?.amount === 0) {
setFormError('iou.error.invalidAmountCurrentUser');
return;
}
// OR
if (transaction?.splitShares[currentUserPersonalDetails.accountID] && !transaction?.splitShares[currentUserPersonalDetails.accountID]?.amount) {
setFormError('iou.error.invalidAmountCurrentUser');
return;
}
createSplitsAndOnyxData
we can check for the amount of the current user and only include if they have a valid amount.https://github.com/user-attachments/assets/d444a6e6-a10f-4d45-a593-d751a25505a4
Edited by proposal-police: This proposal was edited at 2024-08-05 10:55:58 UTC.
After entering zero as amount for first participant and tapping split no error is displayed. But unexpected error is shown after creating split expense also.
When there's an error, we don't have logic to prevent creating the split bill and show the error message
In MoneyRequestConfirmationList
add new invalidInputs state to store the index of invalid inputs
when users split the bill within at least one amount is 0, we don't allow users to split the bill and
formError
and invalidInputs
stateinvalidInputs
to remove the current input.
If invalidInputs
is empty, we should reset formError
-> the formError message will be dismissed-> we can add the new isError
prop (getting from invalidInputs
) to MoneyRequestAmountInput
, so when there's an error, the input will show the red bottom border
It's still on my testing list; I'll get to it soon.
Job added to Upwork: https://www.upwork.com/jobs/~01329020483b531ccb
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External
)
@jayeshmangwani - can you please review the proposals and identify if one will fix this issue? Thanks!
Thanks for the proposal, If we decide to show an error message when a logged-in user sets their own split amount to 0, we can proceed with @Krishna2323 's Proposal.
Sidenote: We'll need the error message copies to display that the split amount cannot be set to 0 for oneself.
π π π C+ reviewed
Triggered auto assignment to @srikarparsi, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@jayeshmangwani Can you pls confirm the expectation here?
Split expense
button should be shown only when users press on it
- Replace the amount to zero for first participant
- Tap split expense
cc @srikarparsi
The error message above Split expense button should be shown only when users press on it
IMO, the error should appear above the form button, not when the user presses it. Instead, the error should trigger when the user changes the amount to 0. Also, @srikarparsi what's your take on the behavior when the split amount is set to 0 for oneself?
@srikarparsi Whenever you can, please check these comments https://github.com/Expensify/App/issues/46802#issuecomment-2288262240 and https://github.com/Expensify/App/issues/46802#issuecomment-2285950860
@srikarparsi, friendly bump ^
@alexpensify @jayeshmangwani @srikarparsi this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Yes, I agree with what you've said @jayeshmangwani, sorry for the delay. In the future we will want to allow for setting your own split to 0 but that is de-prioritized so this frontend fix will be good in the meanwhile to avoid this bug. Internal discussion here
The error should appear above the Split Expense button as it does for other errors. The error should appear immediately after the user enters their own split amount as 0 (should not wait for the user to press the split expense button).
@Krishna2323's proposal looks good to me. @alexpensify, do you think you could help with getting the english and spanish copies for the error text? Something on the lines of "Split amount for yourself must be greater than 0"
π£ @Krishna2323 π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@alexpensify, @jayeshmangwani, @srikarparsi Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
PR will be up today.
@jayeshmangwani, PR ready for review ^
Triggered auto assignment to @VictoriaExpensify (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.
This PR is going through the review process. @VictoriaExpensify I reassigned the Bug
label because @Krishna2323 needs help getting the translations (https://github.com/Expensify/App/pull/47886#issuecomment-2307448608) for this update. Can you please help move this GH along while I'm OOO? Thanks!
If anything urgent is needed here, please ask for help in the #expensify-open-source Slack Room-- thanks!
needs help getting the translations (https://github.com/Expensify/App/pull/47886#issuecomment-2307448608) for this update
@VictoriaExpensify Can you please help getting the translations ?
@jayeshmangwani, could you please start a thread in slack? I can't do that as I'm not in the channel.
@Krishna2323 I've opened the thread here
@Krishna2323 Since you don't have access to Slack, here's an update: We have the English copy, Please enter a non-zero amount for your split.
, Srikar is working on getting us the Spanish copy.
@jayeshmangwani, any updates on the Spanish copy?
@Krishna2323 There's no update on the slack thread.
@srikarparsi should I use this GPT to get the Spanish copy and then post it on Slack for confirmation from someone on the team?
Hey! Sorry for the delay, I asked internally in Slack and just waiting on a response. I'll update once I hear back.
Hey, here's the spanish translation:
Por favor, introduce una cantidad diferente de cero para tu parte.
Thanks, @VictoriaExpensify, for your help! I'm back online and taking this GH back.
Hey, here's the spanish translation:
Thanks for the translations!
@Krishna2323 We now have the Spanish version as well. Please update it.
@alexpensify The PR was merged yesterday. I think we should remove the daily tag and replace it with a weekly tag.
Thanks for the update-- I've manually updated this GH since automation didn't kick in.
Payouts due: 2024-09-11
Upwork job is here.
Closing - I completed the payment process in Upwork for @Krishna2323. @jayeshmangwani please submit a request in Chat. Thanks!
Requested on ND as per https://github.com/Expensify/App/issues/46802#issuecomment-2344815319
$250 approved for @jayeshmangwani
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.16 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4815729 Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
After entering zero as amount for first participant and tapping split must show error. If not, error must not be shown after creating split expense also.
Actual Result:
After entering zero as amount for first participant and tapping split no error is displayed. But unexpected error is shown after creating split expense also.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/4b68e895-ff3c-47fe-8478-132842df284c
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @jayeshmangwani