Bugzilla – Attachment 161904 Details for
Bug 35248
Bookings needs unit tests
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35248: Remove Koha::Booking->intersects
Bug-35248-Remove-KohaBooking-intersects.patch (text/plain), 1.58 KB, created by
Nick Clemens (kidclamp)
on 2024-02-08 13:10:38 UTC
(
hide
)
Description:
Bug 35248: Remove Koha::Booking->intersects
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-02-08 13:10:38 UTC
Size:
1.58 KB
patch
obsolete
>From f621ee0a777ca1caf91253f69462e1bfeee6efc0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 30 Jan 2024 11:09:17 +0000 >Subject: [PATCH] Bug 35248: Remove Koha::Booking->intersects > >Another method left behind from an earlier iteration.. not actually >called anywhere in the final submission in Koha. > >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Booking.pm | 33 --------------------------------- > 1 file changed, 33 deletions(-) > >diff --git a/Koha/Booking.pm b/Koha/Booking.pm >index 60dcc88d630..2aabe72a95d 100644 >--- a/Koha/Booking.pm >+++ b/Koha/Booking.pm >@@ -142,39 +142,6 @@ sub store { > return $self; > } > >-=head3 intersects >- >- my $intersects = $booking1->intersects($booking2); >- >-Returns a boolean denoting whether booking1 interfers/overlaps/clashes with booking2. >- >-=cut >- >-sub intersects { >- my ( $self, $comp ) = @_; >- >- # Start date of comparison booking is after end date of this booking. >- return 0 >- if ( >- DateTime->compare( >- dt_from_string( $comp->start_date ), >- dt_from_string( $self->end_date ) >- ) >= 0 >- ); >- >- # End date of comparison booking is before start date of this booking. >- return 0 >- if ( >- DateTime->compare( >- dt_from_string( $comp->end_date ), >- dt_from_string( $self->start_date ) >- ) <= 0 >- ); >- >- # Bookings must overlap >- return 1; >-} >- > =head3 get_items_that_can_fill > > my $items = $bookings->get_items_that_can_fill(); >-- >2.30.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 35248
:
161061
|
161062
|
161608
|
161611
|
161620
|
161621
|
161632
|
161636
|
161651
|
161652
|
161653
|
161654
|
161655
|
161656
|
161657
|
161658
|
161659
|
161660
|
161821
|
161822
|
161823
|
161824
|
161825
|
161826
|
161827
|
161828
|
161829
|
161830
|
161831
|
161861
|
161862
|
161863
|
161864
|
161865
|
161866
|
161867
|
161868
|
161869
|
161870
|
161871
|
161890
|
161891
|
161893
|
161894
|
161895
|
161896
|
161897
|
161898
|
161899
|
161900
|
161901
|
161902
|
161903
| 161904 |
161905
|
161906
|
161907
|
161908
|
161909
|
161910
|
161911
|
161912