6.0.0-beta1
7/13/25

[#1503] Recurring events when I delete a recurrence ALWAYS create an exception.
Summary Recurring events when I delete a recurrence ALWAYS create an exception.
Queue Kronolith
Queue Version 2.0.2
Type Bug
State Resolved
Priority 1. Low
Owners chuck (at) horde (dot) org
Requester scalero (at) datadec (dot) es
Created 03/07/2005 (7433 days ago)
Due
Updated 03/31/2005 (7409 days ago)
Assigned 03/28/2005 (7412 days ago)
Resolved 03/31/2005 (7409 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/31/2005 09:30:02 AM scalero (at) datadec (dot) es Comment #5 Reply to this comment
1.- Sorry.



2.- I was mistaken in this point.  I thought the function 
'hasActiveRecurrence' must to return only true if the event has more 
than ONE recurrence.  Sorry again.



Your patch seems optimal and I have already applied it.





Greetings and thanks.



Sebastian Calero.
03/31/2005 04:16:34 AM Chuck Hagenbuch Comment #4
State ⇒ Resolved
Reply to this comment
1. Please use unified diffs and upload patches as attachments instead 
of pasting them.



2. I don't think that patch makes sense. Why wouldn't the 
hasActiveRecurrences() call catch the case you're talking about?



I've committed a fix for what I've been able to reproduce.
03/29/2005 08:52:57 AM scalero (at) datadec (dot) es Comment #3 Reply to this comment
OK you can remove the event directly in the 'future' case like this:



diff  deleventaction.php



line 38



<             $event->addException(Util::getFormData('year'),

<                                  Util::getFormData('month'),

<                                  Util::getFormData('mday'));

---
             if (mktime(0, 0, 0, $event->start->month, 
$event->start->mday, $event->start->year) ==
                 mktime(0, 0, 0, Util::getFormData('month'), 
Util::getFormData('mday'), Util::getFormData('year'))) {
                 $kronolith->deleteEvent($event->getID());
             } else
                 $event->save();
line 49



<         if ($event->hasRecurType(KRONOLITH_RECUR_NONE) || 
Util::getFormData('all') || !$event->hasActiveRecurrence()) {

---
         if (isset($event) && 
($event->hasRecurType(KRONOLITH_RECUR_NONE) || 
Util::getFormData('all') || !$event->hasActiveRecurrence())) {
Sebastian Calero.
03/28/2005 07:57:50 PM Chuck Hagenbuch Comment #2
Assigned to Chuck Hagenbuch
State ⇒ Feedback
Reply to this comment
It looks to me like that addException() call in the 'future' case was 
simply left over and shouldn't be there at all - please test what 
happens when you just remove it?
03/07/2005 04:00:41 PM scalero (at) datadec (dot) es Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Recurring events when I delete a recurrence ALWAYS create an exception.
Queue ⇒ Kronolith
Reply to this comment
If you create a recurring event, for example for all days in this 
month, if I delete the recurrence for day 15 and click "Future" all is 
OK.



But I select the same event and modify the end date again at 30 March 
the recurrence of the day 15 not appear because has a exception.



I think we must add a exception only for the fisrt recurrence of the 
recurring event.



POSIBLE FIX:



diff -r1.1 deleventaction.php

38,40c38,43

<             $event->addException(Util::getFormData('year'),

<                                  Util::getFormData('month'),

<                                  Util::getFormData('mday'));

---
             if (mktime(0, 0, 0, $event->start->month, 
$event->start->mday, $event->start->year) ==
                 mktime(0, 0, 0, Util::getFormData('month'), 
Util::getFormData('mday'), Util::getFormData('year'))) {
                 $event->addException(Util::getFormData('year'),
                                      Util::getFormData('month'),
                                      Util::getFormData('mday'));
             }

Saved Queries