Steps to reproduce: 1. Verify that in the default MARC framework there is a field linked to biblioitems.publicationyear (typically it's 210$d for UNIMARC) 2. Create a biblio with a non ISO-formatted date in this field. It can be a "YYYY" year for instance. Create an item for this biblio. 3. Try to place a hold on this biblio. You should get an internal server error and the following message in the logs: Template process failed: undef error - The given date (2013) does not match the date format (iso) at /home/koha/src/Koha/DateUtils.pm line 204. It looks like the problem was introduced by bug 29660 which replaces an 'html' filter by a '$KohaDates' filter for publicationyear
Created attachment 132390 [details] [review] Bug 30395: Fix TT filtering of publicationyear in reserve/request.tt biblioitems.publicationyear is not a date (it can be, but we cannot guarantee that) so the $KohaDates filter should not be used on this data Test plan: 1. Verify that in the default MARC framework there is a field linked to biblioitems.publicationyear (typically it's 210$d for UNIMARC) 2. Create a biblio with a non ISO-formatted date in this field. It can be a "YYYY" year for instance. Create an item for this biblio. 3. Try to place a hold on this biblio. If it works, you can sign off
Created attachment 132560 [details] [review] Bug 30395: Fix TT filtering of publicationyear in reserve/request.tt biblioitems.publicationyear is not a date (it can be, but we cannot guarantee that) so the $KohaDates filter should not be used on this data Test plan: 1. Verify that in the default MARC framework there is a field linked to biblioitems.publicationyear (typically it's 210$d for UNIMARC) 2. Create a biblio with a non ISO-formatted date in this field. It can be a "YYYY" year for instance. Create an item for this biblio. 3. Try to place a hold on this biblio. If it works, you can sign off Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr>
Hi, I checked the MARC mapping, and I have biblioitems.publicationyear -> 210$d I chose a biblio record where 210$d = 2003 I went to place a hold from the biblio and I didn't have an "internal server error" \o/
Created attachment 132698 [details] [review] Bug 30395: Fix TT filtering of publicationyear in reserve/request.tt biblioitems.publicationyear is not a date (it can be, but we cannot guarantee that) so the $KohaDates filter should not be used on this data Test plan: 1. Verify that in the default MARC framework there is a field linked to biblioitems.publicationyear (typically it's 210$d for UNIMARC) 2. Create a biblio with a non ISO-formatted date in this field. It can be a "YYYY" year for instance. Create an item for this biblio. 3. Try to place a hold on this biblio. If it works, you can sign off Signed-off-by: Sonia <sonia.bouis@univ-lyon3.fr> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 22.05, thanks to everybody involved [U+1F984]