Bug 28966: Add Koha::Object(s) for tmp_holdsqueue

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Kyle Hall 2022-11-09 12:09:34 -05:00 committed by Tomas Cohen Arazi
parent 3c90dbcb82
commit e997b4b3a3
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
4 changed files with 116 additions and 2 deletions

View File

@ -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 );

View File

@ -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;

View File

@ -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;

View File

@ -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;