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" },
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 ;)
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.
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?
Is this a possible duplicate of bug 13054?
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 ***