[Bug 14912] New: Sort Advanced Search Languages by priority
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Bug ID: 14912 Summary: Sort Advanced Search Languages by priority Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: larit@student.uef.fi QA Contact: testopia@bugs.koha-community.org Libraries should be able to control the priority of languages in the advanced search drop-down list. This could be achieved by sorting them according to the AdvancedSearchLanguages system preference. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 --- Comment #1 from Lari Taskula <larit@student.uef.fi> --- Created attachment 42914 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42914&action=edit Bug 14912: Sort Advanced Search Languages by priority Libraries should be able to control the priority of languages in the advanced search drop-down list. This could be achieved by sorting them according to the AdvancedSearchLanguages system preference. To test: -1. Set some languages into AdvancedSearchLanguages system preference 1. Go to advanced search and look at Languages drop-down list 2. Note that the list is in alphabetical order 3. Apply patch 4. Repeat step 1 5. Note that the list is sorted like AdvancedSearchLanguages -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Lari Taskula <larit@student.uef.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42914|0 |1 is obsolete| | --- Comment #2 from Lari Taskula <larit@student.uef.fi> --- Created attachment 42915 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42915&action=edit Bug 14912: Sort Advanced Search Languages by priority -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Lari Taskula <larit@student.uef.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Lari Taskula <larit@student.uef.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |larit@student.uef.fi -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #42915|0 |1 is obsolete| | --- Comment #3 from Marc Véron <veron@veron.ch> --- Created attachment 42944 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42944&action=edit Bug 14912: Sort Advanced Search Languages by priority Libraries should be able to control the priority of languages in the advanced search drop-down list. This could be achieved by sorting them according to the AdvancedSearchLanguages system preference. To test: -1. Set some languages into AdvancedSearchLanguages system preference 1. Go to advanced search and look at Languages drop-down list 2. Note that the list is in alphabetical order 3. Apply patch 4. Repeat step 1 5. Note that the list is sorted like AdvancedSearchLanguages Works as expected Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Trivial patch CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am not sure about this solution - it removes the option to have alphabetic sorting AND a limited list of language options. Even if you sort the entries in AdvancedSearchLanguages correct for one language, it will be wrong for another. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 --- Comment #5 from Marc Véron <veron@veron.ch> --- (In reply to Katrin Fischer from comment #4)
I am not sure about this solution - it removes the option to have alphabetic sorting AND a limited list of language options. Even if you sort the entries in AdvancedSearchLanguages correct for one language, it will be wrong for another.
Good point. I guess the solution would be to have an additional sysypref, something like SortAdvancedSearchLanguages [Alphabetically | As defined] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Yes, that would make sense to me. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 --- Comment #7 from Lari Taskula <larit@student.uef.fi> --- Created attachment 43251 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43251&action=edit Bug 14912: (follow-up) Use priority sorting only if AdvancedSearchLanguagesSort is set to priority. This patch adds a system preference "AdvancedSearchLanguagesSort" that defines whether the drop-down list should be sorted by priority in AdvancedSearchLanguages or alphabetically like before. To test: -1. Set some languages into AdvancedSearchLanguages system preference 1. Go to advanced search and look at Languages drop-down list 2. Note that the list is in alphabetical order 3. Apply patches and run database update 4. Change system preference AdvancedSearchLanguagesSort to "by priority" 5. Repeat step 1 6. Note that the list is sorted like AdvancedSearchLanguages 7. Change system preference AdvancedSearchLanguagesSort to "alphabetically" 8. Repeat step 1 9. Note that the list is again in alphabetical order -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Lari Taskula <larit@student.uef.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12017 --- Comment #8 from Marc Véron <veron@veron.ch> --- Hi Lari, It seems that the alphabetical order uses the English language names and not the (translated) names, is that the case? I have: fre|eng|ger Order: alphabetically and I get E-D-F instead of D-E-F: English (English) Deutsch (German) Français (French) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #43251|0 |1 is obsolete| | --- Comment #9 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 43333 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43333&action=edit Bug 14912: (follow-up) Use priority sorting only if AdvancedSearchLanguagesSort is set to priority. This patch adds a system preference "AdvancedSearchLanguagesSort" that defines whether the drop-down list should be sorted by priority in AdvancedSearchLanguages or alphabetically like before. To test: -1. Set some languages into AdvancedSearchLanguages system preference 1. Go to advanced search and look at Languages drop-down list 2. Note that the list is in alphabetical order 3. Apply patches and run database update 4. Change system preference AdvancedSearchLanguagesSort to "by priority" 5. Repeat step 1 6. Note that the list is sorted like AdvancedSearchLanguages 7. Change system preference AdvancedSearchLanguagesSort to "alphabetically" 8. Repeat step 1 9. Note that the list is again in alphabetical order Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Works as expected -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 --- Comment #10 from Josef Moravec <josef.moravec@gmail.com> --- Marc, I tried some combinations, including the one you wrote about, but I have no problems with sorting. Is it possible that something else comes into effect? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 --- Comment #11 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Lari, Don't you think it would be better to have the 2 prefs on the same line (Same as OpacSeparateHoldings and OpacSeparateHoldingsBranch)? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14912 --- Comment #12 from Marc Véron <veron@veron.ch> --- (In reply to Josef Moravec from comment #10)
Marc, I tried some combinations, including the one you wrote about, but I have no problems with sorting. Is it possible that something else comes into effect?
Josef, The problem is that sorting happens with iso639-2. (Lanugages.pm after line 255) See: https://en.wikipedia.org/wiki/List_of_ISO_639-2_codes For German (Deutsch), the code can be ger *or* deu. With ger it would be sorted as g and not as d (Deutsch). There are more languages where the code can be ambivalent, e.g. dutch, and it is not guaranteed that it is alphabetically on the same place as the native name. Maye the usage of ambivalent codes depends in Koha on what language was used during installation, that could explain that it works for you and not for me. In my opinion, the sorting should happen with the native description anyway, not with the iso 639-2 code. BTW, the native description already exists Lanugages.pm (see around line 240). -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org