HTML reports should be dynamically sortable

Bug #1516867 reported by Dan Scott
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Currently, HTML reports are static tables that are sorted in the order in which the columns were output, so the first column determines the sort order of the table.

While we offer CSV and Excel formats for manipulation of the data, that's overkill for many HTML reports would benefit by being dynamically sortable--for example, circulation reports that let you click on the header to sort in descending instead of ascending order for total fines, or to sort by last name instead of first name, etc.

Luckily this is easily accomplished with modern JavaScript libraries. If we tweak the HTML just slightly, and include a library like sortable (https://github.com/hubspot/sortable - MIT-licensed, so compatible with being bundled with Evergreen), we can have dynamically sortable reports with just 3K of JavaScript.

Dan Scott (denials)
Changed in evergreen:
milestone: none → 2.next
Revision history for this message
Dan Scott (denials) wrote :

Pushed user/dbs/lp1516867_sortable_html_report to working for the amusement of all. We're running this in production because it's a minor delta to clark-kent.pl and a nice overall win.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/lp1516867_sortable_html_report

tags: added: pullrequest reports
Changed in evergreen:
importance: Undecided → Wishlist
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
status: New → Confirmed
Revision history for this message
Dan Scott (denials) wrote :

I've added another commit per Galen's request to locate this under Open-ILS/web/js/sortable (and thus /js/sortable in HTTP requests) rather than under Open-ILS/web/sortable.

Revision history for this message
Galen Charlton (gmc) wrote :

I've pushed to collab/gmcharlt/lp1516867_sortable_report_output a signoff branch that contains Dan's patches, squashed together, and a follow-up patch that sets a limit on how large the report output can be and still have dynamic sorting of the table enabled.

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/gmcharlt/lp1516867_sortable_report_output

tags: added: signedoff
Changed in evergreen:
assignee: Galen Charlton (gmc) → nobody
Revision history for this message
Ben Shum (bshum) wrote :

Works for me, thanks Dan and Galen! Pushed to master for 2.10-beta.

Changed in evergreen:
milestone: 2.next → 2.10-beta
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.