The system preferences was added with 0/1 in sysprefs.sql is checked
as boolean. But the .pref file was added with yes/no which both
evaluate as strings to true.
This fixes the .pref file and includes a database update that sets
0 and 1 correctly for the value currently chosen in the pref.
To test:
* Make sure to update RedirectGuaranteeEmail to Enable/Don't enable
before applying the patch
* Verify in the database, that the values was set to yes or no
You can use a report like:
SELECT * from systempreferences WHERE variable = "RedirectGuaranteeEmail";
* Apply patch and run database update
* Verify the value in the database was corrected:
Yes = 1, No = 0
* Change the setting, verify the new value is stored correctly
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 34c85d051d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch adds a new 'ESPreventAutoTruncate' preference allowing to define
Elasticsearch search fields that should not be autotruncated when 'QueryAutoTruncate'
is active (e.g. barcode).
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 10b43ddd64)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Replace all instances in files with correct capitalization for the
sysprefs:
SerialsDefaultEMailAddress
AcquisitionsDefaultEMailAddress
Test plan:
1. Apply patch
2. Run database update
3. Go to Administration > System Preferences > Acquisitions
-> Confirm correct capitalization for AcquisitionsDefaultEmailAddress
(should be "Email", not "EMail")
4. Go to Administration > System Preferences > Serials
-> Confirm correct capitalization for SerialsDefaultEmailAddress
(should be "Email", not "EMail")
5. Use git grep to confirm no remaining instances of "EMail" in the code
(other than the new dbrev, original dbrev and original release notes)
e.g. git grep --files-with-matches "EMail"
6. Confirm the test plan for Bug 20755 still works
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c1a1374100)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Dbrev to change EMail to Email for SerialsDefaultEMailAddress and
AcquisitionsDefaultEMailAddress
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 43e480255d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test plan:
1. Apply test plan and restart everything
2. Confirm AutoRenewalNotices defaults to patron messaging preferences
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cc94547524)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 943838ed99)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch corrects the default UNIMARC bibliographic framework to
place all the 4XX subfields in tab 4.
To test:
1. Go to Administration > MARC Bibliographic framework test
--> There should be errors indicating subfields from 4XX fields
are in tabs 3 and 4
2. Apply patch and reset_all
3. Redo step 1
--> It should now say that all subfields for each tag are in the
same tab (or ignored)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 49a7950f38)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We must list the columns, or the db rev will fail when a new column is
added. It happened here when 33478 added 'style'
Also remove id and dates
To test:
1. On current main, run:
$ ktd --shell
k$ perl /kohadevbox/misc4dev/run_tests.pl --koha-dir=. --run-db-upgrade-only
=> FAIL: Tests explode for DB query issues
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ff18361204)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Table pseudonymized_transactions contains :
KEY `pseudonymized_transactions_ibfk_1` (`categorycode`),
KEY `pseudonymized_transactions_borrowers_ibfk_2` (`branchcode`),
KEY `pseudonymized_transactions_borrowers_ibfk_3` (`transaction_branchcode`)
To improve SQL queries performance, it needs more indexes, specially on itemnumber.
Looking at table statistics :
KEY `timeidx` (`datetime`),
KEY `branch_idx` (`branch`),
KEY `type_idx` (`type`),
KEY `itemnumber_idx` (`itemnumber`),
So index is need on pseudonymized_transactions columns :
itemnumber => For join with table items
transaction_type => For filter on type issue, return ...
datetime => For filter on date, this will help cleanup script
Test plan :
1) Run updatedatabase.pl
2) Check indexes are created in table pseudonymized_transactions
3) Run SQL query :
describe select * from pseudonymized_transactions join items using(itemnumber)
where transaction_type='issue' and datetime < date_sub(curdate(), INTERVAL 30 DAY)
=> You see the 3 new indexes used in 'possible_keys'.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 0573d01eaa)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Fixed some typos in bug numbers and text.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2e18611b7d8527c7ff9253a7669aad2c13a5afb0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
We now look for the existance of the room reservations 'bookings' table
prior to attempting to install the core bookings table and migrate it in
the same way the upstream plugin does before proceeding with installing
the core bookings tables.
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit af47cc3056)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch fixes the case of the wrong syspref variable co-existing with
the good one.
OAI-PMH:AutoUpdateSetsEmbedItemData is the only case, as the rest of the
mispelled ones are just case fixes, which would not trigger the same
situation as the `systempreferences` table collation is
case-insentitive.
To test:
1. Run:
$ ktd --shell
k$ koha-mysql kohadev
> INSERT INTO systempreferences VALUES ('OAI-PMH:AutoUpdateSetEmbedItemData',0,'','','YesNo');
> UPDATE systempreferences SET variable = 'IllCheckAvailability' WHERE variable = "ILLCheckAvailability";
> INSERT INTO systempreferences VALUES ('IllCheckAvailability',0,'','','YesNo');
=> FAIL: The last command fails because the good and wrong values cannot
coexist
2. Set the version to a prior one:
> UPDATE systempreferences SET value="23.1200004" WHERE variable like 'version';
3. Run:
k$ updatedatabase
=> FAIL: You get this error:
ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry 'OAI-PMH:AutoUpdateSetsEmbedItemData' for key 'systempreferences.PRIMARY' at ...
4. Apply this patch
5. Repeat 3
=> SUCCESS: It works!
6. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Mohd Hafiz Yusoff <mhby87@gmail.com>
Signed-off-by: Mohd Hafiz Yusoff <mhby87@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit c73c27e02d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
One of the follow-ups fixed the description in the
atomic update, but missed the SQL and include files.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2b4cf14e74)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
When a patron search is performed only a user with edit_borrowers
permission can search by name. Search can works only with cardnumber but
it makes searching less intuitive I think.
So, as mentioned in the discussion, I've added a new 'list_borrowers' permission,
completely independent of 'edit_borrowers', so that I can search for a member via the interface
and get the results. In addition to the permission to perform check in and checkouts, this no longer poses an obstacle to simple use.
Test plan:
1) Check with a user without 'edit_borrowers' permission that the patron search can only be performed with cardnumber
2) Apply this patch
3) Make the updatedatabase to add new 'list_borrowers' permissions
4) Set 'list_borrowers' permission on one user and see the difference
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit fc75a344b8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Implements Joubu's suggestion from comment#14 and improves
on it for the cases where we fix capitalization.
Test plan remains unchanged. You can run the database update
a second time to see the difference.
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 92d98c1808)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This fixes the mistakes the unit test helped to find:
* Add missing system preferences to sysprefs.sql
* Correct spelling for AutoUpdateSetsEmbedItemData
* Correct capitalization, so that code and pref files match
* Fix OverDrive sytem preferences, where explanation/options
columns where switched, resulting in strange database entries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 971d115c8f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This doesn't add or remove any entries, but only changes
the sequence of entries to be alphabetic again, compared
to:
SELECT variable FROM systempreferences ORDER BY variable;
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 24249e2647)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2f26de8746)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Sponsored-by: Catalyst IT, New Zealand
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2fbd03fdc7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
There are reports that this update triggers the error Cannot change column 'itemnumber': used in a foreign key constraint 'tmp_holdsqueue_ibfk_1'
Test Plan:
1) Upgrade to post 23.06.00.013
2) Note the failure
3) Apply this patch set
4) Run updatedatabase.pl
5) Update should succeed!
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit a644f41a92)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Should be 32162, not 31162.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit bc8a9b36ab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
To test:
1 - Go to Serials
2 - Add a enw subscription
3 - Select Vendor and record, click next
4 - Select Numbring pattern: Number, or any to populate forms
4 - Click 'show advanced pattern'
5 - 'Modify pattern'
6 - Add a new name
7 - 'Save as new pattern'
8 - Nothin happens
9 - Check logs:
C4::Serials::Numberpattern::AddSubscriptionNumberpattern(): DBI Exception: DBD::mysql::st execute failed: Field 'description' doesn't have a default value at /kohadevbox/koha/serials/create-numberpattern.pl line 58
10 - Apply patch
11 - Update database
12 - Restart all
13 - Click save again
14 - Success!
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Removed wrong 'out' from atomic update file.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f9b57c5342)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Bug 29012 introduces a database update that sets the default values for rules that are required but undefined. This functionally changes the results of the circulation rules.
Instead, this update should find value that is being used for that rule combo and use that as the rule value, only using the default in the case that the derived rule doesn't exist or has a null value.
Test Plan:
1) Check out Koha 22.05.05
2) Create a default all/all/all rule, 3 other rules. Ensure they all have Loan period set to 7, with one of the non-default rules having a Loan period of 14.
3) Delete all but one of the non-default rules with the following query:
Delete from circulation_rules where rule_name = 'issuelength' and ( rule_value != 14 and not ( branchcode is null and categorycode is null and itemtype is null ) ) limit 2;
4) Check out 254f721320
5) Run updatedatabase.pl and restart
6) Note the rules were recreated with the value 0
7) Repeat steps 1-4
8) Apply this patch
9) If you're using the same database, set the version to 22.0600023 and restart
10) Run updatedatabase.pl
11) Note the rules were recreated, but the value is the derived value from the all/all/all rule!
Signed-off-by: Kevin Carnes <kevin.carnes@ub.lu.se>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Bug 33847: Rewrite to use SQL
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed, and added reference to new bug too
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f6f2d1ae41)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit cfa077652c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch updates several files which use the term "issues" without
context, changing them to "Vendor issues." Unchanged is the vendor
issues page template, vendor_issues.tt, which is updated in Bug 35417.
To test, apply the patch and go to Acquisitions.
- Search for a vendor and view the details.
- You should see a "Vendor issues" link in the sidebar.
- Go to Patrons and search for a patron. View the patron's details.
- Click More -> Set permissions.
- Under Acquisitions management you should see "Manage vendor issues
(issue_manage)"
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit b6c71bea4e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
MySQL requires key length for indexes of text columns, while MariaDB
sets it automatically for utf8mb4.
Test plan:
1. Setup Koha to use MySQL (e.g. ku-my8)
2. Downgrade database with the following commands (e.g. koha-mysql
kohadev):
ALTER TABLE `biblioitems` MODIFY COLUMN `publishercode` varchar(255);
ALTER TABLE `biblioitems` DROP INDEX `publishercode`;
ALTER TABLE `biblioitems` ADD INDEX `publishercode` (`publishercode`);
ALTER TABLE `deletedbiblioitems` MODIFY COLUMN `publishercode` varchar(255);
ALTER TABLE `deletedbiblioitems` DROP INDEX `publishercode`;
ALTER TABLE `deletedbiblioitems` ADD INDEX `publishercode` (`publishercode`);
UPDATE systempreferences SET value="23.0600006" WHERE variable = "Version";
3. Attempt to upgrade the database (e.g. koha-upgrade-schema kohadev)
4. Notice the error about "key specification without a key length"
5. Apply patch
6. Attempt to upgrade the database (e.g. koha-upgrade-schema kohadev)
7. Notice that the database is upgraded
8. Sign off
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Perltidied the database update file.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 4c6517767a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>