| Summary: | Wrong YesNo syspref values in some db_revs | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Lucas <lucasmontoya> |
| Component: | Installation and upgrade (command-line installer) | Assignee: | Lucas <lucasmontoya> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | david, jonathan.druart, tomascohen |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41682 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | Sponsored | Comma delimited list of Sponsors: | Universidad de la Frontera |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Attachments: |
Bug 41663: Update system preferences default values
Bug 41663: Update system preferences default values Bug 41663: Update system preferences default values |
||
Created attachment 191694 [details] [review] Bug 41663: Update system preferences default values - Replace default values from '' to '0' for 'ILLHistoryCheck', 'ILLOpacUnauthenticatedRequest' and 'SeparateHoldingsByGroup' avoiding warning messages to be displayed in 'About Koha' page Lucas, a couple issues: (1) Why don't you just ```sql UPDATE systempreferences SET value=0 WHERE type='YesNo' AND value=''; ``` that would cover some other cases as well (i.e. people coming from versions older than 24.11) (2) You commit message should include a concrete test plan. In my opinion your first message here contains half of the test plan, so you would need to add a step that tells the tester to start over, but when switching to main, apply this patch first or similar. Thanks for taking care of this. Yes, that makes sense to me. As you said, that would cover other possible cases. I'm going to complete the test plan and apply the suggested changes. Thanks for the feedback! (In reply to Lucas from comment #3) > Yes, that makes sense to me. > > As you said, that would cover other possible cases. It would also make the patch more easily backportable, which I think will happen. Bug Update for Bug 41663 - Wrong YesNo syspref values in some db_revs Current status: Needs Signoff Current QA-contact: testopia@bugs.koha-community.org Current sponsorship: Sponsored Created attachment 191719 [details] [review] Bug 41663: Update system preferences default values This patch replace default values from '' to '0' for all system preferences which type is 'YesNo' avoiding warning messages to be displayed in 'About Koha' page. To test: 1 - Initialize a fresh instance of ktd, using main as the default branch in the Koha repository. 2 - Run git reset --hard 24.11.x. 3 - Run ktd --shell to enter the container. 4 - Run reset_all to downgrade the database to 24.11. 5 - Exit the shell and run git reset --hard origin/main to switch back to the latest version of Koha. 6 - Run ktd --shell again to re-enter the container. 7 - Run updatedatabase && yarn build to apply the upgrade. 8 - Go to localhost:8081 (or the assigned port for the admin interface) -> More -> 'About Koha' -> 'System information' and you should be able to see the warning messages 9 - Repeat steps 1-4 10 - Exit the shell and apply this patch 11 - Repeat steps 6-8 12 - Congrats! You shouldn't see the related warnings anymore! Created attachment 191720 [details] [review] Bug 41663: Update system preferences default values This patch replace default values from '' to '0' for all system preferences which type is 'YesNo' avoiding warning messages to be displayed in 'About Koha' page. To test: 1 - Initialize a fresh instance of ktd, using main as the default branch in the Koha repository. 2 - Run git reset --hard 24.11.x. 3 - Run ktd --shell to enter the container. 4 - Run reset_all to downgrade the database to 24.11. 5 - Exit the shell and run git reset --hard origin/main to switch back to the latest version of Koha. 6 - Run ktd --shell again to re-enter the container. 7 - Run updatedatabase && yarn build to apply the upgrade. 8 - Go to localhost:8081 (or the assigned port for the admin interface) -> More -> 'About Koha' -> 'System information' and you should be able to see the warning messages 9 - Repeat steps 1-4 10 - Exit the shell and apply this patch 11 - Repeat steps 6-8 12 - Congrats! You shouldn't see the related warnings anymore! Signed-off-by: David Nind <david@davidnind.com> I muddled my way through testing this, and everything worked: 1. I had to checkout 24.11.x locally so that it was available (git checkout 24.11.x) 2. I don't have git bz installed locally, so ran any applying patches and so on within the ktd shell. 3. System preferences that had the warning before the patch: Warning System preference 'ILLHistoryCheck' must be '0' or '1', but is ''. Warning System preference 'ILLOpacUnauthenticatedRequest' must be '0' or '1', but is ''. Warning System preference 'SeparateHoldingsByGroup' must be '0' or '1', but is ''. We could go with this, but please note that bug 41682 is planning to fix way more inconsistencies for sysprefs. I think Jonathan's patch already covers my case and is more complete, since it also improves the tests. Closing the ticket. *** This bug has been marked as a duplicate of bug 41682 *** |
When upgrading Koha from version 24.11.x to the latest release, several warnings are displayed regarding system preferences that are incorrectly configured. Specifically, the following system preferences are expected to have boolean values (0 or 1), but are currently set to an empty value (''): ILLHistoryCheck ILLOpacUnauthenticatedRequest SeparateHoldingsByGroup Additionally, there is a system preference, RequireChoosingExistingAuthority, which is currently disabled. However, a warning indicates that AutoCreateAuthorities must be enabled; otherwise, catalogers may add headings that are not linked to authority records. To replicate the issue: Initialize a fresh instance of ktd, using main as the default branch in the Koha repository. Run git reset --hard 24.11.x. Run ktd --shell to enter the container. Run reset_all to downgrade the database to 24.11. Exit the shell and run git reset --hard origin/main to switch back to the latest version of Koha. Run ktd --shell again to re-enter the container. Run updatedatabase && yarn build to apply the upgrade. Go to localhost:8081 (or the assigned port for the admin interface) -> More -> 'About Koha' -> 'System information' You should be able to see the warning messages