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

feat: cal video no show workflow triggers #18373

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

Conversation

Udit-takkar
Copy link
Contributor

@Udit-takkar Udit-takkar commented Dec 26, 2024

What does this PR do?

  • Fixes #XXXX (GitHub issue number)
  • Fixes CAL-XXXX (Linear issue number - should be visible at the bottom of the GitHub issue description)

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • N/A 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.
  • N/A I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  1. Go to workflows
  2. Create "after hosts didn't join cal video" workflow

Check if task was added in Task Table in prisma studio

you can also execute it by making request to http://localhost:3000/api/tasks/cron

@keithwillcode keithwillcode added core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO labels Dec 26, 2024
Copy link

vercel bot commented Jan 1, 2025

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

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Jan 10, 2025 7:19pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Jan 10, 2025 7:19pm

@Udit-takkar Udit-takkar marked this pull request as ready for review January 2, 2025 18:04
@graphite-app graphite-app bot requested review from a team January 2, 2025 18:04
@Udit-takkar Udit-takkar added this to the v4.9 milestone Jan 2, 2025
@dosubot dosubot bot added workflows area: workflows, automations ✨ feature New feature or request labels Jan 2, 2025
Copy link

graphite-app bot commented Jan 2, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (01/02/25)

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

"Add foundation team as reviewer" took an action on this PR • (01/02/25)

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

Comment on lines +157 to +167
triggerEvent: WorkflowTriggerEvents.AFTER_HOSTS_CAL_VIDEO_NO_SHOW,
bookingId: booking.id,
// Prevents null values from being serialized
workflow: { ...workflow, time: workflow.time, timeUnit: workflow.timeUnit },
calendarEvent,
emailAttendeeSendToOverride,
smsReminderNumber,
hideBranding,
seatReferenceUid,
},
{ scheduledAt }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pass the complete payload that is need to trigger workflows

}
}

export const triggerGuestNoShowWorkflow = async (payload: string): Promise<void> => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

handles triggering workflow

@@ -75,11 +75,11 @@ export default function EditOAuthClientWebhooks() {
},
{
value: WebhookTriggerEvents.AFTER_HOSTS_CAL_VIDEO_NO_SHOW,
label: "after_hosts_cal_video_no_show",
label: "after_hosts_cal_video_no_show_trigger",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just changed the name of key


await markHostsAsNoShowInBooking(booking, hostsThatDidntJoinTheCall);
}

export const triggerHostNoShowWorkflow = async (payload: string): Promise<void> => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this handles the logic to execute all workflows

@keithwillcode keithwillcode modified the milestones: v4.9, v5.0 Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core area: core, team members only enterprise area: enterprise, audit log, organisation, SAML, SSO ✨ feature New feature or request workflows area: workflows, automations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants