Closed m-natarajan closed 1 year ago
Cannot invite a member X to a workspace B if X was added to a workspace A, then split a bill with X and then the workspace A is deleted.
When we create a split request this here
https://github.com/Expensify/App/blob/a6d2f3e3564c19f32caba3837a81adc837f6c752/src/libs/actions/IOU.js#L1060-L1065
checks if there is one to one chat report and if does not exists it sets shouldCreateOptimisticPersonalDetails
to true
even though a personal detail exists and this here
https://github.com/Expensify/App/blob/5dc3c25aa776aef3cedc45e6638734c9ee85a2f2/src/libs/actions/IOU.js#L1122
sets isOptimisticPersonalDetail
to true
and subsequently through buildOnyxDataForMoneyRequest
, the personal detail is set with field isOptimisticPersonalDetail
to true
.
This here
does not show this optimistic personal detail and also no option is created because it already exists in personal details.
We need to check if the accountID already exists in the personal details and if it does we should not change shouldCreateOptimisticPersonalDetails
to true
.
So we can subscribe to personal details in IOU
and add this
const personalDetailExists = _.has(allPersonalDetails, accountID)
here https://github.com/Expensify/App/blob/5dc3c25aa776aef3cedc45e6638734c9ee85a2f2/src/libs/actions/IOU.js#L1051 and change these https://github.com/Expensify/App/blob/5dc3c25aa776aef3cedc45e6638734c9ee85a2f2/src/libs/actions/IOU.js#L1059 https://github.com/Expensify/App/blob/5dc3c25aa776aef3cedc45e6638734c9ee85a2f2/src/libs/actions/IOU.js#L1063 to
shouldCreateOptimisticPersonalDetails = !existingSplitChatReport && !personalDetailExists;
shouldCreateOptimisticPersonalDetails = isNewOneOnOneChatReport && !personalDetailExists;
We might consider changing the logic here https://github.com/Expensify/App/blob/5dc3c25aa776aef3cedc45e6638734c9ee85a2f2/src/libs/actions/IOU.js#L1061 to include the accountID of current user when we get report by participants or have a function to check if there is a chat with this participant instead of checking if a report has all participants like the existing getChatbyParticipants
Job added to Upwork: https://www.upwork.com/jobs/~01045d4102dd433123
Triggered auto assignment to Contributor-plus team member for initial proposal review - @hoangzinh (External
)
@hoangzinh Whoops! This issue is 2 days overdue. Let's get this updated quick!
Reviewing proposal. Btw @m-natarajan could you help to add "Bug" label to this issue in order to have a BZ member assigned to this issue? Thanks
Triggered auto assignment to @peterdbarkerUK (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Platforms
in OP are β
)@c3024 Thanks for your proposal. It looks good to me. Your proposal pointed out a correct RCA and the solution makes sense. We should only create an optimisticPersonalDetails during split bill if it does not exist.
Thus, I think we go with @c3024's proposal here https://github.com/Expensify/App/issues/29024#issuecomment-1751175182
πππ C+ reviewed
Triggered auto assignment to @Gonals, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @hoangzinh π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @c3024 π 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 π
π£ @tewodrosGirmaA π An offer has been automatically sent to your Upwork account for the Reporter role π Thanks for contributing to the Expensify app!
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one π
I think it's more fair for Contributors if this issue is considered for the speed bonus because the 1st round approval is within a half day. @c3024 and I quickly made & tested the PR as soon as possible.
Agreed, speed bonus should be included here.
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.85-4 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-10-24. :confetti_ball:
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:
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:
Summarizing payouts for this issue:
Issue reporter: @tewodrosGirmaA $50
Contributor: @c3024 $750
@hoangzinh please complete the above checklist and I'll process your payment too!
Do we agree π or π
@hoangzinh, @peterdbarkerUK, @Gonals, @c3024 Huh... This is 4 days overdue. Who can take care of this?
Thanks @hoangzinh - I noticed you skipped the PR Review Checklist discussion step. Could you help me understand if and when that step is required? (I've asked this internally too)
Yeah, because I think it's not a straightforward bug. It's hard to catch kind of this bug from the beginning.
Thanks @hoangzinh - I'm new to BZ and still learning how to handle the judgment call elements of instructions. And, candidly, trying to identify steps we can remove as unnecessary.
On that note of me not being very good yet:
seems to me this is an edge case we don't need to test for in TestRail. I should have done this step earlier and saved you some bureaucracy. Would you agree?
No worry @peterdbarkerUK.
seems to me this is an edge case we don't need to test for in TestRail
I feel it's not an edge case. In a workspace, we split the bill to some users, then we delete this workspace and create a new workspace, we would like to add previous users to this new workspace. I'm 50:50 on it.
what do you think? @c3024 @Gonals do you agree this issue is an edge case? Thanks
"Deleting workspace A" is not a required step.
I think this is not an edge case bug.
As long as we split bill with a user (whose personal details are already returned from backend) with whom we don't have a one-to-one chat already, we will face this bug. And this user option does not appear in any option list because this is turned into an optimistic detail.
While this might not be a frequent flow, this flow can happen sometimes and this bug is a bit more than an edge case bug in my opinion.
Yeah, I'd agree with that. In which case should the regression test be:
TR update proposed, thanks everyone!
@peterdbarkerUK let me know when the payment is processed for me in Upwork. Thanks
Ugh, I lost that in the regression test uncertainty. I'm sorry. Payment sent!
Job closed
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:
Email should be found when searching for it in the newly created workspace.
Actual Result:
Email cannot be found when searching for it in the newly created workspace.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.73-9 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: Any additional supporting documentation
https://github.com/Expensify/App/assets/38435837/d6ecb509-bec2-44b5-b3cb-e8a91d427f01
https://github.com/Expensify/App/assets/38435837/980d760e-07e7-42d0-a911-54c150d97fda
https://github.com/Expensify/App/assets/38435837/fc18cb1c-5d83-4fbc-b0ff-2c816a6fa95a
https://github.com/Expensify/App/assets/38435837/76e6e1e9-6b12-44dc-80aa-03d726f010ce
https://github.com/Expensify/App/assets/38435837/d7dc3254-3e11-444a-975b-44b3b0ec3ea2
https://github.com/Expensify/App/assets/38435837/01ab802f-eb83-4312-9618-6ce4fa31892d
https://github.com/Expensify/App/assets/38435837/1bfcba0d-a011-4daa-af77-84dfac706dc7
Expensify/Expensify Issue URL: Issue reported by: @tewodrosGirmaA Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696584062077569
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @peterdbarkerUKIssue Owner
Current Issue Owner: @peterdbarkerUK