[Bug 44332] New: Merging records gives two holds the same priority and leaves the queue without a first place
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44332 Bug ID: 44332 Summary: Merging records gives two holds the same priority and leaves the queue without a first place Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Hold requests Assignee: koha-bugs@lists.koha-community.org Reporter: babarjunaid1122@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, lisette@bywatersolutions.com, tomascohen@gmail.com Target Milestone: --- C4::Reserves::MergeHolds renumbers the holds on the record kept with an UPDATE matched on borrowernumber + reservedate + (itemnumber = ? OR itemnumber IS NULL), not on reserve_id. When one patron has a hold on each of the two records, placed the same day (the case in bug 16766), both of that patron's holds match each UPDATE, so they end up with the same priority, and the queue has no hold at priority 1. To reproduce (main): 1. Patron A: a record-level hold on record 1 and on record 2, both placed today. 2. Patron B: a record-level hold on record 2, placed later. 3. Cataloging > merge record 2 into record 1. 4. The holds on record 1 have priorities 2, 2, 3. Expected: 1, 2, 3. The new subtest in t/db_dependent/Reserves.t shows it ([2,2,3] without the patch). This does not decide bug 16766 (whether the patron should keep two holds); it only stops two holds sharing a priority. See Also 16766. Note for testers: on main, Reserves.t already fails 'can successfully generate hold slip (bug 10949)' and 'no warnings' in KTD without this patch; the new subtest passes. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44332 --- Comment #1 from babar junaid <babarjunaid1122@gmail.com> --- Created attachment 212775 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212775&action=edit Bug 44332: Give every hold its own priority when merging records Bug 44332: Give every hold its own priority when merging records MergeHolds() renumbered the holds on the record kept with an UPDATE matched on borrowernumber + reservedate + itemnumber, not on reserve_id. When one patron had a hold on each of the two records, placed the same day, both of that patron's holds matched each UPDATE: they ended with the same priority and the queue had no hold at priority 1. The holds are now renumbered by reserve_id, in the same order as before (reservedate, then reserve_id). Test plan: 1. Apply only the test file change and run prove t/db_dependent/Reserves.t The new subtest "MergeHolds gives every hold its own priority" fails: the priorities are 2, 2, 3. 2. Apply the whole patch and run it again: they are 1, 2, 3. Note: 'can successfully generate hold slip (bug 10949)' and 'no warnings' already fail on main in KTD without this patch. Sponsored-by: Koha Solutions -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44332 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |babarjunaid1122@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44332 babar junaid <babarjunaid1122@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16766 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org