-
Notifications
You must be signed in to change notification settings - Fork 10.2k
feat: implement automatic event type reassignment when user attributes change #22706
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
base: main
Are you sure you want to change the base?
Conversation
…s change - Add eventTypeAttributeReassignment.ts with centralized logic for updating event type hosts based on attribute changes - Hook into assignUserToAttribute.handler.ts to trigger reassignment after individual attribute updates - Hook into assignValueToUser.ts to trigger reassignment after bulk attribute updates - Add reassignEventTypes.handler.ts for manual bulk reassignment via tRPC - Use zod validation for type-safe JsonValue to AttributesQueryValue conversion - Preserve existing host settings (priority, weight, scheduleId) when reassigning - Add comprehensive error handling and logging Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
Co-Authored-By: joe@cal.com <j.auyeung419@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ 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 (
|
This PR is being marked as stale due to inactivity. |
feat: implement automatic event type reassignment when user attributes change
Summary
This PR implements automatic event type host reassignment when user attributes are updated. Previously, when attributes were assigned to users, event types using attribute-based filtering (
assignRRMembersUsingSegment
) would not automatically update their host assignments to reflect the new attribute values.Key Changes:
eventTypeAttributeReassignment.ts
with centralized logic for finding and updating event types based on attribute changesassignUserToAttribute.handler.ts
) and bulk (assignValueToUser.ts
) attribute assignment flowsreassignEventTypes
for manual bulk reassignmentReview & Testing Checklist for Human
Recommended Test Plan:
assignRRMembersUsingSegment: true
and attribute filter queriesDiagram
Notes
Link to Devin run: https://app.devin.ai/sessions/48b698274b8b4407baf83267091974d3
Requested by: @joeauyeung