Summary: | Can't select a country for usage statistics | ||
---|---|---|---|
Product: | Koha | Reporter: | Georg <koha.gehim> |
Component: | System Administration | Assignee: | Janusz Kaczmarek <januszop> |
Status: | Pushed to main --- | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, januszop, jonathan.druart, mjnkml |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35213 | ||
Change sponsored?: | Sponsored | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
25.05.00
|
|
Circulation function: | |||
Attachments: |
Bug 36163: Usage statistics - Not possible to select a country
Bug 36163: Usage statistics - Not possible to select a country Bug 36163: Usage statistics - Not possible to select a country Bug 36163: Usage statistics - Not possible to select a country Bug 36163: Chomp country list |
Description
Georg
2024-02-24 21:57:48 UTC
Confirmed. There is also an error message: Note: The value of your system preference 'UsageStatsCountry' is not valid (Algeria). Please select a valid one. The pull down appears to be the same as for UsageStatsCountry system preference. Not sure what the right fix here would be. Created attachment 176822 [details] [review] Bug 36163: Usage statistics - Not possible to select a country Site: .../cgi-bin/koha/admin/usage_statistics.pl If you try to select a country, you get an error: == The value of your system preference 'UsageStatsCountry' is not valid (Germany). Please select a valid one. == It doesn't matter which country you chose, no country is valid. Test plan: ========== 1. Select a country for UsageStatsCountry system preference. 2. Go to http://<your addr>:8081/cgi-bin/koha/admin/usage_statistics.pl 3. Confirm the issue. 4. Apply the patch ; restart_all. 5. Repeat p. 2. 6. Confirm that the issue has been solved. Sponsored-by: Ignatianum University in Cracow Created attachment 176831 [details] [review] Bug 36163: Usage statistics - Not possible to select a country Site: .../cgi-bin/koha/admin/usage_statistics.pl If you try to select a country, you get an error: == The value of your system preference 'UsageStatsCountry' is not valid (Germany). Please select a valid one. == It doesn't matter which country you chose, no country is valid. Test plan: ========== 1. Select a country for UsageStatsCountry system preference. 2. Go to http://<your addr>:8081/cgi-bin/koha/admin/usage_statistics.pl 3. Confirm the issue. 4. Apply the patch ; restart_all. 5. Repeat p. 2. 6. Confirm that the issue has been solved. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Then I think should remove the trim later: <option value="[% country.trim | html %]" selected="selected">[% country.trim | html %]</option> IMO the best solution would be to trim at the beginning of the loop, but I guess yours also works. Created attachment 176954 [details] [review] Bug 36163: Usage statistics - Not possible to select a country Site: .../cgi-bin/koha/admin/usage_statistics.pl If you try to select a country, you get an error: == The value of your system preference 'UsageStatsCountry' is not valid (Germany). Please select a valid one. == It doesn't matter which country you chose, no country is valid. Test plan: ========== 1. Select a country for UsageStatsCountry system preference. 2. Go to http://<your addr>:8081/cgi-bin/koha/admin/usage_statistics.pl 3. Confirm the issue. 4. Apply the patch ; restart_all. 5. Repeat p. 2. 6. Confirm that the issue has been solved. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> (In reply to Jonathan Druart from comment #4) > Then I think should remove the trim later: > > <option value="[% country.trim | html %]" selected="selected">[% > country.trim | html %]</option> > > IMO the best solution would be to trim at the beginning of the loop, but I > guess yours also works. Updated. Thanks, Jonathan. The mine didn't work for Zimbabwe (last from the list) anyway - there must have been a space added that obviously was not removed by split. Created attachment 176955 [details] [review] Bug 36163: Usage statistics - Not possible to select a country Site: .../cgi-bin/koha/admin/usage_statistics.pl If you try to select a country, you get an error: == The value of your system preference 'UsageStatsCountry' is not valid (Germany). Please select a valid one. == It doesn't matter which country you chose, no country is valid. Test plan: ========== 1. Select a country for UsageStatsCountry system preference. 2. Go to http://<your addr>:8081/cgi-bin/koha/admin/usage_statistics.pl 3. Confirm the issue. 4. Apply the patch ; restart_all. 5. Repeat p. 2. 6. Confirm that the issue has been solved. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Created attachment 176956 [details] [review] Bug 36163: Chomp country list I found the same code in preferences.tt, actually we don't need to trim if the list is properly generated (ie. without extra spaces) Janusz, I think this is actually the correct fix, what do you think? Ideally country-list.inc could return an array but I think it will be problematic to have a TT directive on several lines (it breaks the translation script). (In reply to Jonathan Druart from comment #9) > Janusz, I think this is actually the correct fix, what do you think? Sure, it's simpler and cleaner with ~ . The main point is that the issue is identified and resolved :) Thanks, Jonathan, for having a deeper look into it. Really glad to see this fixed after such a long time! Pushed for 25.05! Well done everyone, thank you! *** Bug 39013 has been marked as a duplicate of this bug. *** |