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

[Due for payment 2025-02-19] [$250] Workspace -"Invited 1 user to Chat Report" displayed instead of WS name when inviting member #56033

Open
5 of 8 tasks
IuliiaHerets opened this issue Jan 30, 2025 · 11 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 Jan 30, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.92-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5530917&group_by=cases:section_id&group_order=asc&group_id=229067
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12 - Chrome / Windows 10 - Chrome
App Component: Chat Report View

Action Performed:

Prerequisite: Have at least one room created for the workspace, so that an #Admins room is displayed.

  1. Open the Expensify app.
  2. Open any workspace chat.
  3. Tap on workspace header and select "Members"
  4. Invite new members to the workspace chat.
  5. Return to LHN.
  6. Check the message displayed on Admins room on LHN.
  7. Open the Admins room and check the message displayed on chat.

Expected Result:

When inviting a new member to a workspace chat, system message displayed on Admins room, should show the workspace name.

Actual Result:

When inviting a new member to a workspace chat, system message on Admins room shows "1 user invited to Chat Report" instead of showing the workspace name.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6728147_1738208070290.Chat_Report.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021885267438744802218
  • Upwork Job ID: 1885267438744802218
  • Last Price Increase: 2025-01-31
Issue OwnerCurrent Issue Owner: @twisterdotcom
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 30, 2025
Copy link

melvin-bot bot commented Jan 30, 2025

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.

@bernhardoj
Copy link
Contributor

Proposal

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

Chat Report is shown instead of the workspace name.

What is the root cause of that problem?

We build the message from the action originalMessage. The report name is taken from roomName and the roomName for policy expense chat is 'Chat Report'. It's the same as the policy expense chat reportName.

Image

const roomName = lastActionOriginalMessage?.roomName ?? '';
if (roomName) {
const preposition =
lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.ROOM_CHANGE_LOG.INVITE_TO_ROOM || lastAction.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.INVITE_TO_ROOM
? ` ${translate(preferredLocale, 'workspace.invite.to')}`
: ` ${translate(preferredLocale, 'workspace.invite.from')}`;
result.alternateText += `${preposition} ${roomName}`;

const roomName = originalMessage?.roomName;
if (roomName) {
const preposition = isInviteAction ? ` ${translateLocal('workspace.invite.to')} ` : ` ${translateLocal('workspace.invite.from')} `;
if (originalMessage.reportID) {
return [
{
kind: 'text',
content: preposition,
},
{
kind: 'roomReference',
roomName,

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

We can use getReportName to get the report name based on the logic inside getReportName.

const roomName = getReportName(allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${lastActionOriginalMessage?.reportID}`]);

This will also fix the case where the room name is updated.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Jan 31, 2025
@melvin-bot melvin-bot bot changed the title Workspace -"Invited 1 user to Chat Report" displayed instead of WS name when inviting member [$250] Workspace -"Invited 1 user to Chat Report" displayed instead of WS name when inviting member Jan 31, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 31, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

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

@hungvu193
Copy link
Contributor

@bernhardoj 's proposal looks good to me
🎀👀🎀

Copy link

melvin-bot bot commented Feb 1, 2025

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

@amyevans
Copy link
Contributor

amyevans commented Feb 3, 2025

Sounds like a plan 👍

@melvin-bot melvin-bot bot added the Overdue label Feb 3, 2025
@melvin-bot melvin-bot bot removed Help Wanted Apply this label when an issue is open to proposals by contributors Overdue labels Feb 3, 2025
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 4, 2025
@bernhardoj
Copy link
Contributor

PR is ready

cc: @hungvu193

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 12, 2025
@melvin-bot melvin-bot bot changed the title [$250] Workspace -"Invited 1 user to Chat Report" displayed instead of WS name when inviting member [Due for payment 2025-02-19] [$250] Workspace -"Invited 1 user to Chat Report" displayed instead of WS name when inviting member Feb 12, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 12, 2025
Copy link

melvin-bot bot commented Feb 12, 2025

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

Copy link

melvin-bot bot commented Feb 12, 2025

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

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

  • @hungvu193 requires payment through NewDot Manual Requests
  • @bernhardoj requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Feb 12, 2025

@hungvu193 @twisterdotcom @hungvu193 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

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

5 participants