Bugzilla – Attachment 135207 Details for
Bug 30730
Holds to Pull should not list items with a notforloan status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30730: Holds to Pull should not list items with a notforloan status
Bug-30730-Holds-to-Pull-should-not-list-items-with.patch (text/plain), 2.13 KB, created by
Martin Renvoize (ashimema)
on 2022-05-19 15:29:18 UTC
(
hide
)
Description:
Bug 30730: Holds to Pull should not list items with a notforloan status
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-05-19 15:29:18 UTC
Size:
2.13 KB
patch
obsolete
>From 580977ef4ad9fa9a9e4a0ee20d3bf23f479c92b9 Mon Sep 17 00:00:00 2001 >From: Shi Yao Wang <shi-yao.wang@inlibro.com> >Date: Tue, 17 May 2022 11:08:06 -0400 >Subject: [PATCH] Bug 30730: Holds to Pull should not list items with a > notforloan status > >Remove items with a notforloan value other than 0 because items that are >potentially holdable (with negative notforloan status) are not wanted in holds to pull. > >Test plan: >1- Have a bib with 2 items, both holdable. Give one of these items a notforloan status with a negative value (like Ordered in the testing docker data). >2- Place a title-level hold on your bib >3- Confirm your bib is showing on Holds to Pull as expected, prompting staff to pull the item that does not have a not for loan status (correct!) >4- Take the item that does not have a not for loan status and check it out to a different patron, make sure not to fill or cancel your hold >5- Reload Holds to Pull, see your title is still listed and now Koha is directing staff to the item with a notforloan status >6- Apply the patch >7- Reload Holds to Pull, see your title with a notforloan status is gone >8- Run `prove t/db_dependent/Koha/Holds.t` and all tests should pass > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/Holds.pm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/Koha/Holds.pm b/Koha/Holds.pm >index 0d062d0620..69899cac8f 100644 >--- a/Koha/Holds.pm >+++ b/Koha/Holds.pm >@@ -134,11 +134,18 @@ sub get_items_that_can_fill { > collapse => 1, > } > )->get_column('itemnumber'); >+ my @notforloan = Koha::Items->search( >+ { notforloan => { '!=' => 0 } }, >+ { >+ columns => ['itemnumber'], >+ collapse => 1, >+ } >+ )->get_column('itemnumber'); > > return Koha::Items->search( > { > -or => \@bibs_or_items, >- itemnumber => { -not_in => [ @branchtransfers, @waiting_holds ] }, >+ itemnumber => { -not_in => [ @branchtransfers, @waiting_holds, @notforloan ] }, > onloan => undef, > } > )->filter_by_for_hold(); >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30730
:
135074
|
135075
|
135081
|
135082
|
135207
|
135208
|
135209
|
135210
|
135211
|
135212