Bugzilla – Attachment 166110 Details for
Bug 36673
Limit search for used categories and item types to current library
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36673: Filter used categories and item types to current branch
Bug-36673-Filter-used-categories-and-item-types-to.patch (text/plain), 1.75 KB, created by
Pedro Amorim
on 2024-05-03 11:33:33 UTC
(
hide
)
Description:
Bug 36673: Filter used categories and item types to current branch
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-05-03 11:33:33 UTC
Size:
1.75 KB
patch
obsolete
>From 22ff44e2c8e37d1e90298afc0b03e37c6ce08d91 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 22 Apr 2024 18:12:47 +0000 >Subject: [PATCH] Bug 36673: Filter used categories and item types to current > branch > >To test: >1 - Define some circulation rules for default and specific branches >2 - Apply patch >3 - Confirm rules display as before > >PA amended: >- bug->Bug in commit title >- squashed tidy > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> > >Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> >--- > admin/smart-rules.pl | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 16faa8b06c..efe1b91dfb 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -739,12 +739,14 @@ my $patron_categories = Koha::Patron::Categories->search({}, { order_by => ['des > > my $itemtypes = Koha::ItemTypes->search_with_localization; > >+my $humanbranch = ( $branch ne '*' ? $branch : undef ); >+ > my @used_categorycodes = >- Koha::CirculationRules->search( {}, { columns => ['categorycode'], distinct => 1, } )->get_column('categorycode'); >+ Koha::CirculationRules->search( { branchcode => $humanbranch }, { columns => ['categorycode'], distinct => 1, } ) >+ ->get_column('categorycode'); > my @used_itemtypes = >- Koha::CirculationRules->search( {}, { columns => ['itemtype'], distinct => 1, } )->get_column('itemtype'); >- >-my $humanbranch = ( $branch ne '*' ? $branch : undef ); >+ Koha::CirculationRules->search( { branchcode => $humanbranch }, { columns => ['itemtype'], distinct => 1, } ) >+ ->get_column('itemtype'); > > my $all_rules = Koha::CirculationRules->search({ branchcode => $humanbranch }); > my $definedbranch = $all_rules->count ? 1 : 0; >-- >2.39.2
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 36673
:
165344
|
165401
|
166109
| 166110