Bugzilla – Attachment 185061 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.54 KB, created by
Nick Clemens (kidclamp)
on 2025-08-01 16:19:59 UTC
(
hide
)
Description:
Bug 22632: (follow-up) Use PATRON_MERGE as log action
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2025-08-01 16:19:59 UTC
Size:
5.54 KB
patch
obsolete
>From 69dfbf8552d2b72677578b6dfe6a1fc50c020578 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 > >Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Patron.pm | 2 +- > koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt | 2 +- > t/db_dependent/Koha/Patron/Log.t | 6 +++--- > 4 files changed, 7 insertions(+), 5 deletions(-) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 60d92c93f0a..3889d9be1a0 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -802,7 +802,7 @@ sub merge_with { > . $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/includes/action-logs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >index dae105f20e4..1ab3e72af80 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/action-logs.inc >@@ -133,6 +133,8 @@ > <span>Run</span> > [% CASE 'End' %] > <span>End</span> >+ [% CASE 'PATRON_MERGE' %] >+ <span>Merge</span> > [% CASE 'EDIT_MAPPINGS' %] > <span>Edit mappings</span> > [% CASE 'RESET_MAPPINGS' %] >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 6eb1659d988..5df1493c8b7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt >@@ -147,7 +147,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' 'RESET 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' 'CREATE_RESTRICTION' 'MODIFY_RESTRICTION' 'DELETE_RESTRICTION' 'MODIFY_CARDNUMBER' ] %] >+ [% FOREACH actx IN [ 'ADD' 'DELETE' 'MODIFY' 'ISSUE' 'RETURN' 'RENEW' 'CREATE' 'CANCEL' 'FILL' 'SUSPEND' 'RESUME' 'ADDCIRCMESSAGE' 'MODCIRCMESSAGE' 'DELCIRCMESSAGE' 'STATUS_CHANGE' 'PATRON_NOTICE' 'CHANGE PASS' 'RESET 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' 'CREATE_RESTRICTION' 'MODIFY_RESTRICTION' 'DELETE_RESTRICTION' 'MODIFY_CARDNUMBER' ] %] > [% 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 >diff --git a/t/db_dependent/Koha/Patron/Log.t b/t/db_dependent/Koha/Patron/Log.t >index 5ffb02d84f0..02ff9602eee 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.39.5
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
|
184493
|
184494
|
184495
|
184496
|
184497
|
184503
|
184504
|
184505
|
184506
|
184507
|
185058
|
185059
|
185060
| 185061 |
185062
|
185063