Bugzilla – Attachment 63197 Details for
Bug 12532
Copy guarantee email to guarantor (or redirect if guarantee has no email set)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Delete a dupilcated row in systempreferences table
Delete-a-dupilcated-row-in-systempreferences-table.patch (text/plain), 7.38 KB, created by
Philippe Audet-Fortin
on 2017-05-05 18:20:24 UTC
(
hide
)
Description:
Delete a dupilcated row in systempreferences table
Filename:
MIME Type:
Creator:
Philippe Audet-Fortin
Created:
2017-05-05 18:20:24 UTC
Size:
7.38 KB
patch
obsolete
>From e3bb332f683753ba1ca05a0d2cbbf98088588251 Mon Sep 17 00:00:00 2001 >From: Philippe <philippe.audet-fortin@inlibro.com> >Date: Fri, 5 May 2017 13:53:21 -0400 >Subject: [PATCH] Delete a dupilcated row in systempreferences table > >Deleted RedirectGuaranteeEmail from systempreference table. >Both RedirectGuaranteeEmail and EnableRedirectGuaranteeEmail were use for >the same raison and RedirectGuaranteeEmail was only use for test. >Repalced all occurences with EnableRedirectGuaranteeEmail. > >https://bugs.koha-community.org/show_bug.cgi?id=12532 >--- > C4/Members.pm | 4 ++-- > .../bug_12532-EnableRedirectGuaranteeEmail_syspref.sql | 2 +- > installer/data/mysql/sysprefs.sql | 1 - > .../prog/en/modules/admin/preferences/patrons.pref | 2 +- > t/db_dependent/Letters.t | 10 +++++----- > t/db_dependent/Members.t | 8 ++++---- > 6 files changed, 13 insertions(+), 14 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 4db88ea..d50ab13 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -1019,8 +1019,8 @@ sub GetNoticeEmailAddress { > my $to_address = $which_address eq 'OFF' ? GetFirstValidEmailAddress($member->{'borrowernumber'}) : $member->{ $which_address }; > my $guarantor_to_address = $which_address eq 'OFF' ? GetFirstValidEmailAddress($guarantor->{'borrowernumber'}) : $guarantor->{ $which_address } if $guarantor; > $to_address .="," . $guarantor_to_address if $guarantor_to_address; >- >- return $to_address || ''; >+ >+ return $to_address || ''; > } > > =head2 GetBorrowersToExpunge >diff --git a/installer/data/mysql/atomicupdate/bug_12532-EnableRedirectGuaranteeEmail_syspref.sql b/installer/data/mysql/atomicupdate/bug_12532-EnableRedirectGuaranteeEmail_syspref.sql >index 11fb97e..2e08159 100644 >--- a/installer/data/mysql/atomicupdate/bug_12532-EnableRedirectGuaranteeEmail_syspref.sql >+++ b/installer/data/mysql/atomicupdate/bug_12532-EnableRedirectGuaranteeEmail_syspref.sql >@@ -1,2 +1,2 @@ > INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) >-VALUES ('RedirectGuaranteeEmail','0',NULL,'Enable the ability to redirect guarantee email messages to guarantor.','YesNo'); >+VALUES ('EnableRedirectGuaranteeEmail','0',NULL,'Enable the ability to redirect guarantee email messages to guarantor.','YesNo'); >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 7791404..3e0f93b 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -148,7 +148,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('EnableAdvancedCatalogingEditor','0','','Enable the Rancor advanced cataloging editor','YesNo'), > ('EnableBorrowerFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to a borrower record.','YesNo'), > ('EnableOpacSearchHistory','1','YesNo','Enable or disable opac search history',''), >-('RedirectGuaranteeEmail', '0', NULL, 'Enable the ability to redirect guarantee email messages to guarantor.', 'YesNo'), > ('EnableSearchHistory','0','','Enable or disable search history','YesNo'), > ('EnhancedMessagingPreferences','0','','If ON, allows patrons to select to receive additional messages about items due or nearly due.','YesNo'), > ('EnhancedMessagingPreferencesOPAC', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >index 3d7af15..669d782 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref >@@ -192,7 +192,7 @@ Patrons: > - track last patron activity. > - Everytime a patron will connect, the borrowers.lastseen will be updated with the current time. > - >- - pref: RedirectGuaranteeEmail >+ - pref: EnableRedirectGuaranteeEmail > choices: > yes: Enable > no: "Don't enable" >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index d4c7ce5..01b485c 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -183,7 +183,7 @@ my $guarantee_message = { > sub SendToGuarantor { > my ($useGuarantor, $message) = @_; > C4::Context->set_preference( 'AutoEmailPrimaryAddress', 'OFF' ); >- C4::Context->set_preference( 'RedirectGuaranteeEmail', $useGuarantor ); >+ C4::Context->set_preference( 'EnableRedirectGuaranteeEmail', $useGuarantor ); > C4::Context->clear_syspref_cache(); > my $id = C4::Letters::EnqueueLetter($message); > C4::Letters::SendQueuedMessages(); >@@ -191,12 +191,12 @@ sub SendToGuarantor { > return $result; > } > my $result = SendToGuarantor(0,$guarantee_message); >-is($result->{'status'}, "sent", "With RedirectGuaranteeEmail off, message is sent."); >-is($result->{'to_address'}, $GUARANTEE_TO_ADDRESS, "With RedirectGuaranteeEmail off, Message is sent to the specified to_address."); >+is($result->{'status'}, "sent", "With EnableRedirectGuaranteeEmail off, message is sent."); >+is($result->{'to_address'}, $GUARANTEE_TO_ADDRESS, "With EnableRedirectGuaranteeEmail off, Message is sent to the specified to_address."); > > $result = SendToGuarantor(1,$guarantee_message); >-is($result->{'status'}, "sent", "With RedirectGuaranteeEmail on, message is sent."); >-is($result->{'to_address'}, $GUARANTOR_EMAIL, "With RedirectGuaranteeEmail on, Message is sent to the guarantor's email address."); >+is($result->{'status'}, "sent", "With EnableRedirectGuaranteeEmail on, message is sent."); >+is($result->{'to_address'}, $GUARANTOR_EMAIL, "With EnableRedirectGuaranteeEmail on, Message is sent to the guarantor's email address."); > > # GetLetters > my $letters = C4::Letters::GetLetters(); >diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t >index 839b1b7..dec9c0d 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -139,7 +139,7 @@ is ($checkcardnum, "2", "Card number is too long"); > > t::lib::Mocks::mock_preference( 'AutoEmailPrimaryAddress', 'OFF' ); > >-C4::Context->set_preference( 'RedirectGuaranteeEmail', 0 ); >+C4::Context->set_preference( 'EnableRedirectGuaranteeEmail', 0 ); > C4::Context->set_preference( 'AutoEmailPrimaryAddress', 'OFF' ); > C4::Context->clear_syspref_cache(); > >@@ -164,13 +164,13 @@ my $guarantee = { > $guarantee->{'borrowernumber'} = AddMember(%$guarantee); > > $notice_email = GetNoticeEmailAddress($guarantee->{'borrowernumber'}); >-is ($notice_email, $GUARANTEE_EMAIL, "GetNoticeEmailAddress returns correct value when RedirectGuaranteeEmail is disabled"); >+is ($notice_email, $GUARANTEE_EMAIL, "GetNoticeEmailAddress returns correct value when EnableRedirectGuaranteeEmail is disabled"); > >-C4::Context->set_preference( 'RedirectGuaranteeEmail', 1 ); >+C4::Context->set_preference( 'EnableRedirectGuaranteeEmail', 1 ); > C4::Context->clear_syspref_cache(); > > $notice_email = GetNoticeEmailAddress($guarantee->{'borrowernumber'}); >-is ($notice_email, "$GUARANTEE_EMAIL,$EMAILPRO", "GetNoticeEmailAddress returns correct value when RedirectGuaranteeEmail is activated"); >+is ($notice_email, "$GUARANTEE_EMAIL,$EMAILPRO", "GetNoticeEmailAddress returns correct value when EnableRedirectGuaranteeEmail is activated"); > > > ok(!$member->{is_expired}, "GetMemberDetails() indicates that patron is not expired"); >-- >1.9.1
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 12532
:
29510
|
30747
|
35313
|
36752
|
39787
|
39925
|
48645
|
53649
|
53689
|
53690
|
53699
|
53700
|
55985
|
56052
|
56053
|
59445
|
59446
|
59447
|
63197
|
64802
|
64824
|
67115
|
68340
|
70865
|
72064
|
72617
|
75099
|
77606
|
80313
|
85134
|
85135
|
87815
|
87816
|
88208
|
88209
|
88210
|
88211
|
88212
|
88213
|
88295
|
88296
|
114455
|
114456
|
114457
|
114458
|
114459
|
114460
|
114461
|
131091
|
131092
|
131093
|
131094
|
149233
|
150071
|
150208
|
150217
|
150240
|
150256
|
151028
|
151029
|
154854
|
154855
|
154856
|
154857
|
155036
|
155037
|
155828
|
155829
|
155830
|
155831
|
155832
|
155833
|
155834
|
155835
|
155836
|
155837
|
155873
|
155874
|
155875
|
155876
|
155877
|
155878
|
155879
|
155880
|
155881
|
155882
|
155883
|
155886
|
155934
|
155935
|
155936
|
155937
|
155938
|
155939
|
155940
|
155941
|
155942
|
155943
|
155944
|
155945
|
155946