Skip to content

feat: Add UTM parameter as an additional filter option #28717

Open
zakacat wants to merge 3 commits intocalcom:mainfrom
SENG-371-Team-15:main
Open

feat: Add UTM parameter as an additional filter option #28717
zakacat wants to merge 3 commits intocalcom:mainfrom
SENG-371-Team-15:main

Conversation

@zakacat
Copy link
Copy Markdown

@zakacat zakacat commented Apr 2, 2026

What does this PR do?

Firstly, we understand that this issue was marked as "needs approval", but we decided to go ahead with the feature as we needed the material for our course. We understand that this PR may not ultimately be approved by a reviewer.

We began by extending the input filter schema to declare the five new UTM fields (utmSource, utmMedium, utmCampaign, utmTerm, utmContent), then modified the query handler to apply the corresponding WHERE clauses when those filters are active. From there we updated the booking filters hook to read the new filter values from the DataTable, registered the new columns in useBookingListColumns.tsx, and added the filterable column definitions to filterColumns.ts. The BookingListContainer.tsx was updated to map the new filter values through to the tRPC query input, and the English translation strings were added to common.json for the filter labels. Finally, we wrote unit tests to validate the new behaviour before and after the changes.

Image Demo:

BEFORE

Before Filter Changes

AFTER

UTM FILTERS UTM MEDIUM 2 UTM SOURCE 2 UTM TERM 2 UVIC CONTENT 2

Mandatory Tasks (DO NOT REMOVE)

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

How should this be tested?

Units tests were added to apps/web/modules/bookings/hooks/useActiveFiltersValidator.test.ts and packages/trpc/server/routers/viewer/bookings/get.handler.test.ts, accordingly.

Run

yarn test get.handler.test apps/web/modules/bookings/hooks/useActiveFiltersValidator.test

to run tests specifc to the filters.

@zakacat zakacat requested a review from a team as a code owner April 2, 2026 23:10
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 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 "Add UTM parameter as an additional filter option ". 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

@github-actions github-actions bot added ✨ feature New feature or request 🚨 needs approval This feature request has not been reviewed yet by the Product Team and needs approval beforehand labels Apr 2, 2026
@zakacat zakacat changed the title Add UTM parameter as an additional filter option feat: Add UTM parameter as an additional filter option Apr 2, 2026
Copy link
Copy Markdown
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 10 files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ feature New feature or request 🚨 needs approval This feature request has not been reviewed yet by the Product Team and needs approval beforehand size/XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add UTM parameter as an additional filter option

3 participants