-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
fix: consider sendToAll settings in routingForms response #18226
base: main
Are you sure you want to change the base?
fix: consider sendToAll settings in routingForms response #18226
Conversation
@vijayraghav-io is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
Graphite Automations"Add consumer team as reviewer" took an action on this PR • (12/17/24)1 reviewer was added to this PR based on Keith Williams's automation. "Add community label" took an action on this PR • (12/17/24)1 label was added to this PR based on Keith Williams's automation. "Add ready-for-e2e label" took an action on this PR • (12/18/24)1 label was added to this PR based on Keith Williams's automation. |
…utingForms_sendToAll
Self-reviewed, Tested and verified locally with and without toggling "Add all team members, including future members", working as expected, sending mails to new members added. Will attach a loom video in some time. |
…utingForms_sendToAll
cool, please add test cases 🙏 |
@Praashh, added test cases 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !!
const whereClause: Prisma.MembershipWhereInput = { teamId: form.teamId }; | ||
if (!settings?.sendToAll) { | ||
whereClause.userId = { in: settings.sendUpdatesTo }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing this, shouldn't we find and update sendUpdatesTo to include future members? Why are we currently not adding future members to it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to avoid having an prisma update request on App_RoutingForms_Form
table every time there is a response on the routing Form. (in cases of sendToAll)
If we take UI approach to update sendUpdatesTo
when switch is selected in RoutingForm, we may miss on the scenario where - new team member is added after the switch in RoutingForm is selected and the sendUpdatesTo wont have future members until the switch is re-toggled.
E2E results are ready! |
…utingForms_sendToAll
What does this PR do?
Before Fix:
https://www.loom.com/share/d800f724d7a64636bf30a16b4dc4d999?sid=ffacca4c-bb87-4338-b134-c44cee8ec0a4
After Fix:
https://www.loom.com/share/ad8eb69159344c3f99bce9dd8f9cb505?sid=741fccb5-3278-48d1-8fb4-520bf32cb572
Mandatory Tasks (DO NOT REMOVE)