Commit graph

4385 commits

Author SHA1 Message Date
39138e860c
Bug 17268: DBRev 19.12.00.084
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 08:36:38 +01:00
8b6be7cced
Bug 17268: Add macros table and permissions
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Heather Hernandez <Heather_Hernandez@nps.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 08:25:07 +01:00
219f000069
Bug 17355: DBRev 19.12.00.083
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 07:57:22 +01:00
Katrin Fischer
dc0cb0378c
Bug 17355: (QA follow-up) Add description to updatedatabase entry
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 07:57:21 +01:00
78ce445ae4
Bug 17355: DB changes - set is_system for categories
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 07:57:21 +01:00
0ebb62755e
Bug 17355: DB changes
This patch adds a new authorised_value_category.is_system boolean/tinyint(1)
DB field.

Name 'is_system' is coming from existing tables account_credit_types and
account_debit_types and should not be discussed here (if you disagree
fill a new bug report and deal with naming issue separately)

Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 07:57:20 +01:00
6842574924
Bug 23794: (RM follow-up) Make DB update consistent
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-04 07:56:19 +01:00
30906c8b4f
Bug 23794: DBRev 19.12.082
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-01 08:19:48 +01:00
4689777ba9
Bug 23794: Convert OpacMainUserBlock system preference to news block
This patch builds on Bug 22318 to move the OpacMainUserBlock system
preference into the Koha news system, making it possible to have
language- and library-specific content.

To test you should have some content in the OpacMainUserBlock system
preference. Apply the patch and run the database update process.

 - Go to the OPAC and confirm that the content which was previously in
   the OpacMainUserBlock system preference now displays correctly where
   it was before.
 - In the staff client, go to Tools -> News and verify that the content
   from OpacMainUserBlock is now stored in news items. There should be
   one entry for each of the enabled translations in your system, for
   instance 'opacmainuserblock_en', 'opacmainuserblock_fr-FR',
   'opacmainuserblock_cs-CZ'
 - Go to Administration -> System preferences and confirm that the
   OpacMainUserBlock preference has been removed.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-05-01 08:17:23 +01:00
94097761d5
Bug 22630: DBRev 19.12.00.081
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 17:12:13 +01:00
Julian Maurice
605d6c9b6e
Bug 22630: Allow to change homebranch in course reserves
Test plan:
1. Create a course (disabled)
2. Add a reserve to this course for an item and set a homebranch
   different from the item's homebranch
3. Enable the course
4. Verify that the item's homebranch has changed
5. Disable the course
6. Verify that the item's homebranch was reset to its initial value
7. prove t/db_dependent/CourseReserves/CourseItems.t

Sponsored-by: Université de Lyon 3
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Sonia Bouis <sonia.bouis@univ-lyon3.fr>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 17:07:52 +01:00
feab2cbeb2
Bug 21294: Replace BOOLEAN with TINYINT(1) in our DB structure
To match the coding guideline SQL12.
We do this for consistency.
Note that we do not need an update DB as BOOLEAN is an alias for
TINYINT(1).

The is_boolean flags have been added to the schema.

Test plan:
1. `dbic` should run correctly
2. kohastructure.sql should be syntaxicaly correct
3. `git grep -i boolean installer/data/mysql/kohastructure.sql`
should not return relevant occurrences.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-29 16:58:45 +01:00
733874e24e
Bug 25045: (RM follow-up) Correction to updatedatebase.pl
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 13:42:26 +01:00
19a241c131
Bug 25045: (RM follow-up) Add the RESTPublicAnonymousRequests syspref
The atomic update alos included a quoting mistake

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:51:44 +01:00
8d77db2769
Bug 25045: (follow-up) Add the RESTPublicAnonymousRequests syspref
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:50:24 +01:00
93c0f4420d
Bug 23081: DBRev 19.12.00.080
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:34:29 +01:00
e116f744a0
Bug 23081: atomicupdate for change to existing installs
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:32:47 +01:00
ec1bfd2b74
Bug 23081: set default to 0 for items.issues and deleteditems.issues
To test:
- save and run this sql query in reports: select sum(if(issues is null,1,0)),sum(if(issues=0,1,0)) from items
- you should see a lot of nulls and no zeros
- apply patch
- updatedatabase
- re-run your query and see that your nulls have changed to zeros
- create a new item
- rerun your query and see your new item is counted in the zeros, not the nulls

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:32:37 +01:00
6c1a4312c4
Bug 25045: DBRev 19.12.00.079
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:17:33 +01:00
5394e8443f
Bug 25045: Add the RESTPublicAnonymousRequests syspref
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:15:21 +01:00
Bernardo Gonzalez Kriegel
69b1a62aa4
Bug 24897: Remove es-ES installer data
With installer data in YAML format and it's translations,
there are no need for localized installer files.

This patch removes es-ES installer files.

To test on top of Bug 24871
1) Apply the patch
2) Translate to spanish
   cd misc/translator
   ./translate update es-ES
   -/translate install es-ES
3) Do a clean install using es-ES,
   check no problems during install
4) Verify MARC21 frameworks, they must
   be translated

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-27 11:12:07 +01:00
c42674cfd9
Bug 24913: DBRev 19.12.00.078
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-21 12:34:04 +01:00
Aleisha Amohia
3d022f0f27
Bug 24913: Add PatronSelfRegistrationConfirmEmail syspref
To test:
1) update database, restart memcached/plack
2) Go to Administration -> System preferences -> OPAC tab. Enable the
new PatronSelfRegistrationConfirmEmail system preference. Enable other
required self registration sysprefs.
3) Go to the OPAC home page. (You may need to log out). Click the
'Register' link so you are redirected to the member entry form.
4) Notice the 'Confirm primary email' field after the 'primary email'
field. Put 'a@a.com' in primary email, and 'b@b.com' in the confirm
field. Scroll to the end of the form and Submit.
5) Confirm the form is not successfully submitted, and an error message
is shown to indicate the email addresses do not match.
6) Confirm you cannot cut, copy or paste in either the primary email or
confirm primary email fields. Confirm the right click menu doesn't work
in these fields.

7) Disable javascript in your browser.
8) Repeat steps 3 and 4.
9) Confirm there is an error message to indicate the email addresses do
not match.

10) Re-enable javascript. Fill in the form correctly with matching email
addresses and confirm it successfully submits.

11) Disable the PatronSelfRegistrationConfirmEmail syspref.
12) Attempt to register an account on the OPAC again. Confirm the
'confirm email address' field is gone and form works as expected.
13) Re-enable the PatronSelfRegistrationConfirmEmail syspref.
14) Log in to the OPAC and go to your personal details
15) Edit the primary email field
16) Confirm you are able to submit your changes (you should not see an
error about emails not matching).

Sponsored-by: Bibliotheksservice-Zentrum Baden-Württemberg (BSZ)
Signed-off-by: holly <hc@interleaf.ie>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-21 12:30:40 +01:00
66135bc4c5
Bug 23727: DBRev 19.12.00.077
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 13:49:05 +01:00
e08eae728c
Bug 23727: Add new columns
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 13:45:40 +01:00
2b7ac72d70
Bug 22887: (RM follow-up) Restore warnings in updatedatabase
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 10:21:43 +01:00
0e9d45e7b4
Bug 21901: DBRev 19.12.00.076
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 10:17:32 +01:00
7d09c46cf7
Bug 21901: (QA follow-up) Add a few NOT NULL constraints in dbrev
We need to specify NOT NULL on subscription and -history as well.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:40:08 +01:00
cd5be73042
Bug 21901: Add a warning if we removed entries
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:39:57 +01:00
021598e8a4
Bug 21901: (QA follow-up) Ensure consistent data before adding keys
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:39:14 +01:00
9287585f38
Bug 21901: Add FK on subscription and serial tables
In order to improve performance in the serial modules and add DB constraints,
this patch is going to add missing foreign key on the following columns:
 * serial.biblionumber
 * serial.subscription
 * subscriptionhistory.biblionumber
 * subscriptionhistory.subscriptionid
 * subscription.biblionumber

Once done, some code can be removed from the Del* subroutines, as the ON
CASCASE clause will make the RDBMS handles the deletions.

Test plan:
0/ It would be useful to test the update DB entry on a big and old
production DB, to make sure the constraints will be added correctly.
We could remove the entries before creating the constraints, but it can
be unecessary
1/ Make sure you can recreate a fresh install with the kohastructure.sql
from this patch
2/ Make sure you can upgrade from a master install
3/ Create a subscription, serial, etc. and delete the biblio
=> The subscription/serials should have been deleted from the DB
4/ Create a subscription, serial, etc. and delete the subscription
=> The serials should have been deleted from the DB

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:39:00 +01:00
2d5d9a54bd
Bug 25086: DBRev 19.12.00.075
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:13:31 +01:00
Agustin Moyano
039afd0936
Bug 25086: Set changed_fields column as nullable
This patch changed_fields column as nullable.

To test:
1. Do not apply any patch
2. Set PatronSelfRegistrationVerifyByEmail preference to require
3. Fill self registration form in opac and submit
CHECK => OPAC dies with a nasty message, that says Field 'changed_fields' doesn't have a default value
4. Apply this patch and updatedatabase
5. Repeat step 3
SUCCESS => Registry process continues as expected
6. Sign off

Sponsored-by: Orex Digital
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 09:10:55 +01:00
edee0266c4
Bug 25147: DBRev 19.12.00.074
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 08:25:20 +01:00
7fb2524a9a
Bug 25147: Rename preference
This patch renames the preference from the ambiguous 'AllowSelfCheckReturns'
to 'SCOAllowCheckin' which is more consistent with other preferences
affecting this module.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 08:23:11 +01:00
67c7b281ae
Bug 25152: (RM follow-up) Correction to update description
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-17 08:23:11 +01:00
48188a1065
Bug 24131: Prevent the first description to be displayed twice
If there are several lines to display, the first one was displayed
twice:
Upgrade to 19.12.00.071 done [13:10:22]: Bug 22887 - Add unique constraint to authorised_values
                                                   - Add unique constraint to authorised_values
                                                   - WARNING - Cannot create unique constraint on authorised_value(category, authorised_value)
                                                   - The following entries are duplicated: COUNTRY:aaa (2)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 14:21:01 +01:00
36cb0e6ae4
Bug 22887: Remove superfluous warn statements
We print them in the description later

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 14:12:13 +01:00
c6b6b0a427
Bug 22887: Fix SQL syntax for MySQL 5.5
This does not happen on MySQL 8 or latest MariaDB, but does on MySQL 5.5

"Non-grouping field 'c' is used in  HAVING clause"

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 14:11:55 +01:00
4da2a353b7
Bug 25152: DBRev 19.12.00.073
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:37:24 +01:00
b87fdec6da
Bug 25152: Make subscription.closed tinyint(1)
https://wiki.koha-community.org/wiki/Coding_Guidelines#SQL12:_Booleans

Boolean fields must be tinyint(1), not int(1)

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:33:33 +01:00
0f3c451c9d
Bug 24380: DBRev 19.12.00.072
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:30:12 +01:00
806bee5a2e
Bug 24380: Add syspref CalculateFinesOnBackdate
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:28:39 +01:00
c0f79717ee
Bug 22784: (QA follow-up) booleans should be TINYINT
As per the coding guidelines, they should be TINYINT(1).

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-15 12:21:57 +01:00
3999741d4a
Bug 22887: DBRev 19.12.00.071
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
66b62058d6
Bug 22887: Remove dup fr-FR for existing installs
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
323e1a2a2f
Bug 22887: Remove dup in fr-FR av.sql
https://en.wikipedia.org/wiki/Cocos_(Keeling)_Islands
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lari Taskula <lari.taskula@hypernova.fi>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
b925d88de1
Bug 22887: Warn if duplicates exist
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
2ce0327480
Bug 22887: Add unique constraint to authorised_values
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 17:24:42 +01:00
fc29f2afa1
Bug 22774: DBRev 19.12.00.070
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-04-14 16:52:49 +01:00