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

Booking Cancelled Webhook - Organiser webhook payload is missing id. #14697

Closed
Shpadoinkle opened this issue Apr 22, 2024 · 3 comments · Fixed by #14745
Closed

Booking Cancelled Webhook - Organiser webhook payload is missing id. #14697

Shpadoinkle opened this issue Apr 22, 2024 · 3 comments · Fixed by #14745
Labels
🐛 bug Something isn't working High priority Created by Linear-GitHub Sync webhooks area: webhooks, callback, webhook payload

Comments

@Shpadoinkle
Copy link
Contributor

Shpadoinkle commented Apr 22, 2024

Issue Summary

Booking Created and Booking Rescheduled webhooks contain the id param on the organiser object.

But this is missing from the Booking Cancelled webhook.

Steps to Reproduce

cancel a booking. The organiser object is missing the id information that is available on the Created and Rescheduled webhook payloads.

Actual Results

  • missing id

Expected Results

  • organiser object to be consistent with create/reschedule flows

Technical details

4.0.1

Evidence

  • file packages/features/bookings/lib/handleCancelBooking.ts
  • line 257 is not passing in id for the organizer object
@dosubot dosubot bot added webhooks area: webhooks, callback, webhook payload 🐛 bug Something isn't working labels Apr 22, 2024
Copy link

dosubot bot commented Apr 22, 2024

The absence of the id parameter from the organiser object in the Booking Cancelled webhook payload is due to its omission in the construction of the organiser object within the handleCancelBooking.ts file. Unlike the Booking Created and Booking Rescheduled webhooks, where the id is included, the code for handling booking cancellations does not explicitly include the id in the organiser object.

To address this inconsistency, you would need to modify the section of the code that constructs the organiser object for the Booking Cancelled webhook payload to include the id. This involves adjusting the payload construction in the handleCancelBooking.ts file, specifically where the organiser details are set for the webhook payload.

For reference, the current construction of the organiser object for cancellations does not account for the id, focusing instead on properties like email, name, timeZone, timeFormat, and language. This is why the id parameter is present in the payloads for created and rescheduled bookings but missing from the cancelled booking webhook payload.

If you're looking to make the organiser object consistent across all booking-related webhooks, adding the id to the payload for cancellations would be the necessary step. This change would ensure that the organiser object structure remains uniform across different types of booking webhooks, facilitating a more predictable and reliable data format for webhook consumers.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@alishaz-polymath alishaz-polymath added the High priority Created by Linear-GitHub Sync label Apr 22, 2024
@vikaspatil0021
Copy link
Contributor

vikaspatil0021 commented Apr 25, 2024

@alishaz-polymath @Shpadoinkle
Should we include the username in the organizer object as well?

@alishaz-polymath
Copy link
Member

@alishaz-polymath @Shpadoinkle Should we include the username in the organizer object as well?

Yes, that should be fine!

Udit-takkar added a commit that referenced this issue May 6, 2024
… id. #14697 (#14745)

* fix: include id information to be consistent with create/reschedule flows

* fix: include username as well

* function expectBookingCancelledWebhookToHaveBeenFired created

* chore: undo yarn.lock

---------

Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Co-authored-by: Udit Takkar <udit222001@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working High priority Created by Linear-GitHub Sync webhooks area: webhooks, callback, webhook payload
Projects
None yet
3 participants