Bugzilla – Attachment 144691 Details for
Bug 18247
Remove SQL queries from branch_transfer_limit.pl administrative script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18247: Remove SQL queries from branch_transfer_limit.pl
Bug-18247-Remove-SQL-queries-from-branchtransferli.patch (text/plain), 2.28 KB, created by
Kyle M Hall (khall)
on 2022-12-16 15:38:26 UTC
(
hide
)
Description:
Bug 18247: Remove SQL queries from branch_transfer_limit.pl
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2022-12-16 15:38:26 UTC
Size:
2.28 KB
patch
obsolete
>From f18994d8fbd079961dc69cc4a00db76fb816d33a Mon Sep 17 00:00:00 2001 >From: Alex Buckley <alexbuckley@catalyst.net.nz> >Date: Mon, 8 Aug 2022 23:59:20 +0000 >Subject: [PATCH] Bug 18247: Remove SQL queries from branch_transfer_limit.pl > >1. Visit Administration > Patrons and circulation > Limit transfer limits > >2. Observe collection codes are displayed as tabs on the Limit transfer >limits page when the BranchTransferLimitsType syspref = 'Collection >code' > >3. Switch the BranchTransferLimitsType syspref = 'item type'. Refresh >the Limit transfer limits page and observe the tabs have changed to item >type codes > >4. Apply patchset and restart services > >5. Reload the Limit transfer limits page and confirm it displays >correctly with the BranchTransferLimitsType = 'collection code' and >'item type' > >6. Confirm you can successfully save transfer policies > >Sponsored-by: Catalyst IT > >Signed-off-by: Jacob Omara <jacob.omara@ptfs-europe.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > admin/branch_transfer_limits.pl | 16 +++------------- > 1 file changed, 3 insertions(+), 13 deletions(-) > >diff --git a/admin/branch_transfer_limits.pl b/admin/branch_transfer_limits.pl >index 5a2a688c70..35b1386388 100755 >--- a/admin/branch_transfer_limits.pl >+++ b/admin/branch_transfer_limits.pl >@@ -52,23 +52,13 @@ my $limitType = C4::Context->preference("BranchTransferLimitsType") || "ccode"; > my @codes; > my @branchcodes; > >-my $sth; > if ( $limitType eq 'ccode' ) { >- $sth = $dbh->prepare('SELECT authorised_value AS ccode FROM authorised_values WHERE category = "CCODE"'); >+ @codes = Koha::AuthorisedValues->search({ category => 'CCODE' })->get_column('authorised_value'); > } elsif ( $limitType eq 'itemtype' ) { >- $sth = $dbh->prepare('SELECT itemtype FROM itemtypes'); >-} >-$sth->execute(); >-while ( my $row = $sth->fetchrow_hashref ) { >- push( @codes, $row->{ $limitType } ); >-} >- >-$sth = $dbh->prepare("SELECT branchcode FROM branches"); >-$sth->execute(); >-while ( my $row = $sth->fetchrow_hashref ) { >- push( @branchcodes, $row->{'branchcode'} ); >+ @codes = Koha::ItemTypes->search->get_column('itemtype'); > } > >+@branchcodes = Koha::Libraries->search->get_column('branchcode'); > ## If Form Data Passed, Update the Database > if ( $input->param('updateLimits') ) { > DeleteBranchTransferLimits($branchcode); >-- >2.30.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 18247
:
61014
|
61015
|
62583
|
62586
|
138946
| 144691