You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-06-13] [$250] mWeb - Members - When last member leaves the group, user is not prompted with a warning message #42204
Version Number: 1.4.74 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/4566310 Issue reported by: Applause - Internal Team
@greg-schroeder FYI 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
Please re-state the problem that we are trying to solve in this issue.
When the final member leaves from the group, the user won't receive a warning message
To see this bug clearly, we can do these steps:
Create a group (1 admin, 1 member)
Go offline
Delete the member
Leave group
What is the root cause of that problem?
The issue arises because when removing the member, we only add the "pending" field and remain report.participant, but
we solely rely on report.participant to determine if it's the last member
What changes do you think we should make in order to solve the problem?
We must ensure that we don't include members with pending deletion actions when verifying if they are the last member
if (Object.keys(report?.participants ?? {}).length - pendingChatMembers.length === 1 ) {
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-]mWeb - Members - When last member leaves the group, user is not prompted with a warning message[/-][+][$250] mWeb - Members - When last member leaves the group, user is not prompted with a warning message[/+]on May 16, 2024
changed the title [-][$250] mWeb - Members - When last member leaves the group, user is not prompted with a warning message[/-][+][HOLD for payment 2024-06-13] [$250] mWeb - Members - When last member leaves the group, user is not prompted with a warning message[/+]on Jun 6, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve 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:
[@mananjadhav] The PR that introduced the bug has been identified. Link to the PR:
[@mananjadhav] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@mananjadhav] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@mananjadhav] Determine if we should create a regression test for this bug.
[@mananjadhav] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
I couldn't pinpoint to the exact PR for this one, but I feel we should add a regression test for this one. The test steps from the PR looks fine to me.
Open app
Tap start chat
Select a user and create group
Send few messages
Tap header -- member
Select one member listed and remove the member
Tap back
Tap Leave group
When last member leaves the group, user must be prompted with a warning message.
Activity
melvin-bot commentedon May 15, 2024
Triggered auto assignment to @greg-schroeder (
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.lanitochka17 commentedon May 15, 2024
@greg-schroeder FYI 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
lanitochka17 commentedon May 15, 2024
We think that this bug might be related to #vip-vsp
cretadn22 commentedon May 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
When the final member leaves from the group, the user won't receive a warning message
To see this bug clearly, we can do these steps:
What is the root cause of that problem?
The issue arises because when removing the member, we only add the "pending" field and remain
report.participant, butwe solely rely on report.participant to determine if it's the last member
App/src/components/ChatDetailsQuickActionsBar.tsx
Line 38 in c19eea6
What changes do you think we should make in order to solve the problem?
We must ensure that we don't include members with pending deletion actions when verifying if they are the last member
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
ZhenjaHorbach commentedon May 15, 2024
Actually we have a ticket where we need to refactor Details page and move leave button to menu items
#40256
So I think it's better to fix this issue it there since this button will be moved to
ReportDetailsAnd to fix this issue
Proposal
Please re-state the problem that we are trying to solve in this issue.
mWeb - Members - When last member leaves the group, user is not prompted with a warning message
What is the root cause of that problem?
The main problem with issue is that when we remove member it remains in
report?.participantsbut with pending action equal todeleteApp/src/components/ChatDetailsQuickActionsBar.tsx
Line 38 in c19eea6
What changes do you think we should make in order to solve the problem?
To fix this issue we can use
activeChatMembersApp/src/pages/ReportDetailsPage.tsx
Lines 100 to 103 in 7c630c8
instead
report?.participantsApp/src/components/ChatDetailsQuickActionsBar.tsx
Line 38 in c19eea6
What alternative solutions did you explore? (Optional)
NA
greg-schroeder commentedon May 16, 2024
Checking if we should handle here before applying External
greg-schroeder commentedon May 16, 2024
Looks like they want to solve this separately, so let's keep it here. Going to add
Externalmelvin-bot commentedon May 16, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0108d139f0fc936c57
[-]mWeb - Members - When last member leaves the group, user is not prompted with a warning message[/-][+][$250] mWeb - Members - When last member leaves the group, user is not prompted with a warning message[/+]22 remaining items
[-][$250] mWeb - Members - When last member leaves the group, user is not prompted with a warning message[/-][+][HOLD for payment 2024-06-13] [$250] mWeb - Members - When last member leaves the group, user is not prompted with a warning message[/+]melvin-bot commentedon Jun 6, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 6, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.79-11 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 2024-06-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 6, 2024
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:
mananjadhav commentedon Jun 11, 2024
I couldn't pinpoint to the exact PR for this one, but I feel we should add a regression test for this one. The test steps from the PR looks fine to me.
greg-schroeder commentedon Jun 13, 2024
Processing
greg-schroeder commentedon Jun 13, 2024
Payment summary:
Contributor: @tienifr - $250 - Paid via Upwork
C+: @mananjadhav - $250 - You can make a manual request
greg-schroeder commentedon Jun 13, 2024
Regression test filed, closing
JmillsExpensify commentedon Jun 14, 2024
$250 approved for @mananjadhav