fix: SCIM group events - compare membership with teamId#22957
Conversation
WalkthroughA filtering condition in the logic for identifying new members not yet part of a specific team was updated. The code previously checked for a match between the Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.ts📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
**/*.{ts,tsx}📄 CodeRabbit Inference Engine (.cursor/rules/review.mdc)
Files:
🧠 Learnings (4)📓 Common learnings📚 Learning: in cal.com's getusereventgroups handler refactor (pr #22618), the membershipcount field for team eve...Applied to files:
📚 Learning: in cal.com's event type system, the membershipcount field for team event groups is intentionally set...Applied to files:
📚 Learning: in cal.com's event type system, the membershipcount field for team event groups is intentionally har...Applied to files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🔇 Additional comments (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (08/07/25)1 reviewer was added to this PR based on Keith Williams's automation. "Add ready-for-e2e label" took an action on this PR • (08/07/25)1 label was added to this PR based on Keith Williams's automation. |
|
|
||
| // Send emails to new members | ||
| const newMembers = users.filter((user) => !user.teams.find((team) => team.id === group.teamId)); | ||
| const newMembers = users.filter((user) => !user.teams.find((team) => team.teamId === group.teamId)); |
There was a problem hiding this comment.
We should rename team to membership.
I have been bitten by a similar bug too 😂
E2E results are ready! |
What does this PR do?
Visual Demo (For contributors especially)
A visual demonstration is strongly recommended, for both the original and new change (video / image - any one).
Video Demo (if applicable):
Image Demo (if applicable):
Mandatory Tasks (DO NOT REMOVE)
How should this be tested?
Checklist