From 0e1659c09cc15b01da8ebb64d7eb198d55860306 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 17 Feb 2021 11:59:51 +0100 Subject: [PATCH] Bug 22544: Restore newdate and timestamp for slip notices Content-Type: text/plain; charset=utf-8 Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy [EDIT] Fixed typo pubished_on --- C4/Members.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/C4/Members.pm b/C4/Members.pm index 3a0bc05bcc..301e6f7e10 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -595,6 +595,13 @@ sub IssueSlip { my @news; while ( my $n = $news->next ) { my $all = $n->unblessed_all_relateds; + + # FIXME We keep newdate and timestamp for backward compatibility (from GetNewsToDisplay) + # But we should remove them and adjust the existing templates in a db rev + my $published_on_dt = output_pref({ dt => dt_from_string( $all->{published_on} ), dateonly => 1 }); + $all->{newdate} = $published_on_dt; + $all->{timestamp} = $published_on_dt; + push @news, { opac_news => $all, }; -- 2.20.1