From 10ff1cd1017a9c7498b6128c066bfff8c4887b2d Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 27 May 2016 14:12:20 +0000 Subject: [PATCH] Bug 16612 - Cannot set "Until date" for "Enrollment period" for Patron Categories MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Attempting to set an "Until date" date for "Enrollment period" will result in the date being accepted but not saved. Test Plan: 1) Attempt to set an enrollment period until date for a new patron category 2) Note the period is not saved 3) Apply this patch 4) Attempt to set the enrollment period date again 5) This time it should save! Signed-off-by: Andrew Brenza Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall (cherry picked from commit 2af028bb13273d2b13f6e5cf417436fc0c8764f7) Signed-off-by: Frédéric Demians (cherry picked from commit 90d3635fedb18acb652134e1541827a888e1bef5) Signed-off-by: Julian Maurice --- admin/categorie.pl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/admin/categorie.pl b/admin/categorie.pl index 6df4051c65..533d741599 100755 --- a/admin/categorie.pl +++ b/admin/categorie.pl @@ -95,8 +95,14 @@ elsif ( $op eq 'add_validate' ) { my $is_a_modif = $input->param("is_a_modif"); - if ( $enrolmentperioddate ) { - $enrolmentperioddate = output_pref({ dt => dt_from_string($enrolmentperioddate), dateformat => 'iso' }); + if ($enrolmentperioddate) { + $enrolmentperioddate = output_pref( + { + dt => dt_from_string($enrolmentperioddate), + dateformat => 'iso', + dateonly => 1, + } + ); } if ($is_a_modif) { -- 2.39.5