Bugzilla – Attachment 165344 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.57 KB, created by
Nick Clemens (kidclamp)
on 2024-04-22 18:13:49 UTC
(
hide
)
Description:
bug 36673: Filter used categories and item types to current branch
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-04-22 18:13:49 UTC
Size:
1.57 KB
patch
obsolete
>From d85760b357a2434ce78db9d706b626f81e02c839 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 >--- > admin/smart-rules.pl | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index 16faa8b06ca..25a78ede749 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -739,12 +739,12 @@ 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