From 11b5b4408e92e7f5390606ea89b31208f35b92b3 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 --- C4/Members.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/C4/Members.pm b/C4/Members.pm index e277c590bf..b57d8f2057 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->{pubished_on} ), dateonly => 1 }); + $all->{newdate} = $published_on_dt; + $all->{timestamp} = $published_on_dt; + push @news, { opac_news => $all, }; -- 2.20.1