cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

feat: added ability to assign event to all members

Open Pradumn27 opened this issue 2 years ago • 10 comments

What does this PR do?

Fixes https://github.com/calcom/cal.com/issues/10991

/claim #10991

Have added the ability to assign all team members a managed event type.

Requirement/Documentation

  • If there is a requirement document, please, share it here.
  • If there is ab UI/UX design document, please, share it here. Design Provided : 265071602-ae6857af-f638-4331-8c3d-eee82807f7c1

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

  • Create a team
  • Created a managed event with this team
  • Now got to settings -> assignment for this event type
  • Inside Assignment check the box above assign to drop down
  • See that all the members of the team get assigned to this event type (can check this from the db directly or by logging in ti the team member accounts individually)
  • Also test by inviting a new member to the team that they also get this event type assigned as the checkbox mentioned that the event type will be assigned to everyone in the team whenever added.

Mandatory Tasks

  • [x] Make sure you have self-reviewed the code. A decent size PR without self-review might be rejected.

Checklist

  • I haven't checked if my PR needs changes to the documentation
  • 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

Pradumn27 avatar Jan 14 '24 21:01 Pradumn27

@Pradumn27 is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jan 14 '24 21:01 vercel[bot]

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

github-actions[bot] avatar Jan 14 '24 21:01 github-actions[bot]

📦 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! 🙌

github-actions[bot] avatar Jan 18 '24 16:01 github-actions[bot]

@Pradumn27 does this also work with round robin and collective?

if not, can you make it work for all team events? round robin, collective, managed events

PeerRich avatar Jan 18 '24 18:01 PeerRich

@Pradumn27 does this also work with round robin and collective?

if not, can you make it work for all team events? round robin, collective, managed events

@PeerRich yes have added an update to incorporate also for round robin and collective events can be tested in the similar manner as above

Screenshot 2024-01-19 at 1 54 38 AM Screenshot 2024-01-19 at 1 54 29 AM

Pradumn27 avatar Jan 18 '24 21:01 Pradumn27

Screenshot 2024-01-19 at 6 50 32 PM

I had to turn off the switch and then turn on again to assign all the members

Udit-takkar avatar Jan 19 '24 13:01 Udit-takkar

@Udit-takkar have resolved the issue, it was due to an error in the update team events query i wrote, but everything should be working fine now.

Pradumn27 avatar Jan 20 '24 18:01 Pradumn27

Another thing i don't think we should use this toggle for round robin event types because round robin assignment has two types 'Fixed hosts' and 'Round Robin Hosts'

lets only do for round robin host, not for fixed host

PeerRich avatar Jan 20 '24 19:01 PeerRich

we definitely want this option for round robin, just not for fixed hosts

PeerRich avatar Jan 20 '24 19:01 PeerRich

Another thing i don't think we should use this toggle for round robin event types because round robin assignment has two types 'Fixed hosts' and 'Round Robin Hosts'

lets only do for round robin host, not for fixed host

That sounds good to me, have incorporated this change in the code, and can be tested as well. cc: @PeerRich @Udit-takkar

Screenshot 2024-01-21 at 2 44 56 AM

Pradumn27 avatar Jan 20 '24 21:01 Pradumn27

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jan 23, 2024 3:32pm

vercel[bot] avatar Jan 23 '24 15:01 vercel[bot]

@CarinaWolli have resolved the above issues

Pradumn27 avatar Jan 23 '24 20:01 Pradumn27

Found another issue:

1. Enable switch for collective event types, save

2. Change scheduling type to round-robin, switch is and stays enabled, save

3. Result: Round-robin has no hosts

That's a nice catch, have resolved it now. @CarinaWolli

Pradumn27 avatar Jan 24 '24 16:01 Pradumn27

nice job! I wonder if we wanna do something in a v2 of this where you can

  • ✅ Everyone
  • Exclude: Anna, Brian, etc.

Sounds like a good idea, can be usefull for users, a few questions though:

  1. Will we only show exclude members option when assignAllTeamMembers is selected or instead it's an alternative option which implies that everyone else apart from the specified people will be assigned and on selecting someone in this assignment option all other assignment options will be hidden(eg: if someone is selected to be excluded in assignment, other options like select hosts or assignAllTeamMembers will get hidden).

cc: @PeerRich

Pradumn27 avatar Jan 27 '24 15:01 Pradumn27