Commit graph

4143 commits

Author SHA1 Message Date
f9abd7d2ef
Bug 24592: DBRev 19.12.00.021
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-13 16:00:56 +00:00
a5a75ddd04
Bug 24592: Database Update
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-13 15:58:14 +00:00
cc595325d6
Bug 19735: Add support for max_ver
This patchset adds support for extracting 'max_ver' from the cpanfile so
we can use version ranges properly and report errors if we have modules
installed that do not fit within that version range.

Test plan:
1) Manually modify the module version of a required module in the cpanfile
   to have a max version greater than the version you have installed.
2) Run through the install proceedure and note the new warning that a
   module needs upgrade for the module in question.
3) The module should also be reported in the about page

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-12 16:33:02 +00:00
faa89f406d
Bug 19735: (QA follow-up) Drop references to 'usage'
The 'usage' key was dropped as part of this migration to cpanfile but
it was still refered to by the installed. This patch simply removes
references to it. After considering how we might add it back in I
decided that as it stands it wasn't a well maintained list and should be
re-implimented in the future in a more consistent form if we miss it.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-12 16:33:02 +00:00
Julian Maurice
a34d086a24
Bug 19735: Move Perl deps definitions into a cpanfile
cpanfile is a format for describing CPAN dependencies for Perl
applications.
It is more concise - thus easier to read and maintain - than
C4::Installer::PerlDependencies, and allows to describe requirements
more accurately (using version ranges or features for instance)
Additionally it can be read by tools such as cpanm or carton for an
easy way to install dependencies on non-Debian-based systems.

For more information on cpanfile, see
http://search.cpan.org/~miyagawa/Module-CPANfile-1.1002/lib/cpanfile.pod

This patch replace C4::Installer::PerlDependencies by an equivalent
cpanfile and update all scripts/modules that were using PerlDependencies
It also removes dead code from C4::Installer::PerlModules (some
subroutines were not used at all, except in unit tests)

Added dependencies:
 - Module::CPANfile
 - CPAN::Meta (dependency of Module::CPANfile, but we need a more recent
   version than the one Module::CPANfile requires)

Test plan:
  1. Go to About page, tab Perl modules and keep this browser tab open
  2. Apply patch
  3. Install Module::CPANfile and CPAN::Meta
    a. On Debian-based systems:
       # will install libcpan-meta-perl as a dependency
       sudo apt install libmodule-cpanfile-perl
    b. Others:
       # will install CPAN::Meta as a dependency
       sudo cpanm Module::CPANfile
  4. In a new browser tab, go to About page, tab Perl modules and compare
     the table with the one in the previous browser tab
     They should be identical, except for newly added dependencies
     (Module::CPANfile and CPAN::Meta)
  5. Do a 'standard' install
    a. perl Makefile.PL (select 'standard')
    b. make
    c. sudo make install
    d. Configure your database, web server, ... and go through the web
       install process
  6. Verify that the cpanfile got copied into PERL_MODULE_DIR (which
     should be /usr/share/koha/lib)
  7. Go to the about page of this fresh install and compare it with your
     dev install
  8. Verify that debian/list-deps still works
     This takes a lot of time and it may not be necessary to wait until
     the end. If you see some Debian package names that correspond to
     modules in cpanfile, it means it still works
     (you need apt-file for this script to work)
  9. Verify that koha_perl_deps.pl still works
 10. prove t/Installer_pm.t t/Installer_PerlModules.t

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-02-12 16:33:02 +00:00
fb69268862
Bug 8643: DBRev 19.12.00.020
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-11 14:37:34 +00:00
simith
339c27ca80
Bug 8643: Add important constraint to marc subfields
This fix permits to add an "Important" option to the marc structure pages.

Testing:

1) Apply the patch
2) Run updatedatabase.pl
3) Regenerate CSS
4) Define 100 as an "important" field ( Administration » MARC bibliographic framework » MARC structure ( Default Frameword) » Edit )
5) Define 100$a as an "important" subfield (Administration » MARC bibliographic framework » MARC structure (Default Frameword) » Subfield » Onglet a)
6) Edit a record to clear the field 100 (subfields are all blank)
7) Save the record.
8) Validate the following message:

A few important fields are not filled:

    * tag 100 subfield a Nom de personne in tab
    * Field 100 is important, at least one of its subfields should be filled.

Are you sure you want to save?

Sponsored by the CCSR ( http://www.ccsr.qc.ca )
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-11 14:33:29 +00:00
21594689e5
Bug 23673: DBRev 19.12.00.019
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-05 14:27:14 +00:00
043a36e46a
Bug 23673: Set updated_on=time_queued on DB update
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-05 14:23:37 +00:00
Agustin Moyano
76c0a06728
Bug 23673: Change DB Structure
Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-05 14:21:59 +00:00
14fa7c112c
Bug 18936: DBRev 19.12.00.018
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-04 10:09:18 +00:00
Joonas Kylmälä
05cabe7b18
Bug 18936: (follow-up) Add missing import of Koha::CirculationRules
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-04 09:56:29 +00:00
e316de81b6
Bug 18936: Insert default rules during the onboarding tool
Those default values have been picked from bug 15522
(Koha::CirculationRules)

Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-04 09:56:28 +00:00
c7536a9569
Bug 18936: Fix Update DB entry
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-04 09:56:27 +00:00
Jesse Weaver
1c43a26525
Bug 18936: (follow-up) Fix tests, replace old get_onshelfholds_policy method
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-04 09:56:25 +00:00
Jesse Weaver
5712ec566f
Bug 18936: (follow-up) fix tests, null vs. empty behavior for limiting rules
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-04 09:56:24 +00:00
Jesse Weaver
14c7a00d4a
Bug 18936: (follow-up) Remove issuingrules from kohastructure.sql
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-04 09:56:24 +00:00
40d8a72a9d
Bug 18936: (follow-up) Fix upgrade step
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-04 09:56:10 +00:00
58fda20e85
Bug 18936: Convert issuingrules fields to circulation_rules
Signed-off-by: Minna Kivinen <minna.kivinen@hamk.fi>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-02-04 09:23:55 +00:00
65024825c5
Bug 21674: (RM follow-up) Fix updatedatabase error
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-31 14:06:25 +00:00
cca2a08270
Bug 21674: DBRev 19.12.00.017
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-30 15:44:42 +00:00
3134736a84
Bug 21674: Remove duplicates from library_groups before adding the uniq constraint
To avoid to make it fails if duplicates existed prior to this change

Credit for the SQL query goes to Nick, thanks!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-30 15:36:25 +00:00
09ac74baca
Bug 21674: DB changes
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-30 15:36:25 +00:00
715da06db5
Bug 22868: DBRev 19.12.00.016
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-30 08:34:28 +00:00
ae53caa681
Bug 22868: Move suggestions_manage subperm out of acquisition perm
Bug 11911 replaced the permission of suggestions.pl (create a purchase
suggestion) from catalogue => 1 to acquisition => 'suggestions_manage'.
However we have a lot of acquisition scripts that have lax permissions
(acquisition => '*' which means any sub permissions of acquisition is
enough).

That causes problem when a circulation staff can create purchase
suggestions but not access acquisition information.

One solution is to move the suggestions_manage subpermission out of the
acquisition permission and create a new suggestion permission.

Test plan:
0. Setup
* Create a patron with several permission (and full acquisition
permission)
* Create another patron with several permission, and suggestions_manage
permission
* Create another patron without the suggestions_manage permission
1. Apply the patch and execute the update database entry
2. Note that the third patron you create still does not have
suggestions_manage
3. Confirm that you can create a purchase suggestion if you have
suggestions_manage, but cannot access acquisition pages if you do not
have any subpermissions of the acquisition permission

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-30 08:27:00 +00:00
f1f1c2e9b1
Bug 24296: DBRev 19.12.00.015
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-28 15:06:08 +00:00
b43a4b2756
Bug 24296: Update existing data in the database
This DB udpate adds the stockration states to the trigger enum in the
branchtransfers table and then populates it with any such data currently
contained within the comments field.

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-01-28 15:03:21 +00:00
c3188f0249
Bug 24287: DBRev 19.12.00.014
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-28 15:01:54 +00:00
64f87158fd
Bug 24287: Add reason to branchtransfers
This patch adds the `reason` field to the `branchtransfers` table to
record what triggered a transfer.

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-01-28 14:57:42 +00:00
a10b520b9b
Bug 24339: Add SIP2 payment types for installation
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-27 10:41:37 +00:00
435e80fb8d
Bug 24478: DBRev 19.12.00.013
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-23 10:40:24 +00:00
Katrin Fischer
83d98dfad5
Bug 24478: Fix sequence in sysprefs.sql and add missing comma
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-23 10:30:54 +00:00
11112b22cb
Bug 24478: Add EnablePointOfSale system preference
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-23 10:30:00 +00:00
0ad865d822
Bug 24481: DBRev 19.12.00.012
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-23 08:50:50 +00:00
637afc8f6d
Bug 24481: Move manage_cash_registers to parameters permission
This patch moves the manage_cash_registers subpermission to the more
appropriate location under 'parameters'.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-23 08:48:21 +00:00
59a75a60cc
Bug 23354: (RM follow-up) Remove stray 'IGNORE' in updatedatabase
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-22 15:02:46 +00:00
5c11d23f00
Bug 23354: (QA follow-up) Add takepayment permission for new installs
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-22 13:49:11 +00:00
d8726c2e46
Bug 24289: (RM follow-up) Correction to DB update version
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-20 14:39:32 +00:00
0d103621ad
Bug 24289: DBRev 19.12.00.011
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-20 14:03:52 +00:00
2dbce72a07
Bug 24289: Make sure sample_holidays will load after sample_libraries
They are inserted depending on their alpha order, and sample_holidays
will fail because of missing branchcode.
This patch suggests a simple fix: rename sample_holidays to
sample_libraries_holidays, to make sure it will be loaded after
sample_libraries

Test plan:
Start a fresh installation and select all sample data

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-20 14:03:51 +00:00
89f572ff5f
Bug 24289: Add foreign keys on *_holidays.branchcode tables
Those are missing foreign keys, it will also clean the holidays tables
and automatically remove the holidays when a library is removed.

Test plan:
0. Do not apply this patch
1. Create a new library
2. Create special and repeatable holiday for this library
3. Remove the library
=> Notice that the holidays still exist in DB
4. Apply this patch
5. Execute the update database entry
=> Notice that the holidays for this library have been removed from the DB
6. Repeat 1-3
=> Notice that the holidays have been removed along with the library

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-20 14:03:51 +00:00
2dc48d0988
Bug 21520: (RM follow-up) Reduce added constraints
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-16 14:47:36 +00:00
eed6cc84c3
Bug 21250: DBRev 19.12.00.010
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-15 16:27:53 +00:00
Matthias Meusburger
43c8ca958f
Bug 21520: (QA follow-up): Updatedatabase
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-15 13:50:17 +00:00
Matthias Meusburger
de0161db1e
Bug 21520: More complex OAI sets mappings
Currently, the rules used to create OAI sets are processed with the 'or'
boolean operator between each rule.

This patch allows to use 'or' or 'and' between the rules.

The evaluation of the rules is done according to the boolean operators
precedence: AND has a higher precedence than OR.

For example:

A and B or C and D

will be evaluated as follow:

(A and B) or (C and D)

Test plan:

 - Apply the patch
 - Apply the atomicupdate
 - Prove t/db_dependant/OAI/AndSets.t
 - Check that existing mappings still work
 - Try modifying existing mappings
 - Try creating new mappings
 - Check that the boolean operators precedence is correctly taken into account

Signed-off-by: Michal Denar <black23@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-15 13:49:19 +00:00
2d03cfca1f
Bug 23354: (RM follow-up) Italian sample notice
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-14 09:30:01 +00:00
cfba7e7364
Bug 23354: (RM follow-up) Update translated sample_notices
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-13 16:46:47 +00:00
ceba85dfd5
Bug 23354: DBRev 19.12.00.009
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-13 14:13:05 +00:00
ade421e896
Bug 23354: (QA follow-up) Make db update idempotent
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-13 14:06:52 +00:00
01faf14d8b
Bug 23354: (follow-up) Update for bugs 23049 and 23805
Remove all mentions of accounttype and replace with debit_type_code and
credit_type_code as appropriate.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2020-01-13 14:05:26 +00:00