Bugzilla – Attachment 173184 Details for
Bug 38148
Check value of holdallowed circ rule properly (Bug 29087 follow-up)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38148: Check value of holdallowed circ rule properly
Bug-38148-Check-value-of-holdallowed-circ-rule-pro.patch (text/plain), 2.50 KB, created by
Nick Clemens (kidclamp)
on 2024-10-22 20:08:52 UTC
(
hide
)
Description:
Bug 38148: Check value of holdallowed circ rule properly
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-10-22 20:08:52 UTC
Size:
2.50 KB
patch
obsolete
>From 5d1e0800d3b35b41c9a4d052ccc09e4c13c2127f Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Fri, 11 Oct 2024 01:53:11 +0000 >Subject: [PATCH] Bug 38148: Check value of holdallowed circ rule properly > >It was noted on Bug 29087 that the value of circulation rules needs to be checked differently, so this follow-up addresses that. > >To test: > >1. Apply patch and restart services >2. Search for a record on the OPAC. Confirm you can see a link to place a hold. >3. Search for this record on the staff interface and place a hold. Go to Circulation -> Holds to pull and confirm your hold shows in the list. >4. Confirm tests still pass t/db_dependent/Koha/Holds.t > >Sponsored-by: Whanganui District Council >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: andrewa <andrew.auld@ptfs-europe.com> >Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk> > >Bug 38148: Revert back to get_effective_rule > >And update the first conditional logic. >This patch aims to maintain the logic behind the first patch, but restore get_effective_rule. >get_effective_rule_value is using cache and I believe that is the reason why Items.t fail when using that. > >Test plan: >1) Search for 'music' on OPAC >2) Notice records have the 'place hold' link >3) Visit circulation rules on Staff: ><staff_url>/cgi-bin/koha/admin/smart-rules.pl >4) On 'Default checkout, hold and return policy' , under 'Hold policy' pick 'From any library'. Hit 'Save'. >5) Repeat 1). Notice the 'place hold' link is gone. >6) Apply patch. restart plack. Repeat 1). Notice the 'place hold' is shown again > >Run: >$ prove t/db_dependent/Koha/Items.t > >Squashed during QA - wnc > >Signed-off-by: andrewa <andrew.auld@ptfs-europe.com> >Signed-off-by: Ray Delahunty <r.delahunty@arts.ac.uk> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Items.pm | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/Koha/Items.pm b/Koha/Items.pm >index 1676a875970..dd8d6c47cfa 100644 >--- a/Koha/Items.pm >+++ b/Koha/Items.pm >@@ -64,11 +64,10 @@ sub filter_by_for_hold { > my $default_rule = Koha::CirculationRules->get_effective_rule( > { > rule_name => 'holdallowed', >- rule_value => 'not_allowed', > } > ); > my @hold_not_allowed_itypes; >- if ($default_rule) { >+ if ( defined $default_rule && $default_rule->rule_value eq 'not_allowed' ) { > @hold_not_allowed_itypes = Koha::ItemTypes->search->get_column('itemtype'); > my @hold_allowed_itypes = Koha::CirculationRules->search( > { >-- >2.39.5
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 38148
:
172680
|
172681
|
172929
|
173125
|
173141
|
173142
|
173143
|
173144
|
173169
|
173170
|
173183
|
173184
|
173185
|
173205
|
173206
|
173207
|
173208