FIX: Sorting issues case directory#14173
Conversation
📝 WalkthroughWalkthroughRestructures the sort-property switch in CaseListCriteriaBuilder#getIndexOrders so case fields map to their own property instead of incorrectly falling through to DISEASE_VARIANT_VALUE, fixing case directory sorting. Separately, SurveyTokenGrid now renders its RESPONSE_RECEIVED column using BooleanRenderer. ChangesCase Directory Sorting Fix
Estimated code review effort: 2 (Simple) | ~10 minutes Survey Token Grid Boolean Rendering
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java (1)
298-324: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueSort mapping fix looks correct.
Breaking the previous fall-through to
DISEASE_VARIANT_VALUEand mapping each case field to its own property viacaze.get(sortProperty.propertyName)directly addresses the reported sorting issues. The split between direct mapping andcb.lower()for identifier-type text fields (external ID, tokens, case reference number) is consistent with the case-insensitive sorting already applied to person name fields. TheDISEASE_VARIANT→Case.DISEASE_VARIANT_VALUEmapping is correctly isolated.Minor nit: the comment on line 302 (
// case normal fields) has irregular leading whitespace.✏️ Minor comment formatting cleanup
- // case normal fields + // case normal fields🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java` around lines 298 - 324, Clean up the inline comment formatting in CaseListCriteriaBuilder’s sort-property switch by removing the irregular leading whitespace in the “case normal fields” comment near the CaseIndexDto mappings; keep the existing CaseIndexDto and CaseIndexDetailedDto branches unchanged and only normalize the comment text/indentation for consistency.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java`:
- Around line 298-324: Clean up the inline comment formatting in
CaseListCriteriaBuilder’s sort-property switch by removing the irregular leading
whitespace in the “case normal fields” comment near the CaseIndexDto mappings;
keep the existing CaseIndexDto and CaseIndexDetailedDto branches unchanged and
only normalize the comment text/indentation for consistency.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 27402158-71a2-4875-a696-8ab213e2b477
📒 Files selected for processing (2)
sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.javasormas-ui/src/main/java/de/symeda/sormas/ui/survey/SurveyTokenGrid.java
Fixes #14093
Summary by CodeRabbit