Bug 39013

Summary: Usage Stats: Always says "The value of your system preference 'UsageStatsCountry' is not valid"
Product: Koha Reporter: mjnkml
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: trivial    
Priority: P5 - low CC: gmcharlt, roman.dolny
Version: 24.11   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: String patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description mjnkml 2025-02-01 14:53:35 UTC
Version: 24.11.01.000
In the "Share usage statistics" page (/admin/usage_statistics.tt), I get:

The value of your system preference 'UsageStatsCountry' is not valid (Selected Country Name). Please select a valid one.

Also, the selection doesn't default to the saved value.

Adding ".trim" on line 103 where it compares the saved value to the one in the loop for generating the options fixes it for me. No more message, and the default selected is what was saved.
Comment 1 Roman Dolny 2025-02-01 18:35:08 UTC

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