Bugzilla – Attachment 153939 Details for
Bug 28966
Holds queue viewer too slow to load for large numbers of holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28966: (QA follow-up) tmp_holdsqueue no longer an iterator
Bug-28966-QA-follow-up-tmpholdsqueue-no-longer-an-.patch (text/plain), 1.53 KB, created by
Tomás Cohen Arazi (tcohen)
on 2023-07-26 20:48:46 UTC
(
hide
)
Description:
Bug 28966: (QA follow-up) tmp_holdsqueue no longer an iterator
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2023-07-26 20:48:46 UTC
Size:
1.53 KB
patch
obsolete
>From 2fd6625abc2a3036979b77964ea274a4c65e945b Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 26 Jul 2023 17:45:41 -0300 >Subject: [PATCH] Bug 28966: (QA follow-up) tmp_holdsqueue no longer an > iterator > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Item.pm | 5 ++--- > t/db_dependent/Koha/Item.t | 1 + > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index 17791f2994e..96b5fa8b0f0 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -891,9 +891,8 @@ This method checks the tmp_holdsqueue to see if this item has been selected for > =cut > > sub has_pending_hold { >- my ( $self ) = @_; >- my $pending_hold = $self->_result->tmp_holdsqueues; >- return $pending_hold->count ? 1: 0; >+ my ($self) = @_; >+ return $self->_result->tmp_holdsqueue ? 1 : 0; > } > > =head3 has_pending_recall { >diff --git a/t/db_dependent/Koha/Item.t b/t/db_dependent/Koha/Item.t >index f63d3677d11..819f897e0e5 100755 >--- a/t/db_dependent/Koha/Item.t >+++ b/t/db_dependent/Koha/Item.t >@@ -364,6 +364,7 @@ subtest 'has_pending_hold() tests' => sub { > $dbh->do("INSERT INTO tmp_holdsqueue (surname,borrowernumber,itemnumber) VALUES ('Clamp',42,$itemnumber)"); > ok( $item->has_pending_hold, "Yes, we have a pending hold"); > $dbh->do("DELETE FROM tmp_holdsqueue WHERE itemnumber=$itemnumber"); >+ $item->discard_changes; > ok( !$item->has_pending_hold, "We don't have a pending hold if nothing in the tmp_holdsqueue"); > > $schema->storage->txn_rollback; >-- >2.41.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 28966
:
124626
|
124627
|
124628
|
124629
|
124639
|
124652
|
124854
|
125377
|
143583
|
143584
|
143857
|
143859
|
143860
|
145395
|
151733
|
151734
|
153120
|
153875
|
153876
|
153877
|
153878
|
153879
|
153880
|
153881
|
153882
|
153928
|
153929
| 153939