View | Details | Raw Unified | Return to bug 17499
Collapse All | Expand All

(-)a/Koha/MessageAttribute.pm (-43 lines)
Lines 1-43 Link Here
1
package Koha::MessageAttribute;
2
3
# Copyright PTFS Europe 2020
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
22
23
use base qw(Koha::Object);
24
25
=head1 NAME
26
27
Koha::MessageAttribute - Koha MessageAttribute Object class
28
29
=head1 API
30
31
=head2 Internal methods
32
33
=cut
34
35
=head3 _type
36
37
=cut
38
39
sub _type {
40
    return 'MessageAttribute';
41
}
42
43
1;
(-)a/Koha/MessageAttributes.pm (-52 lines)
Lines 1-52 Link Here
1
package Koha::MessageAttributes;
2
3
# Copyright PTFS Europe 2020
4
#
5
# This file is part of Koha.
6
#
7
# Koha is free software; you can redistribute it and/or modify it
8
# under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 3 of the License, or
10
# (at your option) any later version.
11
#
12
# Koha is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU General Public License for more details.
16
#
17
# You should have received a copy of the GNU General Public License
18
# along with Koha; if not, see <http://www.gnu.org/licenses>.
19
20
use Modern::Perl;
21
22
23
use base qw(Koha::Objects);
24
use Koha::MessageAttribute;
25
26
=head1 NAME
27
28
Koha::MessageAttributes - Koha MessageAttributes Object set class
29
30
=head1 API
31
32
=head2 Internal methods
33
34
=cut
35
36
=head3 _type
37
38
=cut
39
40
sub _type {
41
    return 'MessageAttribute';
42
}
43
44
=head3 object_class
45
46
=cut
47
48
sub object_class {
49
    return 'Koha::MessageAttribute';
50
}
51
52
1;
(-)a/t/db_dependent/Illrequests.t (-4 / +3 lines)
Lines 29-35 use Koha::Patrons; Link Here
29
use Koha::ItemTypes;
29
use Koha::ItemTypes;
30
use Koha::Items;
30
use Koha::Items;
31
use Koha::Libraries;
31
use Koha::Libraries;
32
use Koha::MessageAttributes;
32
use Koha::Patron::MessagePreference::Attributes;
33
use Koha::Notice::Templates;
33
use Koha::Notice::Templates;
34
use Koha::AuthorisedValueCategories;
34
use Koha::AuthorisedValueCategories;
35
use Koha::AuthorisedValues;
35
use Koha::AuthorisedValues;
Lines 1004-1010 subtest 'Helpers' => sub { Link Here
1004
    is($illrq_obj->requires_moderation, 'CANCREQ', "requires_moderation: Yes.");
1004
    is($illrq_obj->requires_moderation, 'CANCREQ', "requires_moderation: Yes.");
1005
1005
1006
    #send_patron_notice
1006
    #send_patron_notice
1007
    my $attr = Koha::MessageAttributes->find({ message_name => 'Ill_ready' });
1007
    my $attr = Koha::Patron::MessagePreference::Attributes->find({ message_name => 'Ill_ready' });
1008
    C4::Members::Messaging::SetMessagingPreference({
1008
    C4::Members::Messaging::SetMessagingPreference({
1009
        borrowernumber => $patron->{borrowernumber},
1009
        borrowernumber => $patron->{borrowernumber},
1010
        message_attribute_id => $attr->message_attribute_id,
1010
        message_attribute_id => $attr->message_attribute_id,
Lines 1024-1030 subtest 'Helpers' => sub { Link Here
1024
    is($notice, 'ILL_PICKUP_READY' ,"Notice is correctly created");
1024
    is($notice, 'ILL_PICKUP_READY' ,"Notice is correctly created");
1025
1025
1026
    # ill update notice, passes additional text parameter
1026
    # ill update notice, passes additional text parameter
1027
    my $attr_update = Koha::MessageAttributes->find({ message_name => 'Ill_update' });
1027
    my $attr_update = Koha::Patron::MessagePreference::Attributes->find({ message_name => 'Ill_update' });
1028
    C4::Members::Messaging::SetMessagingPreference({
1028
    C4::Members::Messaging::SetMessagingPreference({
1029
        borrowernumber => $patron->{borrowernumber},
1029
        borrowernumber => $patron->{borrowernumber},
1030
        message_attribute_id => $attr_update->message_attribute_id,
1030
        message_attribute_id => $attr_update->message_attribute_id,
1031
- 

Return to bug 17499