Bug 34609: Add biblio method to Old::Hold
Test plan, clean k-t-d: 1) Add a reserve to koha/koha user, mysql run: insert into reserves(borrowernumber, reservedate, branchcode, cancellationdate, timestamp, biblionumber) VALUES (51, '2022-09-23', 'CPL', '2022-09-23', '2022-09-23 15:46:21', 76); 2) Add an old_reserve to koha/koha user, mysql run: insert into old_reserves(borrowernumber, reservedate, branchcode, cancellationdate, timestamp, reserve_id) VALUES (51, '2022-09-23', 'CPL', '2022-09-23', '2022-09-23 15:46:21', 1); 3) Visit holdshistory on either OPAC (requires OPACHoldsHistory sys pref) or STAFF STAFF/cgi-bin/koha/members/holdshistory.pl?borrowernumber=1 OPAC//cgi-bin/koha/opac-holdshistory.pl 4) Notice it blows up with a 500 error 5) Repeat step 3 Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
eaa1a1d7e2
commit
7b57163ef3
1 changed files with 13 additions and 0 deletions
|
@ -34,6 +34,19 @@ This object represents a hold that has been filled or canceled
|
|||
|
||||
=head2 Class methods
|
||||
|
||||
=head3 biblio
|
||||
|
||||
Returns the related Koha::Biblio object for this old hold
|
||||
|
||||
=cut
|
||||
|
||||
sub biblio {
|
||||
my ($self) = @_;
|
||||
my $rs = $self->_result->biblionumber;
|
||||
return unless $rs;
|
||||
return Koha::Biblio->_new_from_dbic($rs);
|
||||
}
|
||||
|
||||
=head3 anonymize
|
||||
|
||||
$old_hold->anonymize();
|
||||
|
|
Loading…
Reference in a new issue