Description
Jonathan Druart
2013-03-05 10:12:23 UTC
Created attachment 15889 [details] [review] Bug 9747: Fix sorting issues on z3950 search results At least the BNF server returns results containing non-sorting characters (NSB SNE). In order to sort results according these characters, this patch adds a new Datatable function. Test plan: - search 'tintin' on the z3950 search (cataloguing/z3950_search.pl) - sort on title (default sort) and check that results are not well sorted. - apply this patch - do the same search and check that the first result is "Hergé. Les Aventures de Tintin..." The value of the cell is: <td>Hergé. Les Aventures de Tintin...</td> I tried to test on sandbox but had this message : Applying: Bug 9747: Fix sorting issues on z3950 search results Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/js/datatables.js CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/js/datatables.js Failed to merge in the changes. Created attachment 16361 [details] [review] Bug 9747: Fix sorting issues on z3950 search results At least the BNF server returns results containing non-sorting characters (NSB SNE). In order to sort results according these characters, this patch adds a new Datatable function. Test plan: - search 'tintin' on the z3950 search (cataloguing/z3950_search.pl) - sort on title (default sort) and check that results are not well sorted. - apply this patch - do the same search and check that the first result is "Hergé. Les Aventures de Tintin..." The value of the cell is: <td>Hergé. Les Aventures de Tintin...</td> Before the patch : Sorting by title works. After applying patch : 1) can't sort by title 2) the first title in the list is not Hergé 3) I cannot see any <td> </td> : which cell do i have to look at ? Is it title column in the table ? Maybe you just have to clear the cache of your browser. I tested it and a javascript error occured the first time, causing the sort to not work. Then I cleared the cache (Ctrl + F5) and it worked. Switching back to Needs signoff. (In reply to comment #5) > Maybe you just have to clear the cache of your browser. > I tested it and a javascript error occured the first time, causing the sort > to not work. Then I cleared the cache (Ctrl + F5) and it worked. > Switching back to Needs signoff. Indeed, cache of JavaScript sorting is very strong. Tested with a browser without cache. Patch tested with a sandbox, by Cedric Vita <cedric.vita@dracenie.com> Created attachment 16461 [details] [review] Bug 9747: Fix sorting issues on z3950 search results At least the BNF server returns results containing non-sorting characters (NSB SNE). In order to sort results according these characters, this patch adds a new Datatable function. Test plan: - search 'tintin' on the z3950 search (cataloguing/z3950_search.pl) - sort on title (default sort) and check that results are not well sorted. - apply this patch - do the same search and check that the first result is "Hergé. Les Aventures de Tintin..." The value of the cell is: <td>Hergé. Les Aventures de Tintin...</td> Signed-off-by: Cedric Vita <cedric.vita@dracenie.com> Conflict in koha-tmpl/intranet-tmpl/prog/en/js/datatables.js Created attachment 18655 [details] [review] Bug 9747: Fix sorting issues on z3950 search results At least the BNF server returns results containing non-sorting characters (NSB SNE). In order to sort results according these characters, this patch adds a new Datatable function. Test plan: - search 'tintin' on the z3950 search (cataloguing/z3950_search.pl) - sort on title (default sort) and check that results are not well sorted. - apply this patch - do the same search and check that the first result is "Hergé. Les Aventures de Tintin..." The value of the cell is: <td>Hergé. Les Aventures de Tintin...</td> Created attachment 18656 [details] [review] Bug 9747: Fix sorting issues on z3950 search results At least the BNF server returns results containing non-sorting characters (NSB SNE). In order to sort results according these characters, this patch adds a new Datatable function. Test plan: - search 'tintin' on the z3950 search (cataloguing/z3950_search.pl) - sort on title (default sort) and check that results are not well sorted. - apply this patch - do the same search and check that the first result is "Hergé. Les Aventures de Tintin..." The value of the cell is: <td>Hergé. Les Aventures de Tintin...</td> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised and doesn't break existing searching Created attachment 18657 [details] [review] Bug 9747 - sort issue for the z3950 results Rebased patch. Datatable sorting is now very different, I really have rewritten this part. I also applied this sort on acquisition page using z3950 search. There are many changes so I set bug to Needs Signoff. You may test with Tolkien as author, you get : The Lord of the rings, The Two towers, The Return of the king, ... Note that NSB and NSE are not visible in MARC popup view, but if you copy/paste the title in an advanced editor (like Geany), you will see them. Oups, we both worked on this bug. I revert my patch, I will add it in a new bug since it adds features. So I set PassedQA. Created attachment 18669 [details] [review] Bug 9747 - sort issue for the z3950 results - Followup Finally I created a follow-up just to add the new sort in z3950 in acquisition module. Also adds default sorting on title column. This feature is really usefull I bet. Thanks all for your work. Pushed to master. Thanks, Jonathan! |