Bugzilla – Attachment 155376 Details for
Bug 17499
Koha objects for messaging preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17499: Replace Koha::MessageAttribute(s) with Koha::Patron::MessagePreference::Attribute(s)
Bug-17499-Replace-KohaMessageAttributes-with-KohaP.patch (text/plain), 4.72 KB, created by
Marcel de Rooy
on 2023-09-08 08:02:45 UTC
(
hide
)
Description:
Bug 17499: Replace Koha::MessageAttribute(s) with Koha::Patron::MessagePreference::Attribute(s)
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2023-09-08 08:02:45 UTC
Size:
4.72 KB
patch
obsolete
>From c83025f53aa25098ca11b0e271b962ac19f5e515 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Fri, 10 Feb 2023 10:48:19 +0000 >Subject: [PATCH] Bug 17499: Replace Koha::MessageAttribute(s) with > Koha::Patron::MessagePreference::Attribute(s) >Content-Type: text/plain; charset=utf-8 > >To test: >1. prove t/db_dependent/Illrequests.t >2. grep -rn 'Koha::MessageAttribute', observe no results in Koha code > >Signed-off-by: Sam Lau <samalau@gmail.com> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > 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 > >diff --git a/Koha/MessageAttribute.pm b/Koha/MessageAttribute.pm >deleted file mode 100644 >index c728b3415f..0000000000 >--- a/Koha/MessageAttribute.pm >+++ /dev/null >@@ -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 <http://www.gnu.org/licenses>. >- >-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; >diff --git a/Koha/MessageAttributes.pm b/Koha/MessageAttributes.pm >deleted file mode 100644 >index 5bc7057508..0000000000 >--- a/Koha/MessageAttributes.pm >+++ /dev/null >@@ -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 <http://www.gnu.org/licenses>. >- >-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; >diff --git a/t/db_dependent/Illrequests.t b/t/db_dependent/Illrequests.t >index 178b89c327..c2e54ec987 100755 >--- a/t/db_dependent/Illrequests.t >+++ b/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, >-- >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 17499
:
63427
|
63428
|
63429
|
63430
|
63431
|
63432
|
63433
|
63434
|
63786
|
63787
|
63788
|
63789
|
63790
|
63791
|
63792
|
63793
|
63801
|
63802
|
63803
|
63804
|
63805
|
63806
|
63807
|
63808
|
63809
|
63810
|
63811
|
63812
|
63878
|
63895
|
64035
|
64036
|
64037
|
64038
|
64039
|
64040
|
64041
|
64042
|
64043
|
64044
|
64795
|
66686
|
69434
|
69435
|
69458
|
91864
|
93863
|
93865
|
93872
|
94748
|
99479
|
99634
|
99668
|
99669
|
99670
|
103441
|
103442
|
103443
|
106653
|
106654
|
106655
|
106656
|
106657
|
107612
|
107613
|
107614
|
107615
|
107616
|
113010
|
113011
|
113127
|
113129
|
113686
|
113687
|
113765
|
113766
|
113767
|
113768
|
118452
|
118453
|
119470
|
119471
|
119472
|
119473
|
119474
|
119475
|
119476
|
119477
|
119478
|
119479
|
119480
|
119481
|
119482
|
119483
|
119484
|
119485
|
119486
|
119487
|
119488
|
119489
|
119490
|
119491
|
141408
|
141409
|
141410
|
141411
|
141412
|
141413
|
141414
|
141415
|
141416
|
141417
|
141418
|
146529
|
146530
|
146531
|
146532
|
146533
|
146534
|
146535
|
146536
|
146537
|
146538
|
146539
|
146540
|
151900
|
151901
|
151902
|
151903
|
151904
|
151905
|
151906
|
151907
|
151908
|
151909
|
151910
|
151911
|
151937
|
151938
|
151939
|
151940
|
151941
|
151942
|
151943
|
151944
|
151945
|
151946
|
151947
|
151948
|
155365
|
155366
|
155367
|
155368
|
155369
|
155370
|
155371
|
155372
|
155373
|
155374
|
155375
| 155376