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

(-)a/Koha/Checkout.pm (-4 / +3 lines)
Lines 52-62 deleted item. Link Here
52
sub item {
52
sub item {
53
    my ( $self, $params ) = @_;
53
    my ( $self, $params ) = @_;
54
54
55
    my $item = Koha::Items->search( { itemnumber => $self->itemnumber() } )->next();
55
    $self->{_item} ||= Koha::Item->_new_from_dbic( $self->_result()->item );
56
    $self->{_item} ||= Koha::Deleted::Items->find( { itemnumber => $self->itemnumber() } ) if ( $params->{deleted} );
56
57
57
    $item ||= Koha::Deleted::Items->search( { itemnumber => $self->itemnumber() } )->next() if ( $params->{deleted} );
58
    return $self->{_item};
58
59
    return $item || undef;
60
}
59
}
61
60
62
=head3 type
61
=head3 type
(-)a/Koha/Item.pm (-8 / +6 lines)
Lines 126-136 deleted biblio. Link Here
126
sub biblio {
126
sub biblio {
127
    my ( $self, $params ) = @_;
127
    my ( $self, $params ) = @_;
128
128
129
    my $biblio = Koha::Biblios->search( { biblionumber => $self->biblionumber() } )->next();
129
    $self->{_biblio} ||= Koha::Biblio->_new_from_dbic( $self->_result()->biblio );
130
    $self->{_biblio} ||= Koha::Deleted::Biblios->find( { biblionumber => $self->biblionumber() } ) if ( $params->{deleted} );
130
131
131
    $biblio ||= Koha::Deleted::Biblios->search( { biblionumber => $self->biblionumber() } )->next() if ( $params->{deleted} );
132
    return $self->{_biblio};
132
133
    return $biblio || undef;
134
}
133
}
135
134
136
=head3 biblioitem
135
=head3 biblioitem
Lines 148-158 deleted biblioitem. Link Here
148
sub biblioitem {
147
sub biblioitem {
149
    my ( $self, $params ) = @_;
148
    my ( $self, $params ) = @_;
150
149
151
    my $biblioitem = Koha::BiblioItems->search( { biblionumber => $self->biblionumber() } )->next();
150
    $self->{_biblioitem} ||= Koha::BiblioItem->_new_from_dbic( $self->_result()->biblioitem );
152
151
    $self->{_biblioitem} ||= Koha::Deleted::BiblioItems->find( { biblionumber => $self->biblionumber() } ) if ( $params->{deleted} );
153
    $biblioitem ||= Koha::Deleted::BiblioItems->search( { biblionumber => $self->biblionumber() } )->next() if ( $params->{deleted} );
154
152
155
    return $biblioitem || undef;
153
    return $self->{_biblioitem};
156
}
154
}
157
155
158
=head3 type
156
=head3 type
(-)a/Koha/Patron.pm (-1 / +4 lines)
Lines 114-120 sub all_checkouts { Link Here
114
            borrowernumber => $self->borrowernumber(),
114
            borrowernumber => $self->borrowernumber(),
115
        },
115
        },
116
        {
116
        {
117
            order_by => { "-$order_by_sort" => $order_by_column }
117
            order_by => { "-$order_by_sort" => $order_by_column },
118
            prefetch => {
119
                'item' => 'biblio'
120
            }
118
        }
121
        }
119
    );
122
    );
120
123
(-)a/t/db_dependent/Members/GetAllIssues.t (-2 / +9 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Test::More tests => 16;
5
use Test::More tests => 17;
6
use Test::MockModule;
6
use Test::MockModule;
7
7
8
use C4::Biblio;
8
use C4::Biblio;
Lines 93-96 $issues = C4::Members::GetAllIssues($borrowernumber2); Link Here
93
is( @$issues, 1, 'GetAllIssues returns the correct number of elements' );
93
is( @$issues, 1, 'GetAllIssues returns the correct number of elements' );
94
is( $issues->[0]->{itemnumber}, $itemnumber3, '' );
94
is( $issues->[0]->{itemnumber}, $itemnumber3, '' );
95
95
96
my @itemnumbers;
97
for my $i ( 1 .. 500 ) {
98
    my $in = AddItem( { barcode => $i, %item_branch_infos }, $biblionumber1 );
99
    AddIssue( $borrower1, $i );
100
}
101
$issues = C4::Members::GetAllIssues($borrowernumber1);
102
is( @$issues, 502, 'GetAllIssues returns the correct number of elements' );
103
96
$dbh->rollback();
104
$dbh->rollback();
97
- 

Return to bug 8483