Skip to content

Conversation

@anonymoususer72041
Copy link

Summary

This pull request fixes the candidate city search by adding the missing searchByCity branch in CandidatesUI::onSearch() and addresses #654.

The “City” option in the candidate search form is now correctly mapped to SearchCandidates::byCity($query, $sortBy, $sortDirection) and the result set is post-processed to populate ownerAbbrName and resumeID in the same way as the existing candidate search modes.

A cityWildCardString variable is also maintained for consistency with the other wildcard string fields.

Motivation

Before this change, the candidate search page rendered the "City" option in the search dropdown without any errors, but submitting a search with that mode active caused the controller to fall through to the default case in CandidatesUI::onSearch().

As a result, the request ended with the generic "Invalid search mode." message instead of executing a proper city-based search, even though SearchCandidates::byCity() already implements the necessary query logic.

By explicitly handling the searchByCity mode, this pull request makes the city search behave like the other supported modes and removes the invalid-mode error when users perform a city-based candidate search.

anonymoususer72041 added a commit to anonymoususer72041/OpenCATS that referenced this pull request Dec 11, 2025
commit e33fbde
Author: anonymoususer72041 <247563575+anonymoususer72041@users.noreply.github.com>
Date:   Sun Dec 7 13:58:24 2025 +0100

    Fix candidate city search mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant