https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697
--- Comment #32 from Martin Renvoize <[email protected]> --- Comment on attachment 134069 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134069 Bug 29697: Use flag embed_items Review of attachment 134069: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=29697&attachment=134069) ----------------------------------------------------------------- This is a great start, but I think we can golf this between us next cycle and come up with something considerably cleaner working towards efficiency ::: Koha/Biblio/Metadata.pm @@ +65,5 @@ > + biblionumber => $biblionumber, > + itemnumbers => $itemnumbers, > + opac => $opac > + } > + ); I think I'd rather see a distinct ->filtered_record() method as opposed to adding filtering functionality into the existing method..? @@ +67,5 @@ > + opac => $opac > + } > + ); > + > +Given a MARC::Record object containing a bib record, You've made this a class method as well as an object method now I see.. the POD isn't entirely clear though.. we can work on that. @@ +72,5 @@ > +modify it to include the items attached to it as 9XX > +per the bib's MARC framework. > +if $itemnumbers is defined, only specified itemnumbers are embedded. > + > +If $opac is true, then opac-relevant suppressions are included. Actually.. as far as I can tell.. you're only doing OPAC filtering on the embedded items.. I'd love to have seem RecordProcessor used here and the actual record to get fully filtered using the framework display stuff.. @@ +170,5 @@ > + for my $itemnumber ( @itemnumbers ) { > + my $item_marc = C4::Items::GetMarcItem( $biblionumber, > $itemnumber ); > + push @item_fields, $item_marc->field($itemtag); > + } > + $record->append_fields(@item_fields); We should use Koha::Filter::EmbedItems here.. this is exactly what it was designed for I reckon. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://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/
