Bug 13070 - Managing staged MARC records, sorting by title should ignore articles
Summary: Managing staged MARC records, sorting by title should ignore articles
Status: RESOLVED DUPLICATE of bug 13054
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL: /cgi-bin/koha/tools/manage-marc-impor...
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2014-10-10 16:59 UTC by Owen Leonard
Modified: 2020-01-07 14:28 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2014-10-10 16:59:49 UTC
The new DataTables-enhanced display of staged MARC records should be modified so that sorting by title ignores articles.

I thought the solution would be as simple as the one for Bug 13069, but when 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 1 Martin Renvoize 2014-10-14 20:42:04 UTC
OK, So I've been investigating this and found the relevant places to update the code.

Looks like this DataTable is indeed entirely serverside processed, relying upon tools/batch_records_ajax.pl for the ajax backend (see line 67->68 for the sort call.  We can then trace this back further into C4/ImportBatch.pm lines 1035 to 1039.

We could hard code an exclusion here, but that not very flexible so I'm currently looking into whether the sType parameters can get passed back in the ajax request inside the mDataProp field.. at which point we may be able to do something a little more workable.

Anywho, just an update to say i've not forgotten this.. it's a bit of a lunchtimes project to get this done at the moment ;)
Comment 2 Martin Renvoize 2014-10-14 20:48:13 UTC
Note, it seems mysql doens't really support this kind of sorting.. there are ways to do it, http://stackoverflow.com/questions/9087603/mysql-sort-alphabetically-but-ignore-the, but I'm feeling they're never going to be as extensible and performant as the feature originally was... hmm, maybe loading the dataset into a perl structure in memory and sorting within that would be a more viable option.. but I feel that level of re-write falls outside the scope of this bug.
Comment 3 Katrin Fischer 2019-12-22 09:53:10 UTC
Please remember we don't only won't to ignore "the", but all the variations of it in other languages as well. It looks like the list of articles to ignore is currently part of the po files?
Comment 4 Katrin Fischer 2020-01-06 12:11:20 UTC
Is this a possible duplicate of bug 13054?
Comment 5 Nick Clemens 2020-01-07 14:28:47 UTC
I think Katrin is right, manage staged marc doesn't work because of server side processing, combining these

*** This bug has been marked as a duplicate of bug 13054 ***