Fix: show descending sort arrow on Document Manager "Observed" column#2486
Fix: show descending sort arrow on Document Manager "Observed" column#2486LiamStanziani wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThe document report table initialization now uses the valid descending sort value for column 6. ChangesDocument report sorting
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideCorrects the DataTables default sort direction for the Document Manager / eDoc "Observed" column so the header shows the descending sort arrow while preserving the existing newest-first data ordering. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Code Review
This pull request corrects the sorting order option in the DataTables configuration within documentReport.jsp from 'dsc' to 'desc'. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@SourceryAI review |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Summary
The Document Manager table (patient Document Manager and the provider eDoc tab) is configured to default-sort by the Observed (observation date) column, newest-first. The rows do render in the correct descending order, but the column header never shows the descending (down) arrow — it displays the neutral "unsorted" up/down glyph instead. This makes it look like the table isn't sorted by Observed date at all.
The cause is a one-character typo in the DataTables initialization: the sort direction was written as
'dsc'instead of'desc'. This change corrects it.Found due to: Documents manager defaults to sorted by first column instead of observed date
Problem
src/main/webapp/documentManager/documentReport.jspinitializes the documents table with:'dsc'is not a valid DataTables direction (the valid values are'asc'/'desc'). Because of how DataTables 1.13.4 handles the value, the three pieces of "sorted" state diverge:'dsc'dir === 'asc'; anything else is treated as descending.aria-sortattribute"descending"_fnSortAriausesdir == 'asc' ? 'ascending' : 'descending'.sorting(no arrow)dir == 'asc' ? sSortAsc : dir == 'desc' ? sSortDesc : <neutral>.'dsc'matches neither branch, so the column falls back to the neutral glyph instead ofsorting_desc.So users see correctly-ordered rows but no visual indicator that the Observed column is the active (descending) sort.
The typo originates from commit
d87797cb45("fix order grouping in document manager ordered by obs date desc"), which introduced theorderoption to fix an earlier "defaults to first column" bug. That commit fixed the data ordering but shipped the'dsc'typo, leaving this residual cosmetic bug. It is present on bothdevelopandrelease/2026-03-17, and affects both the patient Document Manager (function=demographic) and the provider eDoc tab (function=providers).Solution
Change the DataTables sort direction from the invalid
'dsc'to the correct'desc'indocumentReport.jsp:(Actual change:
'dsc'→'desc'on theorder:line.)This is a one-character, behavior-preserving fix: the data was already sorting descending, and now the header correctly renders the
sorting_desc(down-arrow) class so the Observed column visibly shows it is the active descending sort.UI Before:
UI After:
Verification
Verified live in the running app (logged in, demographic 1 + provider eDoc tab):
'dsc'): Observed header class =sorting(neutral, no arrow); rows ordered descending.'desc'): Observed header class =sorting sorting_desc(down arrow shown); rows ordered descending — identical data order, only the indicator changes.Confirmed on both tables of the provider eDoc view (private
tblDocs0and publishedtblDocs1).Summary by Sourcery
Bug Fixes:
Summary by cubic
Fixes the missing descending arrow on the Observed column in the Document Manager and provider eDoc tables by correcting the DataTables sort direction from 'dsc' to 'desc'. Rows were already sorted newest-first; now the header correctly shows the active descending arrow.
Written for commit 7c4cb06. Summary will update on new commits.
Summary by CodeRabbit