Commit graph

5013 commits

Author SHA1 Message Date
1ac1067b64 Bug 16787: DBRev 20.12.00.036
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:50:11 +02:00
087a4f4bc9 Bug 16787: Add noReservesAllowed to club holds
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:37:14 +02:00
2efad4356c Bug 23207: DBRev 20.12.00.035
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 14:37:14 +02:00
c92c568574 Bug 23207: (QA follow-up) Add COMMENT to new column
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

JD amended patch: FIX syntax error.(swap COMMENT and AFTER)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 11:11:05 +02:00
Agustin Moyano
6af090d3a3 Bug 23207: Add automatic_checkin column to itemtypes table
installer/data/mysql/kohastructure.sql

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Hasina Akhter <HasinaA@pascolibraries.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-22 10:08:32 +02:00
Caroline Cyr La Rose
3ae4f91f3b Bug 27852: Link YES_NO authorized value category to 942dev in Default framework
This patch add the YES_NO authorised value category to
942dev in the Default framework and sets the default value
to 0 (No).

To test:
1) Load the yaml file
1) Load the yaml file
(I used the load_yaml.pl script after deleting the values from my database)
2) Go to cataloging and open an empty cataloging form
using the Default framework
2) Go to 942dev: the value should read No and there should
be a drop down choice between Yes and No

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 15:25:07 +02:00
da29bf48db Bug 20854: DBRev 20.12.00.034
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 10:51:29 +02:00
Matthias Meusburger
91307707ed Bug 20854: Allow correct redirect on logout for Cas servers 3.0 and superior.
Test plan:

 1) Apply the patch
 2) Set the system preference casLogout to "Yes"
 3) Set the new system preference CasServerVersion to "CAS 3 or superior"
 4) Check that you are redirected to Koha after a CAS logout from a CAS 3 server
 5) Set the new system preference CasServerVersion to "CAS 2 or inferior"
 6) Check that you are redirected to Koha after a CAS logout from a CAS 2 server

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 10:51:29 +02:00
adf73341e6 Bug 26940: DBRev 20.12.00.033
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 10:51:29 +02:00
789ddd59c9 Bug 26940: Take empty strings into account
Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 10:47:45 +02:00
c309ee36dd Bug 26940: Put in sync borrowers.debarredcomment with comments from borrower_debarment
Signed-off-by: Katariina Hanhisalo <katariina.hanhisalo@xamk.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-21 10:47:45 +02:00
e0b0e908f7 Bug 15986: Add missing notice template for it-IT
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 16:07:40 +02:00
051a9d740f Bug 15986: DBRev 20.12.00.032
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 14:34:51 +02:00
d20be4f270 Bug 15986: Fix typo following vs follwing
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 14:15:37 +02:00
d17438eb43 Bug 15986: Use KohaDates filter to correctly format the waitingdate
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 14:15:37 +02:00
340f542624 Bug 15986: (follow-up) Add atomic update
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 14:15:37 +02:00
ea6467724c Bug 15986: Add sample notice to translated notices
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 14:15:37 +02:00
a351b2379b Bug 15986: Add sample notice and use as default
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-16 14:15:37 +02:00
49a795ceb3 Bug 21260: DBRev 20.12.00.031
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-14 16:07:55 +02:00
b795660540 Bug 21260: (follow-up) Consolidate preference
The bug added a local preference. This should now become a real one.
Renamed in the process to better reflect its use.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-14 16:05:53 +02:00
871a2fc6ff Bug 21549: DBRev 20.12.00.030
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-14 15:34:27 +02:00
46ae8a2cdb Bug 21549: Database revision for new preference
Introducing LockExpiredDelay.

Test plan:
Run upgrade. Check syspref.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-14 15:34:27 +02:00
aa71e7132c Bug 14233: Set default for NoticesLog to 0
To prevent a warning on the about page:
 System preference 'NoticesLog' must be '0' or '1', but is ''.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-13 10:46:02 +02:00
611d3aa483 Bug 27726: DBRev 20.12.00.029
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-12 15:27:50 +02:00
7c854a87d2 Bug 27726: Increase 'content' field size
This alternate patch increases the field size from a 255 character
varchar to a 65535 character text field. This allows for more detailed
problem reports to be submitted.

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-12 14:44:45 +02:00
aad8699b01 Bug 14233: DBRev 20.12.00.028
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-09 16:05:48 +02:00
00ec2839ce Bug 14233: DB changes - NoticesLog pref + letter.id PK
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-09 15:45:12 +02:00
4bfc2584e0 Bug 27069: DBRev 20.12.00.027
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-08 12:15:49 +02:00
f6d2a50478 Bug 26498: DBRev 20.12.00.026
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-08 12:15:44 +02:00
34acb76a21 Bug 27069: Update existing rules
This patch adds an atomic update file that takes care of translating
existing rules. It constrains the rules to translate to those currently
expected by Koha and leaves any other value out.

To test:
1. Have some manually added rules:
   $ koha-mysql kohadev
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', -1);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 1);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 2);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 3);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 0);
   > INSERT INTO circulation_rules (rule_name,rule_value) VALUES
   ('holdallowed', 4);
2. Apply this patch
3. Run:
   $ updatedatabase
=> SUCCESS: It doesn't explode
4. Verify the created rules were updated correctly:
   > SELECT * FROM circulation_rules WHERE rule_name='holdallowed';
5: Verify all the tests that dealt with this rule still pass!
   $ kshell
  k$ git diff origin/master --name-only | grep -e '\.t$' | \
         xargs prove
=> SUCCESS: Tests pass!
6. Verify the UI handles setting things correctly
7. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-07 16:08:04 +02:00
Emmi Takkinen
9fe3c489f4 Bug 26498: Set default expiration date for holds
Koha doesn't automatically set expiration date for holds
so they can live in the system forever. This patch adds
new sysprefs to control setting of default expiration
date for holds. Note that expiration date is only set
if input field for it is left blank.

To test:
1. Apply patch and update database.
2. Enable syspref "DefaultHoldExpirationdate" and set some values
to "DefaultHoldExpirationdatePeriod" and
"DefaultHoldExpirationdateUnitOfTime".
3. Add some holds for patron from staff client or OPAC and leave
expiration date input field blank.
=> Holds expiration date should be set according your settings
4. Disable "DefaultHoldExpirationdate" and repeat step 3.
=> Expiration date shouldn't be set.

Also prove prove t/db_dependent/Hold.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-07 13:10:31 +02:00
Katrin Fischer
fd42e89186 Bug 28047: (QA follow-up) Fix a few more Callnumber entries
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-06 15:56:31 +02:00
Joonas Kylmälä
3aee4f4eca Bug 27936: Clarify AllowItemsOnHoldCheckoutSIP syspref help text
The waiting reserves have always been impossible to checkout via
SIP2. There was some confusion whether this is actually true but if
you check the commit "Bug 25690: Remove duplicated logic in SIP2
checkouts" (338ba1d769) and the removed code around line

  $self->screen_msg("Item is on hold for another patron.");

you will be sure that it has been impossible to checkout waiting holds.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-04-01 18:51:37 +02:00
4e17726829 Bug 27835: DBRev 20.12.00.025 2021-03-18 15:04:47 +01:00
675088752a Bug 27835: Turn off by default
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2021-03-18 15:03:23 +01:00
deb2f6317a Bug 27835: (follow-up) Update language, remove warn, add feedback
This patch:
 - Updates lanugage to be clearer 'ChargeFinesOnClosedDays' vs 'ChargeFinesOnCloseDay'
 - Removes a stary warn
 - Add an 'updated' counter and provides feedback in fines.pl

Test plan:
 0 - Apply patches, updatedatabase
 1 - set finesCalendar to 'ignore', ChargeFinesOnClosedDays to "Don't charge"
 2 - Checkout an item due yesterday
 3 - Ensure circ rules have a fine amount and interval set
 4 - Make today a holiday
 5 - perl misc/cronjobs/fines.pl -v
 6 - 0 updated
 7 - ChargeFinesOnClosedDays to "Charge"
 8 - perl misc/cronjobs/fines.pl -v
 9 - 1 updated
10 - set fines calendar to 'use'
11 - perl misc/cronjobs/fines.pl -v
12 - 1 updated (NOTE: This is wrong maybe, but handle on another bug)
13 - set ChargeFinesOnClosedDays to "Don't charge"
14 - perl misc/cronjobs/fines.pl -v
12 - 0 updated

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2021-03-18 15:03:23 +01:00
5007e24e90 Bug 27835: Add new syspref ChargeFinesOnCloseDay
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2021-03-18 15:03:23 +01:00
c28b857404 Bug 18532: Add missing notice template for it-IT
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-17 08:23:10 +01:00
e01bff1135 Bug 18532: DBRev 20.12.00.024
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
Agustin Moyano
42483f651a Bug 18532: (follow-up) fix messages and bug in automatic_renewals script
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
4bbed39585 Bug 18532: (follow-up) Fix atomic update
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
Agustin Moyano
bc0ee173df Bug 18532: (follow-up) Fix notice message, add notice to all installer languages and fix preference message
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
39faff6606 Bug 18532: Add individual issues to digest notice and hide auto_renewals messaging preference when not needed
This patch enhances auto_renewals message, removes auto_renewals messaging preference when AutoRenewalNotices is not set to ‘preferences’ and uses that preference to send notices in automatic_renewals.pl script.

To test:

1. Apply patches
2. updatedatabase
3. make sure automatic renewals are allowed in circ rules, have a positive number of allowed renewals and a positive number for renewal period
4. Check AutoRenewalNotices preference
SUCCESS => AutoRenewalNotices has the value ‘cron’ (means that It keeps the usual behaviour)
5. Checkout two items for a patron, and set them as automatic renewal and set due date as your current yesterday
6. perl misc/cronjobs/automatic_renewals.pl -c -v
SUCCESS => items were renewed, but there is no message in message_queue table in mysql
7. Repeat step 5
8. perl misc/cronjobs/automatic_renewals.pl -c -s -v
SUCCESS => items were renewed, and there is one message per item in message_queue table in mysql
9. Change AutoRenewalNotices to ‘never’
10. Repeat step 5
11. perl misc/cronjobs/automatic_renewals.pl -c -s -v
SUCCESS => items were renewed, but there is no message in message_queue table in mysql, even with the -s switch
12. Check any patron’s category, and any detail page in staff or OPAC interface, and in any of them you should find Auto Renewals messaging preference
13. Change AutoRenewalNotices to ‘preferences’
14. Repeat step 12, but this time all of them shows the Auto Renewals messaging preference.
15. Repeat step 5 with a patron that has no messaging preference setted
16. perl misc/cronjobs/automatic_renewals.pl -c -s -v
SUCCESS => items were renewed, but there is no message in message_queue table in mysql, because patron didn’t choose to receive messages
17. Grab a category and modify auto renewals messaging preferences, and save
18. Create a new patron from that category.
SUCCESS => created patron has the same messaging preference for auto renewals
19. Grab that patron and change auto renewals messaging preference to email but not digest
20. Repeat step 5 for that last patron.
21. perl misc/cronjobs/automatic_renewals.pl -c -v
SUCCESS => Items were renewed, and there is a message for each item in message_queue table in mysql.
22. Change auto renewals messaging preference from the same patron and set to email and digest.
23. Repeat step 5.
24. perl misc/cronjobs/automatic_renewals.pl -c -v
SUCCESS => items where renewed, and now there is only one message in message_queue table with the details of both renewed items.
25. Check that any changes to a patron’s auto renewals messaging preference in staff is reflected in OPAC, and the other way arround too.
26. Sign off

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
14896e2032 Bug 18532: (follow-up) Remove digest switch and add preference
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
Agustin Moyano
fe781ba216 Bug 18532: Add new letter AUTO_RENEWALS_DGST, new Auto_Renewals in message_attributes, and configured message_transports
Signed-off-by: tgoat <tgoatley@gmail.com>
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Marti Fuerst <mfuerst@hmcpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 18532: (QA follow-up) Atomicupdate syntax

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-16 16:08:31 +01:00
8efc21385a Bug 27652: DBRev 20.12.00.023
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 17:20:47 +01:00
6b25e526bf Bug 27652: (follow-up) Correct typo in database update
This patch adds a missing "SET" in the database update. Before:

   UPDATE systempreferences
   value=REPLACE(value, '|', ',')

Corrected:

   UPDATE systempreferences
   SET value=REPLACE(value, '|', ',')

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 17:20:47 +01:00
010181a6a0 Bug 27652: Display patron's categories for sysprefs expecting them
This patch adds a new type of system preference entry option: patron
category. A preference with this type will show either a <select> with
patron categories to choose from or a multiple-select menu for choosing
one or more.

This prevents possible errors from incorrect category codes being
entered manually.

To test, apply the patch and run the database update.

- Go to Administration -> System preferences.
- Test each of the updated preferences to confirm that the available
  options are correct and that your selections are correctly saved.

  - Single category selections, PatronSelfRegistrationDefaultCategory
    and GoogleOpenIDConnectDefaultCategory. With each of these you
    should see a dropdown where you can select of all the existing
    patron categories.

  - Multiple selections, OPACHoldsIfAvailableAtPickup and
    BatchCheckouts: These preferences should have an option for
    selecting one or more system preferences at once.

- Test the pages affected by the updated system preferences:

- With BatchCheckouts enabled, confirm that the batch checkout page is
  correctly limited by patron category.

- Set the OPACHoldsIfAvailableAtPickup preference to "Don't allow" and
  select at least one patron category in the
  OPACHoldsIfAvailableAtPickupExceptions preference.
- Log in to the OPAC as a patron whose category was not selected in
  the OPACHoldsIfAvailableAtPickupExceptions preference.
- Try to place a hold on an item which is available at a library.
- When confirming the hold, the libraries where the item is available
  should be disabled in the "Pick up location" dropdown.
- Repeat the process as a patron whose category was selected in
  OPACHoldsIfAvailableAtPickupExceptions. There should be no disabled
  pickup locations.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-09 17:20:47 +01:00
7e66d32be4 Bug 12224: DBRev 20.12.00.022
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:54:02 +01:00
Katrin Fischer
05b55cc49f Bug 12224: (follow-up) Format today with KohaDates
Updates the slip templates to use [% today | $KohaDates %].
Adding an explicit USE statement is not necessary in this case.

To test:
- When testing the feature according to the test plan, make sure
  that the date for today shows up formatted to the DateFormat
  system preference.

Note: As we are printing today's checkins, I have intentionally left
oft the time. But it could be easily added if a library wanted it.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:04 +01:00
Aleisha Amohia
28b90b684e Bug 12224: (follow-up) Switching to TT notice
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:03 +01:00
Aleisha Amohia
29d173a6fd Bug 12224: Print a slip of borrower's checkins for today
To test:

1) Apply patch and run installer
2) Check out two items (or more) to a borrower
3) Check in two items (or more) for this borrower (you should end up on
    circ/returns.pl)
4) Notice the checked-in items table has started building. There should
be a new column with the button 'Print checkin slip' in each row.
5) Click the button and confirm the checkin slip opens for printing in a
new window.
6) Go to the patron's account
7) Click the Print dropdown. Confirm there is a 'Print checkin slip'
option. Click this and confirm the checkin slip opens for printing in a
new window.

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Alexandra Speer <alexandra.speer@bsz-bw.de>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Christian Stelzenmüller <christian.stelzenmueller@bsz-bw.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-05 13:49:03 +01:00
75a210aef4 Bug 22824: DBRev 20.12.00.021
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:26:04 +00:00
f92cae1381 Bug 22824: Atomic update
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
83d07dec7f Bug 22824: Fix default values for YesNo
select variable, value from systempreferences where type="YesNo" and ( ( value <>'1' and value <>'0' ) or value is null );

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-04 16:18:42 +01:00
80e3bfd376 Bug 24446: DBRev 20.12.00.020
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
99e3bb18b0 Bug 24446: Update branchtransfers.daterequested for stockrotation
This database update catches existing stockrotation triggered
branchtransfers and moves the datesent value into daterequested

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
c004a9128a Bug 26057: DBRev 20.12.00.019
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
3d0006f772 Bug 26057: Add datecancelled, cancellation_reason fields
This patch adds the datecancelled and cancellation_reason fields to the
branchtransfers table to record when and why transfers have been
cancelled.

To test
1/ Run the database update
2/ Check the database for the 'datecancelled' and 'cancellation_reason'
fields
3/ Signoff

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 15:36:13 +01:00
2542687f68 Bug 27822: Fix default value for AddressFormat (es-ES)
It must be "us" not "US" otherwise you get
Template process failed: file error - member-main-address-style-US: not found at /usr/share/koha/lib/C4/Templates.pm line 122" because the system expects "us", not "US".

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-03 11:57:51 +01:00
8df3e02885 Bug 27808: (QA follow-up) Make sure the update catches the items we want
This query:

SELECT *
FROM items
LEFT JOIN issues
ON issues.itemnumber=items.itemnumber
WHERE items.onloan IS NULL;

returns 961 rows on the sample data, with 2 items checked out and onloan
set to NULL.

With this tweak, the query only matches the 2 checkout items with onloan
set to NULL:

SELECT *
FROM items
LEFT JOIN issues
ON issues.itemnumber=items.itemnumber
WHERE items.onloan IS NULL AND issues.issue_id IS NOT NULL;

This is the query that needs to be used on the atomic update for
filtering the items to be updated.

This patch does that.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-02 09:03:36 +01:00
aa41987dbf Bug 27808: DBRev 20.12.00.018
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
bb2758839e Bug 27808: DB changes - adjust items.onloan when needed
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
cb9cd28bac Bug 26937: DBRev 20.12.00.017
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:23 +01:00
Matthias Meusburger
5a31f88d52 Bug 26937: Add an optional delay to the CheckPrevCheckout syspref.
The CheckPrevCheckout allows to check a borrower's checkout history to see if
the current item has been checked out before.

This patch adds an optional syspref: CheckPrevCheckoutDelay

It allows to specify the maximum number of days since the last checkin
that will trigger CheckPrevCheckout's warning.

Test plan:

 - Apply the patch.

 - Set CheckPrevCheckout to "Do" and CheckPrevCheckoutDelay to n.

 - Checkout and check-in an item for a patron.

 - Try to checkout the same item.

 - Check that you have a warning:
   "Patron has previously checked out this title: Check out anyway?"

 - Update the returndate column from the old_issues table to have a returndate
   older than n days ago.

 - Try to checkout the same item.

 - Check that you don't have the warning.

 - Prove t/db_dependent/Patron/Borrower_PrevCheckout.t

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
24df853064 Bug 8976: DBRev 20.12.00.016
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
a46391f077 Bug 8976: (QA follow-up) Add a better feature decription
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
ebe11f70e2 Bug 8976: Sort subfields for authority records
Same patch for the authority frameworks/records

Sponsored-by: Orex Digital

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
742483e7e3 Bug 8976: Add marc_subfield_structure.display_order
Sponsored-by: Orex Digital

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
482d77b536 Bug 27316: DBRev 20.12.00.015
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 15:14:22 +01:00
9dd997e2d3 Bug 27316: Convert 'undef' for sort to Yes and use Yes/No instead of 0/1
This patch changes the interface to remove the undef option
We also update existing mappings and set default of 1

Comment previously indicated undef was treated differently, but in the code we treat undef as 1
That code is untoched to avoid creating problems for older mappings that may be reloaded

To test:
1 - View the ES mappings, note you can set columns to Undef, 0, 1
2 - Set some to undef
3 - Apply patches
4 - Update database
5 - Undef now show as 'Yes'
6 - Confirm you can set columns as Yes/no
7 - Confirm that mandatory columns display correct value when readonly (see issues field)

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 13:50:03 +01:00
3710f34f1b Bug 7806: DBRev 20.12.00.014
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:28:02 +01:00
6ede97e3ae Bug 7806: (follow-up) Update to use sanitize_zero_date
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:16:42 +01:00
099e2fe2b7 Bug 7806: Fix remaining occurrences of 0000-00-00
We should remove all SQL queries that contain 0000-00-00 and finally
assume we do not longer have such value in our DB (for date type)

We already dealt with such values in previous update DB entries.
The 2 added by this one haven't been replaced already.

The code will now assume that either a valid date exist, or NULL/undef.

Test plan:
QA review is needed and test of the different places where code is
modified.

Not sure about the change from reports/issues_avg_stats.pl

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:16:42 +01:00
3e3803ee20 Bug 27821: Make sanitize_zero_date support datetime and timestamp
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-03-01 11:16:42 +01:00
a6527b1058 Bug 23675: Add leader and default value for ACQ
When UseACQFrameworkForBiblioRecords is set, the ACQ framework will be
use when ordering.
But the leader is not defined for this framework and then we will face
encoding issues (I haven't go far investigating this as the suggested
solution worked correctly).

The idea is to define a 000 and default to '     nam a22     7a 4500'
(which is what returns the marc21_leader.pl plugin) for ACQ.

Test plan:
0. Apply this patch and reset_all
1. Create a new basket and place a new order
2. Note that the leader is now displayed on top of the other ACQ
subfields
3. Fill in 245 with "❤️", "ö" or other UTF-8 characters you like
4. Save
5. Notice that 245$a in biblio_metadata is correctly filled with the
title you entered

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:12:56 +01:00
57a15eb474 Bug 27534: Add missing ON UPDATE/DELETE clause to message_transport_type_fk
Bug 9016 (3.15.00.039) added message_transport_type_fk but the ON DELETE
CASCADE ON UPDATE CASCADE clause was missing from the updatedatabase
entry.
If we are upgrading from an old version, 20.06.00.058 will fail on
updating the message_transport_type, with
"Cannot delete or update a parent row: a foreign key constraint fails".

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:12:51 +01:00
63e3311b10 Bug 26997: (QA follow-up) Fix Typo
Feel free to squash this ;)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:07:49 +01:00
0a40b4bb50 Bug 26997: CAST AS CHAR to prevent the error
To prevent the DBMS to fail on 0000-00-00 we can cast it as a char and
compare.
This patch also moves to a subroutine, in case we need to adjust (or
reuse) it later.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:07:49 +01:00
3c087bc216 Bug 26997: Fix upgrade process under MySQL 8
If you are coming from an old version of Koha, you may face an upgrade
error for the SQL query using 0000-00-00.
The idea was to fix it, but actually the DBMS will raise an error (not
blocking the upgrade process however).

We can hide them to not cause confusion

Errors are like:
DBD::mysql::db do failed: Incorrect date value: '0000-00-00' for column 'suggesteddate' at row 1 [for Statement "UPDATE suggestions SET suggesteddate = '1970-01-01' WHERE suggesteddate = '0000-00-00';"] at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 23312.

Test plan:
Checkout an old version of Koha (3.20, not older)
Insert a dump, install Koha
Checkout a recent version of Koha, apply the patch (or use master)
Execute the upgrade process
You should not see the errors

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-23 13:07:49 +01:00
6bd75d6dca Bug 24108: DBRev 20.12.00.013
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:29:30 +01:00
Katrin Fischer
231b3487e2 Bug 24108: (QA follow-up) Add missing comma in sysprefs.sql
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
234cced91d Bug 24108: Make export file names consistent
This patch renames the systempreference to be a bit clearer and uses
explicit options rather than a yes/no

Additionally it standardizes the export from the advanced cataloging editor
with that from the details page

To test:
 1 - Apply patches
 2 - Update database and restart all the things
 3 - Open a record in the advanced editor and save it as marc and xml
 4 - Note the file name is 'bib-{biblionumber.{format}'
 5 - Edit the syspref 'DefaultSaveRecordFileID' to be control number
 6 - Repeate 3-4 on a record with and without a control number
 7 - If control number present fiule name should be 'record-{controlnumber}.{format}'
 8 - Otherwise it should be as above
 9 - Repeat tests from the details page of a record
10 - Repeat tests from the opac details page of a record

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
0b1f162dcc Bug 24108: (QA follow-up) Adjust wording and use perl for update file
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
Cori Lynn Arnold
227077c43d Bug 24108: Advanced editor: configure if biblionumber or control number is used for saved files
Creates a new system preference "SaveRecordbyControlNumber" (renamed in
follow-up patch with "DefaultSaveRecordFileID") which is
initially set to 0 (off/no). By default saving .mrc (and .xml) will be
saved by the biblionumber. If the record does not yet have a biblionumber,
the record will be saved as record.mrc or record.xml

Test plan:
1)  Apply the patch, flush_memcached and restart_all
2)  Enable the "EnableAdvancedCatalogingEditor" system preference
4)  Save the record using the drop down box selecting "Save as MARC (.mrc)
    file.
5)  Note that the file saved is the same as the biblionumber at the top of
    the Advanced Editor interface.
6)  Repeat steps 3-5 for the .xml save option
7)  Update the new system preference "SaveRecordbyControlNumber" and
    change to "Save by ControlNumber"
8)  Verify that there is not a 001 field in the record (delete it if
     there is)
9)  Repeat steps 3-5 for both .mrc and .xml options (the file should still
    be saved as the biblionumber if there is no control field)
10) Add a 001 field to the record such as "001  abc00012345"
11) Repeat step 4 for both .mrc and .xml and verify that the files
    saved are named abc00012345.mrc and abc00012345.xml
12) Sign off!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

JD amended patch:
* Remove change to obsolete sysprefs.sql
* Fix author's patch
* Update commit message to tell the syspref has been renamed

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-17 16:28:25 +01:00
539af7bd5a Bug 27598: DBRev 20.12.00.012
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 12:06:08 +01:00
701055f889 Bug 27598: (QA follow-up) Add category description and installer data
This follow-up makes two additions:

- The UPLOAD category is added to auth_val_cat.sql for new
  installations.
- A description of the category is added to the authorized values
  template.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:59:31 +01:00
289fe72614 Bug 27598: Add UPLOAD as a built-in system authorized value category
This patch updates the database so that it includes an "UPLOAD"
authorized value category with the "is_system" flag set to 1.

The upload tool template is updated to add a link to the authorized
value category from the hint which appears if no authorized values exist
in the UPLOAD category.

To test, apply the patch and run the database update.

- If you have manually added an UPLOAD category it should now be
  classified as a system category.
- If you did not have an UPLOAD category it should have been created for
  you.
- With no authorized values in the UPLOAD category, go to Tools ->
  Upload.
  - Logged in as a user with permission to manage authorized values you
    should see a note, "No upload categories are defined..." It should
    contain a link directly to the UPLOAD category of authorized values.
  - Logged in as a user without authorized value permission you should
    see a similar note without the link.
- Add an authorized value in the UPLOAD category and confirm that the
  note disappears.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-15 11:59:31 +01:00
aa178bcf6a Bug 25026: Use HandleError to not raise or print error
DBIC has its own HandleError, and so it does not work to unset
RaiseError or PrintError if unsafe is not set (what we don't want here).

The idea of this patch is to overwrite the HandleError when we need it:
Either if KOHA_DB_DO_NOT_RAISE_OR_PRINT_ERROR is set (misc4dev)
Or if the installer is triggered (we don't want to explode if the DB
does not exist).

There is an additional trick, when the installer is completed, we want
to restore the original behaviour, and so a disconnect is made.
Note that during the installer we want to display eventual SQL errors,
that's why we still display the errors.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 10:20:49 +01:00
91ddddd8eb Bug 18506: DBRev 20.12.00.011
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:48:49 +01:00
b5ab335d1b Bug 18506: (QA follow-up) opacShibOnly -> OPACShibOnly
As requested

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:46:08 +01:00
1a81264ac1 Bug 18506: Add xShibOnly preference for Shibboleth authentication
This patch adds two system preferences to Koha, opacShibOnly and
staffShibOnly, allowing users to restrict authentication to just
one method, Shibboleth.

We do however, allow for local fallback for the SCO/SCI logins.

A system preference was chosen over a configuration file update to
allow for local override at the virtualhost level. In this way a
hosting provider can setup a 'backdoor opac' for example to allow
fallback to local logins for support operations.

Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-09 09:46:08 +01:00
8302be444a Bug 20410: DBRev 20.12.00.010
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 17:08:41 +01:00
06a58fe56d Bug 20410: Remove OpacGroupResults and PazPar2
This feature is not used as far as we know and it's not known to work.
It's preferable to remove it.

Test plan:
Make sure the OpacGroupResults pref code is removed, as well as the
PazPar2 files and code.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 16:12:42 +01:00
Bernardo Gonzalez Kriegel
f259298fd4 Bug 25632: Update MARC21 frameworks to update Nr. 30 (May 2020)
New
subfields 0 1 2 in 310 and 321

Changes
310 change to repeatable
883 renamed
883 a d q renamed

To test:
1) Remove bibliographic frameworks
2) Check mandatory bibliographic fw load without problem
misc/load_yaml.pl --load --file=installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml
3) Check new/renamed fields/subfields

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:56:00 +01:00
3439d04e1e Bug 27581: DBRev 20.12.00.009
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:56:00 +01:00
Katrin Fischer
3431ddedc7 Bug 27581: (QA follow-up) Fix occurence in it-IT custom.sql
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:56:00 +01:00
c8f1fad8f2 Bug 27581: Rename USeICU preference to UseICUStyleQuotes
Rather thna have a poorly named preference with an explanation of how it doesn't
do what it implies it does, let's rename it!

To test:
 1 - Set UseICU to 'Using'
 2 - Go to the details page of a record in the staff interface
 3 - Hover over a subject heading that has subfields
 4 - Note the link has curly brackets around the subject, like:
     http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=su:{Winnie-the-Pooh Fictitious character}
 5 - Change UseICU to 'Not using'
 6 - Note the link is now:
     http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=su:"Winnie-the-Pooh Fictitious character"
 7 - Repeat on OPAC
 8 - Apply patch
 9 - Restart all
10 - Repeat tests, the behaviour has not changed
11 - Read the new syspref description and confirm it makes sense

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:56:00 +01:00
bab6a08ac9 Bug 27466: Don't use set_preference from updatedatabase.pl
We must never use subroutines or methods from updatedatabase.pl!

Having it using C4::Context->set_preference will call
Koha::Config::Syspref->store then C4::Log::logaction and finally
Koha::Logger->get which will need the log4perl configured correctly
(which is not necessary the case when you upgrade).

Test plan:
git checkout ed3e4540d7 (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 0
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is an empty string
git checkout ed3e4540d7 (20.06.00.022)
reset_all
Set the value of QuoteOfTheDay to 1
git checkout bug_27466 (master + this patch)
updatedatabase
=> QuoteOfTheDay is set to "opac"

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-08 14:55:59 +01:00
940c0e319a Bug 25552: DBRev 20.12.00.008
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 17:25:22 +01:00
e53d559f42 Bug 25552: Add missing Claims Returned option to MarkLostItemsAsReturned
Marking an item as a return claim checks MarkLostItemsAsReturned to see if claim_returned is a value in MarkLostItemsAsReturned.
However, this option was never added to MarkLostItemsAsReturned so an a return claim can never be automatically removed from the patron record, even if they wanted such behavior.

Test Plan:
1) Apply this patch
2) Restart all the things
3) Note the new return claims option on MarkLostItemsAsReturned in the system preferences

Signed-off-by: Marti Fyerst <mfuerst@hmcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 17:20:37 +01:00
b647aff01d Bug 27530: Set correct dateofbirth for 'C'
Categories B, J, K and YA have a upper age limit of 17 years.
We are setting the dateofbirth to today - 15 years to prevent juvenils
to be 70!

Note that DATE_SUB is a MySQLism, but there is no way to be portable
here.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 16:32:39 +01:00
e3205b4c41 Bug 27530: Set dateexpiry to 2099 in sample patrons
To prevent them to be expired.

Note that the last patron is kept expired.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-02-01 16:32:39 +01:00
b0bdaab666 Bug 27486: DBRev 20.12.00.007
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 09:03:45 +01:00
Mazen Khallaf
71c1aa44a9 Bug 27486: Rename system preference delimiter to CSVDelimiter
Test Plan:

1. Go to Administration
2. Go to System Preferences
3. Find 'delimiter' (note the name)
4. Apply patch
5. Repeat step 1 and 2
6. Find 'CSVDelimiter' (note the name)

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 09:03:45 +01:00
72346502d9 Bug 27487: DBRev 20.12.00.006
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 09:03:42 +01:00
James O'Keeffe
dc1eeab6bd Bug 27487: Rename system preference reviewson to OPACComments
This patch renames the reviewson system pref to OPACComments

Test Plan:
1. In Koha Administration, search for the reviewson system preferance
2. Note the presence of the reviewson system preferance
3. Apply the patch and run updatedatabase.pl
4. Repeat steps 1 and 2. The reviewson preferenace should be gone
5. Seach for and note the OPACComments system preferance
6. Ensure that the OPACComments system preferance operates correctly, as
if it were reviewson

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=27484

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-29 07:56:17 +01:00
Katrin Fischer
ff494ecbad Bug 11257: (QA follow-up) Add thank you
Even if we are grumpy because they still have not returned the items,
we should be nice :)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-27 14:36:26 +01:00
James O'Keeffe
9988835953 Bug 11257: (followup) Document <<items.content>> for DUEDGST and PREDUEDGST and update sample notices
This patch changes the default text for the DUEDGST sample notice to the
following:
    Dear <<borrowers.firstname>> <<borrowers.surname>>,
    The following item(s) are due:
    <<items.content>>
(it does not include an atomic update)

Test plan:
1. Select "edit" on DUEDGST in the notices and slips page (Home ->
        tools -> Notices and slips)
2. Open "email", and note the default text.
3. Apply the patch, and peform a fresh install of Koha.
4. Navigate to the same page. The default text should have changed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-27 14:36:26 +01:00
James O'Keeffe
6d7a91654c Bug 11257: PREDUEDST should have more useful default text
This patch changes the default text of PEDUEDST to the following:
    Dear <<borrowers.firstname>> <<borrowers.surname>>,
    The following item(s) will be due soon:
    <<items.content>>

Note: I dont beleive ive done everything requesting in the bug, ie there
was a request to add  <<items.content>> to the documentation of
sample_notices.yml, but I couldn't find documentation for it. If there's
things I missed, please tell me so I can make the appropraite changes,
or feel free to make the changes yourself.

Test plan:
1. Select "edit" on PREDUEDST in the notices and slips page (Home -> tools
        -> Notices and slips)
2. Open "email", and note the default text.
3. Apply the patch, and peform a fresh install of Koha.
4. Navigate to the same page. The default text should have changed.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

JD amended patch: Remove double spaces in PREDUEDST

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-27 14:36:26 +01:00
9dd87e9b73 Bug 27491: DBRev 20.12.00.005
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 14:59:27 +01:00
Mazen Khallaf
c90ee1be60 Bug 27491: Rename system preference opaclanguages to OPACLanguages
Test Plan:

1. Go to Administration
2. Go to System Preferences
3. Find 'opaclanguages' (note the lack of capitalisation)
4. Apply patch
5. Repeat step 1 and 2
6. Find 'OPACLanguages' (note the use of capitalisation)

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 14:59:27 +01:00
46a403a356 Bug 27485: DBRev 20.12.00.004
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 14:59:27 +01:00
Mazen Khallaf
4ddf2e8ec0 Bug 27485: Rename system preference gist to TaxRates
Test Plan:

1. Create a vendor
2. Create a basket
3. Add an order to the basket (note the existence of the option 'gist'
4  Apply patch
5. Create another order (note the existence of the option 'TaxRates'
    instead)
6. Run 'prove t/Prices.t' to confirm the tests were successful
7. If everything above is correct then patch was successful

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 14:09:46 +01:00
ava li
c6009f3220 Bug 24811: French SQL files "news" link fixed
This fixes a broken link in the sample news items for fr-FR and fr-CA.

Test plan:

1) Apply the patch.

2) Install the French language files - see
https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client

3) When Koha is in French, from the home page of the staff interface go to Tools/Outils > News/Annonces, and make sure the two news items are there.
    -If not, try importing the two files into your database or reset and install Koha in French (fr-FR or fr-CA).

4) There should be a news item with the heading Et maintenant ?, click the 5th link "proposez des correctifs et des améliorations".

5) If should take you to
https://wiki.koha-community.org/wiki/Version_Control_Using_Git
and there is no 404 error, the patch has worked!

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 13:49:25 +01:00
ava li
42aac43290 Bug 24810: French SQL files for "news" removed "3"
TEST PLAN
Follow https://wiki.koha-community.org/wiki/Installation_of_additional_languages_for_OPAC_and_INTRANET_staff_client in order to install french.
When koha is in french, from home go to tools/outils, then
news/Annonces, make sure the two files are there.
Preview them there or view them from the homepage and check that the 3
is gone.
If the files are not there, try importing the two files into your
database.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 13:46:50 +01:00
Ella Wipatene
732e69f4b2 Bug 11996: (follow-up) Updating the uk-UA currency
I have changed GRN to UAH in both
installer/data/mysql/ru-RU/optional/sample_currency.sql and in
installer/data/mysql/uk-UA/optional/sample_currency.sql

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 13:46:42 +01:00
Ethan Amohia
6bb8065af6 Bug 11996: Made RUB default currency for ru-RU
Didn't know how to change the uk-UA default currency.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-22 13:46:42 +01:00
4253eb91a6 Bug 26947: Remove AUTO_INCREMENT
Sending a cake there
https://bugs.mysql.com/bug.php?id=20786

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-12 12:31:58 +01:00
8c5845ef9e Bug 26947: Update kohastructure.sql
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-12 12:31:58 +01:00
d6bf5dc965 Bug 26947: Replace double quotes from comments
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-12 12:31:58 +01:00
a341902bee Bug 26947: Move -- comment to the COMMENT clause
Sed command from bug 26947 comment 8
sed -r --in-place 's/,\s*-- (.*)$/ COMMENT "\1",/g;' installer/data/mysql/kohastructure.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-12 12:31:58 +01:00
9f03a9e974 Bug 27349: DBRev 20.12.00.003
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-11 10:25:46 +01:00
37b5a14f4c Bug 27349: (QA follow-up) Move DB update to perl file and add description
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-11 10:05:21 +01:00
557d2137d6 Bug 27349: Fix Mana system preference wrong type
Mana system preference type 'YesNo' is wrong since it has 3 values.
Change to 'Choice'

Test plan :
1) Run atomic update
2) Check in database 'Mana' system preference type is 'Choice'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-11 10:05:21 +01:00
555080c1dd Bug 27351: DBRev 20.12.00.002
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-08 15:21:51 +01:00
e6426a540b Bug 27351: (QA follow-up) Use skeleton.perl and add description
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-08 15:17:30 +01:00
bbab661563 Bug 27351: Fix UsageStatsCountry system preference wrong type
UsageStatsCountry system preference type 'YesNo' is wrong since it has
several values.
Change to 'Choice'.
Looks like this error whas only in updatedabase 3.17.00.030.

Test plan :
1) Run atomic update
2) Check in database 'UsageStatsCountry' system preference type is
   'Choice'

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-08 15:17:30 +01:00
f255be3e51 Bug 27252: DBRev 20.12.00.001
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-07 15:37:14 +01:00
181267bd2b Bug 27252: Add deprecation warning, cross_fields pref, and add version to ES info
This patch prepares Koha to officially no longer support Elasticsearch 5.X

It adds a new system preference 'ElasticsearchCrossFields' to allow users to choose whether or not
to enable this feature

It updates the about page to add a deprecation warning if a site is running ES5

To test:
 1 - Be running Koha with Elasticsearch 5.X
 2 - Attempt to search
   Error: Unable to perform your search. Please try again.
 3 - Apply patch
 4 - Update database
 5 - Searching works
 6 - Find syspref 'ElasticsearchCrossFields'
 7 - Enable it
 8 - Searching is now broken
 9 - Check the about page
 10 - you can now see the Elasticsearch version
 11 - The systeminformation tab has a deprectaion warning
 12 - Set SearchEngine preference to 'Zebra'
 13 - View the about page - no warnings
 14 - Test again with ES6 - searching should "work" with either pref setting
 15 - There should be no warning on about pages

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-07 15:32:20 +01:00
ca50623a60 Bug 17809: FR installer: fix duplicate authorised value qualif 370
Monteur vs Réalisateur

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-04 16:33:15 +01:00
016c51f3a4 Bug 17809: Fix ER country appearing twice in fr-FR database files
In installer/data/mysql/fr-FR/1-Obligatoire/authorised_values.sql, ER is defined twice, for "Erythrée" (correct one) and "Allemagne".

Test plan :
- Create a new database using fr-FR or import the sql file
- Look at authorised values COUNTRY
=> without patch you have ER / Allemange
=> with patch you have ER / ErythrÃe

NOTE: Allemange occurs twice as well, correctly with DE.
      This patch correctly removes the ER one.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-04 16:33:15 +01:00
Mark Tompsett
9b2dbfab94 Bug 17809: Correct authorised values for fr-FR
This corrects:
CC -- duplicate, but name not full.
GQ -- duplicate, but only one name correct.
PK -- Poland was mislabelled.

This removes and edits duplicates and corrects PK to PL.

Signed-off-by: Luke Honiss <luke.honiss@gmail.com>

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-04 16:33:15 +01:00
80029ad472 Bug 27331: (bug 27331 follow-up) Fix syntax error in authorised_values.sql for fr-FR
ERROR 1064 (42000) at line 724: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '+
+INSERT INTO authorised_values (category, authorised_value, lib) VALUES ('HOLD' at line 1

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-01-04 16:33:15 +01:00
fb0a659684 Bug 24658: (bug 22008 follow-up) Correct update DB entry 18.12.00.031
If the original constraint does not exist, the second one is not added.

Test plan:
1. checkout dbrev 18.12.00.030
2. Remove the constraint: ALTER TABLE accountlines DROP FOREIGN KEY accountlines_ibfk_2
3. checkout master
4.
% updatedatabase
=> The constraint accountlines_ibfk_items is not added
5. Repeat 1 to 4
=> The constraint is added correctly

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-12-09 11:08:20 +01:00
fcb0c4ed49 Koha 20.12 - start of a new dev cycle
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-30 10:47:25 +01:00
5deae26ae8 Koha 20.11.00 is here!
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-27 16:41:28 +01:00
b52d2eb09b Fix some updatedatabase.pl issues
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-27 16:22:18 +01:00
1e69d96a03 Bug 27103: Remove from fr-FR
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-27 13:00:38 +01:00
0f47e16ef6 Bug 27103: Remove HOLD_CANCELLATION notice
We are really close to release, and the 'proper' fix to make the sending
of hold cancellation notices optional will introduce string changes.

This patch takes the alternative approach of removing the default notice
template there by disabling the feature for 20.11.00 release and giving
us time to properly impliment a solution and re-instate the default
notice template for the 20.11.01 release.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-27 13:00:38 +01:00
dcc1b96ea9 Bug 22818: Fix the last_insert_id call
DBI last_insert_id: invalid number of arguments: got handle + 3, expected handle + between 4 and 5
Usage: $h->last_insert_id($catalog, $schema, $table_name, $field_name [, \%attr ]) at /kohadevbox/koha/installer/data/mysql/updatedatabase.pl line 23326.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-13 08:14:40 +01:00
Andrew Isherwood
1dadf88233 Bug 22818: (QA follow-up) Respond to feedback
This commit addresses the requests from Jonathan in comment #188

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-12 16:58:44 +01:00
Andrew Isherwood
0423d09e57 Bug 24083: (QA follow-up) Fix DB upgrade
This commit makes the addition of the 'unseen_renewals_allowed'
circulation rule idempotent, as highlighted by Jonathan in comment #140

Bug 24083: (QA follow-up) Fix for previous

It helps if you don't commit commented out code...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-12 16:52:11 +01:00
f11484ae7f Bug 24083: DBRev 20.06.00.069
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
6e311a1be1 Bug 24083: (follow-up) Squashed follow ups
This squashed commit fixes:
-  a small error in the checkouts related JS

- GetRenewCount now returns 6 values when a call to it succeeds, a
failed call should also return the same number of values. This commit
adds these additional values.

- Some changes in issue.t had broken the tests for unseen renewals (the
unseen tests were using variables that had been moved out of the tests'
scope).

- Also now using Koha::CirculationRules::set_rules to set circ rules
rather than using SQL queries.

- Fixed expected number of return values from GetRenewCount

- Moved unseen tests in issue.t to the bottom of the file to remove the
risk of interference with other test circ rules.

- There was a real mess in C4/Circulation.pm due to a bad rebase back in
February. Frankly it's a wonder anything worked at all. This commit
fixes that problem and reinstates the correct patch for
C4/Circulation.pm

- Somehow I'd never noticed this before but the columns in smart-rules.tt
were misaligned when UnseenRenewals was turned off. This was due to the
display of a <td> not being conditional when it should have been. This
is now fixed.

- This commit also fixes items 1 & 2 descibed by Katrin in comment #74 ->
comment #76.

- Fixed missing check for too_unseen in opac-user.tt, this test did used
to exist but got lost during sizeable rebase a few weeks ago :-(
- Added test for too_unseen to all AUTO_RENEWAL notice templates apart
from de-DE (as previously requested by Katrin)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
bbfdc72303 Bug 24083: (follow-up) Respond to QA feedback
This patch implements changes requested by Katrin in QA feedback
(comment #38):

- Fix QA script failures
- Fix alter table column order mismatch
- Use new convention for JS strings
- Fix terminology

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
Andrew Isherwood
07bc356156 Bug 24083: Required atomic updates & DB update
This patch adds:

- An "UnseenRenewals" circulation syspref that enables/disables the
  functionality added in this bug

- Add unseen_renewals_allowed to circulation_rules

- A change to the issues & old_issues table schemas and corresponding
  database upgrades to add issues.unseen_renewals &
  old_issues.unseen_renewals

Signed-off-by: Sally Healey <sally.Healey@cheshirewestandchester.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 16:09:58 +01:00
6adc4514c6 Bug 23019: DBRev 20.06.00.068
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:49 +01:00
Agustin Moyano
2d53ae88b6 Bug 23019: (follow-up) set table name to import_batch_profiles
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:49 +01:00
Agustin Moyano
a7d834d2e5 Bug 23019: Update database structure and add atomic update
Signed-off-by: Abbey Holt <aholt@dubuque.lib.ia.us>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:48 +01:00
47f4ae3fe7 Bug 20936: DBRev 20.06.00.067
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:48 +01:00
Agustin Moyano
5bab8b0fec Bug 20936: Add OPACHoldsHistory syspref
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:48 +01:00
ff0be50cde Bug 22818: DBRev 20.06.00.066
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 15:55:48 +01:00
Katrin Fischer
adce91dc25 Bug 22818: (QA follow-up) Add sample ILL notices to it-IT installer
Run: prove xt/sample_notices.t

de-DE are missing on purpose because of bug 24972.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
Andrew Isherwood
d193883868 Bug 22818: (follow-up) Respond to feedback
This commit implements the feedback from Katrin in comment #103 ->
comment #108:

- Fixed rebase issue mentioned in comment #103
- Fixed ILL notice display mentioned in comment #106
- Fixed bug with metadata display, though not the issue that was
mentioned in comment #107
- Fixed buttons display mentioned in comment #107, in addition to some
more buttons suffering the same issue

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
Andrew Isherwood
afd13b6a9b Bug 22818: (follow-up) Respond to feedback
This commit fixes this bug, it was broken in a number of ways.

Fixes include:

- Added necessary config block in C4::Letters to enable the TT notice
syntax introduced in an earlier commit to work
- Changed template variables to refer to singular objects rather than
multiple e.g. borrowers -> borrower
- Fixed missing / misnamed variables

This commit also implements the additional syspref checks suggested by
Katrin in comment #87

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
30af45ccf1 Bug 22818: (QA follow-up) Add mandatory data at install time
This patch adds the data from the update script into the mandatory sql
files such that it is also populated at install time.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
ccdba691ff Bug 22818: (QA follow-up) Sample Notices
Convert the update notices to TT syntax and add them into the
sample_notices file.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
Andrew Isherwood
51895cd7fb Bug 22818: Add notices sysprefs and DB column
This patch adds two new sysprefs. 'ILLDefaultEmail', 'ILLSendStaffNotices' and a new column to the
branches table called 'branchillemail'. It also adds five ILL related
notices.

Here we are providing the ability for a branch to have a dedicated email
address for it's ILL staff, the idea being that any notices sent by ILL
to staff need to go to specific staff, rather than the general branch
email address. If no branch specific address is defined, the address
specified in the ILLDefaultEmail syspref is used.

We're also providing a syspref 'ILLSendStaffNotices' to allow the user to specify which
notices should be sent to staff upon certain events.

We are also providing patron messaging preferences for the two patron
bound notices

We are also providing five notices for various ILL related events.

Sponsored-by: PTFS Europe
Signed-off-by: Niamh Walker-Headon <Niamh.Walker-Headon@it-tallaght.ie>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-11 08:35:10 +01:00
df9b697cd4 Bug 23916: DBRev 20.06.00.065
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
8dd313fc4a Bug 23916: (follow-up) Adapt all the things to the new column and accessor names
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
aebf7f2756 Bug 23916: (QA follow-up) Rename issuer => issuer_id [DB]
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
Andrew Isherwood
55ac67d95b Bug 23916: (follow-up) Fix terminology, use patron-title and make column consistent in issues and old_issues
This commit makes the changes suggested by Katrin in comment #50:

- Changed syspref from RecordIssuer to RecordStaffUserOnCheckout
- Changed terminology from "issue" to "check out" and variations
- Fixed name display to use patron-title.inc
- Made issuer column DEFAULT NULL consistently between issues and
old_issues and between the DB update and kohastructure.sql

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
Andrew Isherwood
838be5e516 Bug 23916: (follow-up) Don't anonymise issuer and don't update action_logs on upgrade
This commit implements the two suggestions made by Nick in comment #41:

- Removes the attempted retrospective addition of issuers to old issues.
It was not particularly reliable, it also is not appropriate if the user
does not wish to make use of this functionality

- Removes the conversion of a NULL issuer to the anonymous borrowernumber when
anonymising checkouts

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
Andrew Isherwood
d01f78e2d5 Bug 23916: Add "RecordIssuer" syspref
This patch adds the "RecordIssuer" syspref, which is disabled by default

Signed-off-by: Ben Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
Andrew Isherwood
b46c1a0378 Bug 23916: Add issues.issuer column and FK
This patch adds the issues.issuer column which is a foreign key to
borrowers.borrowernumber

Signed-off-by: Ben Veasey <B.T.Veasey@lboro.ac.uk>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
0ad4e7c7c3 Bug 24603: DBRev 20.06.00.064
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
Katrin Fischer
9bf00d3248 Bug 24603: (QA follow-up) Make the new credit type translatable and shorten description a bit
Adding the new offset type and credit type to the include so it can be translated.

Also suggest shortening the db description a bit.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=24063

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
9c709b871f Bug 24603: (follow-up) Update to double entry accounting
This patch updates the logic to create a cancellation accountline and
apply it to the charge line so we correction record the transaction in
terms of double entry accounting standards.

Test plan:
1. Go to a patron's accounting section
2. Create a manual invoice
3. In Transactions tab, you should see a 'Cancel charge' button. Click
   on it. It should now be marked as cancelled
4. A cancellation line should be associated with the original charge.
5. Create another manual invoice
6. Pay it (partially or fully)
7. Notice that the 'Cancel charge' button is not available
8. Void the payment
9. 'Cancel charge' button is available again. Click on it and verify
   that it still works
10. prove t/db_dependent/Koha/Account/Lines.t

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=24063

Bug 24603: Fix number of unit tests

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

https://bugs.koha-community.org/show_bug.cgi?id=24063

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-10 15:00:14 +01:00
76c95e585d Bug 14866: DBRev 20.06.00.063
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:18 +01:00
Aleisha Amohia
1deb47e793 Bug 14866: Make high holds work with different item types
To test:
1) Apply patch, update database, restart services
2) Enable decreaseLoanHighHolds sysprefs if not already active
3) Go to circulation rules and set a value under 'Decrease loan holds
(day)' that is DIFFERENT from decreaseLoanHighHoldsDuration
4) Check out an item with holds and confirm that the value from the rule
is used instead of the system preference
5) Confirm tests pass before and after the patch
t/db_dependent/DecreaseLoanHighHolds.t

Sponsored-by: Catalyst IT

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>
Signed-off-by: Henry Bolshaw <bolshawh@parliament.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
8bd02f9919 Bug 23091: DBRev 20.06.00.062
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
2f7d2e327c Bug 23091: Database update
This patch updates the 'refund' circulation rule to be called
'lostreturn' and populates the value with 'refund' where appropriate.

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
c0830466c1 Bug 24412: DBRev 20.06.00.061
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
351eb6c26d Bug 24412: (QA follow-up) Change CASCADE DELETE to SET NULL
I don't believe waiting reserves should be removed if a desk is deleted,
we should instead simply unset the desk.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
Nicolas Legrand
47b32572d4 Bug 24412: Attach waiting reserve to desk
When an item is checked in and marked 'Waiting' or already 'Waiting'
and there is a desk attached to the session, the item is marked
waiting at the current desk of the current library.

The information is displayed on the OPAC and on the intranet. The
patron can then know at which desk he can retrieve his document.

Desk Management (Bug 13881) is now useful.

Test plan :

1. apply Bug 24201
2. $KOHA_PATH/installer/data/mysql/updatedatabase.pl
3. Check out some document to someone
4. make another one reserve this document
5. check in the document
6. you can see the document is attach to the current library
7. create some desks and attach one to your session (see Bug 13881 and
Bug 24201)
8. cancel the preceding reserve and redo steps 3 to 5
9. you should see the document is waiting at the current library and
current desk on:
  a. the intranet document request page
  b. the intranet borrower holds tab
  c. the item list where the document is listed on the bibliographic
    details
  d. the borrower's OPAC holds tab.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 24412: (follow-up) QA

Following Josef Moravec QA comments :

- rewrite Koha::Hold->desk according to Object Oriented Koha
Guidelines and use it to fetch desk name in various templates
- remove unused Desks.GetName
- Check for columns existence in db update

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 24412: (follow-up) QA: useless change

Maybe it was a relic of something usefull... anyway
not anymore.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Bug 24412: (follow-up) Fix POD

Koha::Desk and not Koha::Library...

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
Nicolas Legrand
d87090f3bb Bug 24412: kohastructure and atomic update
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-06 15:55:17 +01:00
6dd1dbc3a1 Bug 25334: DBRev 20.06.00.060
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
946edb595b Bug 25334: Add generic 'phone' message transport type
As bug 25333 changed the 'phone' transport type to 'talkingtech', we can
now re-add 'phone' as a transport type again, and allow it to behave and
support the same notices as the email transport type.

Test Plan;
1) Apply this patch
2) Run updatedatabase
3) Restart all the things!
4) Disable TalkingTechItivaPhoneNotificationi if enabled
5) Enable new PhoneNotification system preference
6) Go to a patron's messaging preferences, not you can select the
   'phone' option for all the same notices as the 'email' option
7) Enable the phone option for all the message types
8) Browser to the Notices and slips editor
9) Add a phone notice version for each notice you wish to test
10) Test some notices ( CHECKIN, CHECKOUT, etc )
11) Notices should show in the patron's messages as 'phone' notices

Signed-off-by: Christopher Zorn <Christofer.Zorn@ajaxlibrary.ca>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
31e38bc371 Bug 26911: (bug 18936 follow-up) Remove invalid data before copying the circ rules
UPDATE: changed queries to not touch * values

To test:
 1 - Checkout 19.11.x and reset_all
 2 - Add a new patron category, itemtype, and branch to your system
 3 - Create issuing rules using thise 3 values, and others
 4 - Delete the new category, itemtype and branch
 5 - Checkout master
 6 - Restart_all
 7 - updatedatabase
 8 - you get errors
 9 - repeat 1-5
10 - apply patch
11 - restart_all
12 - updatedatabase
13 - no errors!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-05 15:24:20 +01:00
Katrin Fischer
a27c22bffc Bug 26718: Rename "reading history" to "checkout history"
This changes all occurences of reading history to the more
accurate term 'checokut history' as it was correctly pointed out
that 'reading' doesn't apply to all kind of items available
at the library (audio books, games, etc.)

To test:
- Verify that the term reding history has been replaced by checkout
  history in:
  - System preferences
  - OPAC tab "your checkout history"
  - OPAC tab "your privacy" (switch OpacPrivacy pref first)
  - Staff permission for patron batch anonymization

Signed-off-by: Barbara Johnson  <barbara.johnson@bedfordtx.gov>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
Tal Rogoff
0ddb841d22 Bug 26783: set OpacRenewalAllowed to "Allow" for new Koha installations
test plan:
1.Drop and recreate database
2.Go through web installer
3.Observe that "OpacRenewalAllowed" is set to "Don't Allow"
4.Apply patch
5.Repeat steps 1 and 2
6.Observe that "OpacRenewalAllowed" is now set to "Allow"

sponsored-by: Catalyst

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
657df01fec Bug 19482: DBRev 20.06.00.059
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
dcbc856b60 Bug 19482: (follow-up) Fix update, add tests, restore closing </td>
To test:
1 - View the mappings page, confirm table is correctly structured
2 - prove -v t/db_dependent/Koha/SearchEngine/Elasticsearch/ExportConfig.t t/db_dependent/Koha/SearchEngine/Elasticsearch/Reset.t t/db_dependent/Koha/SearchField.t
3 - Confirm update statement works and table is ordered correctly

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
14f99da17c Bug 19482: DB changes
Signed-off-by: Nicolas Legrand <nicolas.legrand@bulac.fr>
Signed-off-by: Bouzid Fergani <bouzid.fergani@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:33 +01:00
77365090f5 Bug 25333: DBRev 20.06.00.058
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
ebbee18822 Bug 25333: Change message transport type for Talking Tech from "phone" to "itiva"
From its inception, phone notices via Talking Tech have not behaved like
other notices. Instead of reading notices generated by Koha, the Talking
Tech scripts largely generate their own notices.

We would like to pave the way to having "generic" phone notices that can
be processed by plugins to support arbitrary telephony vendors ( we will
be targeting Twilio initially ).

To that end, it seems sensible to begin by changing the messaage
transport type for Talking Tech from 'phone' to 'itiva' to
highlight its specificity and difference from standard message
transports.

Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Restart all the things!
4) Test Talking Tech outbound script
5) Note no changes in functionality

Signed-off-by: Christopher Zorn <Christofer.Zorn@ajaxlibrary.ca>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

JD amended patch: remove uneeded indentation change in sample_notices_message_transports.sql

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
c7938f5f86 Bug 26638: DBRev 20.06.00.057
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
Katrin Fischer
76da06b6a3 Bug 26638: Remove unused system preference ArticleRequestsMandatoryFieldsItemsOnly
The preference was probably added because of a typo, as there is a
used system preference ArticleRequestsMandatoryFieldsItemOnly
(Item vs Items).

This patch fixes the situation:

- syspref.sql had the pref name with the typo, this is fixed.
- A database update removes the unused variable and makes sure
  the used one is added.

To test:
- Look at the local use system preferences, verify the false pref is there
- Look at the other ArticleRequests* preferences, verify the other without "s"
  is there
- Apply patch and run database update
- Verify the local use tab one is gone now

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
Katrin Fischer
d80421ce85 Bug 11460: Remove MARC21 default mapping from itemcallnumber system preference
The mapping in the itemcallnumber system preference is only valid
for MARC21 libraries using DDC classification, but not for libraries
using UNIMARC or other classification.

This patch suggests to remove the default mapping and start new installations
with an empty value.

To test:
- On an emtpy database
- Apply patch
- Run the web installer, selecting either MARC21 or UNIMARC
- Verify that the itemcallnumber system preference is empty
- Verify the description now also include examples for UNIMARC

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-04 12:59:32 +01:00
507c9a6447 Bug 26853: DBRev 20.06.00.056
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:34 +01:00
e39b9684d5 Bug 26853: Harmonize import_biblios with biblio and biblioitems
This patch harmonizes the column datatypes of import_biblios
with biblio and biblioitems to prevent database errors which cause
staged MARC uploads to sometimes fail to update 100% correctly.

To test:
1. Go to http://localhost:8081/cgi-bin/koha/tools/stage-marc-import.pl
2. Upload a file with MARC records with titles longer than 128
characters long
3. Click "Stage for import"
4. Monitor /var/log/koha/kohadev/intranet-error.log for
database errors
5. Note that there are no database errors

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 09:12:38 +01:00
3df7a02d81 Bug 18050: move aqbudgetperiods table before aqbudgets, to fix sql error
00:02:16.310 koha_1       | DBD::mysql::st execute failed: Can't create table `koha_kohadev`.`aqbudgets` (errno: 150 "Foreign key constraint is incorrectly formed") at /usr/share/perl5/DBIx/RunSQL.pm line 278, <$args{...}> line 1.
00:02:16.310 koha_1       | Something went wrong loading file /kohadevbox/koha/installer/data/mysql/kohastructure.sql ([SQL ERROR]: CREATE TABLE `aqbudgets` ( -- information related to Funds
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2020-10-26 15:55:11 -03:00
7b8bcd9dc3 Bug 18050: DBRev 20.06.00.055
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
Katrin Fischer
3c8bef50a2 Bug 18050: (QA follow-up) Adjust conditions and make use of message text
- When we run into invalid data, we use Augustin's suggested solution
  and copy the data into a separate table, setting the budget_period_id to
  NULL.
- We amend the output using the new $message.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
Agustin Moyano
1193dddd8b Bug 18050: (follow-up) Force adding FK constraint
When there are inconsistent budget_period_id in aqbudgets this patch
creates the table _bug_18050_aqbudgets with the original data, then sets
the column to null and warns the user that there is inconsistent data.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
Katrin Fischer
0ce62b29bf Bug 18050: Add FK constraint on aqbudgets.budget_period_id
This adds a FK constraint on aqbudgets.budget_period_id so that
a fund cannot be added with an invalid aqbudget.budget_period_id.

We should not have funds that belong to no budget. In case we have, the
update will be skipped and a note displayed.

Part1:
- Before applying the patch
- Make sure you have a budget with some funds linked to it
- You will have to change one of the funds to link to an invalid
  budget with SQL:
  UPDATE aqbudgets SET budget_period_id = 999 WHERE budget_id = max(budget_id);
- Apply patch
- Run updatedatabase - verify that you see the hint about 1 existing fund with invalid budget.
- Repair your fund with SQL
  UPDATE aqbudgets SET budget_period_id = ... WHERE budget_id = max(budget_id);
  (... needs to be your existing budget_period_id)
- Run updatedatabase again - verify it runs successfully now.
- If you try to change the budget_period_id to a non-existing now with SQL, you will
  get a database error. The new FK doesn't permit it.
Part 2:
- Start fresh with the web installer, verify there are no errors on
  creating the database tables

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
22be7246e5 Bug 24972: Remove de-DE installer data
With installer data in YAML format and it's translations,
there are no need for localized installer files.

This patch removes de-DE installer files.

1) Apply the patch
2) Translate to de-DE
   cd misc/translator
   ./translate update de-DE
   ./translate install de-DE
3) Do a clean install using de-DE,
   check no problems during install
4) Verify MARC21 frameworks, they must
   be translated

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:42 +01:00
3a5d5367f1 Bug 25596: DBRev 20.06.00.054
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
e3183de77b Bug 25596: Identify overpayment refunds for translation
This patch ensures we can uniquely identify automatic overpayment refund
credits from the accountlines by introducing a new account credit type
and adding appropriate translations for the new code.

Test plan
1/ You'll need an overpayment refund to start...
1a/ Issue yourself and item and set the date due early enough
to create an overdue fine for at least 2 days worth of overdue fines
1b/ Run the fines.pl script to add the fines
1c/ As a patron, pay off the accruing fine
1d/ Return the item ensuring you backdate it at least a day
1e/ Check that there is an 'Overpayment refund' credit on the patrons
account.
2/ Check that the overpayment string is translatable (i.e. it appears in
the accounts include file)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
John Fawcett
3bd23a3287 Bug 26613: Fix it-IT unimarc_framework.sql installer file
This is really an installation issue, though at the
time of installation it did not result in any error.

During cataloguing in the items menu the "Type of item or material"
is not constrained by the itemtypes authorised_values (as it is for 942c records).

I have added the itemtypes to the installer sql in unimarc_framework.sql
as well as adding the description of this field for OPAC, which had been left empty.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
John Fawcett
7c74c6636f Bug 26612: Error during web install for it-IT translation
Patch changes some of the values in the sql statement that inserts 307a
unimarc row into the marc_subfield_structure which created an SQL error
on installation.

The fields changed are:
- isurl now 0 instead of NULL,
- hidden now -5 instead of NULL,
- seealso empty string instead of NULL,
- link empty string instead of NULL.

These field values are now similar to the ones inserted for 306a or 308a.
The value that caused the SQL error was using NULL for hidden (due to
the NOT NULL constraint in the table definition).

I have tested the install with this change and found no issues.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
4e865d9e72 Bug 26569: DBRev 20.06.00.053
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:14:41 +01:00
a96f5deef0 Bug 26569: Use gender neutral pronouns in system prefernece explanations
To test:
1 - perform query "select variable,explanation from systempreferences where explanation like '% his %';"
2 - find 6 sysprefs with gendered pronouns used in explanations
3 - apply patch, reset_all
4 - repeat query
5 - no more gendered pronouns!

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-26 00:04:18 +01:00
35a3b9e6b9 Bug 25460: Remove swp file
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 14:00:20 +02:00
dd05abf911 Bug 25460: DBRev 20.06.00.052
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:31 +02:00
ac1a8adba2 Bug 25460: Update OAI sets when adding/editing/deleting item records
Also adds syspref to optionally choose to embed item information in record when adding/editing bibliographic and item records.

Test plan:
1. Enable OAI-PMH and OAI-PMH:AutoUpdateSets sysprefs
2. Create a biblio record with 1 item with CCODE of NFIC
3. In Administration > OAI Sets configuration create a set and define
the mapping:
Field: 952, Subfield: 8, Operator: is equal to,  Value: FIC

4. Run the build_oai_sets.pl script:
 cd misc/migration_tools
 sudo koha-shell <instancename>
 ./build_oai_sets.pl -i

5. Check what items are in the OAI set:
sudo koha-mysql <instancename>
select * from oai_sets_biblios;

6. Observe your bib from step 2 is not in the set
7. [ITEM EDIT] Edit the item to have CCODE of FIC repeat step 5 and observe biblio is still not in OAI set
8. [ITEM ADD] Add a new item with CCODE of FIC and repeat step 5 and observe biblio
still not in OAI set
9. [ITEM DELETE] Delete one of your 2 items and repeat step 5 and observe biblio still
not in OAI set

10. Apply patch, update database and restart plack (instruction below on
the latter 2 actions):

cd installer/data/mysql
sudo koha-shell <instancename>
./updatedatabase.pl
sudo koha-plack --restart <instancename>

11. Enable new syspref OAI-PMH:AutoUpdateSetsEmbedItemData
12. [ITEM ADD] Repeat step 8 and observe biblio is now in the OAI set
13. [ITEM EDIT] Edit both items to have a CCODE of NFIC and repeat step 5 and
observe bib now not in set
14. [ITEM EDIT] Edit one of the items to have CCODE of FIC and repeat step 5
and observe bib now in set
15. [ITEM DELETE] Delete all items off bib and repeat step 5 and observe bib
no longer in set

Sponsored-By: Catalyst IT

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
Julian Maurice
96cc447045 Bug 25898: Prohibit indirect object notation
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-15 12:56:30 +02:00
76eb46f25f Bug 12556: DBRev 20.06.00.051
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
Joonas Kylmälä
0e1d291b14 Bug 12556: Add new "in processing" state to holds
This adds new syspref, HoldsNeedProcessingSIP, which controls whether
a hold that is related to item will be filled automatically or not. If
the user has enabled the syspref then instead of fulfilling the hold
automatically the hold will go to "in processing" state.

To test:
 1. Checkout a book to patron A
 2. Place a bib level hold to the book for B
 3. Patron A returns the book via SIP, to simulate this use:
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --item <ItemBarcode> -m checkin
 4. Notice that no notification is generated for Patron B about hold
    and that the hold status in intranet and opac is "In Processing".
 5. Notice that patron A (or other patrons) cannot checkout a book
    that is in processing, because it is considered to be attached to
    the holdee (similarly to the waiting state):
        ./misc/sip_cli_emulator.pl -su koha -sp koha -l CPL -a 127.0.0.1 -p 6001 --patron <PatronABarcode> --item <ItemBarcode> -m checkout

Signed-off-by: Timothy Alexis Vass <timothy_alexis.vass@ub.lu.se>
Rebased-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
119ddb6f12 Bug 19382: DBRev 20.06.00.050
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
7a7a0a2474 Bug 19382: Add ability to block guarantees based on fees owed by guarantor and other guarantees
Some libraries would like to not only block the circulation of a guarantor based on fines owed by guarantees, but would also like to block circulation for all guarantees as well. Basically, if a family as a whole reaches a certain threshold of fines, the entire family will be blocked from checking out items.

Test Plan:
1) Apply this patch
2) Set NoIssuesChargeGuarantorsWithGuarantees to $14
3) Create a family of four ( 2 guarantors, 2 guarantees ) where the parents guarantee both children
4) Give 3 of the 4 a $5 fine
5) None of them should be able to check out items

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
a15a7f5d81 Bug 23895: Move installer file into the mandatory directory
Prior to this patch we had a confusing situation, mandatory files were
in both installer/data/mysql and installer/data/mysql/mandatory
To make things clearer this patch move them all into the mandatory
subdir.
However kohastructure.sql stay in the "root" directory.

Test plan:
1. Drop and recreate your DB and use the installer to populate the DB
2. Use the merge request code from misc4dev to test the reset_all alias
3. Still with the merge request from misc4dev checkout master (you can
also try 19.11 and/or 19.05) and reset_all again
=> All the data from the SQL mandatory files must have been correctly
inserted into the DB

https://gitlab.com/koha-community/koha-misc4dev/-/issues/46

Note that this patch also remove the x flag for subtag_registry.sql

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 14:50:07 +02:00
Katrin Fischer
1cd2233173 Bug 26018: Fix frameworks errors with subfields in wrong tab
All subfields for a MARC21 field should always be in the same tab.
There were some mistakes found by the "MARC bibliographic framework
test" this fixes.

Before you apply the patch:
- Check the "MARC bibliographic framework test" page
- Ideally you should see the "wrong tab" mistakes
- Reset your db (reset_all) or drop your db and run the web installer
- Verify the page no longer points out any issues

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-14 11:47:57 +02:00
3611a2cd68 Bug 26145: DBRev 20.06.00.049
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
7bc87ce75e Bug 26145: Refactoring - Move C4::Images to Koha::CoverImages
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
b6f5768145 Bug 26145: Refactoring - Rename table biblioimages to cover_images
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
ff17013a65 Bug 26145: DB changes - Add biblioimages.imagenumber
Sponsored-by: Gerhard Sondermann Dialog e.K. (presseplus.de, presseshop.at, presseshop.ch)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-12 11:28:41 +02:00
f8093f18d4 Bug 26529: DBRev 20.06.00.048
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 13:06:59 +02:00
da218a0d6f Bug 26529: Remove existing blank rules
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 13:06:59 +02:00
ab6494fc3d Bug 23420: DBRev 20.06.00.047
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 13:06:38 +02:00
12253d5382 Bug 23420: (QA follow-up) Remove AllowPurchaseSuggestionBranchChoice syspref
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 12:22:01 +02:00
b7d31ef16d Bug 23420: Add OPACSuggestionUnwantedFields system pref
To test:
-Apply patch
-Check OPACSuggestionUnwantedFields
-Check some fields as unwanted
-Go to the OPAC suggestion page and make sure these correct fields are hidden
-Turn on the system preference AllowPurchaseSuggestionBranchChoice to see the branch choice on the form
-Make sure you can correctly hide this one and still submit the purchase suggestion for without error.
-Go through each option and make sure it hides properly.

Note: You will only see the patron reason field when there are authorised values in the OPAC_SUG category

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-09 12:22:01 +02:00
48f9692edd Bug 13535: DBRev 20.06.00.046
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:18:19 +02:00
Katrin Fischer
ffd10c34e2 Bug 13535: Add FK constraint on borrowernumber to alert table
When a patron is deleted, we should clean up the data connected
to the patron. This includes subscriptions to 'new issue arrived'
arrive messages from the serials module.

To test:

Part1:
- Before applying the patch
- Add a subscription and select a notice template for patron notification
- Go to the OPAC and subscribe to the email alert
- Log in as any other patron (not yourself) and subscribe with that patron too
- Verfiy on the subscription detail page, that the patrons are subscribed
- Note the borrowernumber of your patrons
- Delete the second patron
- Note borrowernumber and delete patron
- Run: SELECT * from alert; in a report
- Despite the patron being deleted, you will see entries for both
- Apply patch
- Run updatedatabase - verify no error message
- Run updatedatabase again - verify still no error message
- There should no longer be an entry with the deleted borrowernumber,
  but only the entry for your own patron account
Part 2:
- Start fresh with the web installer, verify there are no errors on
  creating the database tables

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-08 16:18:18 +02:00
718fedcde8 Bug 22417: Correct DBRev bug number
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:32:21 +02:00
2e08fa0b18 Bug 15032: DBRev 20.06.00.045
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:30:08 +02:00
53ba2f3ffb Bug 22417: Add the new permission manage_background_jobs
QA: Please answer the question in admin/background_jobs.pl

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:23:01 +02:00
df1b8db174 Bug 22417: UpdateDB entry
TODO:
- Add the FK on borrowernumber

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-05 15:22:33 +02:00
a1cd243d9d Bug 22343: DBRev 20.06.00.044
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 15:27:18 +02:00
c9c1458df1 Bug 22343: (QA follow-up) Ensure FK names don't conflict
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 10:54:41 +02:00
1854d20b46 Bug 22343: Add parameters => manage_smtp_servers subpermission
This patch introduces a new subpermission for managing SMTP servers, for
granularity.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 10:54:40 +02:00
c94e2b2e32 Bug 22343: Add a new table to store SMTP servers configs
This patch adds a new table to store SMTP servers configs.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-02 10:54:40 +02:00
e4fa2eafda Bug 25261: DBRev 20.06.00.043
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 11:41:36 +02:00
54454554e9 Bug 25261: (follow-up) Rename CircConfirmParts to CircConfirmItemParts
This clarifies the preference name to make it clear we are talking about
the 'parts' that make up an 'item'. 'Part' is a well known term in
british english libraries and I think perhaps 'Materials' may be
confused with other terms?

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
a6ca5a6e12 Bug 25261: Add system preference
Sponsored-by: Royal College of Music [https://www.rcm.ac.uk/]
Sponsored-by: PTFS Europe [https://ptfs-europe.com/]
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:33:10 +02:00
a51e442557 Bug 25776: DBRev 20.06.00.042
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
Katrin Fischer
50877291b2 Bug 25776: Add a 'last updated' column for notices
This add an 'udated_on' column to the letter table and displays
the information in 'slips and notices'.

To test:
- Apply patch
- Run updatedatabase
  Note: the existing letters will all be set to the
  currnet date).
- Go to Tools > Notices and slips
- Verify there is a new column "Last updated" in the table
  Note: The table will always display the newest change date
  of the different message transport types.
- Edit any notice
- Verify the "Last updated" is shown for any transport type
  with an existing notice definition
- Edit and add a notice
- Verify the dates are correctly stored
- Test the column configuration for the new column works
  correctly

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
90756266e6 Bug 26268: DBRev 20.06.00.041
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
80da74f8d3 Bug 26268: Fix deleteditems query in DB rev
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
Katrin Fischer
9625c409b4 Bug 26268: Remove invalid mappings from MARC frameworks when items.paidfor is removed
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
Katrin Fischer
d93cbf75a4 Bug 26268: Correct mapping for internal note to items.itemnotes_nonpublic
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
1758388045 Bug 26268: (QA follow-up) Conditionally remove
This patch adds conditions to prevent the removal of items.paidfor if it
is populated and also adds the removal fo the marc_subfield_structure
row if it exists.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
7d2b6a3f35 Bug 26268: (QA follow-up) Split DB update checks
This patch splits the DB update such that the 'paidfor' field is checked
for distinctly in the deleteditems table rather than assuming if it
exists in the items table it will also exist in deleteditems.

We also correct the check as highlights by Julian.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
f45b3b3f3a Bug 26268: Remove items.paidfor from the database
In bug 19919 we removed all references to setting, unsettling and
referring to the paidfor field but we neglected to actually drop the
field from the database (I think I intended to do this, but was asking
for feedback on the approach before adding the actual db change.. then
completely forgot when it went through SO/QA quickly).

In bug 23463 we inadvertently re-introduced some of the setting code
during a rebase.

In bug 18501 we then moved that inadvertently re-introduced setter into
Koha::Item->store.

We should kill it off once and for all!

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-10-01 10:32:15 +02:00
8a6427e9e2 Bug 26454: DBRev 20.06.00.040
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-30 17:30:13 +02:00
Timothy Alexis Vass
debf8f804c Bug 26454: Add system preference to set meta description for the OPAC
Websites should have a meta description tag that shows in search engine results.
The content should also be available to set as a system preference.

To test:
1) Look at opac-main source (in the browser) and see that meta name="description" is missing.
2) Apply patch.
3) Run: perl installer/data/mysql/updatedatabase.pl
4) Go to system preferences > OPAC and add a description to OpacMetaDescription.
5) Look at opac-main source and confirm that meta name="description" now has content equal to the text set in the OpacMetaDescription system preference.
6) Sign off.

Sponsored by: Lunds University Libraries
Signed-off-by: Magnus Enger <magnus@libriotech.no>
Works as advertised. Newlines are preserved. Double quote is rendered
as &quot;. Nice enhancement!
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-30 16:15:34 +02:00
e708566e72 Bug 26341: Database update for bug 21443 is not idempotent and will destroy settings
If the database update for bug 21443 is run, and the library changes any
of the hourly or daily rental fees following the calendar, a second run
of the database update will overwrite those changes.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-23 22:08:25 +02:00
d45a699975 Bug 19889: (follow-up 2) update DB adjustments
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-23 22:08:21 +02:00
3d06cbb55a Bug 19889: (follow-up) update DB adjustments
Fix fields order

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-09-18 11:50:54 +02:00