Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended, and shows the wrong number of "patrons with holds" which presumably tells the librarian how many copies to pull from the shelves. Test Plan: 1) Create a record with one or more holdable items 2) Place two holds on the record 3) Note they show in the holds to pull report 4) Suspend the priority 2 hold 5) Note the report continues showing that 2 patrons have holds 6) Resume the priority 2 hold 7) Suspend the priority 1 hold 8) Note the hold disappears from the holds to pull report 9) Apply this patch 10) Restart all the things! 11) Reload the holds to pull report 12) The report should show one hold that needs an item pulled to fill it!
Created attachment 132032 [details] [review] Bug 30337: Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended, and shows the wrong number of "patrons with holds" which presumably tells the librarian how many copies to pull from the shelves. Test Plan: 1) Create a record with one or more holdable items 2) Place two holds on the record 3) Note they show in the holds to pull report 4) Suspend the priority 2 hold 5) Note the report continues showing that 2 patrons have holds 6) Resume the priority 2 hold 7) Suspend the priority 1 hold 8) Note the hold disappears from the holds to pull report 9) Apply this patch 10) Restart all the things! 11) Reload the holds to pull report 12) The report should show one hold that needs an item pulled to fill it!
Created attachment 132033 [details] [review] Bug 30337: Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended, and shows the wrong number of "patrons with holds" which presumably tells the librarian how many copies to pull from the shelves. Test Plan: 1) Create a record with one or more holdable items 2) Place two holds on the record 3) Note they show in the holds to pull report 4) Suspend the priority 2 hold 5) Note the report continues showing that 2 patrons have holds 6) Resume the priority 2 hold 7) Suspend the priority 1 hold 8) Note the hold disappears from the holds to pull report 9) Apply this patch 10) Restart all the things! 11) Reload the holds to pull report 12) The report should show one hold that needs an item pulled to fill it!
Created attachment 134568 [details] [review] Bug 30337: Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended, and shows the wrong number of "patrons with holds" which presumably tells the librarian how many copies to pull from the shelves. Test Plan: 1) Create a record with one or more holdable items 2) Place two holds on the record 3) Note they show in the holds to pull report 4) Suspend the priority 2 hold 5) Note the report continues showing that 2 patrons have holds 6) Resume the priority 2 hold 7) Suspend the priority 1 hold 8) Note the hold disappears from the holds to pull report 9) Apply this patch 10) Restart all the things! 11) Reload the holds to pull report 12) The report should show one hold that needs an item pulled to fill it! Signed-off-by: David Nind <david@davidnind.com>
Created attachment 134972 [details] [review] Bug 30337: Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended, and shows the wrong number of "patrons with holds" which presumably tells the librarian how many copies to pull from the shelves. Test Plan: 1) Create a record with one or more holdable items 2) Place two holds on the record 3) Note they show in the holds to pull report 4) Suspend the priority 2 hold 5) Note the report continues showing that 2 patrons have holds 6) Resume the priority 2 hold 7) Suspend the priority 1 hold 8) Note the hold disappears from the holds to pull report 9) Apply this patch 10) Restart all the things! 11) Reload the holds to pull report 12) The report should show one hold that needs an item pulled to fill it! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
BTW, this is a problem all the way back to 21.05
Created attachment 135213 [details] [review] Bug 30337: Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended Holds to Pull ( pendingreserves.pl ) ignores holds if priority 1 hold is suspended, and shows the wrong number of "patrons with holds" which presumably tells the librarian how many copies to pull from the shelves. Test Plan: 1) Create a record with one or more holdable items 2) Place two holds on the record 3) Note they show in the holds to pull report 4) Suspend the priority 2 hold 5) Note the report continues showing that 2 patrons have holds 6) Resume the priority 2 hold 7) Suspend the priority 1 hold 8) Note the hold disappears from the holds to pull report 9) Apply this patch 10) Restart all the things! 11) Reload the holds to pull report 12) The report should show one hold that needs an item pulled to fill it! Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected and resolves a regression. QA script is happy. I'd love to have seen some work to move some of the queries here out of the controller and up into the Koha::Holds class (so we could also have unit tests added).. But as a fix, this does the job and is pragmatic so I can't really fail it ;P Passing
(In reply to Martin Renvoize from comment #7) > Works as expected and resolves a regression. QA script is happy. > > I'd love to have seen some work to move some of the queries here out of the > controller and up into the Koha::Holds class (so we could also have unit > tests added).. Was going to post the same. Let's follow-up and build the query in Koha::Holds->filter_by_something or the like.
Pushed to master for 22.11. Nice work everyone, thanks!
Pushed to 22.05.x for 22.05.01
thx, pushed to 21.11.x for 21.11.07
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.
This seems like a bug fix, nothing to add to the manual.