Skip to content

Fixed the like pattern for customizable field#14100

Merged
KarnaiahPesula merged 1 commit into
developmentfrom
bugfix-14078-typing-into-search-field-causes-technical-error-in-customizable-fields-configuration
Jun 30, 2026
Merged

Fixed the like pattern for customizable field#14100
KarnaiahPesula merged 1 commit into
developmentfrom
bugfix-14078-typing-into-search-field-causes-technical-error-in-customizable-fields-configuration

Conversation

@KarnaiahPesula

@KarnaiahPesula KarnaiahPesula commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #

Summary by CodeRabbit

  • Bug Fixes
    • Improved free-text filtering for customizable field metadata, making searches more reliable across field name, description, and UI group values.
    • Preserved existing search behavior while preventing issues caused by text handling during filtering.

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 00580f95-4030-42c2-9915-be4934718177

📥 Commits

Reviewing files that changed from the base of the PR and between f07820b and ba9fbf1.

📒 Files selected for processing (1)
  • sormas-backend/src/main/java/de/symeda/sormas/backend/customizablefield/CustomizableFieldMetadataService.java

📝 Walkthrough

Walkthrough

In CustomizableFieldMetadataService.buildCriteriaFilter, the NAME, DESCRIPTION, and UI_GROUP criteria paths now include an explicit .as(String.class) cast before cb.lower(...) is applied for free-text filtering.

Customizable Field Metadata Free-Text Filter

Layer / File(s) Summary
Explicit String cast in free-text predicate
sormas-backend/src/.../customizablefield/CustomizableFieldMetadataService.java
NAME, DESCRIPTION, and UI_GROUP paths now call .as(String.class) before cb.lower(...) in the OR-combined LIKE predicates.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A bunny hopped through fields of code,
Found paths that needed strings bestowed,
.as(String.class) — a tiny fix,
No more type-casting magic tricks!
🐇✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is only the template placeholder and is missing the required issue number after Fixes #. Replace the placeholder with a real issue reference, e.g. "Fixes #1234", and keep any additional summary details as needed.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the main change to customizable field text filtering.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix-14078-typing-into-search-field-causes-technical-error-in-customizable-fields-configuration

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@KarnaiahPesula KarnaiahPesula requested review from raulbob and roldy June 30, 2026 10:30
@KarnaiahPesula KarnaiahPesula merged commit 5135411 into development Jun 30, 2026
7 checks passed
@KarnaiahPesula KarnaiahPesula deleted the bugfix-14078-typing-into-search-field-causes-technical-error-in-customizable-fields-configuration branch June 30, 2026 10:52
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.

Typing into search field causes technical error - Customizable fields configuration

2 participants