@@ -, +, @@ the merge in the log viewer. -Apply the patch -Make sure you have "BorrowersLog" on in you System Preference -Search patrons -Check two ore more patrons -Merge selected patrons -Merge patrons -Go to log viewer - Make sure there is the line with the action : "Merge" --- Koha/Patron.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) --- a/Koha/Patron.pm +++ a/Koha/Patron.pm @@ -465,9 +465,10 @@ sub siblings { =cut sub merge_with { - my ( $self, $patron_ids ) = @_; + my ( $self, $patron_ids, $interface ) = @_; my @patron_ids = @{ $patron_ids }; + my @interface = @{ $interface }; # Ensure the keeper isn't in the list of patrons to merge @patron_ids = grep { $_ ne $self->id } @patron_ids; @@ -475,6 +476,8 @@ sub merge_with { my $schema = Koha::Database->new()->schema(); my $results; + my $patron_merged; + my $info; $self->_result->result_source->schema->txn_do( sub { foreach my $patron_id (@patron_ids) { @@ -493,9 +496,13 @@ sub merge_with { $patron->move_to_deleted(); $patron->delete(); - } - }); + if (C4::Context->preference("BorrowersLog")){ + $info = $patron->firstname. " " . $patron->surname . " ( ".$patron->cardnumber . ")". " has been merged into " . $self->firstname . " " . $self->surname . " ( ".$self->cardnumber . ")" ; + logaction("Patrons", "Merge", $patron_id, $info ,@interface); + } + } + }); return $results; } @@ -506,7 +513,6 @@ sub merge_with { $wants_check = $patron->wants_check_for_previous_checkout; Return 1 if Koha needs to perform PrevIssue checking, else 0. - =cut sub wants_check_for_previous_checkout { --