Scheduling infrastructure for absolutely everyone.
Show correct label in email and make sure that rechedule reason is shown on booking success page (#8053)
Hariom Balhara84f64f5d0653
diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.tsindex 550504298e2..cb04e6f34d3 100644--- a/packages/features/bookings/lib/handleNewBooking.ts+++ b/packages/features/bookings/lib/handleNewBooking.ts@@ -1084,7 +1084,7 @@ async function handler(await sendRescheduledEmails({...copyEvent,additionalNotes, // Resets back to the additionalNote input and not the override value- cancellationReason: "$RCH$" + rescheduleReason ? rescheduleReason : "", // Removable code prefix to differentiate cancellation from rescheduling for email+ cancellationReason: "$RCH$" + (rescheduleReason ? rescheduleReason : ""), // Removable code prefix to differentiate cancellation from rescheduling for email});}const resultBooking = await resultBookingQuery(newBooking.id);@@ -1189,7 +1189,7 @@ async function handler(await sendRescheduledEmails({...copyEvent,additionalNotes, // Resets back to the additionalNote input and not the override value- cancellationReason: "$RCH$" + rescheduleReason ? rescheduleReason : "", // Removable code prefix to differentiate cancellation from rescheduling for email+ cancellationReason: "$RCH$" + (rescheduleReason ? rescheduleReason : ""), // Removable code prefix to differentiate cancellation from rescheduling for email});// Update the old booking with the cancelled status@@ -1519,6 +1519,9 @@ async function handler(};newBookingData["paid"] = originalRescheduledBooking.paid;newBookingData["fromReschedule"] = originalRescheduledBooking.uid;+ if (originalRescheduledBooking.uid) {+ newBookingData.cancellationReason = rescheduleReason;+ }if (newBookingData.attendees?.createMany?.data) {// Reschedule logic with booking with seatsif (eventType?.seatsPerTimeSlot && bookerEmail) {@@ -1733,7 +1736,7 @@ async function handler(...copyEvent,additionalInformation: metadata,additionalNotes, // Resets back to the additionalNote input and not the override value- cancellationReason: "$RCH$" + rescheduleReason ? rescheduleReason : "", // Removable code prefix to differentiate cancellation from rescheduling for email+ cancellationReason: "$RCH$" + (rescheduleReason ? rescheduleReason : ""), // Removable code prefix to differentiate cancellation from rescheduling for email});}}