-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-11-14] [$250] QAB - Error shows up when submitting split distance expense via split manual shortcut in QAB #50694
Comments
Triggered auto assignment to @slafortune ( |
@slafortune 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 |
Edited by proposal-police: This proposal was edited at 2024-10-23 09:58:53 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.QAB - Error shows up when submitting split distance expense via split manual shortcut in QAB What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)Result |
Edited by proposal-police: This proposal was edited at 2024-10-21 17:06:08 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.For distance request via split expense for quick actions, we directly create split request instead of distance request and the What is the root cause of that problem?When we create a App/src/pages/iou/request/step/IOURequestStepDistance.tsx Lines 247 to 251 in e4969b2
Which in turn gives us API error: This is because App/src/pages/iou/request/step/IOURequestStepDistance.tsx Lines 109 to 110 in e4969b2
So we never considered the case for group chats, and hence we skip the confirmation step and call the wrong api and get error. What changes do you think we should make in order to solve the problem?Current App/src/pages/iou/request/step/IOURequestStepDistance.tsx Lines 111 to 119 in e4969b2
We should update it to: --- a/src/pages/iou/request/step/IOURequestStepDistance.tsx
+++ b/src/pages/iou/request/step/IOURequestStepDistance.tsx
@@ -114,9 +114,10 @@ function IOURequestStepDistance({
const shouldSkipConfirmation: boolean = useMemo(() => {
if (!skipConfirmation || !report?.reportID) {
return false;
}
return (
- !ReportUtils.isArchivedRoom(report, reportNameValuePairs) && !(ReportUtils.isPolicyExpenseChat(report) && ((policy?.requiresCategory ?? false) || (policy?.requiresTag ?? false)))
+ !ReportUtils.isGroupChat(report) && !ReportUtils.isArchivedRoom(report, reportNameValuePairs) && !(ReportUtils.isPolicyExpenseChat(report) && ((policy?.requiresCategory ?? false) || (policy?.requiresTag ?? false)))
);
}, [report, skipConfirmation, policy, reportNameValuePairs]); Result VideoScreen.Recording.2024-10-14.at.11.51.02.AM.movSimilar to #47021. The correct solution is to avoid shouldSkipConfirmation=true when moving to a distance request. What alternative solutions did you explore? (Optional)We should not skip the confirmation through QAB for split expenses, so we should update the following code and set shouldSkipConfirmation to false: App/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx Lines 259 to 261 in e4969b2
App/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx Lines 262 to 264 in e4969b2
case CONST.QUICK_ACTIONS.SPLIT_MANUAL:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.MANUAL, false), true);
return;
case CONST.QUICK_ACTIONS.SPLIT_SCAN:
selectOption(() => IOU.startMoneyRequest(CONST.IOU.TYPE.SPLIT, quickActionReportID, CONST.IOU.REQUEST_TYPE.SCAN, false), true);
return; Alternative solution 2:Like we do on QAB split manual request page, there too App/src/pages/iou/request/step/IOURequestStepAmount.tsx Lines 195 to 199 in e4969b2
We will do the same for distance page as well, update the following: App/src/pages/iou/request/step/IOURequestStepDistance.tsx Lines 248 to 250 in e4969b2
To: if (shouldSkipConfirmation) {
// Only skip confirmation when the split is not configurable, for now Smartscanned splits cannot be configured
if (iouType === CONST.IOU.TYPE.SPLIT && transaction?.iouRequestType === CONST.IOU.REQUEST_TYPE.SCAN) {
IOU.splitBill({ OR if (shouldSkipConfirmation && transaction?.iouRequestType === CONST.IOU.REQUEST_TYPE.SCAN) {
// Only skip confirmation when the split is not configurable, for now Smartscanned splits cannot be configured
if (iouType === CONST.IOU.TYPE.SPLIT) {
IOU.splitBill({ |
@slafortune , you need to be on P2P distance beta to be able to reproduce this bug, let me know if you are not able to reproduce |
Was able to recreate 👍 |
Job added to Upwork: https://www.upwork.com/jobs/~021845889937723990662 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
@Krishna2323 and @twilight294, would you please update your root cause and suggested solutions to be a bit more specific? For @Krishna2323's proposal: For @twilight294:
Ok, that makes sense that it breaks when calling SplitBill. Shouldn't we change the type when distance is used instead of leaving it as manual? Why is the solution to not skip the confirmation for group chats? What exact problem does that solve? Can we not skip confirmation specifically for distance expenses, or can we make it work while skipping confirmation. It would definitely be good to figure out why we are skipping the confirmation page in the first place. |
We are still making a split expense itself in distance request , if you create it via split expense then you can see that we call distance request itself. it is only in QAB that we make split request wrongly,
That is because even when it is QAB, we still need confirmation screen to see the exact split for each person and adjust accordingly
We are doing it wrong for QAB, it works fine for normal distance split requests If you check for manual split, there also we do not skip confirmation so we missed the case when we have distance request |
@neil-marcellini do let me know if you have more doubts, my solution solves this bug correctly by calling distance request api here Even for the first distance request via split, we call the distance api and not split: Screen.Recording.2024-10-17.at.1.39.26.AM.mov |
bump for review @mollfpr @neil-marcellini |
Sorry for the late response. I'm reviewing it now. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
We don't skip confirmation on QAB split distance, because the Screen.Recording.2024-10-21.at.20.36.28.mp4The issue is when on QAB split expense, the |
Can you check please, in my 2nd solution, for QAB split manual request we have the check in place: App/src/pages/iou/request/step/IOURequestStepAmount.tsx Lines 195 to 199 in e4969b2
In QAB manual we have set that App/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.tsx Lines 259 to 261 in e4969b2
Still we do not skip confirmation because we have the check |
What's the check for? So there's a possibility that the |
@slafortune @mollfpr @neil-marcellini 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! |
Friendly bump @neil-marcellini for final thoughts #50694 (comment) |
I agree with what @mollfpr said and I'd like to go with @Krishna2323's proposal. Thanks for your effort as well @twilight2294. |
📣 @Krishna2323 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.58-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-11-14. 🎊 For reference, here are some details about the assignees on this issue:
|
@mollfpr @slafortune The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.48-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
No error will show up when submitting split distance expense via split manual shortcut in QAB.
Actual Result:
Error shows up when submitting split distance expense via split manual shortcut in QAB.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6633315_1728815023833.20241013_182042.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @slafortuneThe text was updated successfully, but these errors were encountered: