Closed lanitochka17 closed 1 month ago
Triggered auto assignment to @grgia (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
We think that this bug might be related to #vip-split
Edited by proposal-police: This proposal was edited at {current_timestamp}.
Can't split bill with workspace from FAB.
When we split bill with a workspace from FAB, we create a new workspace chat even though there is already a workspace chat. The reason we create a new workspace is because the existing chat report ID below is empty, so getOrCreateOptimisticSplitChatReport
decide to create a new report.
https://github.com/Expensify/App/blob/db669c4d45ec14c849fc5f84af06e3d8564e58b9/src/libs/actions/IOU.ts#L3812-L3814
Previously, the logic look like this:
const existingChatReportID = existingSplitChatReportID || participants[0].reportID
When we split bill from FAB, existingSplitChatReportID
will be an empty string and if the participant is a workspace, then participants[0].reportID
will contain the workspace reportID
.
But now, we use ??
which won't fallback to participants[0].reportID
because existingSplitChatReportID
is an empty string. The logic is updated by this commit.
Based on the commit message, we don't want an undefined existingChatReportID
which is possible if the participant is not a workspace.
const existingChatReportID = '' || undefined => undefined
That's why we fall back again to an empty string. But we shouldn't use ?? specifically for existingSplitChatReportID
because it's an empty string and not undefined.
const existingChatReportID = '' ?? {reportID} ?? '' => ''
So, to fix this, we should change ??
to ||
back.
const existingChatReportID = existingSplitChatReportID || participants[0].reportID || '';
Btw, I think we should fall back to -1 or just let it be undefined again. If it's an empty string, then the report onyx key will be report_
which will fetch the whole report collection.
https://github.com/Expensify/App/blob/db669c4d45ec14c849fc5f84af06e3d8564e58b9/src/libs/actions/IOU.ts#L3817
I think the reason we don't want the reportID
to be undefined
(report_undefined) is that sometimes the invalid report exists in the storage with error data, without a reportID
.
report_undefined: {
errors: ...,
}
And because the report object is not undefined, the logic thinks that it found an existing report, even though it doesn't. https://github.com/Expensify/App/blob/db669c4d45ec14c849fc5f84af06e3d8564e58b9/src/libs/actions/IOU.ts#L3820-L3828
To fix this, we can check for the reportID
to make sure the report object is valid.
if (!existingSplitChatReport?.reportID) {
existingSplitChatReport = ReportUtils.getChatByParticipants(allParticipantsAccountIDs, undefined, participantAccountIDs.length > 1);
}
Job added to Upwork: https://www.upwork.com/jobs/~01fde995cf07525892
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (External
)
@hoangzinh could you assess the proposal, I think we can assign @bernhardoj
@grgia Did you mean to remove the App blocker? Looks like this is a FE issue
Current assignee @grgia is eligible for the DeployBlockerCash assigner, not assigning anyone new.
:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Btw, I think we should fall back to -1 or just let it be undefined again. If it's an empty string, then the report onyx key will be report_ which will fetch the whole report collection.
@bernhardoj because we're getting the report from an array, therefore if it's an empty string, it won't return any data, will it?
Btw, I think it's safer if we check existingChatReportID
exists before retrieving existingSplitChatReport
from array. What do you think?
because we're getting the report from an array
ReportConnection.getAllReports()
doesn't return an array, it's an object.
Btw, I think it's safer if we check existingChatReportID exists before retrieving existingSplitChatReport from array. What do you think?
That's a good idea. I remember we did that before, but it was changed in this PR
Oh my bad, it's an object.
I remember we did that before, but it was changed in this PR
It appears that there is a commit https://github.com/Expensify/App/commit/1443b2645869fbd3e30ad0856de9b710ece794db from that PR to fix disabling Eslint comment. Btw, because it's a DB, I'm happy with either way
@bernhardoj's proposal https://github.com/Expensify/App/issues/47159#issuecomment-2278021011 looks good to me
🎀👀🎀 C+ reviewed
Current assignee @grgia is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
📣 @hoangzinh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
@bernhardoj if you could please make this fix a priority, that would be great!
Actually if this was really caused by https://github.com/Expensify/App/pull/42302, this shouldn't be a blocker anymore since https://github.com/Expensify/App/pull/42302 is now in prod 😅
Triggered auto assignment to @joekaufmanexpensify (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.
PR is ready
cc: @hoangzinh
PR merged!
Hmm, automation did not work here. This went out to prod over a week ago, so payment is due now. Will tackle payment in the next day or so!
Sounds good. TY!
All set to issue payment here. We need to pay:
@hoangzinh $250 sent and contract ended!
Upwork job closed.
Closing as only thing left here is for @bernhardoj to request payment via NewDot!
Requested in ND.
$250 approved for @bernhardoj
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.18-7 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers): applausetester+kh050806@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The expense is split in the workspace chat
Actual Result:
User is unable to split expense with workspace via FAB App opens a report with RBR on LHN and the report shows infinite skeleton after splitting expense with workspace via FAB
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/40534103-b2ea-4b92-8445-f731727704af
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @hoangzinh