Skip to content

fix: search on team availiability (for non-org users)#19738

Merged
eunjae-lee merged 1 commit intomainfrom
fix/search-on-team-availability
Mar 5, 2025
Merged

fix: search on team availiability (for non-org users)#19738
eunjae-lee merged 1 commit intomainfrom
fix/search-on-team-availability

Conversation

@eunjae-lee
Copy link
Copy Markdown
Contributor

@eunjae-lee eunjae-lee commented Mar 5, 2025

What does this PR do?

This PR fixes search on the team availability page for non-org users.

Visual Demo (For contributors especially)

Search used to fail like this in a certain condition (more details in the code review)

Screenshot.2025-03-05.at.11.12.13.mp4

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.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • on main, try to search on /availability?type=team (in a non-org account). It should fail with console error.
  • on this branch, try the same, and it will work.

@graphite-app graphite-app bot requested a review from a team March 5, 2025 10:13
@keithwillcode keithwillcode added consumer core area: core, team members only labels Mar 5, 2025
@dosubot dosubot bot added teams area: teams, round robin, collective, managed event-types 🐛 bug Something isn't working labels Mar 5, 2025
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Mar 5, 2025

Graphite Automations

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

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

"Add ready-for-e2e label" took an action on this PR • (03/05/25)

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

],
}
: {}),
},
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is where we fetch team ids where the user belongs to, but we don't have to filter teams with the search string. It's wrong. The filtering should happen later when fetching members from these teams. We already have the logic there, meaning we have duplicated filtering here.

@eunjae-lee eunjae-lee enabled auto-merge (squash) March 5, 2025 10:33
@eunjae-lee eunjae-lee merged commit d79a5c3 into main Mar 5, 2025
57 of 78 checks passed
@eunjae-lee eunjae-lee deleted the fix/search-on-team-availability branch March 5, 2025 10:56
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 5, 2025

E2E results are ready!

itsalam pushed a commit to itsalam/cal.com that referenced this pull request Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working consumer core area: core, team members only ready-for-e2e teams area: teams, round robin, collective, managed event-types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants