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

--- Comment #22 from Jonathan Druart <jonathan.dru...@bugs.koha-community.org> 
---
David, I was talking about something like that:
diff --git a/C4/Biblio.pm b/C4/Biblio.pm
index b26c767ef8..373d9f8330 100644
--- a/C4/Biblio.pm
+++ b/C4/Biblio.pm
@@ -2840,7 +2840,7 @@ sub EmbedItemsInMarcBiblio {
         && ( C4::Context->preference('OpacHiddenItems') !~ /^\s*$/ );
     require C4::Items;

-    my $items = C4::Items::GetItems($itemnumbers);
+    my $items = Koha::Items->search({ itemnumber => { -in => $itemnumbers }
})->unblessed;
     if ($opachiddenitems) {
         my %hidden_items = map { $_ => undef }
C4::Items::GetHiddenItemnumbers(@{$items});
         # Reduce items to non hidden items
diff --git a/Koha/Item.pm b/Koha/Item.pm
index bea05f8317..73306f54a2 100644
--- a/Koha/Item.pm
+++ b/Koha/Item.pm
@@ -235,6 +235,14 @@ sub current_holds {
     return Koha::Holds->_new_from_dbic($hold_rs);
 }

+sub unblessed {
+    my ($self) = @_;
+    my $itype = $self->effective_itemtype;
+    my $h = $self->SUPER->unblessed;
+    $h->{itype} = $itype;
+    return $h;
+}

Can you share the script you use to benchmark, I could use it to compare
different situations.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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