Bugzilla – Attachment 53244 Details for
Bug 16889
Move the ::columns subroutines to Koha::Objects->columns
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16889: Remove C4::Items::biblioitems_columns and use Koha::Biblioitems->columns instead
Bug-16889-Remove-C4Itemsbiblioitemscolumns-and-use.patch (text/plain), 2.57 KB, created by
Jonathan Druart
on 2016-07-09 13:54:37 UTC
(
hide
)
Description:
Bug 16889: Remove C4::Items::biblioitems_columns and use Koha::Biblioitems->columns instead
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-07-09 13:54:37 UTC
Size:
2.57 KB
patch
obsolete
>From caf57024e7846c63ad9bea4331ad9311ade350f3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Sat, 9 Jul 2016 14:37:46 +0100 >Subject: [PATCH] Bug 16889: Remove C4::Items::biblioitems_columns and use > Koha::Biblioitems->columns instead > >Test plan: >Add new rule to the "Automatic item modifications by age" tools >(tools/automatic_item_modification_by_age.pl) and make sure the columns >of the biblioitems table are correctly displayed in the 'Conditions' >dropdown list. >--- > C4/Items.pm | 17 ++--------------- > tools/automatic_item_modification_by_age.pl | 3 ++- > 2 files changed, 4 insertions(+), 16 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 0e04574..81a8263 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -37,6 +37,7 @@ use Data::Dumper; # used as part of logging item record changes, not just for > use Koha::DateUtils qw/dt_from_string/; > use Koha::Database; > >+use Koha::Biblioitems; > use Koha::Items; > use Koha::SearchEngine; > use Koha::SearchEngine::Search; >@@ -3046,20 +3047,6 @@ sub PrepareItemrecordDisplay { > }; > } > >-=head2 biblioitems_columns >- >- my @columns = C4::Items::biblioitems_columns(); >- >-Returns an array of biblioitems' table columns on success, >-and an empty array on failure. >- >-=cut >- >-sub biblioitems_columns { >- my $rs = Koha::Database->new->schema->resultset('Biblioitem'); >- return $rs->result_source->columns; >-} >- > sub ToggleNewStatus { > my ( $params ) = @_; > my @rules = @{ $params->{rules} }; >@@ -3068,7 +3055,7 @@ sub ToggleNewStatus { > my $dbh = C4::Context->dbh; > my @errors; > my @item_columns = map { "items.$_" } Koha::Items->columns; >- my @biblioitem_columns = map { "biblioitems.$_" } C4::Items::biblioitems_columns; >+ my @biblioitem_columns = map { "biblioitems.$_" } Koha::Biblioitems->columns; > my $report; > for my $rule ( @rules ) { > my $age = $rule->{age}; >diff --git a/tools/automatic_item_modification_by_age.pl b/tools/automatic_item_modification_by_age.pl >index 49673fc..12a1c00 100755 >--- a/tools/automatic_item_modification_by_age.pl >+++ b/tools/automatic_item_modification_by_age.pl >@@ -41,6 +41,7 @@ use C4::Output; > use C4::Koha; > > use Koha::Items; >+use Koha::Biblioitems; > > my $cgi = new CGI; > >@@ -109,7 +110,7 @@ if ( $@ ) { > } > > my @item_fields = map { "items.$_" } Koha::Items->columns; >-my @biblioitem_fields = map { "biblioitems.$_" } C4::Items::biblioitems_columns; >+my @biblioitem_fields = map { "biblioitems.$_" } Koha::Biblioitems->columns; > $template->param( > op => $op, > messages => \@messages, >-- >2.8.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 16889
:
53240
|
53241
|
53243
|
53244
|
53292
|
53293
|
53294
|
53295
|
53379
|
53380
|
53381
|
53382
|
53383