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

--- Comment #4 from M. Tompsett <[email protected]> ---
Comment on attachment 70385
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70385
Bug 19943: Koha::GetBiblioItemData - Replace existing occurrences

Review of attachment 70385:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=19943&attachment=70385)
-----------------------------------------------------------------

::: circ/bookcount.pl
@@ +39,5 @@
>  my $biblionumber = $input->param('biblionumber');
>  
>  my $idata = itemdatanum($itm);
> +my $biblio = Koha::Biblios->find( $biblionumber );
> +die "No valid biblionumber passed" unless $biblio; # FIXME A bit rude!

I believe if you purposefully call bookcount.pl directly so as to trigger this,
GetBiblioItemData wouldn't die this way in the old code. Also, you can only
call this from an existing catalogue/moredetail.tt page.
Perhaps the uglier:
$data = $biblio ? $biblio->unblessed : {};

::: t/db_dependent/Biblio.t
@@ +198,5 @@
>      is( $marc->subfield( $title_field, $title_subfield ), $title, );
>  
> +    my $biblioitem = Koha::Biblioitems->find( $biblioitemnumber );
> +    is( $biblioitem->_result->biblio->title, $title, # Should be 
> $biblioitem->biblio instead, but not needed elsewhere for now
> +        'Do not know if this makes sense - compare result of previous two 
> GetBiblioData tests.');

This test was proving that the GetBiblioItemData function worked by confirming
that the title set in the Biblio was the one retrieved in this function. Given
that this bug patch set removes the function, I'm not sure this test is needed
at all. I'd recommend removing this one test.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to