Bug 19549 - Reserve Slip prints first found hold when patron has multiple holds on a biblio
Summary: Reserve Slip prints first found hold when patron has multiple holds on a biblio
Status: RESOLVED DUPLICATE of bug 17561
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-31 10:35 UTC by Nick Clemens
Modified: 2018-05-18 12:22 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 19549 - Reserve Slip prints first found hold when patron has multiple holds on a biblio (7.99 KB, patch)
2017-10-31 11:33 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19549 - Reserve Slip prints first found hold when patron has multiple holds on a biblio (7.52 KB, patch)
2018-03-12 14:40 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-10-31 10:35:12 UTC
In C4/Reserves.pm the ReserveSlip function uses this call to get the reserve:
1982     my $hold = Koha::Holds->search({biblionumber => $biblionumber, borrowernumber => $borrowernumber })->next;

If a patron has multiple holds there is no way to know if we have the correct one.

This function should be updated to take an itemnumber as well and all calls updated.
Comment 1 Kyle M Hall 2017-10-31 11:33:06 UTC
Created attachment 68855 [details] [review]
Bug 19549 - Reserve Slip prints first found hold when patron has multiple holds on a biblio

In C4/Reserves.pm the ReserveSlip function uses this call to get the reserve:
1982     my $hold = Koha::Holds->search({biblionumber => $biblionumber, borrowernumber => $borrowernumber })->next;

If a patron has multiple holds there is no way to know if we have the correct one.

This function should be updated to take an itemnumber as well and all calls updated.

Test Plan:
1) Apply this patch
2) Capture some holds, ensure the correct hold was caught and printed in the notice
3) prove t/db_dependent/Reserves.t
Comment 2 Caroline Cyr La Rose 2017-11-03 21:08:40 UTC
Is this for multiple holds on the same biblio?
Comment 3 Jason Palmer 2017-11-03 21:13:37 UTC
(In reply to Caroline Cyr La Rose from comment #2)
> Is this for multiple holds on the same biblio?

Yes.  Multiple holds for same bib.
Comment 4 Chris Cormack 2018-02-20 20:31:54 UTC
Testing this with a library at the moment, will sign off if it works.
Comment 5 Victor Grousset/tuxayo 2018-03-12 13:59:36 UTC
Conflicts:

Bug 19549 - Reserve Slip prints first found hold when patron has multiple holds on a biblio

68855 - Bug 19549 - Reserve Slip prints first found hold when patron has multiple holds on a biblio

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 19549 - Reserve Slip prints first found hold when patron has multiple holds on a biblio
Using index info to reconstruct a base tree...
M	C4/Reserves.pm
M	circ/circulation.pl
M	circ/hold-transfer-slip.pl
M	circ/returns.pl
M	koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
M	koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
M	t/db_dependent/Reserves.t
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/Reserves.t
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
Auto-merging circ/returns.pl
CONFLICT (content): Merge conflict in circ/returns.pl
Auto-merging circ/hold-transfer-slip.pl
Auto-merging circ/circulation.pl
Auto-merging C4/Reserves.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 19549 - Reserve Slip prints first found hold when patron has multiple holds on a biblio
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-19549---Reserve-Slip-prints-first-found-hold-w-T4NFp1.patch
Comment 6 Nick Clemens 2018-03-12 14:40:26 UTC
Created attachment 72700 [details] [review]
Bug 19549 - Reserve Slip prints first found hold when patron has multiple holds on a biblio

In C4/Reserves.pm the ReserveSlip function uses this call to get the reserve:
1982     my $hold = Koha::Holds->search({biblionumber => $biblionumber, borrowernumber => $borrowernumber })->next;

If a patron has multiple holds there is no way to know if we have the correct one.

This function should be updated to take an itemnumber as well and all calls updated.

Test Plan:
1) Apply this patch
2) Capture some holds, ensure the correct hold was caught and printed in the notice
3) prove t/db_dependent/Reserves.t
Comment 7 Nick Clemens 2018-05-16 10:15:37 UTC
Upping severity, would be nice to get some attention on this
Comment 8 Kyle M Hall 2018-05-18 12:22:59 UTC

*** This bug has been marked as a duplicate of bug 17561 ***