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-20] Group chat - Member amount is 0 when creating group chat offline #43042
Version Number: 1.4-79-2 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 Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Go offline
Go to FAB > Start chat
Create a group chat with a few users
Tap on the chat header
Expected Result:
Members will show the correct number of group members
Actual Result:
Members show 0 when there are some group members
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
👋 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:
Identify the pull request that introduced this issue and revert it.
@aldo-expensify 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
What changes do you think we should make in order to solve the problem?
Change it to this:
const participants = useMemo(() => {
if (isSystemChat) {
// Filter out the current user from the participants of the systemChat
return ReportUtils.getParticipantAccountIDs(report.reportID ?? '').filter((accountID) => accountID !== session?.accountID);
}
return ReportUtils.getVisibleChatMemberAccountIDs(report.reportID ?? '');
}, [report, session, isSystemChat]);
We don't need the check for isGroupChat, getVisibleChatMemberAccountIDs should be used.
Please re-state the problem that we are trying to solve in this issue.
Member amount is 0 when creating group chat offline
What is the root cause of that problem?
Regression caused by this PR #41290. If it's not a systemChat we are filtering out all the members. The purpose of this change was to filter current user from members list if it's a system chat
So removing just isSystemChat will not work here. We can do something like this as we don't want to filter current user from member's list
if (isGroupChat) {
return ReportUtils.getParticipantAccountIDs(report.reportID ?? '');
}
if(isSystemChat){
// Filter out the current user from the particpants of the systemChat
return ReportUtils.getParticipantAccountIDs(report.reportID ?? '').filter((accountID) => accountID !== session?.accountID)
}
What alternative solutions did you explore? (Optional)
We don't show members page if it's a system report
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
Activity
melvin-bot commentedon Jun 4, 2024
Triggered auto assignment to @aldo-expensify (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.github-actions commentedon Jun 4, 2024
👋 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:
lanitochka17 commentedon Jun 4, 2024
@aldo-expensify 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
ShridharGoel commentedon Jun 4, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Group chat - Member amount is 0 when creating group chat offline
What is the root cause of that problem?
There is an extra
&& isSystemChatin the below condition which causes the condition to be always false when it's a group chat.App/src/pages/ReportDetailsPage.tsx
Lines 94 to 101 in 1865aa8
What changes do you think we should make in order to solve the problem?
Change it to this:
We don't need the check for isGroupChat,
getVisibleChatMemberAccountIDsshould be used.ShridharGoel commentedon Jun 4, 2024
@aldo-expensify Since this is a blocker, I can open a PR quickly. Can you have a look at the above proposal?
It is caused by #41290.
Nodebrute commentedon Jun 4, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Member amount is 0 when creating group chat offline
What is the root cause of that problem?
Regression caused by this PR #41290. If it's not a systemChat we are filtering out all the members. The purpose of this change was to filter current user from members list if it's a system chat
App/src/pages/ReportDetailsPage.tsx
Line 97 in 1865aa8
What changes do you think we should make in order to solve the problem?
This was added to filter out current user from members list. But with this is also removing current user from group's members list too
App/src/pages/ReportDetailsPage.tsx
Line 97 in 1865aa8
So removing just
isSystemChatwill not work here. We can do something like this as we don't want to filter current user from member's listWhat alternative solutions did you explore? (Optional)
We don't show members page if it's a system report
App/src/pages/ReportDetailsPage.tsx
Line 154 in 1865aa8
We can remover filtering logic here
ShridharGoel commentedon Jun 4, 2024
Proposal
Updated to add full function code.
Nodebrute commentedon Jun 4, 2024
Proposal Updated
Alternative solution added
ShridharGoel commentedon Jun 4, 2024
Proposal
Updated to add few more details.
aldo-expensify commentedon Jun 4, 2024
@francoisl I agree with @ShridharGoel on that this seems to have been cause by this change:
https://github.com/Expensify/App/pull/41290/files#diff-409b0e2fb439856e9897b808014031ce244a427d116ed30f37a2e0117599adc4R95-R97
What do you think of the proposed solution:
#43042 (comment)
53 remaining items
sonialiap commentedon Jun 20, 2024
Payment summary:
melvin-bot commentedon Jun 20, 2024
Payment Summary
Upwork Job
BugZero Checklist (@sonialiap)
sonialiap commentedon Jun 24, 2024
@ShridharGoel please accept the offer and complete the checklist steps in which you are tagged
sonialiap commentedon Jul 3, 2024
@ShridharGoel please accept the offer. I've also sent you a message in Upwork in case you see that first
ShridharGoel commentedon Jul 3, 2024
Accepted, thanks.
sonialiap commentedon Jul 3, 2024
@ShridharGoel please complete the checklist
ShridharGoel commentedon Jul 3, 2024
@sonialiap I think that would be handled by @aldo-expensify.
sonialiap commentedon Jul 4, 2024
@ShridharGoel melvin assigned you to the regression part of the checklist
melvin-bot commentedon Jul 29, 2024
This issue has not been updated in over 15 days. @sonialiap, @ShridharGoel, @aldo-expensify eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
ShridharGoel commentedon Jul 30, 2024
Looks like no additional test is needed, if we already have a test to check the member count when offline.