-
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
[PAID] [$1000] App crashes when splitting a bill offline #14355
Comments
Triggered auto assignment to @strepanier03 ( |
Job added to Upwork: https://www.upwork.com/jobs/~013e5bf073f9b98c1b |
Current assignee @strepanier03 is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane ( |
Triggered auto assignment to @yuwenmemon ( |
Proposal We can validate first the diff --git a/src/libs/IOUUtils.js b/src/libs/IOUUtils.js
index 5c1538682..681ada7c6 100644
--- a/src/libs/IOUUtils.js
+++ b/src/libs/IOUUtils.js
@@ -82,7 +82,7 @@ function getIOUReportActions(reportActions, iouReport, type = '', pendingAction
return _.chain(reportActions)
.filter(action => action.originalMessage
&& action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU
- && action.originalMessage.IOUReportID.toString() === iouReport.reportID.toString())
+ && action.originalMessage.IOUReportID && action.originalMessage.IOUReportID.toString() === iouReport.reportID.toSt
ring())
.filter(action => (!_.isEmpty(type) ? action.originalMessage.type === type : true))
.filter(action => (!_.isEmpty(pendingAction) ? action.pendingAction === pendingAction : true))
.filter(action => (filterRequestsInDifferentCurrency ? action.originalMessage.currency !== iouReport.currency : true)) |
ProposalWe should check that both Checking that they are not nil will preserve the previous logic without any potential regression that differs from existing logic. (Below I use both diff --git a/src/libs/IOUUtils.js b/src/libs/IOUUtils.js
index 5c1538682c..aa8ecb6139 100644
--- a/src/libs/IOUUtils.js
+++ b/src/libs/IOUUtils.js
@@ -81,6 +81,8 @@ function updateIOUOwnerAndTotal(iouReport, actorEmail, amount, currency, type =
function getIOUReportActions(reportActions, iouReport, type = '', pendingAction = '', filterRequestsInDifferentCurrency = false) {
return _.chain(reportActions)
.filter(action => action.originalMessage
+ && !_.isUndefined(action.originalMessage.IOUReportID) && !_.isNull(action.originalMessage.IOUReportID)
+ && !_.isUndefined(iouReport.reportID) && !_.isNull(iouReport.reportID)
&& action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU
&& action.originalMessage.IOUReportID.toString() === iouReport.reportID.toString())
.filter(action => (!_.isEmpty(type) ? action.originalMessage.type === type : true))
|
I don't think we need to validate Line 725 in 3636f1f
|
ProposalRoot IssueThis is a regression from 966e018 , removing this line This is an example of IOU report action that causes this issue , this reportAction does not have SolutionRollback old code that validates diff --git a/src/libs/IOUUtils.js b/src/libs/IOUUtils.js
index 5c1538682c..0e06b5a16e 100644
--- a/src/libs/IOUUtils.js
+++ b/src/libs/IOUUtils.js
@@ -82,6 +82,7 @@ function getIOUReportActions(reportActions, iouReport, type = '', pendingAction
return _.chain(reportActions)
.filter(action => action.originalMessage
&& action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU
+ && action.originalMessage.type === type
&& action.originalMessage.IOUReportID.toString() === iouReport.reportID.toString())
.filter(action => (!_.isEmpty(type) ? action.originalMessage.type === type : true))
.filter(action => (!_.isEmpty(pendingAction) ? action.pendingAction === pendingAction : true))
|
Proposal It's the IOU reports without the specified type (CREATE) that don't contain the report ID, causing the error when using diff --git a/src/libs/IOUUtils.js b/src/libs/IOUUtils.js
index 5c1538682..a8cb9a6c7 100644
--- a/src/libs/IOUUtils.js
+++ b/src/libs/IOUUtils.js
@@ -81,9 +81,9 @@ function updateIOUOwnerAndTotal(iouReport, actorEmail, amount, currency, type =
function getIOUReportActions(reportActions, iouReport, type = '', pendingAction = '', filterRequestsInDifferentCurrency = false) {
return _.chain(reportActions)
.filter(action => action.originalMessage
- && action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU
+ && (!_.isEmpty(type) ? action.originalMessage.type === type : true))
+ .filter(action => action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU
&& action.originalMessage.IOUReportID.toString() === iouReport.reportID.toString())
- .filter(action => (!_.isEmpty(type) ? action.originalMessage.type === type : true))
.filter(action => (!_.isEmpty(pendingAction) ? action.pendingAction === pendingAction : true))
.filter(action => (filterRequestsInDifferentCurrency ? action.originalMessage.currency !== iouReport.currency : true))
.value(); |
@sobitneupane - A few proposals coming through, thanks for taking a look. I'll circle back tomorrow to check in for any updates. |
@Ollyws Can you please elaborate how re-ordering will solve the issue? |
@sobitneupane |
@Ollyws Thanks for the clarification. @Ollyws's proposal looks good to me. I will like to suggest a minor change in the proposal if it doesn't change the expected output. function getIOUReportActions(reportActions, iouReport, type = '', pendingAction = '', filterRequestsInDifferentCurrency = false) {
return _.chain(reportActions)
.filter(action => action.originalMessage
&& action.actionName === CONST.REPORT.ACTIONS.TYPE.IOU
- && action.originalMessage.IOUReportID.toString() === iouReport.reportID.toString())
- .filter(action => (!_.isEmpty(type) ? action.originalMessage.type === type : true))
+ && (!_.isEmpty(type) ? action.originalMessage.type === type : true))
+ .filter(action => action.originalMessage.IOUReportID.toString() === iouReport.reportID.toString())
.filter(action => (!_.isEmpty(pendingAction) ? action.pendingAction === pendingAction : true))
.filter(action => (filterRequestsInDifferentCurrency ? action.originalMessage.currency !== iouReport.currency : true))
.value();
} 🎀👀🎀 C+ reviewed cc: @yuwenmemon |
Sounds good thanks! @Ollyws Please submit a PR at your earliest convenience. |
📣 @Ollyws You have been assigned to this job by @yuwenmemon! |
All yours @sobitneupane ! |
Thank you everyone for moving this along! |
PR review is waiting on @yuwenmemon but he's OoO today. I'll take this into consideration when assessing the bonus for merge during payout. |
Most recent updatePR is merged and awaiting deploy to production, all good here for now. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.59-1 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-02-02. 🎊 After the hold period, please check if any of the following need payment for this issue, and if so check them off after paying:
Timeline assessment for bonus: That's technically 4 business days but Yuwen was OoO and reviewed promptly as soon as he got back. This did push it out at least one extra business day so I'm going to apply the speed bonus. As a reminder, here are the bonuses/penalties that should be applied for any External 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:
|
@sobitneupane and @Ollyws - Please feel free to apply for the job here and I'll keep an eye open for your application so I can send you offers. If we get this taken care of now I will be able to pay more promptly on 2023-02-02. Thanks! Will work on reg test now. |
@sobitneupane and @Ollyws - I've accepted your proposals and extended the offer, thank you for taking care of it so quickly. |
@sobitneupane or @yuwenmemon - Can one of you please finish the three steps in this checklist? |
Reg test buddy check here. |
Offline tests are already included in the PR review checklist. So, I don't think any update in the PR review checklist will be necessary. |
@sobitneupane and @Ollyws have been paid and contracts closed in UpWork, thank you both for your hard work. This GH will stay open until the reg test is resolved. |
Bumped reg test buddy-check. |
@strepanier03 Are we good to close this out? |
Nope, not ready to close yet, the reg test isn't added. |
Waiting for reg test to be added here. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
You should be taken to a 1:1 chat with that user
You should a normal message that says Split $X with for
You should see another IOU action that says: Requested $(X/2) from for
Actual Result:
The app crashes and you land on the error boundary
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.55-0
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
Notes/Photos/Videos:
Recording.1313.mp4
Expensify/Expensify Issue URL:
Issue reported by: @roryabraham
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1673903364260589
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: