Bug 36428: Add Bookings->filter_by_active and use it for display
Currently the bookings tab on a biblio details and patron details use 'filter_by_future'
which lists upcoming bookings.
Libraries would like to see upcoming, and active bookings in these cases, and we should add a filter
for bookings that have not ended.
NOTE: This removes the only uses of filter_by_future, but I preserve this for Martin's decision as the creator
of the bookings module
To test:
1 - Make an item bookable from the items tab on a record details
2 - Return to details view and place a booking
3 - Note sidebar says "Bookings (1)"
4 - Make the booking current from the DB:
UPDATE bookings SET start_date=NOW() WHERE biblio_id={biblionumber};
5 - Reload the page
6 - Note the count is now "Bookings (0)"
7 - View the patron's details page - note "Bookings (0)" and none listed
8 - Apply patch
9 - Reload biblio details, note Bookings(1)
10 - Reload patron details, note Bookings(1) and booking is listed
11 - End the booking:
UPDATE bookings SET end_date=NOW() WHERE biblio_id={biblionumber};
12 - Confirm booking no longer listed on biblio or patron details
Signed-off-by: Sam Lau <samalau@gmail.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit
859e84417eb57e9b505972b85a9b1d94992b946b)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>