Skip to content
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

[HOLD for payment] [$250] Admins room members shows 2 members but members list only has one person #46670

Closed
1 of 6 tasks
m-natarajan opened this issue Aug 1, 2024 · 20 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review

Comments

@m-natarajan
Copy link

m-natarajan commented Aug 1, 2024

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.15-5
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
Expensify/Expensify Issue URL:
Issue reported by: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1722451867724679

Action Performed:

  1. Sign up for account
  2. Choose "manage my team"
  3. Click on the "meet your setup specialist" task
  4. Click on the "admins room" link

Expected Result:

Both admin and chat specialist displayed in admin room

Actual Result:

Only admin is displayed in member list but the member count is displayed as 2

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Recording.403.mp4

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0158f19a1453ec7c77
  • Upwork Job ID: 1819232195007431581
  • Last Price Increase: 2024-08-02
  • Automatic offers:
    • dominictb | Contributor | 103414279
Issue OwnerCurrent Issue Owner: @allroundexperts
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 1, 2024
Copy link

melvin-bot bot commented Aug 1, 2024

Triggered auto assignment to @VictoriaExpensify (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.

@dominictb
Copy link
Contributor

dominictb commented Aug 2, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Only admin is displayed in member list but the member count is displayed as 2

What is the root cause of that problem?

We do not filter out the accountID that is not available in personalDetails data:

const activeChatMembers = participants.flatMap((accountID) => {
const pendingMember = report?.pendingChatMembers?.findLast((member) => member.accountID === accountID.toString());
return !pendingMember || pendingMember.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? accountID : [];
});

like we did in
const details = personalDetails?.[accountID];
if (!details) {
Log.hmmm(`[ReportParticipantsPage] no personal details found for Group chat member with accountID: ${accountID}`);

What changes do you think we should make in order to solve the problem?

We should check if the accountID is available in personalDetails data or not. If not, remove from activeChatMembers

const activeChatMembers = participants.flatMap((accountID) => {
const pendingMember = report?.pendingChatMembers?.findLast((member) => member.accountID === accountID.toString());
return !pendingMember || pendingMember.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE ? accountID : [];
});

We also can filter out in

const participants = useMemo(() => {
const shouldExcludeHiddenParticipants = !isGroupChat && !isSystemChat;
return ReportUtils.getParticipantsAccountIDsForDisplay(report, shouldExcludeHiddenParticipants);
}, [report, isGroupChat, isSystemChat]);

What alternative solutions did you explore? (Optional)

Copy link
Contributor

github-actions bot commented Aug 2, 2024

true

@dominictb
Copy link
Contributor

Proposal updated

Copy link
Contributor

github-actions bot commented Aug 2, 2024

true

@VictoriaExpensify
Copy link
Contributor

Recreated issue:

image

Agree we should fix this.

@VictoriaExpensify VictoriaExpensify added the External Added to denote the issue can be worked on by a contributor label Aug 2, 2024
@melvin-bot melvin-bot bot changed the title Admins room members shows 2 members but members list only has one person [$250] Admins room members shows 2 members but members list only has one person Aug 2, 2024
Copy link

melvin-bot bot commented Aug 2, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0158f19a1453ec7c77

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 2, 2024
Copy link

melvin-bot bot commented Aug 2, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (External)

@allroundexperts
Copy link
Contributor

@dominictb's proposal has the correct RCA and the proposed solution looks good to me. Let's go with them.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 4, 2024

Triggered auto assignment to @Gonals, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 6, 2024
Copy link

melvin-bot bot commented Aug 6, 2024

📣 @dominictb 🎉 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 7, 2024
@melvin-bot melvin-bot bot removed the Weekly KSv2 label Aug 30, 2024
Copy link

melvin-bot bot commented Aug 30, 2024

This issue has not been updated in over 15 days. @Gonals, @allroundexperts, @VictoriaExpensify, @dominictb 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!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Aug 30, 2024
@VictoriaExpensify
Copy link
Contributor

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:

  • [@allroundexperts ] The PR that introduced the bug has been identified. Link to the PR:
  • [@allroundexperts ] 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:
  • [@allroundexpert ] 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:
  • [@allroundexperts ] Determine if we should create a regression test for this bug.
  • [@allroundexperts ] 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.
  • [@VictoriaExpensify Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@VictoriaExpensify
Copy link
Contributor

Payment summary:
Contributor: @dominictb paid $250 via Upwork

@allroundexperts I will make your payment once the checklist is complet

@dominictb
Copy link
Contributor

@VictoriaExpensify Can you add HOLD for payment to the title as well?

@JmillsExpensify JmillsExpensify changed the title [$250] Admins room members shows 2 members but members list only has one person [HOLD for payment] [$250] Admins room members shows 2 members but members list only has one person Oct 17, 2024
@allroundexperts
Copy link
Contributor

Checklist

  1. [Fix]: Number of announce room members does not update when remove workspace members due to pendingAction #39796
  2. https://github.com/Expensify/App/pull/39796/files#r1807946690
  3. N/A
  4. A regression test would be good.

Regression test

  1. Sign up for a new account
  2. In the onboarding modal that appears, choose "manage my team"
  3. Click on the "meet your setup specialist" task
  4. Click on the opened admin room title
  5. Select members from the RHN

Verify that the member count equals to the number of users being shown in the list.

Do we 👍 or 👎 ?

@JmillsExpensify
Copy link

@VictoriaExpensify can you also update the payment summary with an amount for @allroundexperts

@VictoriaExpensify
Copy link
Contributor

Updated Payment summary:
Contributor: @dominictb paid $250 via Upwork
Contributor+: @allroundexperts owed $250 via NewDot

@VictoriaExpensify
Copy link
Contributor

Raised a request to add the regression test to TestRail - https://github.com/Expensify/Expensify/issues/440290

So I think we're all done here. Thanks!

@JmillsExpensify
Copy link

$250 approved for @allroundexperts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review
Projects
No open projects
Status: Polish
Development

No branches or pull requests

6 participants