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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Fixes order search so uppercase customer search terms like
JOHNreliably match existing orders for customers such as John Smith.Ticket / Assignment
What changed
lower(...)to the searched order number, customer name, and customer email fields.How to test
Results:
Manual checks:
JOHNand confirmsORD-1001andORD-1003are returned.Screenshots or recordings
N/A
Risks / follow-ups
PR checklist
CONTRIBUTING.mdCode 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.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.