Bugzilla – Attachment 32046 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] - Use Koha::Calendar
Bug-12803-QA-Followup---Use-KohaCalendar.patch (text/plain), 1.94 KB, created by
Kyle M Hall (khall)
on 2014-10-07 16:32:26 UTC
(
hide
)
Description:
Bug 12803 [QA Followup] - Use Koha::Calendar
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-10-07 16:32:26 UTC
Size:
1.94 KB
patch
obsolete
>From cc5d9f5c5abc1a711bb87f0989a455d2717168b5 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 7 Oct 2014 11:54:51 -0400 >Subject: [PATCH] Bug 12803 [QA Followup] - Use Koha::Calendar > >--- > C4/HoldsQueue.pm | 10 +++++----- > t/db_dependent/HoldsQueue.t | 1 + > 2 files changed, 6 insertions(+), 5 deletions(-) > >diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm >index 7090c08..2a53975 100755 >--- a/C4/HoldsQueue.pm >+++ b/C4/HoldsQueue.pm >@@ -30,7 +30,7 @@ use C4::Circulation; > use C4::Members; > use C4::Biblio; > use C4::Dates qw/format_date/; >-use C4::Calendar; >+use Koha::Calendar; > use Koha::Database; > use Koha::DateUtils; > >@@ -81,9 +81,9 @@ sub TransportCostMatrix { > }; > > if ( C4::Context->preference("HoldsQueueSkipClosed") ) { >- $calendars->{$from} ||= C4::Calendar->new( branchcode => $from ); >+ $calendars->{$from} ||= Koha::Calendar->new( branchcode => $from ); > $transport_cost_matrix{$to}{$from}{disable_transfer} ||= >- $calendars->{$from}->isHoliday( $today->day(), $today->month(), $today->year() ); >+ $calendars->{$from}->is_holiday( $today ); > } > > } >@@ -614,8 +614,8 @@ sub load_branches_to_pull_from { > my $today = dt_from_string(); > if ( C4::Context->preference('HoldsQueueSkipClosed') ) { > @branches_to_use = grep { >- !C4::Calendar->new( branchcode => $_ ) >- ->isHoliday( $today->day(), $today->month(), $today->year() ) >+ !Koha::Calendar->new( branchcode => $_ ) >+ ->is_holiday( $today ) > } @branches_to_use; > } > >diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t >index c9aa435..6fc6771 100755 >--- a/t/db_dependent/HoldsQueue.t >+++ b/t/db_dependent/HoldsQueue.t >@@ -11,6 +11,7 @@ use Modern::Perl; > use Test::More tests => 23; > use Data::Dumper; > >+use C4::Calendar; > use C4::Context; > use C4::Branch; > use C4::ItemType; >-- >1.7.2.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 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