Closed kbecciv closed 5 months ago
Triggered auto assignment to @lschurr (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
@lschurr 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.
We think that this bug might be related to #vip-split
Pressing the split bill shortcut after splitting bill with one user leads to not found page.
When we open the split bill from the shortcut, the canCreateRequest
condition will be false.
https://github.com/Expensify/App/blob/d7161ae40ea3c09a041fca7c680bdfd8dea0d4fe/src/pages/iou/request/IOURequestStartPage.js#L116
And that's because getMoneyRequestOptions
doesn't include the split bill option for 1:1 DM.
https://github.com/Expensify/App/blob/d7161ae40ea3c09a041fca7c680bdfd8dea0d4fe/src/libs/ReportUtils.ts#L4989-L4995
https://github.com/Expensify/App/blob/d7161ae40ea3c09a041fca7c680bdfd8dea0d4fe/src/libs/ReportUtils.ts#L4802-L4809
That's why you can't see the split bill option from composer + menu, but you can still split with one user.
Split bill with one user is totally valid, so I think we can start showing the split bill option for 1:1 DM too by removing the hasMultipleOtherParticipants
conditions (or replacing it with otherParticipants.length > 0
).
If we don't want to show the split bill option in the composer + menu but still allow it from the shortcut, then we can:
canCreateRequest
whether to include a split bill for 1:1 DM or not and pass true for the money request page.
ORJob added to Upwork: https://www.upwork.com/jobs/~01356e4f802ce02d01
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External
)
Split bill shortcut directs to 404 page after splitting a bill with one account
The IOURequestStartPage
checks isAllowedToCreateRequest
is true to display the FullPageNotFoundView
https://github.com/Expensify/App/blob/ee5ab95f2c893738fb48756a9002e9d9dadd9a31/src/pages/iou/request/IOURequestStartPage.js#L151
The issue here is within isAllowedToCreateRequest
https://github.com/Expensify/App/blob/ee5ab95f2c893738fb48756a9002e9d9dadd9a31/src/pages/iou/request/IOURequestStartPage.js#L116
as mentioned on the comment:
// Allow the user to create the request if we are creating the request in global menu or the report can create the request
So isAllowedToCreateRequest
uses ReportUtils.canCreateRequest
to check if we are creating the request in global menu. But we are not checking if we are creatring the request from the shortcut
.
We need to check if we are creatring the request from the shortcut
.
Inside IOURequestStartPage
we need to subscribe to Onyx quickAction
export default withOnyx({
// ...
+ quickAction: {
+ key: ONYXKEYS.NVP_QUICK_ACTION_GLOBAL_CREATE,
+ },
})(IOURequestStartPage);
Add quickAction?.action === "splitManual"
to isAllowedToCreateRequest
const isAllowedToCreateRequest = _.isEmpty(report.reportID) || ReportUtils.canCreateRequest(report, policy, iouType) || quickAction?.action === "splitManual";
POC video:
https://github.com/Expensify/App/assets/12425932/e64eda1f-667a-4e4d-88bf-2c6d1be165bf
Hi @jjcoffee - Could you take a look at the proposals on this one?
Looks like we have an inconsistency here as @bernhardoj's proposal points out. We can create a split with a single user from the FAB, but it doesn't show as an option in a 1:1 chat (from the composer +
menu). I would say it makes sense to fix up that consistency, so I'd go with the main solution.
I'm not 100% whether there might be some reason for keeping the Split Bill
option out of 1:1 DMs, so asking on Slack just in case!
:ribbon::eyes::ribbon: C+ reviewed
Triggered auto assignment to @NikkiWines, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Thanks for double checking @jjcoffee. Agreed that @bernhardoj's proposal looks good π
π£ @jjcoffee π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @bernhardoj π 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 π
PR is ready
cc: @jjcoffee
PR hit production last week (2024-04-10), so payment should be due tomorrow!
Thanks for the bump @jjcoffee!
Payment summary:
Paid!
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: v1.4.59-0 Reproducible in staging?: y Reproducible in production?: y Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
Split bill shortcut should open
Actual Result:
Hmm... it's not here page opens
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/461d3b0a-aa08-4c3c-bdc1-c2649c866602
View all open jobs on GitHub
Upwork Automation - Do Not Edit