Activity log for bug #117817

Date Who What changed Old value New value Message
2007-05-30 18:11:59 sainrat bug added bug
2007-06-04 21:19:53 Tom Hoffman schooltool: assignee ignas
2007-06-04 21:19:53 Tom Hoffman schooltool: statusexplanation
2007-06-05 11:06:50 Ignas Mikalajūnas schooltool: status Unconfirmed Confirmed
2007-06-05 11:06:50 Ignas Mikalajūnas schooltool: importance Undecided Wishlist
2007-06-05 11:06:50 Ignas Mikalajūnas schooltool: statusexplanation Yes we only test for intersection with first event in the chain. The heuristics could be improved i guess, but implementing a system that would find whether there is a possible intersection between 2 infinitely recurring events is very difficult and not very feasible so i am marking this as a "Wishlist". If you want to you can try and come up with some kind of clever algorithm, i will gladly accept patches that fix this problem. As for your current code: def getConflictingEvents(self, resource): """Return a list of events that would conflict when booking resource.""" events = [] if not canAccess(resource.calendar, "expand"): return events if self.context.recurrence: totest = [] # this loop is infinite when you have an infinite recurrence rule for d in self.context.recurrence.apply(self.context): totest.append(datetime(d.year, d.month, d.day, self.context.dtstart.hour, self.context.dtstart.minute, self.context.dtstart.second, self.context.dtstart.microsecond, self.context.dtstart.tzinfo)) else: totest = [self.context.dtstart] for d in totest: # expanding each of the events let's say 300 times (because we have a daily recurring event for a year) for event in resource.calendar.expand(d,d + self.context.duration): # for every one of like 100 events in the resource calendar # and we show at least 10 resources # i am afraid this would be too slow :( if event != self.context: events.append(EventForBookingDisplay(event)) return events
2010-05-03 07:22:23 Justas Sadzevičius tags calendar resources
2010-09-09 16:05:00 Ignas Mikalajūnas schooltool: assignee Ignas Mikalajūnas (ignas) Justas Sadzevičius (justas-pov)