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

fix: cancel workflows on cancel booking #17871

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

VK-RED
Copy link
Contributor

@VK-RED VK-RED commented Nov 27, 2024

What does this PR do?

Removed deleteScheduledSend function in scheduledEmailRemainder cron api, as this lead to removing the cancelled label on the scheduled emails, thus causing the users to receive emails for cancelled event.

According to sendGrid docs :

When a Batch is canceled, all messages associated with that batch will stay in your sending queue, but when their send_at value is reached, they will be discarded instead of attempting delivery.

Link to SendGrid docs

Previously ( when deleteScheduledSend is present )

Event Created

Screenshot from 2024-11-26 17-07-46

Event Cancelled

Screenshot from 2024-11-26 17-09-38

Simulated a Cron

Simulated a cron to execute deleteScheduledSend to delete emails in the queue.
https://github.com/calcom/cal.com/blob/main/packages/features/ee/workflows/api/scheduleEmailReminders.ts#L80

Ideally this cron action should have deleted the emails in the queue, and the users should not get any email regarding the cancelled booking

Email Received on Cancelled Booking

Screenshot from 2024-11-26 17-30-54

Did not received SMS or Whatsapp Reminder, but still received email on the cancelled booking.

Updated Changes ( deleteScheduledSend is removed )

Event Created

Screenshot from 2024-11-26 18-08-25

Event Cancelled

Screenshot from 2024-11-26 18-09-14

Again Simulated the cron

https://github.com/calcom/cal.com/blob/main/packages/features/ee/workflows/api/scheduleEmailReminders.ts#L80

No Emails received on Cancelled Booking

Screenshot from 2024-11-26 18-31-14

No emails , SMS or Whatsapp reminder is received.

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

Copy link

vercel bot commented Nov 27, 2024

@VK-RED is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@graphite-app graphite-app bot added the community Created by Linear-GitHub Sync label Nov 27, 2024
@graphite-app graphite-app bot requested a review from a team November 27, 2024 07:23
@github-actions github-actions bot added High priority Created by Linear-GitHub Sync workflows area: workflows, automations 🐛 bug Something isn't working labels Nov 27, 2024
@dosubot dosubot bot added emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email ✨ feature New feature or request labels Nov 27, 2024
@dosubot dosubot bot added this to the v4.7 milestone Nov 27, 2024
Copy link

graphite-app bot commented Nov 27, 2024

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (11/27/24)

1 reviewer was added to this PR based on Keith Williams's automation.

"Add community label" took an action on this PR • (11/27/24)

1 label was added to this PR based on Keith Williams's automation.

"Add foundation team as reviewer" took an action on this PR • (11/27/24)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link
Contributor

@Praashh Praashh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VK-RED would be great if you add a loom video.

@Praashh Praashh changed the title feat: cancel workflows on cancel booking fix: cancel workflows on cancel booking Nov 27, 2024
@VK-RED
Copy link
Contributor Author

VK-RED commented Nov 27, 2024

Hi @Praashh here is a screen recording

Screencast

Screencast.from.2024-11-27.18-38-30.mp4

No Emails Received

image

@keithwillcode
Copy link
Contributor

@CarinaWolli Can you please take a look at this one? 🙏

@keithwillcode keithwillcode added the high-risk Requires approval by Foundation team label Nov 27, 2024
@graphite-app graphite-app bot requested a review from a team November 27, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working community Created by Linear-GitHub Sync emails area: emails, cancellation email, reschedule email, inbox, spam folder, not getting email ✨ feature New feature or request High priority Created by Linear-GitHub Sync high-risk Requires approval by Foundation team workflows area: workflows, automations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-4779] cancelling in app.cal.com does not cancel workflow
4 participants