Skip to content

[$250] Inviting a secondary login to a workspace appears as Hidden in the members table.  #52517

Closed

Description

@trjExpensify

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: v9.0.61-3
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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @danielrvidal
Slack conversation (hyperlinked to channel name): #convert

Action Performed:

  1. Invite two users to a workspace
  2. Make sure one of the users you invite is a secondary login to an existing account.

Expected Result:

The user with a secondary login should only appear once in the table, and their primaryLogin should be displayed.

Actual Result:

The secondary login invitee appears as Hidden in the members table, and there appears to be two entries in the workspace's employeeList.

Workaround:

Not that I'm aware of.

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

2024-11-14_01-43-27.mp4
image

Other example:

image image

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021866191811810677468
  • Upwork Job ID: 1866191811810677468
  • Last Price Increase: 2024-12-09

Activity

  1. added
    External
    Daily
    Bug
    on Nov 14, 2024
  2. added
    Help Wanted
    on Nov 14, 2024
  3. melvin-bot commented on Nov 14, 2024

    @melvin-bot

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

  4. melvin-bot commented on Nov 14, 2024

    @melvin-bot

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

  5. truph01 commented on Nov 14, 2024

    @truph01
    Contributor

    Edited by proposal-police: This proposal was edited at 2024-11-14 05:25:56 UTC.

    Proposal

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

    The secondary login invitee appears as Hidden in the members table, and there appears to be two entries in the workspace's employeeList.

    What is the root cause of that problem?

    • When we invite an account that is a secondary login to an existing account, we optimistically merge the secondary email to policy.employeeList. And BE returns the policy.employeeList containing primary email. Now the policyEmployeeList contains both primary and secondary emails. But only the primary email has detail data in personalDetailsList because the secondary email data has been cleared when the API is called successfully.

    • The data in here:

    const policyMemberEmailsToAccountIDs = useMemo(() => PolicyUtils.getMemberAccountIDsForWorkspace(policy?.employeeList, true), [policy?.employeeList]);

    only contains the accountID for primary email.

    • But in:

    const accountID = Number(policyMemberEmailsToAccountIDs[email] ?? '');

    in case of secondary email, its policyMemberEmailsToAccountIDs[email] is undefined and Number(policyMemberEmailsToAccountIDs[email] ?? '') is 0. And in personalDetailsList data, we has 0 as valid key and its data is not empty so the condition:

    is false.

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

    • Should update:

    const accountID = Number(policyMemberEmailsToAccountIDs[email] ?? '');

                const accountID = Number(policyMemberEmailsToAccountIDs[email] ?? '');
                if(!accountID){
                    return
                }
    

    What alternative solutions did you explore? (Optional)

    • Should update:

    const accountID = Number(policyMemberEmailsToAccountIDs[email] ?? '');

                if (policyMemberEmailsToAccountIDs[email] === undefined) {
                    return;
                }
                const accountID = Number(policyMemberEmailsToAccountIDs[email] ?? '');
    
  6. twisterdotcom commented on Nov 18, 2024

    @twisterdotcom
    Contributor

    Relabelling as Lauren is OOO now.

  7. removed
    Bug
    on Nov 18, 2024
  8. 19 remaining items

  9. allgandalf commented on Nov 25, 2024

    @allgandalf
    Contributor

    @truph01 left some comments please check :))

  10. NikkiWines commented on Dec 9, 2024

    @NikkiWines
    Contributor

    @mallenexpensify, I raised this here for discussion on closing this issue out.

  11. added
    External
    and removed
    External
    on Dec 9, 2024
  12. changed the title [-]Inviting a secondary login to a workspace appears as `Hidden` in the members table. [/-] [+][$250] Inviting a secondary login to a workspace appears as `Hidden` in the members table. [/+] on Dec 9, 2024
  13. melvin-bot commented on Dec 9, 2024

    @melvin-bot
  14. added
    Help Wanted
    on Dec 9, 2024
  15. melvin-bot commented on Dec 9, 2024

    @melvin-bot

    Current assignee @allgandalf is eligible for the External assigner, not assigning anyone new.

  16. added
    Daily
    and removed
    Weekly
    on Dec 9, 2024
  17. mallenexpensify commented on Dec 9, 2024

    @mallenexpensify
    Contributor

    We want to close this issue because the PRs not needed anymore, right? Cuz we hired @truph01 , full compensation is due to both the contributor and C+, per internal SO

    100% due if contributor drafted a PR and requested a review.
    100% due to C+ if they reviewed the PR.

    @truph01 @allgandalf can you please accept the job and reply here once you have?
    https://www.upwork.com/jobs/~021866191811810677468

  18. truph01 commented on Dec 10, 2024

    @truph01
    Contributor

    @mallenexpensify I accepted the job. Appreciate it 🙏

  19. mallenexpensify commented on Dec 10, 2024

    @mallenexpensify
    Contributor

    Contributor: @truph01 paid $250 via Upwork
    Contributor+: @allgandalf paid $250 via Upwork

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

Metadata

Metadata

Labels

BugDailyExternalHelp WantedReviewing

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions