Bugzilla – Attachment 106629 Details for
Bug 25850
CalcDateDue freezes with 'useDaysMode' set to 'Dayweek' and the due date lands on a Sunday
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25850: (QA follow-up) Match logic in is_holiday
Bug-25850-QA-follow-up-Match-logic-in-isholiday.patch (text/plain), 1.07 KB, created by
Nick Clemens (kidclamp)
on 2020-07-07 12:07:10 UTC
(
hide
)
Description:
Bug 25850: (QA follow-up) Match logic in is_holiday
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2020-07-07 12:07:10 UTC
Size:
1.07 KB
patch
obsolete
>From e97692f2e53c6e3e98f2e9a987bccd8ad2e7392b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 29 Jun 2020 09:54:58 +0100 >Subject: [PATCH] Bug 25850: (QA follow-up) Match logic in is_holiday > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Calendar.pm | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/Koha/Calendar.pm b/Koha/Calendar.pm >index f2bc834c34..0b5ac1862d 100644 >--- a/Koha/Calendar.pm >+++ b/Koha/Calendar.pm >@@ -246,11 +246,18 @@ sub get_push_amt { > unless exists $self->{days_mode}; > > my $dow = $base_date->day_of_week; >+ # Representation fix >+ # DateTime object dow (1-7) where Monday is 1 >+ # Arrays are 0-based where 0 = Sunday, not 7. >+ if ( $dow == 7 ) { >+ $dow = 0; >+ } >+ > return ( > # We're using Dayweek useDaysMode option > $self->{days_mode} eq 'Dayweek' && > # It's not a permanently closed day >- !$self->{weekly_closed_days}->[$dow % 7] >+ !$self->{weekly_closed_days}->[$dow] > ) ? 7 : 1; > } > >-- >2.11.0
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 25850
:
106207
|
106346
|
106347
|
106348
|
106381
|
106382
|
106383
|
106384
|
106626
|
106627
|
106628
| 106629 |
106630