Bugzilla – Attachment 157263 Details for
Bug 22632
Add logging of merged patrons
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22632: (follow-up) Use PATRON_MERGE as log action
Bug-22632-follow-up-Use-PATRONMERGE-as-log-action.patch (text/plain), 5.25 KB, created by
Owen Leonard
on 2023-10-17 16:21:16 UTC
(
hide
)
Description:
Bug 22632: (follow-up) Use PATRON_MERGE as log action
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-10-17 16:21:16 UTC
Size:
5.25 KB
patch
obsolete
>From c24baf8798485a69dbe71c9593695a3a2e2e60d3 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Tue, 17 Oct 2023 15:48:16 +0000 >Subject: [PATCH] Bug 22632: (follow-up) Use PATRON_MERGE as log action > >--- > Koha/Patron.pm | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt | 4 ++-- > t/db_dependent/Koha/Patron/Log.t | 6 +++--- > 3 files changed, 6 insertions(+), 6 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 1c3233c3e2..9988fb8cde 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -679,7 +679,7 @@ sub merge_with { > > if (C4::Context->preference("BorrowersLog")){ > my $info = $patron->firstname. " " . $patron->surname . " (".$patron->cardnumber . ")". " has been merged into " . $self->firstname . " " . $self->surname . " (".$self->cardnumber . ")" ; >- logaction("MEMBERS", "Merge", $self->id, $info ); >+ logaction("MEMBERS", "PATRON_MERGE", $self->id, $info ); > } > } > }); >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 cf8dd816ac..2034fdcf34 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -146,7 +146,7 @@ > [% CASE 'DELETE_FUND' %]<span>Delete a fund</span> > [% CASE 'Run' %]<span>Run</span> > [% CASE 'End' %]<span>End</span> >-[% CASE 'Merge' %]<span>Merge</span> >+[% CASE 'PATRON_MERGE' %]<span>Merge</span> > [% CASE 'EDIT_MAPPINGS' %]<span>Edit mappings</span> > [% CASE 'RESET_MAPPINGS' %]<span>Reset mappings</span> > [% CASE 'SERIAL CLAIM' %]<span>Serial claim</span> >@@ -239,7 +239,7 @@ > <label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value=""> All</label> > [% END %] > >- [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'FILL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'MODCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'PATRON_NOTICE' 'CHANGE PASS' 'Run' 'End' 'Merge' 'EDIT_MAPPINGS' 'RESET_MAPPINGS' 'ADD_BASKET' 'MODIFY_BASKET' 'MODIFY_BASKET_HEADER' 'MODIFY_BASKET_USERS' 'CLOSE_BASKET' 'APPROVE_BASKET' 'REOPEN_BASKET' 'CANCEL_ORDER' 'CREATE_ORDER' 'MODIFY_ORDER' 'CREATE_INVOICE_ADJUSTMENT' 'UPDATE_INVOICE_ADJUSTMENT' 'DELETE_INVOICE_ADJUSTMENT' 'RECEIVE_ORDER' 'MODIFY_BUDGET' 'MODIFY_FUND' 'CREATE_FUND' 'DELETE_FUND' 'ACQUISITION CLAIM' 'ACQUISITION ORDER' 'OVERDUE' 'EXPIRE' ] %] >+ [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'FILL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'MODCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'PATRON_NOTICE' 'CHANGE PASS' 'Run' 'End' 'PATRON_MERGE' 'EDIT_MAPPINGS' 'RESET_MAPPINGS' 'ADD_BASKET' 'MODIFY_BASKET' 'MODIFY_BASKET_HEADER' 'MODIFY_BASKET_USERS' 'CLOSE_BASKET' 'APPROVE_BASKET' 'REOPEN_BASKET' 'CANCEL_ORDER' 'CREATE_ORDER' 'MODIFY_ORDER' 'CREATE_INVOICE_ADJUSTMENT' 'UPDATE_INVOICE_ADJUSTMENT' 'DELETE_INVOICE_ADJUSTMENT' 'RECEIVE_ORDER' 'MODIFY_BUDGET' 'MODIFY_FUND' 'CREATE_FUND' 'DELETE_FUND' 'ACQUISITION CLAIM' 'ACQUISITION ORDER' 'OVERDUE' 'EXPIRE' ] %] > [% IF actions.grep(actx).size %] > <label for="action[% actx| replace('\s+', '_') | html %]" class="viewlog"><input type="checkbox" id="action[% actx | replace('\s+', '_') | html %]" name="actions" value="[% actx | html %]" checked="checked"> [% PROCESS translate_log_action action=actx %]</label> > [% ELSE %] >diff --git a/t/db_dependent/Koha/Patron/Log.t b/t/db_dependent/Koha/Patron/Log.t >index 5ffb02d84f..02ff9602ee 100644 >--- a/t/db_dependent/Koha/Patron/Log.t >+++ b/t/db_dependent/Koha/Patron/Log.t >@@ -41,7 +41,7 @@ subtest 'Test Koha::Patrons::merge' => sub { > > my $results = $keeper->merge_with([ $borrower1->{borrowernumber}, $borrower2->{borrowernumber} ]); > >- my $log=GetLogs("","","",["MEMBERS"],["Merge"],$keeper->id,""); >+ my $log=GetLogs("","","",["MEMBERS"],["PATRON_MERGE"],$keeper->id,""); > > my $info_borrower1 = $borrower1->{firstname} . " " . $borrower1->{surname} . " (" . $borrower1->{cardnumber} . ") has been merged into " . > $keeper->firstname . " " . $keeper->surname . " (" . $keeper->cardnumber . ")"; >@@ -63,7 +63,7 @@ subtest 'Test Koha::Patrons::merge' => sub { > > $results = $keeper->merge_with([ $borrower3->{borrowernumber}, $borrower4->{borrowernumber} ]); > >- $log=GetLogs("","","",["MEMBERS"],["Merge"],$keeper->id,""); >+ $log=GetLogs("","","",["MEMBERS"],["PATRON_MERGE"],$keeper->id,""); > $info_log = $log->[0]{info}; > > is($info_log,undef,"GetLogs didn't returns results in the log viewer for the merge of " . $borrower3->{borrowernumber}); >@@ -73,4 +73,4 @@ subtest 'Test Koha::Patrons::merge' => sub { > is($info_log,undef,"GetLogs didn't returns results in the log viewer for the merge of " . $borrower4->{borrowernumber}); > }; > >-$schema->storage->txn_rollback; >\ No newline at end of file >+$schema->storage->txn_rollback; >-- >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 22632
:
87778
|
87920
|
87921
|
87922
|
87923
|
87926
|
87995
|
87996
|
87997
|
87998
|
87999
|
88043
|
88044
|
88045
|
88046
|
89728
|
89729
|
89730
|
89731
|
157260
|
157261
|
157262
|
157263
|
157264
|
157265
|
157266
|
157267
|
157268
|
157269
|
157270
|
157271
|
157278
|
157281
|
157286
|
159553
|
159554
|
159555
|
159556
|
159557
|
159558