Preparation:
1) apply patch
2) run reset_all
3) enable ILLModule sys preference
4) install a backend (e.g. FreeForm)
5) go into system preferences and confirm that ILLPartnerCode exists and is the default inter-library loan (IL)
Test plan:
1) create an ILL request
2) ensure the patron of category 'IL' has a primary e-mail configured
3) click on "place request with partners"
4) verify that the patron(s) of said category are on the partners list
Upgrade test:
1) Remove the system preference from the database, run query:
delete from systempreferences where variable="ILLPartnerCode";
2) Check or edit the value or partner_code in koha-conf.xml and run atomicupdate:
installer/data/mysql/updatedatabase.pl
3) Confirm the value in koha-conf.xml has been successfully migrated into the system preference, run query:
select * from systempreferences where variable="ILLPartnerCode";
Optional tests:
- Set a patron category in the sys pref and then delete said patron category (needs to not have patrons in it)
- Check the about page -> System information and confirm the warning message is correct
- Set the sys pref to the empty option
- Check the about page -> System information and confirm the warning message is correct
- Set the sys pref to a category that has no patrons of its type (ktd examples: Board, or Library)
- Check the about page -> System information and confirm the warning message is correct
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
SocialNetworks was set to be YesNo, but is actual choice with
3 options: linkedin, facebook, email.
This updates the database and the sysprefs.sql file.
It doesn't correct the value, but if it still contains twitter, this
will be fixed by the next change of the pref and has no negative
consequences.
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Must also apply bug 34332 - fixed a syntax error for the pos email template
To test:
1. Configure your Koha to enable the point of sale system (i.e. enable syspref,
set up a register, set up an item to sell).
2. Complete a transaction in the POS system.
3. Click on the “Email receipt” button next to the “Print receipt” option and
enter an email address and confirm that the email is sent.
4. Check the “Tendered” field. It is showing up as 0.00 and not reflecting the
actual amount that was tendered.
5. Apply patch
6. Repeat steps 2 & 3
7. The emailed receipt is now showing the correct tendered amount.
8. Sign off!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This fixes the typo 'Thankyou' in some of the sample notices.
To test:
* With the sample data
* Create and run a report:
SELECT code,content FROM letter where content LIKE "%Thankyou%";
* Verify 3 notices contain 'Thankyou'
* Apply patch
* Drop your database
* Run the web installer
* Run report again, you should no longer get any results
Signed-off-by: Alexander Wagner <alexander.wagner@desy.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
It appears that MySQL 8 rejects creating any table where the primary key is nullable. The table tmp_holdsqueue has a nullable pk ( itemnumber ) but there is no reason for this column to be nullable ( generating a holds queue entry with no itemnumber is not possible ) so it make sense to just remove the nullability for MySQL compatiability.
Test Plan:
1) Using MySQL 8.0, attempt to create a database from kohastructure.sql
If you use ktd, you can try: DB_IMAGE=mysql:8.0 ktd up
2) Note the failure to create the table
3) Apply this patch
4) Repeat step 1
5) The table is created!
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This updates the FK constrant from ON DELETE CASCADE to ON DELETE
SET NULL. This means that if a subscription linked to an order is
deleted, we no longer will also delete the order, but we will just
set subscrptinid in the order to NULL. This will avoid data loss
that can cause the budgets/funds not to add up anymore with the
real espenses of the library.
To test:
Preparation:
* Create 2 subscriptions on different records
* Create a new basket
* Use the "order from subscription" functionality to create order
lines for both of your subscriptions
* Close basket
Without patch:
* Delete the first subscription
* Verify the order line for this subscription is gone from your basket
Apply patch:
* Run database update and restart_all
* Delete the second subscription
* Verify the order line now remained in the basket
Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>
JD amended patch: perl tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Test Plan:
1) prove t/db_dependent/TestBuilder.t
2) Note tests fail
3) Apply this patch
4) Run updatedatabase.pl
5) Update the schema files ( alias 'dbic' can be used in
koha-testing-docker )
6) prove t/db_dependent/TestBuilder.t
7) Tests now pass!
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This field is unused. A historic leftover from 2000-2010.
Test plan:
Run dbrev.
Run prove t/db_dependent/Koha/Virtualshel*
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This rewrite the database update with some things in mind:
* We now use a positive value list of allowed characters to check
This makes sure that all of those are recognized:
1,00
1.00€
abc
* Instead of dying after finding one wrong value, we loop through
all values first, building up an error string
* When we have errors... we die and print the full list of things
that need fixing.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
We want to recognise the truthyness of a number vs string so we drop
trailing decimals if they're just 0.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
When currency format is set on FR commas are decimals separators
but when cron like fines.pl try to calculate fines it's fails due to
this format.
I changed this behavior by targetted 'fine' and 'overduefinescap' in
circulation_rules.rule_name to unformat them when we save them.
This also fix the display in smart_rules table (before with commas price
was not good displayed - without decimals)
Test Plan :
1) Set your currency format on 'FR' and 'fine' OR/AND 'overduefinescap'
with commas
2) Be sure to have some patron overdues
3) Run ~/misc/cronjobs/fines.pl with args to find overdues
4) See an error like 'isn't numeric in substraction[..] or gt > [...]'
5) Run updatedatabase script (it will replace commas in your rules
changed in step 1) )
6) Repeat step 3 and see that everything was going "fine" (🎉)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
See also BZ report. As suggested by Tomas.
NOTE: The dbrev is extended too for removing records with a failing guarantor_id
foreign key (theoretically not present obviously).
Test plan:
1) cp installer/data/mysql/db_revs/220600048.pl installer/data/mysql/atomicupdate/
2) Run updatedatabase.pl
3) Remove copied file
Bonus:
Manually remove FK constraint before running updatedatabase.
Insert a record with bad guarantor_id into relationships manually.
Run the update again.
You should not see the message that the constraint is removed.
Is the bad record count reported and record removed?
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Simplified. No longer removes the FK. Just disables during ALTER.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds a new 'OpacTrustedCheckout' system preference to govern
whether the library allows opac users to check out items to themselves
from their OPAC login.
Signed-off-by: Silvia Meakins <smeakins@eso.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Some libraries would like to have the text version of the serials
"published on" field auto-generated from a template. This template
should be definable at the subscription level.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Create or edit a new subscription
5) Edit the "Publication date template", create a template toolkit
template.
Keys available are the Koha::Subscription object as 'subscription'
and the following serial table columns as keys:
serialseq
serialseq_x
serialseq_y
serialseq_z
subscriptionid
biblionumber
status
planneddate
publisheddate
publisheddateext
notes
routingnotes
So your example template could be "[% subscription.subscriptionid %] [% biblionumber %]"
6) Generate the next serial
7) Note the next issue has a "Date published (text)" field based on the
template you set!
Signed-off-by: Laura Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This updated the datatype of the following columns from varchar(255) to text
to avoid import problems if the mapped MARC field's data exceeds 255
characters.
This is for:
* place (260$a and 264$a)
* publishercode (260$b and 264$b)
* size (300$c)
* illus (300$b)
* pages (300$a)
To test:
* Edit a bibliographic record and enter more than 255 characters into
the MARC fields listed above. Try to save.
* Run the updatedatabase script to modify the DB structure
* restart_all
* Edit a bibliographic record and enter more than 255 characters into
the MARC fields listed above.
* Save
* Export the record
* Import the record using staging tools, all should work well
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
As it's been requested that we keep the search defaults consistent, I
think this preference is better names DefaultPatronSearchMethod and
appear next to DefaultPatronSearchFields. This patch makes that change,
though actually applying it to the other search area's (outside of
autocomplete) has been left for another bug.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch adds a new system preference called "PatronAutoCompleteSearchMethod"
which allows staff to choose between "Starts with" or "Contains" when
searching for patrons.
The "Contains" option should be useful when searching for patrons that have
multiple surnames or when searching using a patron's middle name.
New Test Plan:
0. Ensure system preference PatronAutoComplete is set to Try
1. Create a patron that has a first name, middle name and two surnames.
(i.e. Adela Maria, Hernandez Acosta).
2. In patron or checkout search, enter their first name and first
surname without submitting.
3. Confirm that a record is found in the autocomplete results
4. In patron or checkout search, enter their first name and second
surname without submitting.
5. Confirm that no record is found.
6. Enter their middle name and first surname. Confirm that no record is
found.
7. Enter their middle name and second surname. Confirm that no record
is found.
8. Apply the patch, update database
9. Under Administration > Global System Preferences > search for
"PatronAutocompleteSearchMethod"
10. Choose "Contains" instead of "Starts with" for the system
preference, reload your search page
11. Repeat steps 2-4. The patron record should appear for all search
methods.
12. Sign off!
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
The tool has not been updated and is no longer working with modern
browser.
It should either be rewritten/adjusted or removed. Given that we didn't
get complains its non-functional status, bugs related to this tool
didn't get attention, and the community is lacking resources, I am
suggesting to remove it and redirect users to the koct FF plugin that
is known to be working.
Test plan:
See bug 10240 and use `git grep` to confirm that we are removing all
tracks of this feature.
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This patch implements the proposed switch to use the standard DB handle
and only require Koha::Encryption if necessary.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
If a librarian has opted to load the checkouts table automatically on the checkouts page, it will trigger a call to svc/checkouts. If a librarian is checkout out 10 items to a patron, that means svc/checkouts is called uselessly 9 times, with only the 10th time being used to display the checkouts table.
It would be useful to add a delay such that the table only load if the page has been display for a given number of seconds. That way the continuous scanning does not trigger useless svc/checkouts calls, but the librarian also does not need to click the load checkouts button manually.
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Verify "Always show checkouts immediately" retains its' original
behavior of loading the checkouts table immediately
4) Set LoadCheckoutsTableDelay to a non-zero integer
5) Verify the automatic table loading is delayed by that number of
seconds
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>