Skip to content

[HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [$250] Room - Room chat LHN preview displays "removed 0 user" after editing room description #44194

Closed

Description

@lanitochka17

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.1-0
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:

  1. Go to staging.new.expensify.com
  2. Go to any room chat
  3. Click on the chat header
  4. Click Room description
  5. Edit room description and save it
  6. Wait for the room description system message to show up in the chat
  7. Look at the room chat LHN preview

Expected Result:

Room chat LHN preview will display room description edit system message

Actual Result:

Room chat LHN preview displays "removed 0 user" after editing room description

Workaround:

Unknown

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

Add any screenshot/video evidence

Bug6521354_1719047083018.renname_room.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01c7a4ab1b5544c43f
  • Upwork Job ID: 1805307133943402370
  • Last Price Increase: 2024-06-24
  • Automatic offers:
    • allgandalf | Reviewer | 102859753
    • ishpaul777 | Contributor | 102859756
Issue OwnerCurrent Issue Owner: @allgandalf

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    DeployBlockerIndicates it should block deploying the API
    on Jun 22, 2024
  2. github-actions commented on Jun 22, 2024

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  3. melvin-bot commented on Jun 22, 2024

    @melvin-bot

    Triggered auto assignment to @cristipaval (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. lanitochka17 commented on Jun 22, 2024

    @lanitochka17
    Author

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

  5. lanitochka17 commented on Jun 22, 2024

    @lanitochka17
    Author

    We think that this bug might be related to #vip-vsp

  6. ishpaul777 commented on Jun 22, 2024

    @ishpaul777
    Contributor

    Proposal

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

    Room chat LHN preview displays "removed 0 user" after editing room description

    What is the root cause of that problem?

    Here we are missing the logic to check lastActionName === 'UPDATEROOMDESCRIPTION' and we dont handle the case to set result.alternateText appropriate transalation key. (set room description to: {newroomName} )

    } else if (ReportActionsUtils.isRoomChangeLogAction(lastAction)) {
    const lastActionOriginalMessage = lastAction?.actionName ? ReportActionsUtils.getOriginalMessage(lastAction) : null;
    const targetAccountIDs = lastActionOriginalMessage?.targetAccountIDs ?? [];
    const targetAccountIDsLength = targetAccountIDs.length !== 0 ? targetAccountIDs.length : report.lastMessageHtml?.match(/<mention-user[^>]*><\/mention-user>/g)?.length ?? 0;
    const verb =
    lastActionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM || lastActionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.INVITE_TO_ROOM
    ? Localize.translate(preferredLocale, 'workspace.invite.invited')
    : Localize.translate(preferredLocale, 'workspace.invite.removed');
    const users = Localize.translate(preferredLocale, targetAccountIDsLength > 1 ? 'workspace.invite.users' : 'workspace.invite.user');
    result.alternateText = `${lastActorDisplayName} ${verb} ${targetAccountIDsLength} ${users}`.trim();

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

    we need to check lastActionName === 'UPDATEROOMDESCRIPTION' and set result.alternateText to appropriate translation key

    } else if (ReportActionsUtils.isRoomChangeLogAction(lastAction)) {
    const lastActionOriginalMessage = lastAction?.actionName ? ReportActionsUtils.getOriginalMessage(lastAction) : null;
    const targetAccountIDs = lastActionOriginalMessage?.targetAccountIDs ?? [];
    const targetAccountIDsLength = targetAccountIDs.length !== 0 ? targetAccountIDs.length : report.lastMessageHtml?.match(/<mention-user[^>]*><\/mention-user>/g)?.length ?? 0;
    const verb =
    lastActionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM || lastActionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.INVITE_TO_ROOM
    ? Localize.translate(preferredLocale, 'workspace.invite.invited')
    : Localize.translate(preferredLocale, 'workspace.invite.removed');
    const users = Localize.translate(preferredLocale, targetAccountIDsLength > 1 ? 'workspace.invite.users' : 'workspace.invite.user');
    result.alternateText = `${lastActorDisplayName} ${verb} ${targetAccountIDsLength} ${users}`.trim();

    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.

  7. mountiny commented on Jun 24, 2024

    @mountiny
    Contributor

    @ishpaul777 What PR cause this regression?

  8. ishpaul777 commented on Jun 24, 2024

    @ishpaul777
    Contributor

    This one #40168

  9. cristipaval commented on Jun 24, 2024

    @cristipaval
    Contributor

    @nkdengineer, do you have time to look at this one?

  10. 21 remaining items

  11. changed the title [-][$250] Room - Room chat LHN preview displays "removed 0 user" after editing room description[/-] [+][HOLD for payment 2024-07-02] [$250] Room - Room chat LHN preview displays "removed 0 user" after editing room description[/+] on Jun 25, 2024
  12. melvin-bot commented on Jun 25, 2024

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  13. melvin-bot commented on Jun 25, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.1-19 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-07-02. 🎊

    For reference, here are some details about the assignees on this issue:

  14. melvin-bot commented on Jul 2, 2024

    @melvin-bot

    Issue is ready for payment but no BZ is assigned. @miljakljajic you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!

  15. miljakljajic commented on Jul 3, 2024

    @miljakljajic
    Contributor

    both contributors paid. Thank you!

  16. changed the title [-][HOLD for payment 2024-07-02] [$250] Room - Room chat LHN preview displays "removed 0 user" after editing room description[/-] [+][HOLD for payment 2024-07-10] [HOLD for payment 2024-07-02] [$250] Room - Room chat LHN preview displays "removed 0 user" after editing room description[/+] on Jul 3, 2024
  17. melvin-bot commented on Jul 3, 2024

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-7 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-07-10. 🎊

    For reference, here are some details about the assignees on this issue:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionEngineeringExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions