[Koha-bugs] [Bug 19943] Koha::Biblio - Remove GetBiblioItemData

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 18 02:31:37 CET 2018


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

--- Comment #4 from M. Tompsett <mtompset at hotmail.com> ---
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.


More information about the Koha-bugs mailing list