Bugzilla – Attachment 120747 Details for
Bug 28108
Move action logs 'SERIAL CLAIM' and 'ACQUISITION CLAIM' to a new 'CLAIMS' module
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28108: Fix filtering
Bug-28108-Fix-filtering.patch (text/plain), 8.19 KB, created by
Katrin Fischer
on 2021-05-09 14:49:52 UTC
(
hide
)
Description:
Bug 28108: Fix filtering
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-05-09 14:49:52 UTC
Size:
8.19 KB
patch
obsolete
>From 9f086518cd9bc4fc901babc79b28e211125bae7e Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 7 Apr 2021 14:25:24 +0100 >Subject: [PATCH] Bug 28108: Fix filtering >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > C4/Letters.pm | 4 ++-- > C4/UsageStats.pm | 2 +- > installer/data/mysql/atomicupdate/claimslog.perl | 14 ++++++++++++++ > installer/data/mysql/mandatory/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/logs.pref | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt | 4 ++-- > t/db_dependent/Letters.t | 8 ++++---- > t/db_dependent/UsageStats.t | 2 +- > 8 files changed, 26 insertions(+), 12 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/claimslog.perl > >diff --git a/C4/Letters.pm b/C4/Letters.pm >index d0e50982b6..03342f0428 100644 >--- a/C4/Letters.pm >+++ b/C4/Letters.pm >@@ -535,7 +535,7 @@ sub SendAlerts { > unless $success; > > logaction( >- "ACQUISITION", >+ "CLAIMS", > $action, > undef, > "To=" >@@ -544,7 +544,7 @@ sub SendAlerts { > . $letter->{title} > . " Content=" > . $letter->{content} >- ) if C4::Context->preference("LetterLog"); >+ ) if C4::Context->preference("ClaimsLog"); > } > # send an "account details" notice to a newly created user > elsif ( $type eq 'members' ) { >diff --git a/C4/UsageStats.pm b/C4/UsageStats.pm >index a74dd1fac0..1fa95bcb5f 100644 >--- a/C4/UsageStats.pm >+++ b/C4/UsageStats.pm >@@ -223,7 +223,7 @@ sub BuildReport { > CataloguingLog > FinesLog > IssueLog >- LetterLog >+ ClaimsLog > ReturnLog > SubscriptionLog > BiblioDefaultView >diff --git a/installer/data/mysql/atomicupdate/claimslog.perl b/installer/data/mysql/atomicupdate/claimslog.perl >new file mode 100644 >index 0000000000..8045b7d147 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/claimslog.perl >@@ -0,0 +1,14 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if ( CheckVersion($DBversion) ) { >+ $dbh->do(q{ >+ UPDATE action_logs SET module = 'CLAIMS' >+ WHERE module = 'ACQUISITIONS' AND ( action = 'SERIAL CLAIM' OR action = 'ACQUISITION ORDER' OR action = 'ACQUISITION CLAIM') >+ }); >+ >+ $dbh->do(q{ >+ UPDATE systempreferences SET variable = 'ClaimsLog' WHERE variable = 'LetterLog'; >+ }); >+ >+ # Always end with this (adjust the bug info) >+ NewVersion( $DBversion, XXXXX, "Description" ); >+} >diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql >index a422ca3ad0..2ae86ad3d2 100644 >--- a/installer/data/mysql/mandatory/sysprefs.sql >+++ b/installer/data/mysql/mandatory/sysprefs.sql >@@ -301,7 +301,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` > ('KohaManualLanguage','en','en|ar|cs|de|es|fr|it|pt_BR|tr|zh_TW','What is the language of the online manual you want to use?','Choice'), > ('LabelMARCView','standard','standard|economical','Define how a MARC record will display','Choice'), > ('language','en',NULL,'Set the default language in the staff interface.','Languages'), >-('LetterLog','1',NULL,'If ON, log all notices sent','YesNo'), >+('ClaimsLog','1',NULL,'If ON, log all notices sent','YesNo'), > ('LibraryName','','','Define the library name as displayed on the OPAC',''), > ('LibraryThingForLibrariesEnabled','0','','Enable or Disable Library Thing for Libraries Features','YesNo'), > ('LibraryThingForLibrariesID','','','See:http://librarything.com/forlibraries/','free'), >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref >index 843d47df6e..c5a7889c2e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/logs.pref >@@ -1,7 +1,7 @@ > Logging: > Logging: > - >- - pref: LetterLog >+ - pref: ClaimsLog > choices: > 1: Log > 0: "Don't log" >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >index b9688964bf..b7e90d27d6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -82,7 +82,7 @@ > > [% CASE 'CIRCULATION' %]Circulation[% UNLESS Koha.Preference('IssueLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %] > >-[% CASE 'LETTER' %]Letter[% UNLESS Koha.Preference('LetterLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %] >+[% CASE 'CLAIMS' %]Claims[% UNLESS Koha.Preference('ClaimsLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %] > > [% CASE 'FINES' %]Fines[% UNLESS Koha.Preference('FinesLog') %] <i class="fa fa-warning" title="Log not enabled"></i>[% END %] > >@@ -197,7 +197,7 @@ > [% ELSE %] > <label for="moduleALL" class="viewlog"><input type="checkbox" id="moduleALL" name="modules" value=""> All</label> > [% END %] >- [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'LETTER' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES' ] %] >+ [% FOREACH modx IN [ 'AUTH' 'CATALOGUING' 'AUTHORITIES' 'MEMBERS' 'ACQUISITIONS' 'SERIAL' 'HOLDS' 'ILL' 'CIRCULATION' 'CLAIMS' 'FINES' 'SYSTEMPREFERENCE' 'CRONJOBS', 'REPORTS', 'SEARCHENGINE', 'NOTICES' ] %] > [% IF modules.grep(modx).size %] > <label for="module[% modx | html %]" class="viewlog"><input type="checkbox" id="module[% modx | html %]" name="modules" value="[% modx | html %]" checked="checked"> [% PROCESS translate_log_module module=modx %]</label> > [% ELSE %] >diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t >index 5913e7af96..cd5d404cc9 100755 >--- a/t/db_dependent/Letters.t >+++ b/t/db_dependent/Letters.t >@@ -460,8 +460,8 @@ is($err->{'error'}, 'no_email', "Trying to send an alert when there's no e-mail > $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); > $bookseller->contacts->next->email('testemail@mydomain.com')->store; > >-# Ensure that the preference 'LetterLog' is set to logging >-t::lib::Mocks::mock_preference( 'LetterLog', 'on' ); >+# Ensure that the preference 'ClaimsLog' is set to logging >+t::lib::Mocks::mock_preference( 'ClaimsLog', 'on' ); > > # SendAlerts needs branchemail or KohaAdminEmailAddress as sender > t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', 'library@domain.com' ); >@@ -639,8 +639,8 @@ subtest 'SendAlerts - claimissue' => sub { > $bookseller = Koha::Acquisition::Booksellers->find( $booksellerid ); > $bookseller->contacts->next->email('testemail@mydomain.com')->store; > >- # Ensure that the preference 'LetterLog' is set to logging >- t::lib::Mocks::mock_preference( 'LetterLog', 'on' ); >+ # Ensure that the preference 'ClaimsLog' is set to logging >+ t::lib::Mocks::mock_preference( 'ClaimsLog', 'on' ); > > # SendAlerts needs branchemail or KohaAdminEmailAddress as sender > t::lib::Mocks::mock_userenv({ branchcode => $library->{branchcode} }); >diff --git a/t/db_dependent/UsageStats.t b/t/db_dependent/UsageStats.t >index 74ed09ed1c..cf61f5c940 100755 >--- a/t/db_dependent/UsageStats.t >+++ b/t/db_dependent/UsageStats.t >@@ -484,7 +484,7 @@ sub mocking_systempreferences_to_a_set_value { > CataloguingLog > FinesLog > IssueLog >- LetterLog >+ ClaimsLog > ReturnLog > SubscriptionLog > BiblioDefaultView >-- >2.11.0
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 28108
:
119295
|
119548
| 120747 |
120748
|
120749
|
120763
|
120781
|
120782
|
120791