PHP version: 5.2.9
Drupal version: 6.16
Bookings API: 6.x-1.0-alpha5
Views: 6.x-2.10
CCK: 6.x-2.6
Date API: 6.x-2.4
I'm trying to create a resource that is only available for a few hours each day. I then want to place a booking request within the few available hours, and disallow bookings outside those hours. I believe I've found a bug in the availability parameter interface such that the resource becomes either strictly available or strictly unavailable (Flexibility = Rigid) even if the Flexibility = Flexible setting is selected. Flexibility = Flexible does not appear to be saved when selected. I've attached screen shots to show what I did.
resource-1: Shows the resource with default availability of "Unavailable".
availability-2: Shows the availability I created for the resource, with Flexibility = Flexible.
availability-1: Shows what the availability looks like after saving the availability info. Note that the type is now "Strictly Available". If I try to edit the availability again the Flexibility value is "Rigid" instead of "Flexible".
booking-1: Shows what happens ("No conflicts found.") when I try to place a request that's outside the available hours.
I would expect to have a conflict when trying to book the resource outside the hours of availability. I suspect it's not working that way because "Strictly Available" is described in the documentation as "Strictly available will be bookable, whatever you do".
Sorry for the long-winded explanation. Is the behavior I'm seeing expected, or is it because the Flexibility setting isn't being saved properly?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | modules.jpg | 137.63 KB | sah62 |
| #8 | availability-4.jpg | 13.89 KB | sah62 |
| #8 | availability-6.jpg | 14.22 KB | sah62 |
| #8 | request-1.jpg | 17.68 KB | sah62 |
| #8 | availability-5.jpg | 72.26 KB | sah62 |
Comments
Comment #1
Anonymous (not verified) commentedActually it's because there are a couple of bug in 1.x - and some of them are buried really deep I fear. Would you mind switching to 3.x?
Comment #2
sah62 commentedSure, I'll try again later today, but I had the same basic problem when I first tried this with 3.x. I switched back thinking the 1.x alpha release was more stable.
Comment #3
brein commentedFirst post
Same Issue here
If i do like this:
It trigger on
date_difference($record['start'], $now, 'minutes', 'DATE_DATETIME')
Comment #4
Anonymous (not verified) commentedWhats a problem with date_convert / date_difference got to do with Flexible Availabilities?
Comment #5
brein commentedSorry wrong tree :-(
It was about bookingapi dev 3.x in function bookingsapi_conflict_check when one is trying to add a booking
Can you direct me to the proper tree :-)
Comment #6
Anonymous (not verified) commentedJust post a new issue here: http://drupal.org/project/issues/bookingsapi :)
Comment #7
brein commentedthanks sorry about the trouble
1. time :-/
BTW: Greate work I like it
Comment #8
sah62 commentedOK, I just uninstalled alpha 1.x and reinstalled dev 3.x. The issue exists in dev 3.x, too:
Set Flexibility = Flexible, Availability status = Available (see attachment availability-4.jpg)
Save (-> "The availability Lesson Hours has been created.", see attachment availability-5.jpg but note warnings)
Type is now shown as "Available". Edit again, and Flexibility = Rigid (ee attachment availability-6.jpg)
I also attached a screen shot (request-1.jpg) to show you what I see when I try to place a request and check for a conflict. The progress meter appears, but there's no check mark or red X shown to describe the result of the search.
I mentioned a warning above: I got a user warning (availability-5.jpg) when trying to create the resource. The table in my DB is named drupal_content_type_bookingsapi_resource, but it appears that a table named content_type_bookingsapi_resource is being looked for.
Hope this helps!
Comment #9
Anonymous (not verified) commentedThere shouldn't be flexible or rigid availabilities in 3.x (they simply dont make sense)? Are you sure you installed both Bookings API and Public Bookings in 3.x?
Comment #10
sah62 commentedDefinitely. Screen shot of installed bookings modules attached. Is there something else I can check? Is it possible that something wasn't removed properly in removing and installing the modules?
Comment #11
Anonymous (not verified) commentedCould you send me a list of tables? And a list of columns in the bookings-tables?
Comment #12
sah62 commentedSure - I'll send them in a moment.
Comment #13
Anonymous (not verified) commentedYou're right .. it's still in the form.. somehow I never realized this (and only checked on the resource-page assuming that the form was created the same way, which would have been correct) My bad, I'll fix it.. SORRY!
Thanks for the data!
Comment #14
Anonymous (not verified) commentedOkay, its committed ..
Comment #15
sah62 commentedThanks! I'll pick up the new version as soon as it's available for download.
Comment #16
sah62 commentedwhen should I expect to find the fix available for download? The most recent version is still dated 21 May.
Comment #17
Anonymous (not verified) commentedIt's committed, but I have no way to make a new release available .. It should be rebuild every 24h, so tomorrow morning at the latest.
Comment #18
Anonymous (not verified) commentedBookings API now has a new dev-release ;)
Comment #19
sah62 commentedFix confirmed - thank you!