@@ -, +, @@ OPAC Template process failed: undef error - The method Koha::NewsItem->author_title is not covered by tests! --- Koha/NewsItem.pm | 8 +++++++- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt | 7 ++++++- t/db_dependent/Koha/News.t | 9 ++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) --- a/Koha/NewsItem.pm +++ a/Koha/NewsItem.pm @@ -22,6 +22,7 @@ use Modern::Perl; use Carp; use Koha::Database; +use Koha::Patrons; use base qw(Koha::Object); @@ -37,7 +38,12 @@ Koha::NewsItem represents a single piece of news from the opac_news table =cut -=head3 type +sub author { + my ( $self ) = @_; + return Koha::Patron->_new_from_dbic($self->_result->borrowernumber); +} + +=head3 _type =cut --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt @@ -106,7 +106,12 @@