Commit graph

5023 commits

Author SHA1 Message Date
Bernardo Gonzalez Kriegel
0b217ca602 Bug 30373: (follow-up) UNIMARC relator codes auth values
This patch adds UNIMARC relator codes into
mandatory auth_values.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify new language codes are in the database
    SELECT * FROM authorised_values WHERE category = 'qualif';

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-27 11:20:43 -10:00
Bernardo Gonzalez Kriegel
3b01eb450d Bug 30373: (follow-up) Language codes auth values
This patch adds language codes (ISO 639-2) into
mandatory auth_values.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify new language codes are in the database
    SELECT * FROM authorised_values WHERE category = 'LANG';

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-27 11:20:43 -10:00
Bernardo Gonzalez Kriegel
d8bb68e40f Bug 30373: (follow-up) Country codes auth values
This patch adds COUNTRY codes (ISO 3166-1) into
mandatory auth_values.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify new country codes are in the database
    SELECT * FROM authorised_values WHERE category = 'COUNTRY';

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-27 11:20:43 -10:00
fb41768d9f Bug 27253: (follow-up) Fix UNIXTIME(0) in db_revs/211200037.pl
MariaDB [koha_myclone]> update borrowers set updated_on=COALESCE( NULL, FROM_UNIXTIME(0) ) where borrowernumber=51;
ERROR 1292 (22007): Incorrect datetime value: '1970-01-01 00:00:00' for column `koha_myclone`.`borrowers`.`updated_on` at row 1

MariaDB [koha_myclone]> update borrowers set updated_on=COALESCE( NULL, FROM_UNIXTIME(1) ) where borrowernumber=51;
Query OK, 1 row affected (0.008 sec)
Rows matched: 1  Changed: 1  Warnings: 0

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested by switching updated_on to datetime. Remove NOT NULL, etc.
Copied dbrev to atomicupdate folder.
Resulted in:
    Updated all NULL values of borrowers.updated_on to GREATEST(date_renewed, dateenrolled, lastseen): 51 rows updated

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-25 10:00:22 -10:00
7d71fb052a Bug 30373: Fix xt/find-license-problems.t
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-22 10:02:52 -10:00
8066f46db0 Bug 30373: Fix unimarc authorised values
1. Replace
  authorised_value: ""
with
  authorised_value:
to match what is done for marc21

2. Fix some wrong category names
-          authorised_value: 146a
+          authorised_value: unimarc_146a

-          authorised_value: 182a
+          authorised_value: unimarc_182a

-          authorised_value: 182c
+          authorised_value: unimarc_182c

3. Remove some category that have not been inserted (should we insert
them then?)
-          authorised_value: 183a
+          authorised_value:

-          authorised_value: qualif
+          authorised_value:

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-22 10:02:52 -10:00
6844d613d9 Revert "Bug 30373: (follow-up) Fix license"
This reverts commit 15405829bf.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-22 10:02:52 -10:00
31c4d213e3 Bug 27253: DBRev 21.12.00.037
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 21:01:09 -10:00
Julian Maurice
eb2ca283d6 Bug 27253: Fix definition of updated_on in borrowers and deletedborrowers
Test plan:
1. First you have to be in a state where updated_on is NULL-able. You
   can do that by either:
   a) do a fresh install of Koha 16.05 and update to master, or
   b) execute the following SQL queries:

     ALTER TABLE borrowers MODIFY updated_on timestamp NULL
     DEFAULT current_timestamp() ON UPDATE current_timestamp()
     COMMENT 'time of last change could be useful for synchronization
     with external systems (among others)'

     ALTER TABLE deletedborrowers MODIFY updated_on timestamp NULL
     DEFAULT current_timestamp() ON UPDATE current_timestamp()
     COMMENT 'time of last change could be useful for synchronization
     with external systems (among others)'
2. Create two borrowers (let's name them X and Y)
3. Delete borrower Y
4. Set the column updated_on to NULL for both borrowers by executing the
   following SQL query:
   UPDATE borrowers SET updated_on = NULL WHERE borrowernumber =
   <borrowernumber of X>
   UPDATE deletedborrowers SET updated_on = NULL WHERE borrowernumber =
   <borrowernumber of Y>
5. Apply patch and run updatedatabase
6. Verify that borrowers.updated_on and deletedborrowers.updated_on are
   not NULL-able.
   Verify that updated_on for X and Y have taken the value of
   dateenrolled.
7. Repeat step 2 to 6 but this time renew the patron and/or log in with
   its account in order to set the columns borrowers.date_renewed and
   borrowers.lastseen before executing updatedatabase
   borrowers.updated_on should take the greatest value among
   dateenrolled, date_renewed, and lastseen

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 21:01:09 -10:00
15405829bf Bug 30373: (follow-up) Fix license
Copy from MARC21 files

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 21:01:09 -10:00
Bernardo Gonzalez Kriegel
674ad809f3 Bug 30373: Fix visibility, authorised values and descriptions
This patch fixes certain values of default bibliographic
framework.

It fixes hidden values using as reference default framework
from biblibre demo site.

Also adds some missing subfields, authorised values and
fixes capitalization on some descriptions.

To test:
1) On biblibre demo site, run a report
   SELECT tagfield,tagsubfield,hidden
   FROM marc_subfield_structure
   WHERE frameworkcode = ''
   ORDER BY tagfield,tagsubfield;
2) Download as tab separated values, ej. biblibre-hidden.txt
3) Apply the patch, remove bib frameworks, load YAML file
4) Run something like this to check correct hidden values

   while read -r -a l; do
    t="${l[0]}";
    s="${l[1]}";
    h="${l[2]}";
    b=$( mysql koha -N -B -e "select hidden from marc_subfield_structure where frameworkcode = '' and tagfield = '$t' and tagsubfield = '$s'");
    [ -n "$b" -a "$b" != "$h" ] && echo "$t:$s: -> change $b to $h";
   done < <( cat biblibre-hidden.txt )

   there must be no output

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 13:41:36 -10:00
Bernardo Gonzalez Kriegel
c7b4d311d4 Bug 30373: Add TYPEDOC authorised_values_category
TYPEDOC authorised value category is needed to permit
correct loading of default UNIMARC bibliographic framework.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 13:41:35 -10:00
52b61767b3 Bug 30373: Show 325$a
It was not hidden in unimarc_complet/Obligatoire/framework_DEFAULT.sql

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 13:41:35 -10:00
da975c9581 Bug 30373: Hide items.dateaccessioned from the editor
-6 was used in unimarc_complet/Obligatoire/framework_DEFAULT.sql

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 13:41:35 -10:00
Bernardo Gonzalez Kriegel
4951822d5d Bug 30373: Rewrite authorities_normal_unimarc to YAML
YAML version of authorities_normal_unimarc + sample auth types
Includes

This files works like it's marc21 counterpart:
* Defines an authority default framework
* Creates sample auth types by copy

Auth type codes and select fields/subfields are based on
french files in fr-FR install directory.

To test:
1. Apply this patch
2. Repeat UNIMARC install procedure as previous patches
3. Verify authorities_normal_unimarc.yml is loaded without problem
4. In the staff interface verify all auth types are present

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 13:41:35 -10:00
Bernardo Gonzalez Kriegel
69f17cf4c3 Bug 30373: Add UNIMARC FA (fast add) framework
This parch creates optional folder and a sample
fast add framework

To test:
0. On top of first patch, repeat procedure to do an UNIMARC install
1. Verify existence of FA framework

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 13:41:35 -10:00
Bernardo Gonzalez Kriegel
b61dc91c2e Bug 30373: Rewrite unimarc_framework_DEFAULT to YAML
YAML version of unimarc_framework_DEFAULT + ACQ framework

To test:
0. Apply this patch, recreate database and restart_all
1. Follow web installer, selecting UNIMARC, finish
2. Default UNIMARC framework must load without problem
3. In staff interface check existence of Default and ACQ frameworks

ACQ is buit in the thame way as marc21, by copome fields/subfields.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-21 13:41:35 -10:00
8e48d69d9e Bug 28786: DBRev 21.12.00.036
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 20:43:15 -10:00
f03e2689d6 Bug 28786: (QA follow-up) Upgrade atomicupdate to new style
Test plan:
Run dbrev again.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 20:43:15 -10:00
cbf12e601c Bug 28786: Add new DB column borrowers.auth_method
Sponsored-by: Orex Digital

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 20:43:15 -10:00
76ec37e8f4 Bug 28786: Add new DB column borrowers.secret
Sponsored-by: Orex Digital

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 20:43:15 -10:00
451e4b007d Bug 28786: Add new syspref TwoFactorAuthentication
Sponsored-by: Orex Digital

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 20:43:15 -10:00
0f9e82f655 Bug 30226: DBRev 21.12.00.035
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 20:43:15 -10:00
45e8a00ee9 Bug 30226: (follow-up) Remove text from database update
The text displayed by database update is not really helpful.
And it will be incorrect if update is run several times.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 20:43:15 -10:00
77cd5d301d Bug 30226: (QA follow-up) Sync atomicupdate with sysprefs.sql
Description and remove choices.
Set items => flag items (as in circulation.pref)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 20:43:14 -10:00
47d5e07dfc Bug 30226: Add system preference AllowSetAutomaticRenewal
To test:
1. Apply patch, restart the things, and run updatedatabase
2. Look for the system preference 'AllowSetAutomaticRenewal'.
3. To preserve current behavior the system preference should be set to allow by default.
4. Go to the circulation page and see that under 'Checkout settings' there is the option to set a particular item for auto renewal.
5. Set 'AllowSetAutomaticRenewal' to 'don't allow'.
6. Go back to the circulation page and under checkout settings you should no longer see the option to set an item for auto renewal.

Signed-off-by: Kelly mcElligott <kelly@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 20:43:14 -10:00
3fdcc4cde3 Bug 30237: DBRev 21.12.00.034
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
33fb5d70a5 Bug 30237: (QA follow-up) Spelling
Thankyou => Thank you
No thanks ;)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
6ab1dcef95 Bug 30237: (follow-up) Make LibraryName conditional
It's easy to forget to set the LibraryName preference.. as such we can
make this a conditional and fall back to a default of 'the library'.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
830f43d6c2 Bug 30237: (follow-up) Add french sample notice
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
71b1caccb9 Bug 30237: (follow-up) Update Notice
This patch updates the sample notice as suggested by Katrin.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
3d5e974f8f Bug 30237: Replace AutoEmailOpacUser with AutoEmailNewUser
This patch replaces the AutoEmailOpacUser system preference with a new
AutoEmailNewUser preference. This makes the functionof the preference
clearer.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
2609adc1bd Bug 30237: Replace ACCDETAILS notice with WELCOME notice
This patch drops the ACCDETAILS notice in preference to a new WELCOME
notice.

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-20 09:03:39 -10:00
51192f9895 Bug 27783: DBRev 21.12.00.033
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
c859066ee5 Bug 27783: (QA follow-up) Make dbrev executable
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
db4baee498 Bug 27783: (QA follow-up) Make dbrev idempotent
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
dc886e1b13 Bug 27783: (follow-up) Add DB change to installer
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
Julian Maurice
faf2a07231 Bug 27783: Add missing atomicupdate file
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
2876e87622 Bug 30498: DBRev 21.12.00.032
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:40 +02:00
045b467858 Bug 30498: Fix enum search_field.type
Resolves sync issue with upgrades.

Test plan:
Run dbrev.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
80f7355571 Bug 30481: DBRev 21.12.00.031
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
0b647518de Bug 30481: Drop unique constraint deleteditemsstocknumberidx
Resolves a sync issue between database and schema caused by
differences between structure and upgrades. Note: newer
databases do not contain this index any longer.

Test plan:
Run dbrev.
Check SHOW CREATE TABLE deleteditems.
Verify that unique index has been dropped, regular index added.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
d12e2645e6 Bug 30135: DBRev 21.12.00.030
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
2c82d0e335 Bug 30135: (QA follow-up) Fix typo in sysprefs.sql
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
3ca182e1a4 Bug 30135: (QA follow-up) Fix typo in update
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
509aebd60e Bug 30135: Add EdifactLSQ mapping preference
This patch adds a new system preference, EdifactLSQ, to allow
configuration of the ambiguous LSQ, sequence code, field included in the
EDIFACT specifications.

Originally the field was hard coded to map to 'location', but as per the
specification it could have been mapped to 'ccode'.

From the specification:

A code or other designation which identifies stock which is to be
shelved in a specified sequence or collection.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
ce51b4daef Bug 30130: Add DBRev 21.12.00.029
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
Katrin Fischer
5c3ab82e2f Bug 30130: (QA follow-up) Fix permission on atomic update file
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
fee274b4df Bug 30130: (follow-up) Set BiC for 'Ulverscroft'
The 'Ulverscroft' supplier is also a BiC follower, this patch adds their
SAN, 5013546031839, to the DB update.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
be7b4dffb9 Bug 30130: Add standard field to edi_account
This patch add a 'standard' field to the edifact account configuration
table to allow setting the message standard as either 'EDItEUR' or 'BiC'.

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
6f101d68b6 Bug 16258: Add DBRev 21.12.00.028
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
2049b7f952 Bug 16258: (QA follow-up) Capitalise EDIFACT
EDIFACT is an abreviation, so it should be ALLCAPS.

* Electronic Data Interchange for Administration, Commerce and Transport

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
fcfd3a9a0d Bug 16258: (QA follow-up) Remove superflous comment from sysprefs
This patch removes the errant comment from default syspref SQL.

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

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
912f82cb48 Bug 16258: (QA follow-up) Don't set to off for existing install, they may be using EDI
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: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:39 +02:00
Colin Campbell
491c8708c4 Bug 16258: Add a syspref to govern EDIFACT functionality
Adds an "Edifact" systempreference to govern whether edifact processing
is enabled. In most places this is hidden if the current
vendor does not appear in the edi vendors table. This preference
hides the admin screens which define this and a couple of links.

Also fixes an anomaly whereby the basketgroup screen was not
making the same check on whether edi ordering should be enabled as
the basket screen. Both now use the same logic.

Rebased-by: Mark Tompsett <mtompset@hotmail.com>
Rebased-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
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: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-13 15:55:38 +02:00
6d7aa694a9 Bug 26346: DBRev 21.12.00.027
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-12 17:13:02 +02:00
46a19e5011 Bug 26346: Database changes
- Adds allow_change_from_staff to virtualshelves table
- Add edit_public_lists sub-permission

Sponsored-By: Catalyst IT

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

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-12 17:13:02 +02:00
2aaa0b87cf Bug 17018: DBRev 21.12.00.026
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-12 17:13:02 +02:00
c73967d87c Bug 17018: Split AdvancedSearchTypes for staff and OPAC
This patch adds a new system preference, OpacAdvancedSearchTypes, as an
OPAC-specific version of the AdvancedSearchTypes preference. Values from
AdvancedSearchTypes are copied to OpacAdvancedSearchTypes so that
behavior is consistent.

The patch also alters the output of the "Most popular" page so that:
1. The page heading is correct ("Most popular titles" instead of "Top
issues").
2. The table show both item type and collection whether or not the user
has submitted query with one of those fields as a filter.

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

- Go to Administration -> System preferences.
- Search for AdvancedSearchTypes. You should get two results, one for
  the OPAC preference and one for the staff interface.
- Check that the OpacAdvancedSearchTypes settings match the
  AdvancedSearchTypes settings.
- View the advanced search pages in the staff interface and OPAC to
  confirm that the tabs look correct.
- Change the OpacAdvancedSearchTypes and AdvancedSearchTypes settings to
  be different and confirm that each is applied separately to each
  interface.
- Enable the OpacTopissue system preference.
- View the "Most popular" page in the OPAC.
  - The page heading should be correct.
  - The OpacAdvancedSearchTypes settings should be reflected in the
    "Refine your search" sidebar: If "Collection" is checked, a filter
    for collection should appear. If "Item types" is checked, a filter
    for item types should appear.
  - The output of your search should include collection and item type
    regardless of what filters you've submitted.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-12 17:13:02 +02:00
1445012f5f Bug 30501: Fix typo in sysprefs.sql
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-11 15:28:06 +02:00
9cad82b3c6 Bug 29990: DBRev 21.12.00.025
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:18 +02:00
0fc8846494 Bug 29990: (QA follow-up) Change class name and apply to heading, add -x to update
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:17 +02:00
Aleisha Amohia
f6138634f5 Bug 29990: Add ShowHeadingUse system preference
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:17 +02:00
18939987f5 Bug 20398: DBRev 21.12.00.024
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:17 +02:00
Katrin Fischer
d58e5fc7a0 Bug 20398: (QA follow-up) Fix alphabetical order in sysprefs.sql
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:17 +02:00
ThibaudGLT
437a3e1de5 Bug 20398: Added a syspref to highlight or not highlight search terms in results on the staff interface
There is a possibility on OPAC but not yet on the staff interface, so I added this syspref which has the same behaviour as the OPAC highlighting syspref.
When you choose to disable highlighting on the syspref, the toggle anchor in the result page does not appear at all.
But if you keep the default state (highlighting on), you still have the option to switch between "Unhighlight" and "Highlight" modes.

Test plan :
1. Go to the syspref named "StaffHighlightedWords" and see that the default state is "Highlight".
2. Look for something in the catalogue for example and see that the words are highlighted and that it is also possible to change between "Unhighlight" and "Highlight".
3. Go back to syspref and choose to disable highlighting by choosing "Don't Highlight".
4. Refresh your results page if you have not closed it or reload a new search.
5. There is no highlighting at all and anchors do not exist (same behaviour as the OPAC interface).

Signed-off-by: ManuB <e.betemps@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:17 +02:00
075cd4b937 Bug 20517: DBRev 21.12.00.023
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:17 +02:00
Magnus Enger
afbe5deddc Bug 20517: Use the "sort bin" field in SIP2 Checkin Response
This bug adds the SIP2SortBinMapping to make it possible to tell
the Koha SIP2 server to include a sort_bin/CL field in the
Checkin Response, if appropriate.

To test:
- Check out an item and return it via SIP2:
  $ telnet localhost 8023
  9300CNterm1|COterm1|CPCPL|
  09N20200422    12430020200422    124300APCPL|AOCPL|AB001|AC|
  (Where 001 in |AB001| is the barcode of the item in question)
- Check there is no CL field in the last response
- Apply the patch, fill in SIP2SortBinMapping with e.g.:
       CPL:itype:BK:3
- Repeat the first step
- Check the respons contains a CL field with a value of 3 (or what
  you put in the config). The field should look like |CL3|
- Signe ye offe

2020-06-25: Pass an item to _get_sort_bin, not a checkout. Rebase.

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

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:17 +02:00
b025a79345 Bug 11083: DBRev 21.12.00.022
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:15 +02:00
Julian Maurice
4978f3d562 Bug 11083: Add ability to generate authority summary using XSLT
This patch only affects authority search results in the staff interface.
It adds a new system preference AuthorityXSLTResultsDisplay. If set,
each authority search result MARCXML will be transformed using the XSLT
at the given filename or URL. The output will be displayed in place of
the default summary.
If errors occur, the XSLT is ignored and the default summary is
displayed.

The syspref value can contain {langcode} and {authtypecode} which will
be replaced by the appropriate value (resp. current language and
authority type code)

Test plan:
1. Apply patch and run updatedatabase
2. Verify that authority search results are not affected yet.
3. Create an XSLT file (for instance in
/home/koha/xslt/en/GEOGR_NAME.xsl)
4. Set AuthorityXSLTResultsDisplay syspref value to
/home/koha/xslt/{langcode}/{authtypecode}.xsl
5. Do an authority search that returns GEOGR_NAME results. Verify that
the summary matches what you expect from your XSLT
6. Do an authority search that returns authorities of other types.
Verify that the default summary is displayed.

Example of a minimal XSLT:

<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
 xmlns:marc="http://www.loc.gov/MARC21/slim"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output omit-xml-declaration="yes"/>
  <xsl:template match="marc:record">
    <xsl:element name="div">
      <xsl:attribute name="class">
        <xsl:text>authority-summary</xsl:text>
      </xsl:attribute>
      <xsl:value-of
        select="marc:datafield[@tag='151']/marc:subfield[@code='a']"/>
    </xsl:element>
  </xsl:template>
</xsl:stylesheet>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-08 15:49:15 +02:00
33aa6953f1 Bug 30063: DBRev 21.12.00.021
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-04 16:35:53 +02:00
7d2d53793b Bug 30063: Sort by "Name" firstname,surname
As it's how it's displayed

Signed-off-by: Séverine Queune <severine.queune@bulac.fr>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-04 09:47:02 +02:00
619fc83cbe Bug 19532: (follow-up) Fix installer data for unimarc
https://bugs.koha-community.org/show_bug.cgi?id=19532
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-28 16:00:25 +02:00
563836cce1 Bug 30276: (bug 30060 follow-up) Fix 21.12.00.016
ERROR 1832 (HY000): Cannot change column 'code': used in a foreign key constraint 'user_permissions_ibfk_2'

Test plan:
Checkout a commit prior to 30060 (c023f63abc)
reset_all
checkout master+this patch
updatedatabase

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-28 16:00:25 +02:00
4aedda8197 Bug 24221: DBRev 21.12.00.020
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-25 11:01:04 -10:00
7adebc4a81 Bug 24221: Improve atomic update
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-25 11:01:04 -10:00
bc135ba1e1 Bug 24221: Move OPACMySummaryNote to HTML customizations in additional-contents
To test:
1- Before applying the patch add some content to the system preference OPACMySummaryNote
2- Apply patch
3- restart_all and updatedatabase
4. Go to additional-content.pl ( HTML customizations )
5. You should now see your content from the system preference under OpacMySummaryNote in HTML customizations
6. Try searching for the system preference, OPACMySummaryNote. It has been removed and you should not be able to find it.
7. Try changing/removing/adding content from OpacMySummaryNote in HTML customizations
8. Make sure your edits are reflected when you look at the user summary page

Note: The system preference was named OPACMySummaryNote but in to be more consitent with how we have named other additional_contents I have renamed this OpacMySummaryNote.
Signed-off-by: shiyao <shiyao@inlibro.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-25 11:01:04 -10:00
6625f8ed50 Bug 27812: DBRev 21.12.00.019
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-17 11:22:56 -10:00
0b3febb279 Bug 27812: (QA follow-up) Fix atomicupdate
We removed a bit too much from the skeliton here ;)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-17 11:22:56 -10:00
c87525f6b6 Bug 27812: Add DBRev to warn of the change to the account details notice
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-17 11:22:56 -10:00
9d1abe0632 Bug 27812: Remove the ability to transmit a patron's plain text password over email
We should not give libraries the ability to compromise patron accounts,
it is considered a huge security issue and nobody in network security
would never recommend allowing passwords to be transmitted in clear text
over email.

It should simply not be possible to send a patron's password in plain text
via email. As such, we should remove this ability from Koha.

Test Plan:
1) Apply this patch
2) Create a patron to generate the ACCTDETAILS email
3) Note you can no longer transmit the patron's password in the email

Signed-off-by: Amit Gupta <amitddng135@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-17 11:22:56 -10:00
975f52a4cf Bug 19532: (RM follow-up) Fix recalls.old is default 0
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-15 00:31:32 -10:00
9cb2ff97d2 Bug 19532: DBRev 21.12.00.018
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:52 -10:00
ea6eb301a6 Bug 19532: Make recalls.status an ENUM
This patch makes the status attribute an ENUM, setting the default value
as 'requested' as well. The chosen names are easier to read than single
letters. Also, renamed F into fulfilled (this impacts methods names as
well). This is because 'finished' or 'completed' is more a synonym for
old => 1...

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:52 -10:00
Aleisha Amohia
53aa7b523b Bug 19532: Database and installer stuff
- Add recalls table
- Add recalls circulation rules - recalls allowed, recalls per record, on shelf recalls, recall due date interval, recall overdue fine, recall shelf time
- Add system preferences - useRecalls, RecallsMaxPickUpDelay, RecallsLog
- Add email notices (RETURN_RECALLED_ITEM, PICKUP_RECALLED_ITEM)
- Add print notice (RECALL_REQUESTER_DET)
- Add user permission - recalls, manage_recalls
- Add Recall and CancelRecall enum options for branchtransfers reason

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

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-14 22:45:50 -10:00
23334aa6ca Bug 30128: DBrev 21.12.00.017
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-08 23:03:34 -10:00
4bd5d0f0bf Bug 30128: Change language_subtag_registry.description to varchar(255)
In database, language_descriptions.description is VARCHAR(255).
language_subtag_registry.description is VARCH(25), it should have same size.

You can see in https://www.loc.gov/standards/iso639-2/php/code_list.php there is for example 'South American Indian languages'

Test plan :
1) Run atomic update
2) Check language_subtag_registry.description is now varchar(255)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-08 23:03:33 -10:00
fd1c259c0d Bug 30185: Missing return in db rev 210600003.pl
db rev files are constructed with a return {...}, db rev 210600003.pl is missing return word.
I don't know if it can impact the db upgrade but we should fix it for consistency.

To test upgrade from a version 21.05 and check db rev is applied.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-01 22:47:47 -10:00
109925459b Bug 30060: DBRev 21.12.00.016
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-24 14:35:36 -10:00
64e679b012 Bug 30060: (follow-up) Remove duplicate prior to adding key
I had issues with this update as somehow my user_permissions table
contained duplicate rows which throws an error when adding the new
primary key.

This follow-up patch adds SQL to remove any duplicate rows prior to
adding the new primary key.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-24 14:35:36 -10:00
ec3c7a85c9 Bug 30060: Add primary key to user_permissions table
Without primary key DBIC is failing with something like:

GET /api/v1/suggestions/managers: unhandled exception (DBIx::Class::Exception)<<DBIx::Class::ResultSource::RowParser::_resolve_collapse(): Unable to calculate a definitive collapse co
lumn set for UserPermission (last member of the Borrower -> user_permissions chain): fetch more unique non-nullable columns at /kohadevbox/koha/Koha/Objects.pm line 394>> Koha::REST::Plugin::Exceptions::__ANON__ /
kohadevbox/koha/Koha/REST/Plugin/Exceptions.pm (73)

Test plan:
Execute the atomic update and confirm that the new PK has been added to the user_permissions table.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-24 14:35:36 -10:00
Caroline Cyr La Rose
fc3e532897 Bug 29634: Map biblio.medium to 245 by default (MARC21)
This patch adds a mapping from 245 to biblio.medium.

To test:
1) Apply patch
2) Delete existing frameworks
   -  In the database
      delete from marc_tag_structure;
      delete from marc_subfield_structure;
      delete from biblio_framework;
3) Load default framework
   - In a terminal, run
     ./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
4) In the staff interface, go to Administration > MARC bibliographic framework
   - Make sure the default framework is there
5) In Administration > Koha to MARC mapping, check the mappings for biblio.medium
   - biblio.medium should be mapped to 245
6) Create a bibliographic record with a value in 245
   - In the database, check the biblio entry for this record, the value from 245 should be in medium

I hope I didn't forget anything! :)

Caroline

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-16 11:51:10 -10:00
Caroline Cyr La Rose
3b1b78955f Bug 29626: Map biblioitems.place to 264 by default (MARC21)
This patch adds a mapping from 264 to biblioitems.place.

To test:
1) Apply patch
2) Delete existing frameworks
   -  In the database
      delete from marc_tag_structure;
      delete from marc_subfield_structure;
      delete from biblio_framework;
3) Load default framework
   - In a terminal, run
     ./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
4) In the staff interface, go to Administration > MARC bibliographic framework
   - Make sure the default framework is there
5) In Administration > Koha to MARC mapping, check the mappings for biblioitems.place
   - biblioitems.place should be mapped to 260 as well as 264
6) Create a bibliographic record with a value in 264
   - In the database, check the biblioitems entry for this record, the value from 264 should be in place
7) Create a bibliographic record with a value un 260
   - In the database, check the biblioitems entry for this record, the value from 260 should be in place

I hope I didn't forget anything! :)

Caroline

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-16 11:51:10 -10:00
Caroline Cyr La Rose
3bd4689075 Bug 29627: Map biblioitems.publishercode to 264 by default (MARC21)
This patch adds a mapping from 264 to biblioitems.publishercode.

To test:
1) Apply patch
2) Delete existing frameworks
   -  In the database
      delete from marc_tag_structure;
      delete from marc_subfield_structure;
      delete from biblio_framework;
3) Load default framework
   - In a terminal, run
     ./misc/load_yaml.pl -f installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.yml --load
4) In the staff interface, go to Administration > MARC bibliographic framework
   - Make sure the default framework is there
5) In Administration > Koha to MARC mapping, check the mappings for biblioitems.publishercode
   - biblioitems.publishercode should be mapped to 260 as well as 264
6) Create a bibliographic record with a value in 264
   - In the database, check the biblioitems entry for this record, the value from 264 should be in publishercode
7) Create a bibliographic record with a value un 260
   - In the database, check the biblioitems entry for this record, the value from 260 should be in publishercode

I hope I didn't forget anything! :)

Caroline

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-16 11:51:10 -10:00
bb316c5ded Bug 29943: DBRev 21.12.00.015
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-01 21:39:39 -10:00
320d73b10f Bug 29943: Db rev: replace typo in existing notices
Test plan:
Run updatedatabase.

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-01 21:39:39 -10:00
13490c4dfb Bug 29943: Fix NOTIFY_MANAGER notice in sample notices
Test plan:
Look good at this change, or do a new install :)

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-01 21:39:39 -10:00
c346481429 Bug 29596: DBRev 21.12.00.014
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-01 21:39:39 -10:00
87621c2c89 Bug 29596: Add Yiddish language
This patch adds the Yiddish language to Koha. The language codes were
taken from https://www.loc.gov/standards/iso639-2/php/code_list.php

Sponsored-by: Universidad Nacional de San Martín

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-01 21:39:39 -10:00
6935a30cfc Bug 29605: DBRev 21.12.00.013
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-02-01 21:39:39 -10:00