@@ -, +, @@ Koha::Patron::MessagePreference::Attribute(s) --- Koha/MessageAttribute.pm | 43 ----------------------------- Koha/MessageAttributes.pm | 52 ------------------------------------ t/db_dependent/Illrequests.t | 6 ++--- 3 files changed, 3 insertions(+), 98 deletions(-) delete mode 100644 Koha/MessageAttribute.pm delete mode 100644 Koha/MessageAttributes.pm --- a/Koha/MessageAttribute.pm +++ a/Koha/MessageAttribute.pm @@ -1,43 +0,0 @@ -package Koha::MessageAttribute; - -# Copyright PTFS Europe 2020 -# -# 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 . - -use Modern::Perl; - - -use base qw(Koha::Object); - -=head1 NAME - -Koha::MessageAttribute - Koha MessageAttribute Object class - -=head1 API - -=head2 Internal methods - -=cut - -=head3 _type - -=cut - -sub _type { - return 'MessageAttribute'; -} - -1; --- a/Koha/MessageAttributes.pm +++ a/Koha/MessageAttributes.pm @@ -1,52 +0,0 @@ -package Koha::MessageAttributes; - -# Copyright PTFS Europe 2020 -# -# 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 . - -use Modern::Perl; - - -use base qw(Koha::Objects); -use Koha::MessageAttribute; - -=head1 NAME - -Koha::MessageAttributes - Koha MessageAttributes Object set class - -=head1 API - -=head2 Internal methods - -=cut - -=head3 _type - -=cut - -sub _type { - return 'MessageAttribute'; -} - -=head3 object_class - -=cut - -sub object_class { - return 'Koha::MessageAttribute'; -} - -1; --- a/t/db_dependent/Illrequests.t +++ a/t/db_dependent/Illrequests.t @@ -29,7 +29,7 @@ use Koha::Patrons; use Koha::ItemTypes; use Koha::Items; use Koha::Libraries; -use Koha::MessageAttributes; +use Koha::Patron::MessagePreference::Attributes; use Koha::Notice::Templates; use Koha::AuthorisedValueCategories; use Koha::AuthorisedValues; @@ -1004,7 +1004,7 @@ subtest 'Helpers' => sub { is($illrq_obj->requires_moderation, 'CANCREQ', "requires_moderation: Yes."); #send_patron_notice - my $attr = Koha::MessageAttributes->find({ message_name => 'Ill_ready' }); + my $attr = Koha::Patron::MessagePreference::Attributes->find({ message_name => 'Ill_ready' }); C4::Members::Messaging::SetMessagingPreference({ borrowernumber => $patron->{borrowernumber}, message_attribute_id => $attr->message_attribute_id, @@ -1024,7 +1024,7 @@ subtest 'Helpers' => sub { is($notice, 'ILL_PICKUP_READY' ,"Notice is correctly created"); # ill update notice, passes additional text parameter - my $attr_update = Koha::MessageAttributes->find({ message_name => 'Ill_update' }); + my $attr_update = Koha::Patron::MessagePreference::Attributes->find({ message_name => 'Ill_update' }); C4::Members::Messaging::SetMessagingPreference({ borrowernumber => $patron->{borrowernumber}, message_attribute_id => $attr_update->message_attribute_id, --