Bugzilla – Attachment 153875 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: Add Koha::Object(s) for tmp_holdsqueue
Bug-28966-Add-KohaObjects-for-tmpholdsqueue.patch (text/plain), 4.30 KB, created by
Kyle M Hall (khall)
on 2023-07-25 13:44:14 UTC
(
hide
)
Description:
Bug 28966: Add Koha::Object(s) for tmp_holdsqueue
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-07-25 13:44:14 UTC
Size:
4.30 KB
patch
obsolete
>From bc08a68481398a80dd2baee70c16e8eaa066daff Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Wed, 9 Nov 2022 12:09:34 -0500 >Subject: [PATCH] Bug 28966: Add Koha::Object(s) for tmp_holdsqueue > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > C4/HoldsQueue.pm | 3 +- > Koha/Hold/HoldsQueueItem.pm | 46 +++++++++++++++++++++++ > Koha/Hold/HoldsQueueItems.pm | 57 +++++++++++++++++++++++++++++ > Koha/Schema/Result/TmpHoldsqueue.pm | 12 +++++- > 4 files changed, 116 insertions(+), 2 deletions(-) > create mode 100644 Koha/Hold/HoldsQueueItem.pm > create mode 100644 Koha/Hold/HoldsQueueItems.pm > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 4884f6570e..6f0c755360 100644 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -25,9 +25,10 @@ use warnings; > use C4::Context; > use C4::Circulation qw( GetBranchItemRule ); > use Koha::DateUtils qw( dt_from_string ); >+use Koha::HoldsQueueItems; > use Koha::Items; >-use Koha::Patrons; > use Koha::Libraries; >+use Koha::Patrons; > > use List::Util qw( shuffle ); > use List::MoreUtils qw( any ); >diff --git a/Koha/Hold/HoldsQueueItem.pm b/Koha/Hold/HoldsQueueItem.pm >new file mode 100644 >index 0000000000..986ec969e6 >--- /dev/null >+++ b/Koha/Hold/HoldsQueueItem.pm >@@ -0,0 +1,46 @@ >+package Koha::Hold::HoldsQueueItem; >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use Koha::Database; >+ >+use base qw(Koha::Object); >+ >+=head1 NAME >+ >+Koha::Hold::HoldsQueueItem - Koha hold cancellation request Object class >+ >+=head1 API >+ >+=head2 Internal methods >+ >+=head3 _type >+ >+=cut >+ >+sub _type { >+ return 'TmpHoldsqueue'; >+} >+ >+=head1 AUTHORS >+ >+Kyle Hall <kyle@bywatersolutions.com> >+ >+=cut >+ >+1; >diff --git a/Koha/Hold/HoldsQueueItems.pm b/Koha/Hold/HoldsQueueItems.pm >new file mode 100644 >index 0000000000..4b99ed85a9 >--- /dev/null >+++ b/Koha/Hold/HoldsQueueItems.pm >@@ -0,0 +1,57 @@ >+package Koha::Hold::HoldsQueueItems; >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+ >+use Koha::Database; >+ >+use Koha::Hold::HoldsQueueItem; >+ >+use base qw(Koha::Objects); >+ >+=head1 NAME >+ >+Koha::Hold::HoldsQueueItems - Koha hold cancellation requests Object set class >+ >+=head1 API >+ >+=head2 Internal methods >+ >+=head3 _type >+ >+=cut >+ >+sub _type { >+ return 'TmpHoldsqueue'; >+} >+ >+=head3 object_class >+ >+=cut >+ >+sub object_class { >+ return 'Koha::Hold::HoldsQueueItem'; >+} >+ >+=head1 AUTHORS >+ >+Kyle Hall <kyle@bywatersolutions.com> >+ >+=cut >+ >+1; >diff --git a/Koha/Schema/Result/TmpHoldsqueue.pm b/Koha/Schema/Result/TmpHoldsqueue.pm >index 756c9325e4..882a91ad0c 100644 >--- a/Koha/Schema/Result/TmpHoldsqueue.pm >+++ b/Koha/Schema/Result/TmpHoldsqueue.pm >@@ -220,6 +220,16 @@ __PACKAGE__->belongs_to( > # Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-11-04 22:42:42 > # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RdIrLi+vbzj3ab/UP7e9pw > >+__PACKAGE__->add_columns( >+ '+item_level_request' => { is_boolean => 1 } >+); >+ >+sub koha_object_class { >+ 'Koha::HoldsQueueItem'; >+} >+ >+sub koha_objects_class { >+ 'Koha::HoldsQueueItems'; >+} > >-# You can replace this text with custom content, and it will be preserved on regeneration > 1; >-- >2.30.2
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