Bugzilla – Attachment 26718 Details for
Bug 11213
GetItemsInfo() called twice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug_11213: Use branch codes from the database rather than hardcoded CPL and MPL
bug11213-Use-branch-codes-from-the-database-rather.patch (text/plain), 2.36 KB, created by
Srdjan Jankovic
on 2014-04-01 05:48:33 UTC
(
hide
)
Description:
bug_11213: Use branch codes from the database rather than hardcoded CPL and MPL
Filename:
MIME Type:
Creator:
Srdjan Jankovic
Created:
2014-04-01 05:48:33 UTC
Size:
2.36 KB
patch
obsolete
>From fb239a2cf5a1d5c5311a8056daf8920e7adfd90b Mon Sep 17 00:00:00 2001 >From: Srdjan <srdjan@catalyst.net.nz> >Date: Tue, 1 Apr 2014 18:43:26 +1300 >Subject: [PATCH] bug_11213: Use branch codes from the database rather than > hardcoded CPL and MPL > >--- > t/db_dependent/Items.t | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index 5ec8d34..bec6d9d 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -20,6 +20,7 @@ use Modern::Perl; > > use MARC::Record; > use C4::Biblio; >+use C4::Branch; > > use Test::More tests => 3; > >@@ -28,6 +29,8 @@ BEGIN { > } > > my $dbh = C4::Context->dbh; >+my $branches = GetBranches; >+my ($branch1, $branch2) = keys %$branches; > > subtest 'General Add, Get and Del tests' => sub { > >@@ -42,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."); > >@@ -79,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 > ); >@@ -127,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 ); >-- >1.8.3.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 11213
:
22800
|
26394
|
26430
|
26431
|
26499
|
26500
|
26695
|
26696
|
26713
|
26718
|
26719
|
26720
|
26721
|
29557
|
29558
|
29559
|
29560
|
29561
|
29562
|
29563
|
29564
|
38584
|
38585
|
38586
|
38587
|
38588
|
38589
|
38590
|
39023
|
39024
|
39025
|
39026
|
39027
|
39028
|
39029
|
42234
|
42235
|
42236
|
42237
|
42238
|
42239
|
42240
|
42425
|
49750
|
49751
|
49752
|
49753
|
49754
|
49755
|
50163
|
50164
|
50165
|
50166
|
50167
|
50168
|
54447
|
54448
|
54449
|
54450
|
54451
|
54452
|
57578
|
57579
|
57580
|
57581
|
57582
|
57583
|
62434
|
62435
|
62436
|
62437
|
62438
|
62439
|
68646
|
68818
|
68819
|
68820
|
68821
|
68822
|
68823