Bug 27530: Set correct dateofbirth for 'C'

Categories B, J, K and YA have a upper age limit of 17 years.
We are setting the dateofbirth to today - 15 years to prevent juvenils
to be 70!

Note that DATE_SUB is a MySQLism, but there is no way to be portable
here.

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

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit b647aff01d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2021-01-27 10:22:27 +01:00 committed by Fridolin Somers
parent c2f9610e3f
commit 23dd20a9ce
1 changed files with 3 additions and 0 deletions

View File

@ -2424,3 +2424,6 @@ tables:
flags: ~
sort1: 0.91641750830823
sort2: 0.27291712562825
sql_statements:
- "UPDATE borrowers SET dateofbirth=DATE_SUB(CAST(NOW() AS DATE), INTERVAL 15 YEAR) WHERE categorycode IN ('B', 'J', 'K', 'YA');"