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

[$250] Group chat - After removing user, group name is not updated #49491

Closed
3 of 6 tasks
IuliiaHerets opened this issue Sep 19, 2024 · 18 comments
Closed
3 of 6 tasks

[$250] Group chat - After removing user, group name is not updated #49491

IuliiaHerets opened this issue Sep 19, 2024 · 18 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 19, 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.38-0
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause Internal Team

Action Performed:

  1. Launch app
  2. Tap fab -- start chat
  3. Select a user with a custom name eg: jaihanumanblog@gmail.com
    and tap add to group
  4. Open the group name and note user name shown
  5. Select the user and now note the group name updated without user name
  6. Tap back
  7. Select a user with a custom name eg: jaihanumanblog@gmail.com
    and tap add to group
  8. Tal start group
  9. Tap header
  10. Tap the group name and note user name shown
  11. Remove the user
  12. Tap group name and note group name not updated without user name and just a swipe down shows character limit error

Expected Result:

After removing user, group name must be updated.

Actual Result:

After removing user, group name is not updated.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6608614_1726735802186.Screenrecorder-2024-09-19-14-10-17-185_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021836866126068088205
  • Upwork Job ID: 1836866126068088205
  • Last Price Increase: 2024-09-19
  • Automatic offers:
    • c3024 | Reviewer | 104061081
    • FitseTLT | Contributor | 104061083
Issue OwnerCurrent Issue Owner: @twisterdotcom
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 19, 2024
Copy link

melvin-bot bot commented Sep 19, 2024

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

@IuliiaHerets
Copy link
Author

@twisterdotcom 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

@bondydaa bondydaa self-assigned this Sep 19, 2024
@bondydaa bondydaa added the External Added to denote the issue can be worked on by a contributor label Sep 19, 2024
@melvin-bot melvin-bot bot changed the title Group chat - After removing user, group name is not updated [$250] Group chat - After removing user, group name is not updated Sep 19, 2024
Copy link

melvin-bot bot commented Sep 19, 2024

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

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

melvin-bot bot commented Sep 19, 2024

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

@abzokhattab
Copy link
Contributor

abzokhattab commented Sep 19, 2024

what should happen if the user changed the group name to something else before removing a user?

@FitseTLT
Copy link
Contributor

FitseTLT commented Sep 19, 2024

Proposal

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

Group chat - After removing user, group name is not updated

What is the root cause of that problem?

We are not removing pending delete participants when we construct a default (when there is no custom group name) group name here

let participantAccountIDs = participants?.map((participant) => participant.accountID) ?? Object.keys(report?.participants ?? {}).map(Number);

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

We should filter out participants with pending delete from report.participants

    let participantAccountIDs =
        participants?.map((participant) => participant.accountID) ??
        Object.keys(report?.participants ?? {})
            .map(Number)
            .filter((accountID) => {
                const pendingMember = report?.pendingChatMembers?.find((member) => member.accountID === accountID.toString());
                return !(pendingMember && pendingMember.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE);
            });

What alternative solutions did you explore? (Optional)

@c3024
Copy link
Contributor

c3024 commented Sep 20, 2024

@FitseTLT 's proposal here LGTM!

🎀 👀 🎀 C+ Reviewed

@c3024
Copy link
Contributor

c3024 commented Sep 20, 2024

🎀 👀 🎀 C+ Reviewed

Copy link

melvin-bot bot commented Sep 20, 2024

Current assignee @bondydaa is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

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

melvin-bot bot commented Sep 20, 2024

📣 @c3024 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Sep 20, 2024

📣 @FitseTLT 🎉 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 the Overdue label Sep 23, 2024
@twisterdotcom
Copy link
Contributor

Let us know how you're getting on @FitseTLT!

Copy link

melvin-bot bot commented Sep 23, 2024

@bondydaa, @twisterdotcom, @FitseTLT, @c3024 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@FitseTLT
Copy link
Contributor

PR created

@bondydaa
Copy link
Contributor

hmm automation failed looks like this was deployed 2 weeks ago #49618 (comment)

@bondydaa bondydaa added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Oct 15, 2024
@c3024
Copy link
Contributor

c3024 commented Oct 15, 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:

  • [@c3024] The PR that introduced the bug has been identified. Link to the PR: fix: New users are not displayed in group name #46703
  • [@c3024] 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: https://github.com/Expensify/App/pull/46703/files#r1801578029
  • [@c3024] 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: No discussion was started because this could not have been identified earlier.
  • [@c3024] Determine if we should create a regression test for this bug. Yes
  • [@c3024] 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.

Regression Test Proposal

  1. FAB > Start chat
  2. Select a few members and create a group chat
  3. Go to the group chat report
  4. Click on the group chat header
  5. Press on "Members" in the right hand panel
  6. Select a member and remove them from the group
  7. Verify that the group chat name does not contain name/login of the removed user in Step 6

@c3024
Copy link
Contributor

c3024 commented Oct 15, 2024

@twisterdotcom

Can you please handle the payment here? Thanks!

@twisterdotcom
Copy link
Contributor

Payment Summary:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants