Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Pages: [1]   Go Down
Print
Author Topic: NoOverlap bug?  (Read 673 times)
0 Members and 1 Guest are viewing this topic.
Keith G
Guest
« on: January 06, 2003, 12:11:00 PM »

  I was wondering if anyone else had seen this problem with the NoOverlap plugin. The plugin works fine when a person is entering a conflicting schedule for one specific date. The problem I am seeing is that if a person enters a schedule for multiple dates only the first date seems to get checked for conflicts. If there aren't any conflicts on the first date ALL of the remaining dates get scheduled even if there is a conflict of times. So it does not look like it is looping to check for all possible dates for conflicts.
   Anyone else seen this and have a fix to make it check all the dates?

  Thanks -
      Keith

Logged
Keith G
Guest
« Reply #1 on: January 06, 2003, 12:40:00 PM »

  After some more testing I found that NoOverlap will check for conflicts if the multiple dates are part of a recurring schedule. It does not seem to check for conflicts when multiple dates are entered from the
Individual Date(s):
line on the non-recurring schedule page. It will check the first date in the string but not the others.
          Keith
Logged
Keith G
Guest
« Reply #2 on: January 07, 2003, 06:07:00 PM »

 I think I found out where the code needs to be edited but since my Perl abilities are not much better than modifying hacks that have already been written I am not sure how to edit this. The file this code came from is the after_schedule_event.pl file in the NoOverlap plugin directory. It is part of the sub addAllTimes and is at the bottom. Here is what I thnk needs to be edited -

else    #bounded recurring event, or normal, single occurrence event.
       {
               push @$start, $schedule->{start};
               push @$end, $schedule->{start} + $length;
       }

 The bounded recurring event part works fine, it just doesn't seem to check for overlaps when there is more than one date entered on the single event line. It will check the first date entered but if there is not a conflict it will add the event to the other dates as well not checking for overlaps.

 If anyone could offer any insight I would appreciate it.
    Thanks again -
         Keith

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: January 08, 2003, 03:40:00 PM »

TubeDave (the original plug-in author) is back and will likely see your message and look into it when he gets a chance. With the speed he usually works, it shouldn't be too long for a solution I would think.

Dan O.

------------------

Logged
TubaDave
New Member
*

Karma: 0
Offline Offline

Posts: 0

Student


WWW
« Reply #4 on: January 08, 2003, 06:31:00 PM »

Hi Keith,

So far, I am unable to reproduce your bug.  Could you post the schedule of 2 events that should conflict but don't and I'll see if I can fix it.

David Whittaker

Logged

Keith G
Guest
« Reply #5 on: January 08, 2003, 08:43:00 PM »

 Hmmm ... I hope it isn't something strange just on my set up. Anyway - here is a scenario.

Event one - A user adds an event in January 03 from 1:30pm to 4pm on the 13th, 20th, 27th. No other events are scheduled during that period so the events are added.

Event two - 2nd user adds an event in January 03 from 2pm to 4pm on the 9th, 20th and 27th. Nothing is scheduled on the 9th. Since this is not a recurring event the dates are entered individually on the Individual Dates line on the Schedule Event form. After saving the schedule the events are entered onto the calendar even though the last two dates overlap.

 I tested it using the first date in the string of dates as the overlap date and the plugin works as expected, it does not allow the addition. It just seems to me that if the first date is not in conflict when they are entered in a string on the individual date(s) input line the plugin does not check the remaining dates in the string.
 I hope this clarifies the problem and I hope you can reproduce it! I've been having some oddities occur with a couple of Michael's plugins that he can't seem to reproduce on his end.
 Thanks for any help and glad to see you are back -
         Keith

Logged
TubaDave
New Member
*

Karma: 0
Offline Offline

Posts: 0

Student


WWW
« Reply #6 on: January 08, 2003, 09:24:00 PM »

Nope, still can't reproduce it.  Those inputs fail as expected.  What other plugins are you using?  Perhaps it's the combination of plugins that's causing the problem.

------------------
David Whittaker
[url" target="_blank">http://bama.ua.edu/~whitt013

Logged

Keith G
Guest
« Reply #7 on: January 08, 2003, 10:07:00 PM »

I was afraid of that ....

 The other plugins (enabled) I am using are (in order from top to bottom):

NoOverlap
Redirector
EmailNotify
DeleteOld

I just tried the scenario above again and as long as the date that does not cause the overlap problem is listed first (ie 9th, 20th 27th) the overlap occurs. If I change it around and enter the dates where the first one is causing the overlap (ie 20th, 27th, 9th) the Overlap plugin works as expected and does not allow the entry.

Not sure if it matters, but the event that is getting stepped on (Event 1) was entered as a recurring event. Also I am using a slightly modified version of the dayspan template but I'm not sure how likely that is the cause. The overlap either occurs (or doesn't) right after the save button is hit on the schedule. If the overlap occurs, redirector takes me right back to thte calendar with the overlapping event added. If the overlap does not occur, I get the error message that another event has been scheduled at the same time in the schedule event entry form.

Hope this helps some -
    Keith

Logged
Keith G
Guest
« Reply #8 on: January 09, 2003, 08:34:00 AM »

OK - I have found and fixed the problem. A while back I was trying to get the edit recurring events individually hack to work. I had modified the Events.inc file and calendar_admin.pl file according to the posts in this link - http://www.calendarscript.com/support/forum/Forum5/HTML/000045.html  
  This code does not work in Calendarscript 3.2 but I had left the mod in the 2 files in case something simple came up to make it work. By taking this code out of the 2 files the NoOverlap function works as it should. Maybe something to keep in mind if you decide to tackle the edit recurring events individually job?

 Anyway - thanks for your time and hope this might help other people who might run into similar problems.
             Keith

Logged
Pages: [1]   Go Up
Print
Jump to: