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

(-)a/misc/release_notes/release_notes_19_11_00.html (-1 / +1 lines)
Lines 1366-1372 have already been fixed in maintainance releases)</p> Link Here
1366
1366
1367
<p><strong>Sponsored by</strong> <em>Goethe-Institut</em></p></li>
1367
<p><strong>Sponsored by</strong> <em>Goethe-Institut</em></p></li>
1368
<li><p><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21939">[21939]</a> Permission for holds history tab is too strict</p></li>
1368
<li><p><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21939">[21939]</a> Permission for holds history tab is too strict</p></li>
1369
<li><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22741">[22741]</a> Koha::Patron->store must not log updated_on changes (random failure of test BorrowerLogs and TrackLastPatronActivity)</li>
1369
<li><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22741">[22741]</a> Koha::Patron->store must not log updated_on changes (random failure of test BorrowersLog and TrackLastPatronActivity)</li>
1370
<li><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22910">[22910]</a> Unique attributes should not be copied when duplicating a patron</li>
1370
<li><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22910">[22910]</a> Unique attributes should not be copied when duplicating a patron</li>
1371
<li><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944">[22944]</a> avoid AnonymousPatron in search_patrons_to_anonymise</li>
1371
<li><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944">[22944]</a> avoid AnonymousPatron in search_patrons_to_anonymise</li>
1372
<li><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23077">[23077]</a> Can't import patrons without cardnumber</li>
1372
<li><a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23077">[23077]</a> Can't import patrons without cardnumber</li>
(-)a/misc/release_notes/release_notes_19_11_00.md (-1 / +1 lines)
Lines 1104-1110 have already been fixed in maintainance releases) Link Here
1104
  **Sponsored by** *Goethe-Institut*
1104
  **Sponsored by** *Goethe-Institut*
1105
1105
1106
- [[21939]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21939) Permission for holds history tab is too strict
1106
- [[21939]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21939) Permission for holds history tab is too strict
1107
- [[22741]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22741) Koha::Patron->store must not log updated_on changes (random failure of test BorrowerLogs and TrackLastPatronActivity)
1107
- [[22741]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22741) Koha::Patron->store must not log updated_on changes (random failure of test BorrowersLog and TrackLastPatronActivity)
1108
- [[22910]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22910) Unique attributes should not be copied when duplicating a patron
1108
- [[22910]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22910) Unique attributes should not be copied when duplicating a patron
1109
- [[22944]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944) avoid AnonymousPatron in search_patrons_to_anonymise
1109
- [[22944]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22944) avoid AnonymousPatron in search_patrons_to_anonymise
1110
- [[23077]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23077) Can't import patrons without cardnumber
1110
- [[23077]](http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23077) Can't import patrons without cardnumber
(-)a/t/db_dependent/Koha/Patrons.t (-8 / +7 lines)
Lines 503-509 subtest 'renew_account' => sub { Link Here
503
        my $number_of_logs =
503
        my $number_of_logs =
504
            $schema->resultset('ActionLog')
504
            $schema->resultset('ActionLog')
505
            ->search( { module => 'MEMBERS', action => 'RENEW', object => $retrieved_patron->borrowernumber } )->count;
505
            ->search( { module => 'MEMBERS', action => 'RENEW', object => $retrieved_patron->borrowernumber } )->count;
506
        is( $number_of_logs, 1, 'With BorrowerLogs, Koha::Patron->renew_account should have logged' );
506
        is( $number_of_logs, 1, 'With BorrowersLog, Koha::Patron->renew_account should have logged' );
507
507
508
        t::lib::Mocks::mock_preference( 'BorrowerRenewalPeriodBase', 'now' );
508
        t::lib::Mocks::mock_preference( 'BorrowerRenewalPeriodBase', 'now' );
509
        t::lib::Mocks::mock_preference( 'BorrowersLog',              0 );
509
        t::lib::Mocks::mock_preference( 'BorrowersLog',              0 );
Lines 519-525 subtest 'renew_account' => sub { Link Here
519
        $number_of_logs =
519
        $number_of_logs =
520
            $schema->resultset('ActionLog')
520
            $schema->resultset('ActionLog')
521
            ->search( { module => 'MEMBERS', action => 'RENEW', object => $retrieved_patron->borrowernumber } )->count;
521
            ->search( { module => 'MEMBERS', action => 'RENEW', object => $retrieved_patron->borrowernumber } )->count;
522
        is( $number_of_logs, 1, 'Without BorrowerLogs, Koha::Patron->renew_account should not have logged' );
522
        is( $number_of_logs, 1, 'Without BorrowersLog, Koha::Patron->renew_account should not have logged' );
523
523
524
        t::lib::Mocks::mock_preference( 'BorrowerRenewalPeriodBase', 'combination' );
524
        t::lib::Mocks::mock_preference( 'BorrowerRenewalPeriodBase', 'combination' );
525
        $expiry_date = $retrieved_patron_2->renew_account;
525
        $expiry_date = $retrieved_patron_2->renew_account;
Lines 655-661 subtest "delete" => sub { Link Here
655
    my $number_of_logs =
655
    my $number_of_logs =
656
        $schema->resultset('ActionLog')
656
        $schema->resultset('ActionLog')
657
        ->search( { module => 'MEMBERS', action => 'DELETE', object => $patron->borrowernumber } )->count;
657
        ->search( { module => 'MEMBERS', action => 'DELETE', object => $patron->borrowernumber } )->count;
658
    is( $number_of_logs, 1, 'With BorrowerLogs, Koha::Patron->delete should have logged' );
658
    is( $number_of_logs, 1, 'With BorrowersLog, Koha::Patron->delete should have logged' );
659
659
660
    # Test deletion with designated fallback owner
660
    # Test deletion with designated fallback owner
661
    my $designated_owner = $builder->build_object( { class => 'Koha::Patrons' } );
661
    my $designated_owner = $builder->build_object( { class => 'Koha::Patrons' } );
Lines 2038-2050 subtest 'BorrowersLog and CardnumberLog tests' => sub { Link Here
2038
    my $log_info = from_json( $logs[0]->info );
2038
    my $log_info = from_json( $logs[0]->info );
2039
    is( $log_info->{cardnumber}->{after},  'TESTCARDNUMBER', 'Got correct new cardnumber' );
2039
    is( $log_info->{cardnumber}->{after},  'TESTCARDNUMBER', 'Got correct new cardnumber' );
2040
    is( $log_info->{cardnumber}->{before}, $cardnumber,      'Got correct old cardnumber' );
2040
    is( $log_info->{cardnumber}->{before}, $cardnumber,      'Got correct old cardnumber' );
2041
    is( scalar @logs, 1, 'With BorrowerLogs, one detailed MODIFY action should be logged for the modification.' );
2041
    is( scalar @logs, 1, 'With BorrowersLog, one detailed MODIFY action should be logged for the modification.' );
2042
2042
2043
    t::lib::Mocks::mock_preference( 'TrackLastPatronActivityTriggers', 'connection' );
2043
    t::lib::Mocks::mock_preference( 'TrackLastPatronActivityTriggers', 'connection' );
2044
    $patron->update_lastseen('connection');
2044
    $patron->update_lastseen('connection');
2045
    @logs = $schema->resultset('ActionLog')
2045
    @logs = $schema->resultset('ActionLog')
2046
        ->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber } );
2046
        ->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber } );
2047
    is( scalar @logs, 1, 'With BorrowerLogs and TrackLastPatronActivityTriggers we should not spam the logs' );
2047
    is( scalar @logs, 1, 'With BorrowersLog and TrackLastPatronActivityTriggers we should not spam the logs' );
2048
2048
2049
    # Clear the logs for this patron
2049
    # Clear the logs for this patron
2050
    Koha::ActionLogs->search( { object => $patron->borrowernumber } )->delete();
2050
    Koha::ActionLogs->search( { object => $patron->borrowernumber } )->delete();
Lines 2474-2480 subtest '->set_password' => sub { Link Here
2474
    my $number_of_logs =
2474
    my $number_of_logs =
2475
        $schema->resultset('ActionLog')
2475
        $schema->resultset('ActionLog')
2476
        ->search( { module => 'MEMBERS', action => 'CHANGE PASS', object => $patron->borrowernumber } )->count;
2476
        ->search( { module => 'MEMBERS', action => 'CHANGE PASS', object => $patron->borrowernumber } )->count;
2477
    is( $number_of_logs, 0, 'Without BorrowerLogs, Koha::Patron->set_password doesn\'t log password changes' );
2477
    is( $number_of_logs, 0, 'Without BorrowersLog, Koha::Patron->set_password doesn\'t log password changes' );
2478
2478
2479
    # Enable logging password changes
2479
    # Enable logging password changes
2480
    t::lib::Mocks::mock_preference( 'BorrowersLog', 1 );
2480
    t::lib::Mocks::mock_preference( 'BorrowersLog', 1 );
Lines 2486-2492 subtest '->set_password' => sub { Link Here
2486
            object => $patron->borrowernumber
2486
            object => $patron->borrowernumber
2487
        }
2487
        }
2488
    )->count;
2488
    )->count;
2489
    is( $number_of_logs, 1, 'With BorrowerLogs, Koha::Patron->set_password does log password changes' );
2489
    is( $number_of_logs, 1, 'With BorrowersLog, Koha::Patron->set_password does log password changes' );
2490
2490
2491
    # add other action name
2491
    # add other action name
2492
    $patron->set_password( { password => 'abcd   b2', action => 'RESET PASS' } );
2492
    $patron->set_password( { password => 'abcd   b2', action => 'RESET PASS' } );
2493
- 

Return to bug 41024