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

(-)a/koha-tmpl/intranet-tmpl/prog/js/holds.js (-2 / +8 lines)
Lines 1454-1460 async function load_patron_holds_table(biblio_id, split_data) { Link Here
1454
                    orderable: false,
1454
                    orderable: false,
1455
                    searchable: false,
1455
                    searchable: false,
1456
                    render: function (data, type, row, meta) {
1456
                    render: function (data, type, row, meta) {
1457
                        if (row.status || !CAN_user_reserveforothers_modify_holds_priority) {
1457
                        if (
1458
                            row.status ||
1459
                            !CAN_user_reserveforothers_modify_holds_priority
1460
                        ) {
1458
                            return null;
1461
                            return null;
1459
                        }
1462
                        }
1460
                        let buttons =
1463
                        let buttons =
Lines 1673-1679 async function load_patron_holds_table(biblio_id, split_data) { Link Here
1673
                    orderable: false,
1676
                    orderable: false,
1674
                    searchable: false,
1677
                    searchable: false,
1675
                    render: function (data, type, row, meta) {
1678
                    render: function (data, type, row, meta) {
1676
                        if (row.status || !CAN_user_reserveforothers_modify_holds_priority) {
1679
                        if (
1680
                            row.status ||
1681
                            !CAN_user_reserveforothers_modify_holds_priority
1682
                        ) {
1677
                            return null;
1683
                            return null;
1678
                        } else {
1684
                        } else {
1679
                            if (row.lowest_priority) {
1685
                            if (row.lowest_priority) {
(-)a/t/db_dependent/Koha/Holds.t (-2 / +4 lines)
Lines 466-472 subtest 'cancel' => sub { Link Here
466
        my $reserve_id = C4::Reserves::AddReserve($hold_info);
466
        my $reserve_id = C4::Reserves::AddReserve($hold_info);
467
        Koha::Holds->find($reserve_id)->cancel;
467
        Koha::Holds->find($reserve_id)->cancel;
468
        my $number_of_logs =
468
        my $number_of_logs =
469
            $schema->resultset('ActionLog')->search( { module => 'HOLDS', action => 'CANCEL', object => $reserve_id } )
469
            $schema->resultset('ActionLog')
470
            ->search( { module => 'HOLDS', action => 'CANCEL', object => $reserve_id } )
470
            ->count;
471
            ->count;
471
        is( $number_of_logs, 0, 'Without HoldsLog, Koha::Hold->cancel should not have logged' );
472
        is( $number_of_logs, 0, 'Without HoldsLog, Koha::Hold->cancel should not have logged' );
472
473
Lines 474-480 subtest 'cancel' => sub { Link Here
474
        $reserve_id = C4::Reserves::AddReserve($hold_info);
475
        $reserve_id = C4::Reserves::AddReserve($hold_info);
475
        Koha::Holds->find($reserve_id)->cancel;
476
        Koha::Holds->find($reserve_id)->cancel;
476
        $number_of_logs =
477
        $number_of_logs =
477
            $schema->resultset('ActionLog')->search( { module => 'HOLDS', action => 'CANCEL', object => $reserve_id } )
478
            $schema->resultset('ActionLog')
479
            ->search( { module => 'HOLDS', action => 'CANCEL', object => $reserve_id } )
478
            ->count;
480
            ->count;
479
        is( $number_of_logs, 1, 'With HoldsLog, Koha::Hold->cancel should have logged' );
481
        is( $number_of_logs, 1, 'With HoldsLog, Koha::Hold->cancel should have logged' );
480
    };
482
    };
(-)a/t/db_dependent/api/v1/holds.t (-2 / +1 lines)
Lines 527-533 subtest 'suspend and resume tests' => sub { Link Here
527
        ->json_is(
527
        ->json_is(
528
        '/end_date',
528
        '/end_date',
529
        output_pref( { dt => $date, dateformat => 'iso', dateonly => 1 } )
529
        output_pref( { dt => $date, dateformat => 'iso', dateonly => 1 } )
530
    )->header_is( Location => "/api/v1/holds/" . $hold->id . "/suspension", 'The Location header is set' );
530
        )->header_is( Location => "/api/v1/holds/" . $hold->id . "/suspension", 'The Location header is set' );
531
531
532
    $t->delete_ok( "//$userid:$password@/api/v1/holds/" . $hold->id . "/suspension" )
532
    $t->delete_ok( "//$userid:$password@/api/v1/holds/" . $hold->id . "/suspension" )
533
        ->status_is( 204, 'REST3.2.4' )
533
        ->status_is( 204, 'REST3.2.4' )
534
- 

Return to bug 23269