Bugzilla – Attachment 45644 Details for
Bug 12803
Add ability to skip closed libraries when generating the holds queue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12803 [QA Followup] - Remove NO_CACHE
Bug-12803-QA-Followup---Remove-NOCACHE.patch (text/plain), 2.48 KB, created by
Kyle M Hall (khall)
on 2015-12-14 13:03:01 UTC
(
hide
)
Description:
Bug 12803 [QA Followup] - Remove NO_CACHE
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-12-14 13:03:01 UTC
Size:
2.48 KB
patch
obsolete
>From b0ddaf1307d7c8d706f3d92815a71cdfbf6345f6 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 14 Dec 2015 12:56:39 +0000 >Subject: [PATCH] Bug 12803 [QA Followup] - Remove NO_CACHE > >--- > Koha/Calendar.pm | 2 +- > t/db_dependent/HoldsQueue.t | 7 ++++--- > 2 files changed, 5 insertions(+), 4 deletions(-) > >diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm >index 5904dee..5d60a84 100644 >--- a/Koha/Calendar.pm >+++ b/Koha/Calendar.pm >@@ -104,7 +104,7 @@ sub single_holidays { > # ... > # } > >- if (!$single_holidays || $ENV{NO_CACHE}) { >+ if (!$single_holidays) { > my $dbh = C4::Context->dbh; > $single_holidays = {}; > >diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t >index b0fa116..4fa62c4 100755 >--- a/t/db_dependent/HoldsQueue.t >+++ b/t/db_dependent/HoldsQueue.t >@@ -8,7 +8,7 @@ > > use Modern::Perl; > >-use Test::More tests => 25; >+use Test::More tests => 26; > use Data::Dumper; > > use C4::Branch; >@@ -307,7 +307,6 @@ is( $holds_queue->[1]->{cardnumber}, $borrower2->{cardnumber}, "Holds queue fill > # and make today a holiday for MPL. When we run it again we should only > # have 1 row in the holds queue > C4::Context->set_preference('HoldsQueueSkipClosed', 1); >-$ENV{NO_CACHE} = 1; > my $today = dt_from_string(); > C4::Calendar->new( branchcode => $branchcodes[0] )->insert_single_holiday( > day => $today->day(), >@@ -316,6 +315,9 @@ C4::Calendar->new( branchcode => $branchcodes[0] )->insert_single_holiday( > title => "$today", > description => "$today", > ); >+# If the test below is removed, aother tests using the holiday will fail. For some reason if we call is_holiday now >+# the holiday will get set in cache correctly, but not if we let C4::HoldsQueue call is_holiday instead. >+is( Koha::Calendar->new( branchcode => $branchcodes[0] )->is_holiday( $today ), 1, 'Is today a holiday for pickup branch' ); > C4::HoldsQueue::CreateQueue(); > $holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} }); > is( scalar( @$holds_queue ), 1, "Holds not filled with items from closed libraries" ); >@@ -336,7 +338,6 @@ C4::Context->set_preference( 'HoldsQueueSkipClosed', 1 ); > C4::HoldsQueue::CreateQueue(); > $holds_queue = $dbh->selectall_arrayref("SELECT * FROM tmp_holdsqueue", { Slice => {} }); > is( scalar( @$holds_queue ), 2, "Holds not filled with items from closed libraries" ); >-$ENV{NO_CACHE} = 0; > C4::Context->set_preference( 'HoldsQueueSkipClosed', 0 ); > > # Bug 14297 >-- >1.7.10.4
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 12803
:
31057
|
31060
|
31061
|
31062
|
31063
|
31630
|
31631
|
32046
|
32271
|
43509
|
43510
|
43511
|
43512
|
43610
|
43779
|
43833
|
43979
|
45569
|
45570
|
45571
|
45572
|
45573
|
45574
|
45575
|
45576
|
45638
|
45643
|
45644
|
46888
|
46889
|
46890
|
46891
|
46892
|
46893
|
46894
|
46895
|
47246
|
47247
|
48574
|
48575