]> git.koha-community.org Git - koha.git/commit
Bug 16678: updatedatabase.pl 3.23.00.006 DB upgrade crashes if subscription_numberpat...
authorJacek Ablewicz <abl@biblos.pk.edu.pl>
Wed, 8 Jun 2016 08:46:18 +0000 (10:46 +0200)
committerFrédéric Demians <f.demians@tamil.fr>
Wed, 15 Jun 2016 06:19:36 +0000 (08:19 +0200)
commit8e7e2c0db929fe9dab47f2cc71c353564e267850
treea2d8c265d8c35f4246cb8d25f9497f2c7c63ece6
parentc0c00b80cd5aca3a0fe1903acbb03031fb654dd2
Bug 16678: updatedatabase.pl 3.23.00.006 DB upgrade crashes if subscription_numberpatterns.numberingmethod contains parentheses

It seems that if subscription_numberpatterns.numberingmethod contains
parentheses, updatedatabase.pl crashes when running the 3.23.00.006 DB upgrade
snippet, with the following error:

[Mon Jun 6 09:06:54 2016] updatedatabase.pl: Unmatched ( in regex; marked by
<-- HERE in m/ ( <-- HERE / at
/home/koha/kohaclone/installer/data/mysql/updatedatabase.pl line 11498.

Steps to reproduce:
1/ Have a Koha DB version<3.23.00.006
2/ Create a subscription numbering with parentheses in it:
   ie "Vol. (Month, Year)" with pattern
       Vol. {X} ({Y}, {Z})
3/ Add some serials using that numbering method so that serialseq is filled in DB:
   ie  "Vol. 16 (February, 2015)"
4/ Run the updatedatabase.pl script either from the cli or just start the webinstaller
5/ The error is produced

To test:
1/ apply patch
2/ try to reproduce this issue once again, should be fixed now
3/ have a look at the code, make sure the changes are consistent

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Note: I have not tested the patch, but the diff looks good.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit 113adf68e56b6233b44a2b7a9b5dc60f6c4de0b7)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
installer/data/mysql/updatedatabase.pl