Error editing a reservation
zetxek - October 12, 2007 - 03:37
| Project: | Resource Conflict |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
When you edit a reservation (let's call that way the events that are related to some resource), if you try to leave the same start and end date you get and error as if you were creating a new event and that resource was already reserved.
(There is a resource conflict. "Meeting room" is currently booked. Please choose a different time or a different resource.)

#1
Thanks for the report. I've fixed this in CVS - can you check it to make sure it works for you?
--Andrew
#2
There is still a problem when increasing a reservation, colliding with another reservation:
1) You create reservation 1 (for example, from 19:00 to 20:00).
2) You create reservation 2 (from 20:00 to 20:30), reserving same node that the 1st one.
3) The module should not allow you to expand reservation 1 from 19:00 to 20:10 (or any time over reservation 2), as the node is booked by reservation 2, but it does.
Anyway, I think the bug of the php error has been corrected succesfully.
#3
I found the problem. I'd been returning a call to db_fetch_array, which only returns the first result, which is often the node being edited. I added a quick loop to fetch all of the results. I've commited the patch - let me know if this works for you.
Thanks,
--Andrew
#4
It seems perfect right now, I think this bug has been fixed.
Closing it.
#5
I actually found another bug related to this. If you extend a booking to end at the same end time as a pre-existing event, it goes through. I'm double-checking my SQL now :)
#6
Ok, hopefully this does it :)
I reorganized the SQL a little and have tested all of the cases. Marking as closed.
#7
Great, I'll get the CVS and test it a little bit more, and see that SQL changes you made :-)
#8