Skip to content

fix(bookings): apply attendeeEmail filter correctly#28540

Open
ankitsingh1421 wants to merge 3 commits intocalcom:mainfrom
ankitsingh1421:fix/attendee-email-filter
Open

fix(bookings): apply attendeeEmail filter correctly#28540
ankitsingh1421 wants to merge 3 commits intocalcom:mainfrom
ankitsingh1421:fix/attendee-email-filter

Conversation

@ankitsingh1421
Copy link

@ankitsingh1421 ankitsingh1421 commented Mar 22, 2026

What does this PR do?

This PR fixes an issue where the attendeeEmail query parameter in GET /v2/bookings was not applied correctly.

Problem

The API was returning all bookings regardless of the provided attendeeEmail filter.

Solution

  • Implemented proper filtering logic for attendeeEmail
  • Ensured exact match filtering on attendee email
  • Aligned filtering behavior with expected API functionality

Visual Demo (For contributors especially)

Image Demo (if applicable):

Before Fix:

  • API returns all bookings (ignores attendeeEmail)

After Fix:

  • API returns only bookings matching the provided attendeeEmail

(Unable to attach screenshots due to local environment issues, but logic has been verified.)


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. (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?

Setup

  • Ensure environment variables like CALCOM_API_KEY are set
  • Run project locally using Docker or yarn dx

Test Steps

  1. Create 3 bookings with different attendee emails:

  2. Call the API:

GET /v2/bookings?take=100&eventTypeId={eventTypeId}&attendeeEmail=attendee-a%40example.com

Expected Result (Happy Path)

  • totalCount should be 1
  • Only booking with attendee-a@example.com should be returned

Previous Behavior

  • All bookings were returned (filter ignored)

@ankitsingh1421 ankitsingh1421 requested review from a team as code owners March 22, 2026 20:53
@github-actions github-actions bot added the 🐛 bug Something isn't working label Mar 22, 2026
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Singh seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 22, 2026

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:

No release type found in pull request title "Fix/attendee email filter". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

Copy link
Contributor

@Ryukemeister Ryukemeister left a comment

Choose a reason for hiding this comment

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

Review: were

{
"env": {
"CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

dont think we need these changes can you please revert these

@ankitsingh1421
Copy link
Author

Thanks for the suggestions!

I've:

  • Reverted the unrelated env changes
  • Removed the duplicate attendeeEmail field and used the existing one in filters
  • Ensured filtering logic works as expected

Would appreciate another review 🙏

@ankitsingh1421 ankitsingh1421 changed the title Fix/attendee email filter fix(bookings): apply attendeeEmail filter correctly Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get all bookings filter

3 participants