Bug 13054 - Allow server-side sorting by title to ignore custom sets of articles
Summary: Allow server-side sorting by title to ignore custom sets of articles
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
: 13070 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-09 14:27 UTC by Owen Leonard
Modified: 2020-01-07 14:32 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13054: Added sort 'anti-the' to title (910 bytes, patch)
2014-10-09 15:23 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-10-09 14:27:18 UTC
When sorting clent-side DataTables-enhanced tables by title, it's possible to use a custom sorting algorithm to ignore articles, based on this configuration in datatables-strings.inc:

var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the");

...and the "anti-the" sorting code in js/datatables.js. This doesn't work with server-side DataTables implementations, which means that sorting by title on the circulation and patron detail pages no longer works as well as it did before those pages were redone with AJAX datatables.

I would like to see some kind of implementation which continued to enable the user to define articles to exclude from sorting and would work at the database level so that AJAX datatables could be correctly sorted.
Comment 1 Martin Renvoize 2014-10-09 15:23:35 UTC
Created attachment 32093 [details] [review]
Bug 13054: Added sort 'anti-the' to title
Comment 2 Martin Renvoize 2014-10-09 15:24:43 UTC
A tad confused... I just added the 'anti-the' to checkouts.js and found it appeared to be working for me..

See patch for the super tiny change..

Maybe i'm not looking in the right place though.
Comment 3 Owen Leonard 2014-10-09 16:48:30 UTC
(In reply to Martin Renvoize from comment #2)
> I just added the 'anti-the' to checkouts.js and found it
> appeared to be working for me..

Yes, that works for me too. However, if I try to add something similar to manage-marc-imports.tt it doesn't work (Line 38):

-              { "mDataProp": "citation" },
+              { "mDataProp": "citation", "sType": "anti-the" },
Comment 4 Nick Clemens 2020-01-07 14:28:47 UTC
*** Bug 13070 has been marked as a duplicate of this bug. ***
Comment 5 Nick Clemens 2020-01-07 14:32:53 UTC
A possible workaround for titles at least would be to respect the non-filing indications into the title field in the DB, or a new title_sort field - this would need to address the different MARC21/UNIMARC implementations