View | Details | Raw Unified | Return to bug 22632
Collapse All | Expand All

(-)a/Koha/Patron.pm (-1 / +1 lines)
Lines 679-685 sub merge_with { Link Here
679
679
680
            if (C4::Context->preference("BorrowersLog")){
680
            if (C4::Context->preference("BorrowersLog")){
681
                my $info = $patron->firstname. " " . $patron->surname . " (".$patron->cardnumber . ")". " has been merged into " . $self->firstname . " " . $self->surname . " (".$self->cardnumber . ")" ;
681
                my $info = $patron->firstname. " " . $patron->surname . " (".$patron->cardnumber . ")". " has been merged into " . $self->firstname . " " . $self->surname . " (".$self->cardnumber . ")" ;
682
                logaction("MEMBERS", "Merge", $self->id, $info );
682
                logaction("MEMBERS", "PATRON_MERGE", $self->id, $info );
683
            }
683
            }
684
        }
684
        }
685
    });
685
    });
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt (-2 / +2 lines)
Lines 146-152 Link Here
146
[%        CASE 'DELETE_FUND' %]<span>Delete a fund</span>
146
[%        CASE 'DELETE_FUND' %]<span>Delete a fund</span>
147
[%        CASE 'Run'    %]<span>Run</span>
147
[%        CASE 'Run'    %]<span>Run</span>
148
[%        CASE 'End'    %]<span>End</span>
148
[%        CASE 'End'    %]<span>End</span>
149
[%        CASE 'Merge'    %]<span>Merge</span>
149
[%        CASE 'PATRON_MERGE'    %]<span>Merge</span>
150
[%        CASE 'EDIT_MAPPINGS' %]<span>Edit mappings</span>
150
[%        CASE 'EDIT_MAPPINGS' %]<span>Edit mappings</span>
151
[%        CASE 'RESET_MAPPINGS' %]<span>Reset mappings</span>
151
[%        CASE 'RESET_MAPPINGS' %]<span>Reset mappings</span>
152
[%        CASE 'SERIAL CLAIM' %]<span>Serial claim</span>
152
[%        CASE 'SERIAL CLAIM' %]<span>Serial claim</span>
Lines 239-245 Link Here
239
                                        <label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value=""> All</label>
239
                                        <label for="actionALL" class="viewlog"><input type="checkbox" id="actionALL" name="actions" value=""> All</label>
240
                                    [% END %]
240
                                    [% END %]
241
241
242
                                    [% 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' ] %]
242
                                    [% 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' ] %]
243
                                        [% IF actions.grep(actx).size %]
243
                                        [% IF actions.grep(actx).size %]
244
                                            <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>
244
                                            <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>
245
                                        [% ELSE %]
245
                                        [% ELSE %]
(-)a/t/db_dependent/Koha/Patron/Log.t (-4 / +3 lines)
Lines 41-47 subtest 'Test Koha::Patrons::merge' => sub { Link Here
41
41
42
    my $results = $keeper->merge_with([ $borrower1->{borrowernumber}, $borrower2->{borrowernumber} ]);
42
    my $results = $keeper->merge_with([ $borrower1->{borrowernumber}, $borrower2->{borrowernumber} ]);
43
43
44
    my $log=GetLogs("","","",["MEMBERS"],["Merge"],$keeper->id,"");
44
    my $log=GetLogs("","","",["MEMBERS"],["PATRON_MERGE"],$keeper->id,"");
45
45
46
    my $info_borrower1 = $borrower1->{firstname} . " " . $borrower1->{surname} . " (" . $borrower1->{cardnumber} . ") has been merged into " .
46
    my $info_borrower1 = $borrower1->{firstname} . " " . $borrower1->{surname} . " (" . $borrower1->{cardnumber} . ") has been merged into " .
47
    $keeper->firstname . " " . $keeper->surname . " (" . $keeper->cardnumber . ")";
47
    $keeper->firstname . " " . $keeper->surname . " (" . $keeper->cardnumber . ")";
Lines 63-69 subtest 'Test Koha::Patrons::merge' => sub { Link Here
63
63
64
    $results = $keeper->merge_with([ $borrower3->{borrowernumber}, $borrower4->{borrowernumber} ]);
64
    $results = $keeper->merge_with([ $borrower3->{borrowernumber}, $borrower4->{borrowernumber} ]);
65
65
66
    $log=GetLogs("","","",["MEMBERS"],["Merge"],$keeper->id,"");
66
    $log=GetLogs("","","",["MEMBERS"],["PATRON_MERGE"],$keeper->id,"");
67
    $info_log = $log->[0]{info};
67
    $info_log = $log->[0]{info};
68
68
69
    is($info_log,undef,"GetLogs didn't returns results in the log viewer for the merge of " . $borrower3->{borrowernumber});
69
    is($info_log,undef,"GetLogs didn't returns results in the log viewer for the merge of " . $borrower3->{borrowernumber});
Lines 73-76 subtest 'Test Koha::Patrons::merge' => sub { Link Here
73
    is($info_log,undef,"GetLogs didn't returns results in the log viewer for the merge of " . $borrower4->{borrowernumber});
73
    is($info_log,undef,"GetLogs didn't returns results in the log viewer for the merge of " . $borrower4->{borrowernumber});
74
};
74
};
75
75
76
$schema->storage->txn_rollback;
76
$schema->storage->txn_rollback;
77
- 

Return to bug 22632