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

feat: when bulk importing, ignore already invited people #13861

Closed
wants to merge 3 commits into from

Conversation

Pritam-sd-dev
Copy link
Contributor

@Pritam-sd-dev Pritam-sd-dev commented Feb 26, 2024

What does this PR do?

Fixes #13825
Before:
https://www.loom.com/share/2478041272b24f6aabed035c06f0c7e5?sid=18a4848a-1b1a-49c5-8ed9-ff7fc44af281

After:
https://www.loom.com/share/285d8bd3141640d98db157495c140171?sid=41e32490-af3f-49e1-b14f-5cf502cc058c

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How should this be tested?

Checklist

  • I haven't checked if my changes generate no new warnings
  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Feb 26, 2024
Copy link

vercel bot commented Feb 26, 2024

@Pritam-sd-dev is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added enterprise area: enterprise, audit log, organisation, SAML, SSO Medium priority Created by Linear-GitHub Sync organizations area: organizations, orgs labels Feb 26, 2024
Copy link
Contributor

github-actions bot commented Feb 26, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@github-actions github-actions bot added the ✨ feature New feature or request label Feb 26, 2024
Copy link

graphite-app bot commented Feb 26, 2024

Graphite Automations

A Graphite automation took an action on this PR • (02/26/24)

1 label was added based on Keith Williams's automation, 'Add community label'

Copy link
Contributor

github-actions bot commented Feb 26, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@keithwillcode keithwillcode requested a review from a team February 27, 2024 13:56
@keithwillcode keithwillcode added this to the v3.9 milestone Feb 27, 2024
@Pritam-sd-dev Pritam-sd-dev marked this pull request as draft February 27, 2024 16:54
Copy link
Contributor

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Mar 13, 2024
@PeerRich PeerRich marked this pull request as ready for review March 25, 2024 21:03
@PeerRich
Copy link
Member

looks solid, anything missing?

@PeerRich PeerRich modified the milestones: v3.9, v4.0 Mar 25, 2024
@emrysal
Copy link
Contributor

emrysal commented Mar 25, 2024

Hi @Pritam-sd-dev - I'd like see this fixed in the getUsersToInvite function, instead of throwing an error what we should do there is a .filter() function that runs the check eligibility code. This should be enough to fix the issue.

Also, you can consider splitting up the check eligibility code into two seperate functions (one for illegal actions, a guard and one for filtering to prevent duplicate invites).

@github-actions github-actions bot removed the Stale label Mar 26, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

This PR is being marked as stale due to inactivity.

@github-actions github-actions bot added the Stale label Apr 9, 2024
@keithwillcode keithwillcode modified the milestones: v4.0, v4.1 Apr 15, 2024
@dosubot dosubot bot removed this from the v4.1 milestone Apr 15, 2024
@github-actions github-actions bot removed the Stale label Apr 16, 2024
@keithwillcode keithwillcode added this to the v4.1 milestone Apr 16, 2024
@CarinaWolli
Copy link
Member

Hi @Pritam-sd-dev - I'd like see this fixed in the getUsersToInvite function, instead of throwing an error what we should do there is a .filter() function that runs the check eligibility code. This should be enough to fix the issue.

Also, you can consider splitting up the check eligibility code into two seperate functions (one for illegal actions, a guard and one for filtering to prevent duplicate invites).

@Pritam-sd-dev will you be able to take a look at that? Putting it in draft for now until this is addressed 🙏

@CarinaWolli CarinaWolli marked this pull request as draft April 18, 2024 15:01
@Amit91848
Copy link
Contributor

This has already been fixed #13139

const existingUsersWithMemberships = await getUsersToInvite({
usernamesOrEmails: usernameOrEmailsToInvite,
isInvitedToOrg: isOrg,
team,
});
const existingUsersWithMembershipsThatNeedToBeInvited = existingUsersWithMemberships.filter(
(invitee) => invitee.canBeInvited
);

@CarinaWolli
Copy link
Member

This has already been fixed #13139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Created by Linear-GitHub Sync enterprise area: enterprise, audit log, organisation, SAML, SSO ✨ feature New feature or request Medium priority Created by Linear-GitHub Sync organizations area: organizations, orgs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-3422] [CAL-3230] [CAL-3193] when bulk importing, ignore already invited people
6 participants