[Koha-bugs] [Bug 22544] Move C4:NewsChannels to Koha namespace

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 17 12:08:23 CET 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22544

--- Comment #108 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
(In reply to Jonathan Druart from comment #104)
> 1. cf last comment

Done.

> 2. -            $_->{'timestamp'} = $_->{'newdate'};
> you are loosing the ability to use "timestamp" in the the letter

Done.

> 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.

Done.

> 4. 
> +    $search_params->{published_on} = { '<=' => \'NOW()' };
> +    $search_params->{-or} = [ expirationdate => { '>=' => \'NOW()' },
> 
> use dt_from_string instead of NOW

Not done, this was not valid, we can use 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.

Done, see bug 27714.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list