I've got a strange problem where the bucket reservations are not optimizing. When I try to make a reservation (even before assigning specific bucket times) it won't allow me to do so. Is there any way to have the bucket items recalculate for optimal usage? I've attached an image of an example... In this example I can't make a reservation from 11:30a-1:30p. If the Bucket that starts at 1:30 in the #2 spot was moved to the #5 spot all would be well and the whole #2 would be open. I hope this makes some sense. Any advice would be appreciated.

Comments

darrick’s picture

Do any of the existing reservations have a bucket item assigned? Can you write in words what each existing reservation is or send us a screenshot of the reservation table for that day.

kreynen’s picture

StatusFileSize
new65.05 KB

I was able to reproduce this with 2 DV Cameras when one reservation had an assigned item and the other didn't. Even when I assigned both to camera #1, there was still a conflict. Unselecting the specific camera from both reservations allowed me to make the reservation, but these seems like an error since camera #2 is actually available.

Doesn't this happen when using auto-assign buckets?

thepulsingeye’s picture

StatusFileSize
new62.05 KB

I think that's the exact problem.
In my example, only the reservations that are "Checked Out" have assigned bucket items. The reservations that are "unconfirmed" or "Confirmed" don't have an assigned item yet. I was able to somewhat fix the problem by assigning all of the future reservations bucket items #1,#3,#4,#5 which then opened up camera #2. I was then able to confirm a reservation for one of the cameras as intended, then I went back and unassigned items to the future reservations. The strange thing there was after they were unassigned the items in the reservation grid moved back to #1, #2,#3,#4 leaving #5 "available".

I'll see if auto-assign will make it work, but I would prefer not to use it. It's often hard to rely on students bringing things back on time, despite policy and late fees.

darrick’s picture

Assigned: Unassigned » darrick

I doubt auto-assign will help. I'll look into this later today.

darrick’s picture

This should be fixed in this commit: http://drupalcode.org/project/merci.git/commit/ae1b9be

What was happening was this:

Two buckets items with nid of 101 and 102.

Create two different reservations at different times for the bucket type.

Assign a bucket item with the higher nid to one of the reservations. This is key as the conflict will not happen if you assign the item with the lower nid.

Try to create a third reservation overlapping the above two and you will get a conflict.

darrick’s picture

Status: Active » Needs review
thepulsingeye’s picture

StatusFileSize
new73.45 KB
new62.19 KB

I applied the patch and it did compress the open areas, but there's still something not quite working.
For example I tried to make a reservation from 11a to 2:30p it the conflict grid popped up (pic#1). At first I thought that maybe it was trying to place that reservation in position #2 rather than realizing position #5 was available, so I filled up positions #2,#3,#4 with other reservations, but it still wouldn't allow the reservation to occur in position #5 (pic#2) even though the time slot was open.

Since then I downloaded the Mar24 dev build and I'll keep you posted on wether that solves the problem.

darrick’s picture

Okay. Thanks for checking it out. I'll look into it further.

BTW: you also found a bug with this drupal issue queue. The pound sign in your uploaded pics isn't translated to unicode. The links to your pics should be:

http://drupal.org/files/issues/pic%231.png
http://drupal.org/files/issues/pic%232.png

I posted that issue here: http://drupal.org/node/1105502

darrick’s picture

@thepulsingeye I'm unable to reproduce this. What items do you have assigned to the reservations? Which reservations do not have assigned items. What are the nids of the assigned items.

Can you join the #drupal-openmedia IRC channel to help me solve this?

thepulsingeye’s picture

The cameras are nids 401-405
In the above examples the current time was 12p let's say. Everything from earlier had items assigned items. In pic 1 the 7am-11am time was nid 404. Everything that came after had no bucket item assigned.

I updated to the current dev build and have not been able to replicate it since. I'll run in debug for a while and if it happens again post the logs.

darrick’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)
Issue tags: -optimization, -reservation, -conflict grid, -bucket

Automatically closed -- issue fixed for 2 weeks with no activity.