Commit graph

5217 commits

Author SHA1 Message Date
25621d7c26 Bug 29648: Allow tables_settings.default_display_length to be NULL
We actually want this value to be NULL. If set to NULL and
default_display_length is not in the yml, then the option will not be
displayed.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-27 11:20:44 -10:00
2be3e07970 Bug 29648: Move NumSavedReports to the table settings
The syspref NumSavedReports can be moved to the table settings config
Test plan:
1. Set the syspref to a given value
2. updatedatabase # execute the atomic update
3. Go to the table settings page and confirm that the syspref's value
has been retrieved
4. Select a specific colonne for the default sort
5. Go to the report list view and confirm that the "Show X entries" has
the correct selected value and that the table is sorted as you expect.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-27 11:20:43 -10:00
Bernardo Gonzalez Kriegel
36dbe77451 Bug 30373: (follow-up) Add BNF z3950 server
This is not strictly necessary, but is useful to do the testing

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-27 11:20:43 -10:00
Bernardo Gonzalez Kriegel
a211106cd4 Bug 30373: (follow-up) Enable 'qualif' authorised_value
This patch reinstates the authorised value 'qualif'
to it's corresponding place

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install or load the YAML file
2) Verify 'qualif' authorised_value is present in subfield $4 of
   fields 700/1/2/3, 710/1/2/3, 720/1/2/3 and 730

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-27 11:20:43 -10:00
Bernardo Gonzalez Kriegel
6bfcf4ea52 Bug 30373: (follow-up) Optional SUGGEST auth values
This patch adds 3 SUGGEST optional auth_val.yml

This authorized value is used in UNIMARC default bibliographic
framework.

To test:
1) Do a clean install with optional files or load the YAML file
2) Verify new SUGGEST values are in the database
    SELECT * FROM authorised_values WHERE category = 'SUGGEST';

    Check new values Budget, Expensive and Poldoc

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-04-27 11:20:43 -10:00
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