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

(-)a/C4/Items.pm (-1 / +1 lines)
Lines 636-642 sub GetItemsForInventory { Link Here
636
            '+select' => [ 'marc_subfield_structures.kohafield', 'marc_subfield_structures.frameworkcode', 'me.authorised_value', 'me.lib' ],
636
            '+select' => [ 'marc_subfield_structures.kohafield', 'marc_subfield_structures.frameworkcode', 'me.authorised_value', 'me.lib' ],
637
            '+as'     => [ 'kohafield',                          'frameworkcode',                          'authorised_value',    'lib' ],
637
            '+as'     => [ 'kohafield',                          'frameworkcode',                          'authorised_value',    'lib' ],
638
        }
638
        }
639
    );
639
    )->as_list;
640
640
641
    my $avmapping = { map { $_->get_column('kohafield') . ',' . $_->get_column('frameworkcode') . ',' . $_->get_column('authorised_value') => $_->get_column('lib') } @avs };
641
    my $avmapping = { map { $_->get_column('kohafield') . ',' . $_->get_column('frameworkcode') . ',' . $_->get_column('authorised_value') => $_->get_column('lib') } @avs };
642
642
(-)a/Koha/ItemType.pm (-1 / +1 lines)
Lines 80-86 sub translated_descriptions { Link Here
80
        {   entity => 'itemtypes',
80
        {   entity => 'itemtypes',
81
            code   => $self->itemtype,
81
            code   => $self->itemtype,
82
        }
82
        }
83
    );
83
    )->as_list;
84
    return [ map {
84
    return [ map {
85
        {
85
        {
86
            lang => $_->lang,
86
            lang => $_->lang,
(-)a/reports/guided_reports.pl (-2 / +2 lines)
Lines 749-755 elsif ($phase eq 'Run this report'){ Link Here
749
                        }
749
                        }
750
                    }
750
                    }
751
                    elsif ( $authorised_value eq "biblio_framework" ) {
751
                    elsif ( $authorised_value eq "biblio_framework" ) {
752
                        my @frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] });
752
                        my @frameworks = Koha::BiblioFrameworks->search({}, { order_by => ['frameworktext'] })->as_list;
753
                        my $default_source = '';
753
                        my $default_source = '';
754
                        push @authorised_values,$default_source;
754
                        push @authorised_values,$default_source;
755
                        $authorised_lib{$default_source} = 'Default';
755
                        $authorised_lib{$default_source} = 'Default';
Lines 769-775 elsif ($phase eq 'Run this report'){ Link Here
769
                        }
769
                        }
770
                    }
770
                    }
771
                    elsif ( $authorised_value eq "categorycode" ) {
771
                    elsif ( $authorised_value eq "categorycode" ) {
772
                        my @patron_categories = Koha::Patron::Categories->search({}, { order_by => ['description']});
772
                        my @patron_categories = Koha::Patron::Categories->search({}, { order_by => ['description']})->as_list;
773
                        %authorised_lib = map { $_->categorycode => $_->description } @patron_categories;
773
                        %authorised_lib = map { $_->categorycode => $_->description } @patron_categories;
774
                        push @authorised_values, $_->categorycode for @patron_categories;
774
                        push @authorised_values, $_->categorycode for @patron_categories;
775
                    }
775
                    }
(-)a/t/db_dependent/Acquisition.t (-5 / +5 lines)
Lines 911-922 subtest 'Acquisition logging' => sub { Link Here
911
911
912
    Koha::ActionLogs->delete;
912
    Koha::ActionLogs->delete;
913
    my $basketno = NewBasket( $booksellerid, 1 );
913
    my $basketno = NewBasket( $booksellerid, 1 );
914
    my @create_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'ADD_BASKET', object => $basketno });
914
    my @create_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'ADD_BASKET', object => $basketno })->as_list;
915
    is (scalar @create_logs, 1, 'Basket creation is logged');
915
    is (scalar @create_logs, 1, 'Basket creation is logged');
916
916
917
    Koha::ActionLogs->delete;
917
    Koha::ActionLogs->delete;
918
    C4::Acquisition::ReopenBasket($basketno);
918
    C4::Acquisition::ReopenBasket($basketno);
919
    my @reopen_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'REOPEN_BASKET', object => $basketno });
919
    my @reopen_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'REOPEN_BASKET', object => $basketno })->as_list;
920
    is (scalar @reopen_logs, 1, 'Basket reopen is logged');
920
    is (scalar @reopen_logs, 1, 'Basket reopen is logged');
921
921
922
    Koha::ActionLogs->delete;
922
    Koha::ActionLogs->delete;
Lines 924-940 subtest 'Acquisition logging' => sub { Link Here
924
        basketno => $basketno,
924
        basketno => $basketno,
925
        booksellerid => $booksellerid
925
        booksellerid => $booksellerid
926
    });
926
    });
927
    my @mod_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'MODIFY_BASKET', object => $basketno });
927
    my @mod_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'MODIFY_BASKET', object => $basketno })->as_list;
928
    is (scalar @mod_logs, 1, 'Basket modify is logged');
928
    is (scalar @mod_logs, 1, 'Basket modify is logged');
929
929
930
    Koha::ActionLogs->delete;
930
    Koha::ActionLogs->delete;
931
    C4::Acquisition::ModBasketHeader($basketno,"Test","","","",$booksellerid);
931
    C4::Acquisition::ModBasketHeader($basketno,"Test","","","",$booksellerid);
932
    my @mod_header_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'MODIFY_BASKET_HEADER', object => $basketno });
932
    my @mod_header_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'MODIFY_BASKET_HEADER', object => $basketno })->as_list;
933
    is (scalar @mod_header_logs, 1, 'Basket header modify is logged');
933
    is (scalar @mod_header_logs, 1, 'Basket header modify is logged');
934
934
935
    Koha::ActionLogs->delete;
935
    Koha::ActionLogs->delete;
936
    C4::Acquisition::ModBasketUsers($basketno,(1));
936
    C4::Acquisition::ModBasketUsers($basketno,(1));
937
    my @mod_users_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'MODIFY_BASKET_USERS', object => $basketno });
937
    my @mod_users_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'MODIFY_BASKET_USERS', object => $basketno })->as_list;
938
    is (scalar @mod_users_logs, 1, 'Basket users modify is logged');
938
    is (scalar @mod_users_logs, 1, 'Basket users modify is logged');
939
939
940
    t::lib::Mocks::mock_preference('AcquisitionLog', 0);
940
    t::lib::Mocks::mock_preference('AcquisitionLog', 0);
(-)a/t/db_dependent/Koha/Acquisition/Basket.t (-1 / +1 lines)
Lines 425-431 subtest 'close() tests' => sub { Link Here
425
        'Koha::Exceptions::Acquisition::Basket::AlreadyClosed',
425
        'Koha::Exceptions::Acquisition::Basket::AlreadyClosed',
426
        'Trying to close an already closed basket throws an exception';
426
        'Trying to close an already closed basket throws an exception';
427
427
428
    my @close_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'CLOSE_BASKET', object => $basket->id });
428
    my @close_logs = Koha::ActionLogs->search({ module =>'ACQUISITIONS', action => 'CLOSE_BASKET', object => $basket->id })->as_list;
429
    is (scalar @close_logs, 1, 'Basket closure is logged');
429
    is (scalar @close_logs, 1, 'Basket closure is logged');
430
430
431
    $schema->storage->txn_rollback;
431
    $schema->storage->txn_rollback;
(-)a/t/db_dependent/Patron/HouseboundRoles.t (-2 / +1 lines)
Lines 42-48 is( Link Here
42
);
42
);
43
43
44
my @roles = Koha::Patron::HouseboundRoles
44
my @roles = Koha::Patron::HouseboundRoles
45
    ->search({ borrowernumber_id => $role->{borrowernumber_id} });
45
    ->search({ borrowernumber_id => $role->{borrowernumber_id} })->as_list;
46
my $found_role = shift @roles;
46
my $found_role = shift @roles;
47
is(
47
is(
48
    $found_role->borrowernumber_id,
48
    $found_role->borrowernumber_id,
49
- 

Return to bug 29844