Fixed inconsistent search #4

Open
dsel wants to merge 1 commits from jd-fix/case-insensitive-search-order into master
Collaborator

Summary

Fixes order search so uppercase customer search terms like JOHN reliably match existing orders for customers such as John Smith.

Ticket / Assignment

  • Ticket: Add ticket ID or link
  • Assignment: Order search uppercase input bug

What changed

  • Normalized the incoming order search query to lowercase.
  • Applied SQLite lower(...) to the searched order number, customer name, and customer email fields.
  • Kept the fix scoped to backend order repository search logic.

How to test

bun test apps/api/src/orders/order-search-assignment-1.test.ts
bun test apps/api/src/orders/orders-routes.test.ts
bun run check:api

Results:

  • Uppercase search regression: 1 passed, 0 failed.
  • Order route tests: 6 passed, 0 failed.
  • API typecheck: passed.

Manual checks:

  • Not required for this backend-only change; the API regression test searches with JOHN and confirms ORD-1001 and ORD-1003 are returned.

Screenshots or recordings

N/A

Risks / follow-ups

  • No known risks or follow-ups.

PR checklist

  • change is scoped to one ticket or one small reviewable concern
  • acceptance criteria were checked
  • code follows CONTRIBUTING.md
  • no unrelated refactor is mixed in
  • debug code and temporary logs are removed
  • relevant automated checks were run locally
  • changed behavior was manually tested when needed
  • known risks or follow-ups are called out
## Summary Fixes order search so uppercase customer search terms like `JOHN` reliably match existing orders for customers such as John Smith. ## Ticket / Assignment - Ticket: Add ticket ID or link - Assignment: Order search uppercase input bug ## What changed - Normalized the incoming order search query to lowercase. - Applied SQLite `lower(...)` to the searched order number, customer name, and customer email fields. - Kept the fix scoped to backend order repository search logic. ## How to test ```bash bun test apps/api/src/orders/order-search-assignment-1.test.ts bun test apps/api/src/orders/orders-routes.test.ts bun run check:api ``` Results: - Uppercase search regression: 1 passed, 0 failed. - Order route tests: 6 passed, 0 failed. - API typecheck: passed. Manual checks: - Not required for this backend-only change; the API regression test searches with `JOHN` and confirms `ORD-1001` and `ORD-1003` are returned. ## Screenshots or recordings N/A ## Risks / follow-ups - No known risks or follow-ups. ## PR checklist - [x] change is scoped to one ticket or one small reviewable concern - [x] acceptance criteria were checked - [x] code follows `CONTRIBUTING.md` - [x] no unrelated refactor is mixed in - [x] debug code and temporary logs are removed - [x] relevant automated checks were run locally - [x] changed behavior was manually tested when needed - [x] known risks or follow-ups are called out
dsel added 1 commit 2026-09-14 06:41:40 +00:00
Fixed inconsistent search
Runner Test / test (push) Successful in 16s
Runner Test / test (pull_request) Successful in 15s
37a6d3cd5a
Owner

Code is good. Add the ticket link next time, and maybe think about some risks/follow up. Otherwise good job at getting the assignment test to pass.

Code is good. Add the ticket link next time, and maybe think about some risks/follow up. Otherwise good job at getting the assignment test to pass.
All checks were successful
Runner Test / test (push) Successful in 16s
Runner Test / test (pull_request) Successful in 15s
This pull request doesn't have enough required approvals yet. 0 of 1 approvals granted from users or teams on the allowlist.
The changes on this branch are already on the target branch. This will be an empty commit.
You are not authorized to merge this pull request.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin jd-fix/case-insensitive-search-order:jd-fix/case-insensitive-search-order
git checkout jd-fix/case-insensitive-search-order
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: derrick/ai-wave-02#4