| Summary: | Incorrect patron name for first patron in pendingreserves list. | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Andreas Jonsson <andreas.jonsson> |
| Component: | Circulation | Assignee: | Bugs List <koha-bugs> |
| Status: | NEW --- | QA Contact: | Testopia <testopia> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | gmcharlt, kyle |
| Version: | 24.05 | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
It was pointed out to me that the patron name of the first patron in the table on the pendingreserves page is sometimes wrong. I am reviewing circ/pendigreserves.pl and the below code seems incorrect to me. The hash reference holds_biblios_map is only used for the list of biblionumbers in the query to produce all_holds, which suggest that the where and join clauses should simply be applied direcly on the query for all_holds. Also, the order_by on the first query will have no effect as it is the order of the second query that counts. my $holds_biblios_map = { map { $_->{biblionumber} => $_->{reserve_id} } @{ Koha::Holds->search( {%where}, { join => ['itembib', 'biblio'], select => ['me.biblionumber', 'me.reserve_id'], order_by => { -desc => 'priority' } } )->unblessed } }; my $all_holds = { map { $_->biblionumber => $_ } @{ Koha::Holds->search( { reserve_id => [ values %$holds_biblios_map ]}, { prefetch => [ 'borrowernumber', 'itembib', 'biblio', 'item_group' ], } )->as_list } };