Bugzilla – Attachment 29606 Details for
Bug 5304
Too many post find queries for items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 5304: Use branch codes from the database rather than hardcoded CPL and MPL
SIGNED-OFF-Bug-5304-Use-branch-codes-from-the-data.patch (text/plain), 3.42 KB, created by
Bernardo Gonzalez Kriegel
on 2014-07-10 14:16:54 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 5304: Use branch codes from the database rather than hardcoded CPL and MPL
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2014-07-10 14:16:54 UTC
Size:
3.42 KB
patch
obsolete
>From a723e2c0513c3b875c28f0073ad5296fc357a99f Mon Sep 17 00:00:00 2001 >From: Srdjan <srdjan@catalyst.net.nz> >Date: Tue, 1 Apr 2014 18:43:26 +1300 >Subject: [PATCH] [SIGNED-OFF] Bug 5304: Use branch codes from the database > rather than hardcoded CPL and MPL > >http://bugs.koha-community.org/show_bug.cgi?id=5304 >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >No commit message >No test plan. > >prove t/db_dependent/Items.t pass >No koha-qa errors >--- > t/db_dependent/Items.t | 28 ++++++++++++++-------------- > 1 file changed, 14 insertions(+), 14 deletions(-) > >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index f5561fc..ad52278 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -30,6 +30,8 @@ BEGIN { > } > > my $dbh = C4::Context->dbh; >+my $branches = GetBranches; >+my ($branch1, $branch2) = keys %$branches; > > subtest 'General Add, Get and Del tests' => sub { > >@@ -43,7 +45,7 @@ subtest 'General Add, Get and Del tests' => sub { > my ($bibnum, $bibitemnum) = get_biblio(); > > # Add an item. >- my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => 'CPL', holdingbranch => 'CPL' } , $bibnum); >+ my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => $branch1, holdingbranch => $branch1 } , $bibnum); > cmp_ok($item_bibnum, '==', $bibnum, "New item is linked to correct biblionumber."); > cmp_ok($item_bibitemnum, '==', $bibitemnum, "New item is linked to correct biblioitemnumber."); > >@@ -80,14 +82,14 @@ subtest 'GetHiddenItemnumbers tests' => sub { > > # Add two items > my ($item1_bibnum, $item1_bibitemnum, $item1_itemnumber) = AddItem( >- { homebranch => 'CPL', >- holdingbranch => 'CPL', >+ { homebranch => $branch1, >+ holdingbranch => $branch1, > withdrawn => 1 }, > $biblionumber > ); > my ($item2_bibnum, $item2_bibitemnum, $item2_itemnumber) = AddItem( >- { homebranch => 'MPL', >- holdingbranch => 'MPL', >+ { homebranch => $branch2, >+ holdingbranch => $branch2, > withdrawn => 0 }, > $biblionumber > ); >@@ -128,7 +130,7 @@ subtest 'GetHiddenItemnumbers tests' => sub { > # Two variables, a value each > $opachiddenitems = " > withdrawn: [1] >- homebranch: [MPL] >+ homebranch: [$branch2] > "; > C4::Context->set_preference( 'OpacHiddenItems', $opachiddenitems ); > @hidden = GetHiddenItemnumbers( @items ); >@@ -151,23 +153,21 @@ subtest 'GetItemsInfo tests' => sub { > $dbh->{AutoCommit} = 0; > $dbh->{RaiseError} = 1; > >- my $homebranch = 'CPL'; >- my $holdingbranch = 'MPL'; >- > # Add a biblio >- my $biblionumber = get_biblio(); >+ my ($biblionumber, $biblioitemnumber) = get_biblio(); >+ > # Add an item > my ($item_bibnum, $item_bibitemnum, $itemnumber) > = AddItem({ >- homebranch => $homebranch, >- holdingbranch => $holdingbranch >+ homebranch => $branch1, >+ holdingbranch => $branch2 > }, $biblionumber ); > >- my $branch = GetBranchDetail( $homebranch ); >+ my $branch = GetBranchDetail( $branch1 ); > $branch->{ opac_info } = "homebranch OPAC info"; > ModBranch($branch); > >- $branch = GetBranchDetail( $holdingbranch ); >+ $branch = GetBranchDetail( $branch2 ); > $branch->{ opac_info } = "holdingbranch OPAC info"; > ModBranch($branch); > >-- >1.7.9.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 5304
:
2692
|
29596
|
29597
|
29606
|
29607
|
29629
|
29630
|
29631
|
32722
|
32723