From c4b4db21d2586fd95de942d38913d5142f694563 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 Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy [EDIT] Fixed typo pubished_on Signed-off-by: Jonathan Druart --- 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.39.5