This fixes a syntax erorr in the database update for
the bookings tables.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit f7e1559a79)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Certain configurations of MySQL will not allow a column to be changed
from nullable to non-nullable if the column has a foreign key constraint.
Add the foreign key constraint last to avoid issues from this.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8e788af50b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This patch adds a series of fallthroughs to ensure pickup_library_id is
always set prior to adding the NOT NULL constraint.
We initially only looked at items.homebranch but as that's a nullable
field itself, we now look at items.holdingbranch before finally
defaulting to the first available branch in the branches table in the
worst case.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 8cedcfd5c8)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Database update fails on some databases because of
foreign key constraint error. This comes from attempt
to make column aqbudgets.budget_period_id not accept
NULL values. Update also fails if there are rows where
column aqbudgets.budget_period_id doesn't match any
values in aqbudgetperiods.budget_period_id.
To test:
1. Remove changes made in bug 32132 and downgrade your database:
- ALTER TABLE aqbudgets MODIFY COLUMN `budget_period_id` INT(11) NULL;
- UPDATE aqbudgets SET budget_period_id = NULL
WHERE budget_period_id IN(SELECT budget_period_id FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget");
- DELETE FROM aqbudgetperiods
WHERE budget_period_description = "Budget for funds without budget";
- UPDATE systempreferences SET value="23.1200022" WHERE variable = "Version;
2. Upgrade your database (e.g. running installer/data/mysql/updatedatabase.pl)
=> Update fails on foreign key constraint error.
4. Apply this patch.
5. Try to update your database again.
=> Database should now be upgraded succesfully.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 309127226f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
MySQL/MariaDB checks the primary key/unique constraint before WHERE
clause when performing an UPDATE. As such, the lack of AutoLocation
existing will not prevent a failure on a second run of the update.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 73634e93fd)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
MySQL/MariaDB checks the primary key/unique constraint before WHERE
clause when performing an UPDATE. As such, the lack of AutoLocation
existing will not prevent a failure on a second run of the update.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit dc2388281c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This adds a corresponding atomic update for the case where someone may
have already upgraded past the version we're correcting in the prior
patch.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit d0f1298951)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Test by running upgrade from 23.11.00 to main
Check you see :
Upgrade to 23.12.00.061 [15:34:36]: Bug 26176 - Rename AutoLocation and StaffLoginBranchBasedOnIP system preferences
Renamed system preference 'AutoLocation' to 'StaffLoginRestrictLibraryByIP'
Renamed system preference 'StaffLoginBranchBasedOnIP' to 'StaffLoginLibraryBasedOnIP'
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>
(cherry picked from commit ebd4aa6827)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This patch also renames StaffLoginBranchBasedOnIP to
StaffLoginLibraryBasedOnIP to be consistent with our terminology
guidelines
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch sets AutoLocation to be called StaffLoginRestrictBranchByIP.
The new name is chosen to reflect the new pref StaffLoginBranchBasedOnIP.
Also this patch corrects the order of sysprefs in installer file.
To test:
Follow test plans on bug 36665 and bug 35890 and confirm that the preferences
continue to work as expected
Confirm the descriptions of the prefs in the staff interface match the behaviors expected
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
While this is a new preference, this was the standard behavior for a long time. I think we should
default to enabled to restore previous behavior.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds a new system preference StaffLoginBranchBasedOnIP which restores the behaviour before bug 35918
of using the current IP to determine the user's logged in branchcode
To test:
1 - Get your current ip
2 - Set that IP for a library in the administration section
3 - Find a user account assigned to a different library that can login to staff side
4 - Login to staff as that user, select 'My library'
5 - You are logged in to the user's branch
6 - Apply patch, restart all
7 - Log out and back in, selecting 'My library'
8 - You are logged in to the user's branch
9 - Enable new system preference StaffLoginBranchBasedOnIP
9 - Log out and back in, selecting a different branch, noting the new warning below the library selection
10 - You are logged in to the branch with the matching IP
11 - Log out and back in, selecting 'My library'
10 - You are logged in to the branch with the matching IP
11 - Change your logged in branch
12 - Verify the selection sticks and you can perform staff actions in the chosen branch
13 - Change the IP of the library to one that doesn't match yours
14 - Verify you can log out and log back in and that selected branch is respected when your IP doesn't match library IP
Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds an update to correct the value of scale_width to
0.800000 IF it is 0.080000. It should not change the value if it
is anything else than 0.080000.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch changes the default layout data for the barcode
width.
To test:
**On a fresh db**
1. Go to Cataloging > Label creator
2. Click New > Label batch
3. Enter the following barcodes in the text field (or enter your own)
39999000010114
39999000010138
39999000010152
39999000011333
39999000002331
39999000002355
4. Click Add items
5. Click Export full batch
6. Choose the following
- Template: Avery 5160 | 1 x 2-5/8
- Layout: Label test
7. Click Export
8. Click Download as PDF
9. Open the PDF
--> Note the squished barcodes
10. Apply patch and reset_all
11. Redo steps 1 to 9
--> Note the barcodes now look OK
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
Run updatedatabase.pl
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
This patch merge the previous patch attempt with the existing OPACAuthorIdentifiers syspref.
It creates a new syspref OPACAuthorIdentifiersAndInformation and remove
OPACAuthorIdentifiers.
"identifiers" become an entry of the new syspref.
Test plan:
Select some entries in OPACAuthorIdentifiersAndInformation
Edit an authority record and enter data in the corresponding subfield
(the list is on the syspref entry)
Go to the biblio detail page or the authority detail page at the OPAC
and notice that the info you selected are correctly displayed.
Sponsored-by: Orex Digital
Signed-off-by: Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Sponsored-by: Orex Digital
Signed-off-by: Signed-off-by: Hugo Agud <hagud@orex.es>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Set syspref EmailPurchaseSuggestions to "email address of library"
4. Under Administration > Libraries, enter an email address for at least
one library
5. Go to "my account", and enter a Primary email and Phone number
6. Go to the Acquisitions module > Suggestions page
7. Click "New purchase suggestion", and fill in values for, at minimum:
Bibliographic information:
Title
Author
Copyright date
ISBN/ISSN
Publisher
Publication place
Collection title
Document type
Reason for suggestion
Notes
Acquisition information:
Library (set to the library you entered an email for in step 4)
Copies
8. Submit the suggestion
9. Set the suggestion status to "Rejected"
a. Check the checkbox next to the suggestion
b. Set the "Mark selected as" drop-down (below the table) to Rejected
c. Select a value for the "Reason" drop-down
d. Click the Submit button
10. Set the suggestion status to "Accepted" (as above)
11. Set the suggestion status to "Ordered" (as above)
12. Return to "my account" and open the Notices tab
--> There should be notices suggestion declined, suggestion accepted,
suggestion ordered, and (depending on settings) new suggestion*
13. Open each notice, and confirm the all information was filled in
correctly
* New suggestion will be there if you're using default KTD settings/data
and logged in as the root user. If it is not there, query the database
(by command line or SQL report) to see the generated notice text:
SELECT * FROM message_queue WHERE letter_code = 'NEW_SUGGESTION'
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
a) Find the system preference SMSSendDriver
b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
Item due:
- Check SMS
- Check Email
- Leave Digests only unchecked
Advance notice
- Select 1 day in advance
- Check SMS
- Check Email
- Leave Digests only unchecked
5. Go to the checkout tab for that patron
6. Set a custom due date for today and check out an item
7. Set a custom due date for tomorrow and check out another item
8. Run the cron job to generate notices:
misc/cronjobs/advance_notices.pl -v -c
9. Open the Notices tab on that patron's account
--> The patron should have four notices:
Item due reminder (one for SMS and one for email)
Advance notice of item due (one for SMS and one for email)
10. Open each notice and confirm that all information is correct
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable SMS Notices
a) Find the system preference SMSSendDriver
b) Enter "Email" as the value for SMSSendDriver and save
4. Go to a patron account, and set the following messaging preferences:
Hold filled:
- Check SMS
- Check Email
- Leave Digests only unchecked
5. Leave SMS number and all email address fields blank for that patron
6. Place a hold for that patron
7. Check in an item to fill the hold
8. Open the Notices tab on that patron's account
--> The patron should have a Print "hold filled" notice, since they
don't have an email address or SMS number in the system
9. Add a Primary email and SMS number to the patron account
10. Place another hold for that patron
11. Check in an item to fill the hold
12. Go back to the Notices tab on that patron's account
--> The patron should now have Email and SMS "hold filled" notices as well
13. Open each notice and confirm that all information is correct
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Enable the system preference RenewalSendNotice
4. Check an item out to a patron
5. Edit that patron:
a. Enter a value for Primary email
b. Set messaging preference to enable email notices for Item
checkout and renewal
6. Renew the checked-out item
7. Check the patron's Notices tab for the Item renewal notice, and
confirm that the notice is correct
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Find a patron and make sure their account contains values for
all of the following fields:
First name
Surname
Card number
Phone
Address
Address 2
City
Zipcode
Email
4. Place a hold for this patron, specifying a hold note
5. Check in an item to fill the hold and click "Confirm and print slip"
6. Confirm that all information on the hold slip is correct
Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
To test:
1. Apply patch
2. reset_all (or start your testing environment in the first place)
3. Go to "my account", and enter a Primary email
4. Under Administration > Libraries, enter an email address for at least
one library
5. Add the demo user (koha) as the owner of the Main Fund
a) Go to the Acquisitions module
b) Click on Main Fund
c) Click the Actions button at the end of Main Fund row > click Edit
d) Click "Select owner"
e) Search for "koha"
f) Click the Select button
g) Click Submit
6. Click "Suggestions" on the left side of the page, and click "New
purchase suggestion"
7. Fill in values for, at minimum:
Bibliographic information:
Title
Author
Acquisition information:
Library (set to the library you entered an email for in step 4)
Fund (set to Main Fund)
9. Submit the suggestion
10. Run the cron job to generate TO_PROCESS notification email:
misc/cronjobs/notice_unprocessed_suggestions.pl -v -c --days=0
11. Set the new suggestion to "Accepted"
a) Check the checkbox next to the new suggestion
b) Below the table, set "Mark selected as" drop-down to "Accepted"
c) Click Submit
12. Create an order from the purchase suggestion
a) Return to the Acquisitions homepage
b) Leave the Vendor field blank and click Search
c) Next to the sample basket (My Basket), click "Add to basket"
d) Click "From a suggestion"
e) Click "+ Order" next to the suggestion
f) Make sure there are values for all required item fields
g) Click "Add item"
h) Click Save
13. Close the basket and receive the order
a) Click "Close basket" and click "Yes, close"
b) Click "Receive shipments"
c) Enter a number in "Vendor invoice" and click Next
d) Check the checkbox next to "My Basket" and click "Receive
selected" button
e) Check the checkbox under "Receive?" in the Items table
f) Click Confirm
14. Return to "my account" and open the Notices tab
--> There should be (among others) notices for "A suggestion is ready to
be processed" and "Suggested purchase available"
15. Open each of the above two notices, and confirm all the information
was filled in correctly
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This patch adds a "title notes tab" option to the opacSerialDefaultTab
preference.
To test, apply the patch and restart services.
- Go to Administration -> System preferences -> opacSerialDefaultTab.
- There should now be a new options, "title notes tab."
- Set the preference to the new value.
- Go to the OPAC and locate a bibliographic record which is associated
with a subscription and which has data in a 5XX notes field.
- On the bibliographic detail page the "Title notes" tab should be
selected by default.
- Test that the other system preference values still work correctly too.
Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
PA amended: Squashed borrower_attribute_types table update
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Test plan, k-t-d:
1) Apply patches.
2) Run the following SQL and save the output of each:
SHOW CREATE TABLE pseudonymized_borrower_attributes;
SHOW CREATE TABLE borrower_attribute_types_branches;
SHOW CREATE TABLE borrower_attributes;
SHOW CREATE TABLE borrower_attribute_types;
3) Run updatedatabase
4) Run the SQL queries again, compare the output of each with the previous output before updatedatabase.
5) Make sure the only diff between the two is VARCHAR(10) -> VARCHAR(64)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
So that this functionality can be controlled separately from staff-side batch checkouts
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>