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

LHN - Employee name is displayed as workspace chat name #54661

Open
1 of 8 tasks
lanitochka17 opened this issue Dec 30, 2024 · 4 comments
Open
1 of 8 tasks

LHN - Employee name is displayed as workspace chat name #54661

lanitochka17 opened this issue Dec 30, 2024 · 4 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Overdue

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 30, 2024

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.79-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Component: Left Hand Navigation (LHN)

Action Performed:

Preconditions:
The user uses two accounts, 1 Workspace Admin and 1 employee
1.Go to staging.new.expensify.com
2.Log in with the employee account and with admin account on another device
3. As an admin, invite an employee to the Workspace
4. As an employee, observe the LHN

Expected Result:

After being invited to a workspace, the WS name is displayed in the LHN for the employee

Actual Result:

The employee name is displayed as workspace chat name on LHN, only after navigating to the chat, the correct WS name appears

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Add any screenshot/video evidence
Bug6703928_1735506818234.Recording__306.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 30, 2024
Copy link

melvin-bot bot commented Dec 30, 2024

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

@FitseTLT
Copy link
Contributor

FitseTLT commented Dec 30, 2024

Edited by proposal-police: This proposal was edited at 2024-12-30 18:59:48 UTC.

Proposal

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

LHN - Employee name is displayed as workspace chat name

What is the root cause of that problem?

When the policy expense chat arrives isOwnPolicyExpenseChat is becoming false ( it turns true only when the user opens the report) so this condition fails

App/src/libs/ReportUtils.ts

Lines 2965 to 2966 in 12bbe02

if (report?.isOwnPolicyExpenseChat) {
return getPolicyName(report, false, policy);

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

For these cases, we can give a fallback of checking if ownerAccountID is the current user account id

 if (report?.isOwnPolicyExpenseChat || report?.ownerAccountID === currentUserAccountID) {
        return getPolicyName(report, false, policy);

we can even remove the isOwnPolicyExpenseChat condition and solely rely on the ownerAccountID

If there are other instances where we rely on isOwnPolicyExpenseChat we can apply similar fixes.

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

We can create a test for getPolicyExpenseChatName to check that it returns the proper title for own policy chat though isOwnPolicyExpenseChat is not populated correctly

What alternative solutions did you explore? (Optional)

@huult
Copy link
Contributor

huult commented Jan 1, 2025

I think this issue is related to #54327 because isOwnPolicyExpenseChat is false, and chatType is policyExpenseChat.

@melvin-bot melvin-bot bot added the Overdue label Jan 2, 2025
Copy link

melvin-bot bot commented Jan 3, 2025

@RachCHopkins Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

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. Daily KSv2 Overdue
Projects
None yet
Development

No branches or pull requests

4 participants