Skip to content

Add first name search field to find owners form#88

Closed
meysholdt wants to merge 1 commit into
mainfrom
moritz/cx-216-owner-search-by-first-name
Closed

Add first name search field to find owners form#88
meysholdt wants to merge 1 commit into
mainfrom
moritz/cx-216-owner-search-by-first-name

Conversation

@meysholdt
Copy link
Copy Markdown
Contributor

Summary

The find owners form only searched by last name. This adds a first name field so users can narrow results when multiple owners share a surname.

Closes CX-216

Changes

  • OwnerRepository: Add findByLastNameStartingWithAndFirstNameStartingWith query method
  • OwnerController: Pass both firstName and lastName to the repository query; forward both values to the pagination model
  • findOwners.html: Add first name input field to the search form
  • ownersList.html: Preserve lastName and firstName query params in pagination links
  • OwnerControllerTests: Add tests for first-name-only and combined first+last name search; update existing mocks to use the new repository method

Testing

All 59 tests pass (including 2 new test cases for first name search).

The find owners form only searched by last name. This adds a first name
field so users can narrow results when multiple owners share a surname.

- Add findByLastNameStartingWithAndFirstNameStartingWith to OwnerRepository
- Update OwnerController to pass both firstName and lastName to the query
- Add firstName input to findOwners.html template
- Preserve both search params in ownersList.html pagination links
- Add tests for first name and combined first+last name search

Closes CX-216

Co-authored-by: Ona <no-reply@ona.com>
@sonarqubecloud
Copy link
Copy Markdown

@meysholdt meysholdt closed this Apr 15, 2026
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