-
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
[Awaiting Checklist Completion] [$500] Unable to create a Distance request from an Expense Report #30407
Comments
Triggered auto assignment to @Christinadobrzyn ( |
Job added to Upwork: https://www.upwork.com/jobs/~018ee1716b83450d28 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia ( |
Proposal from @paultsimuraPlease re-state the problem that we are trying to solve in this issue.The Distance request cannot be created from an expense report What is the root cause of that problem?We have a clear check whether to show the distance tab here: App/src/pages/iou/MoneyRequestSelectorPage.js Lines 70 to 72 in fe3e8bc
It's currently configured to show only on FAB and Expense Chats. What changes do you think we should make in order to solve the problem?First, We should modify the code above to show the distance tab on the expense reports as well: const isFromGlobalCreate = !reportID;
const isExpenseChat = ReportUtils.isPolicyExpenseChat(props.report)
const isExpenseReport = ReportUtils.isExpenseReport(props.report);
const shouldDisplayDistanceRequest = isExpenseChat || isExpenseReport || isFromGlobalCreate; Second, we should adapt the flow for creation of such requests on the expense reports. For this, in function createDistanceRequest(report, participant, comment, created, transactionID, category, tag, amount, currency, merchant, billable) {
+ const isExpenseReport = ReportUtils.isExpenseReport(report);
+ const targetChat = isExpenseReport ? ReportUtils.getRootParentReport(report) : report;
const optimisticReceipt = {
source: ReceiptGeneric,
state: CONST.IOU.RECEIPT_STATE.OPEN,
};
const {iouReport, chatReport, transaction, iouAction, createdChatReportActionID, createdIOUReportActionID, reportPreviewAction, onyxData} = getMoneyRequestInformation(
+ targetChat,
- report,
participant, Also, use this report here, because in some cases we allow creating money requests in already settled expense reports proof: https://github.com/Expensify/App/blob/950f37a31154aef422fadc194c3791cd84354675/src/libs/ReportUtils.js#L3565C4-L3577), and the iouReportID: isExpenseReport ? report.reportID : iouReport.reportID, Line 642 in f6a9dde
And here for the final navigation so we get redirected directly to the expense report: Navigation.dismissModal(isExpenseReport ? report.reportID : chatReport.reportID); Line 657 in f6a9dde
Result:Screen.Recording.2023-10-25.at.09.12.19.mp4What alternative solutions did you explore? (Optional) |
ProposalPlease disregard the proposal above: I reposted it here as I wanted to modify the original proposal. Please re-state the problem that we are trying to solve in this issue.The Distance request cannot be created from an expense report What is the root cause of that problem?We have a clear check whether to show the distance tab here: App/src/pages/iou/MoneyRequestSelectorPage.js Lines 70 to 72 in fe3e8bc
It's currently configured to show only on FAB and Expense Chats. What changes do you think we should make in order to solve the problem?First, We should modify the code above to show the distance tab on the expense reports as well (the Distance requests are currently limited to workspaces only, so we should use the expense reports, not IOU reports): const isFromGlobalCreate = !reportID;
const isExpenseChat = ReportUtils.isPolicyExpenseChat(props.report)
const isExpenseReport = ReportUtils.isExpenseReport(props.report);
const shouldDisplayDistanceRequest = isExpenseChat || isExpenseReport || isFromGlobalCreate; Second, we should adapt the flow for the creation of such requests on the expense reports. For this, in function createDistanceRequest(report, participant, comment, created, transactionID, category, tag, amount, currency, merchant, billable) {
+ // If the report is iou or expense report, we should get the linked chat report to be passed to the getMoneyRequestInformation function
+ const isMoneyRequestReport = ReportUtils.isMoneyRequestReport(report);
+ const currentChatReport = isMoneyRequestReport ? ReportUtils.getReport(report.chatReportID) : report;
const optimisticReceipt = {
source: ReceiptGeneric,
state: CONST.IOU.RECEIPT_STATE.OPEN,
};
const {iouReport, chatReport, transaction, iouAction, createdChatReportActionID, createdIOUReportActionID, reportPreviewAction, onyxData} = getMoneyRequestInformation(
+ currentChatReport,
- report,
participant, Third, use this expense report here for the final navigation so we get redirected directly to it instead of the chat report: Navigation.dismissModal(isMoneyRequestReport ? report.reportID : chatReport.reportID); Line 657 in f6a9dde
Result:Screen.Recording.2023-10-25.at.09.12.19.mp4What alternative solutions did you explore? (Optional) |
I think based on our change announced here - https://expensify.slack.com/archives/C01GTK53T8Q/p1698191269281379 We can close this since it was reported by a contributor. |
@Christinadobrzyn this was reported before the announcement.
Why would you close it then? It also was discussed in Slack with the engineers and the reporting was approved before the announcement: https://expensify.slack.com/archives/C01GTK53T8Q/p1698182060752669 |
@Christinadobrzyn we can take bug reports that were sent to #expensify-bugs prior to the announcement |
Ah thanks, I didn't realise it was the Slack date not the GH creation date. Sorry about that! This is a good find so I'm glad we're doing it. I can reproduce and I don't see any other GHs about this issue. |
@thesahindia can you review the provided proposals to see if they will work? Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@thesahindia could you review these proposals and let me know if you want to see others? |
@paultsimura's proposal looks good to me! 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @flodnv, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Hmmm @neil-marcellini what are your thoughts on this please? |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.97-7 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 2023-11-17. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Looks like the PR went to production 3 days ago so payment would be Nov 21st. I'm going ooo until Monday Nov 27th so going to assign another BZ teammate to monitor this until I'm back. Thanks! Status: waiting for payment & regression test proposal Payouts due: Issue Reporter: $50 @paultsimura - reporter bonus (in Upwork) Eligible for 50% #urgency bonus? N Upwork job is here. |
Triggered auto assignment to @twisterdotcom ( |
This comment was marked as off-topic.
This comment was marked as off-topic.
Payment due tomorrow. |
Payment Summary: Waiting on @thesahindia to complete the checklist now. |
@twisterdotcom @paultsimura @neil-marcellini @Christinadobrzyn @thesahindia this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:
Thanks! |
Current assignee @thesahindia is eligible for the Internal assigner, not assigning anyone new. |
I believe we just weren't handling this case. We can add a test case -
|
$500 payment approved for @thesahindia based on this comment. |
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: 1.3.91-1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @paultsimura
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1698185015146149
Action Performed:
VS
Expected Result:
The "Distance" tab should be present
Actual Result:
The "Distance" tab is absent, only "Manual" and "Scan" are present.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Screen.Recording.2023-10-25.at.07.51.59.mov
Android: mWeb Chrome
Screen.Recording.2023-10-25.at.07.51.59.mov
iOS: Native
RPReplay_Final1698212930.MP4
iOS: mWeb Safari
RPReplay_Final1698211822.MP4
MacOS: Chrome / Safari
Screen.Recording.2023-10-25.at.07.28.30.mov
Recording.1640.mp4
MacOS: Desktop
Screen.Recording.2023-10-25.at.09.01.18.mov
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: