[Koha-bugs] [Bug 22544] Move C4:NewsChannels to Koha namespace
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Jan 29 10:37:39 CET 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22544
--- Comment #104 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
1. cf last comment
2. - $_->{'timestamp'} = $_->{'newdate'};
you are loosing the ability to use "timestamp" in the the letter
3. + my $all = $n->unblessed_all_relateds;
you should not use unblessed_all_relateds.
Here we need the attributes of the news and the patron's info. We could built
it easily before passing it to the letter.
4.
+ $search_params->{published_on} = { '<=' => \'NOW()' };
+ $search_params->{-or} = [ expirationdate => { '>=' => \'NOW()' },
use dt_from_string instead of NOW
5.
sub author {
my ( $self ) = @_;
- return Koha::Patron->_new_from_dbic($self->_result->borrowernumber);
+ my $author_rs = $self->_result->borrowernumber;
+ return unless $author_rs;
+ return Koha::Patron->_new_from_dbic( $author_rs );
}
This is actually a bugfix that could go on its own bug report.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list