Last Comment Bug 336952 - first appearance of event disappears when I change date of item with recurrence
: first appearance of event disappears when I change date of item with recurrence
Status: RESOLVED WORKSFORME
: dataloss
Product: Calendar
Classification: Client Software
Component: Internal Components (show other bugs)
: Trunk
: All All
: -- major (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
: 352516 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-07 00:21 PDT by Damian Szczepanik
Modified: 2007-09-12 10:08 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Damian Szczepanik 2006-05-07 00:21:10 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3

Problem with displaing items with recurrences after drag and drop or simply change date

Reproducible: Always

Steps to Reproduce:
1. create new event (8th of May) with monthly repeating (8th of every month)
2. open event again and change date from 8th to 10th (without changing repeating) or just drag&drop
3. press OK button -> event does not apppers on 10th May (first problem)
4. goto 8th of April and delete event - do not use unifinder bar, just do it via main view -> event was deleted, however in unifinder still exists (I deleted single event without confirmation)
5. open event from unifinder and open recurrences bar -> there are exception (event, that was removed)
Actual Results:  
date wos not changed

Expected Results:  
all events should be visible every 10th of month

Behaviours:
1. afret changind date, first apperance was not display
2. when I tried delete event I do not have confirmation dialog (delete single event or all)
3. I change date, but event was still visible (every) 8th of month

version: latest-trunk/sunbird-0.3a2.en-US.win32.zip
Comment 1 Damian Szczepanik 2006-05-12 12:34:58 PDT
Ok, some more details:

step 3a. When I move event and open it I see new date in unifinder and old one in dialog (edit event)
after restoring Sunbird edit event dialog shows also new date
also after changing date and open recurrence dialog (withour clsing edit event dialog) I still see old label (every 8th of month instead of 10th of month), but it is very close, so let me put it here, not in new bug
Comment 2 Michael Büttner (no reviews TFN) 2006-09-13 05:51:05 PDT
*** Bug 352516 has been marked as a duplicate of this bug. ***
Comment 3 Michael Büttner (no reviews TFN) 2006-09-13 05:54:13 PDT
do we want this one to take the 0.3 train?
Comment 4 Dan Mosedale (:dmose) 2006-09-13 08:52:49 PDT
Yeah, we should take this; thanks for the nomination.
Comment 5 Michael Büttner (no reviews TFN) 2006-09-15 01:23:52 PDT
the cause of the problem is that a recurrence rule states that the series consists of the set of items where the bound recurrence rule satisfies a specific condition, in this case at the 8th of every month (modelled as a BYMONTHDAY) rule. the evaluation of the set of item starts at the root item of the series. if the startdate of this item is past the first expected occurrence, the occurrence is obviously dropped, thus it just disappears if the startdate is modified so this behavior is triggered.

one possible solution would be to modify the underlying recurrence rule(s) in order to satify the first occurrence of the series. but unfortunately this is a non-trivial task. imagine a BYMONTHDAY rule with the following array {1,2,3} where the item starts a the first day of the month. what exactly should happen if the user changes the startdate to e.g. the 5th of the month? should the array be offset by the number of days (in this case 5)? what if the user selected the 31th of the month? in this case it would be illegal to offset all elements of the array. another problematic case would be a rule which states "repeat at the last workday of the month". i wouldn't even know how to update the rule in order to reflect a new startdate without causing the first occurrence to disappear.

any ideas?
Comment 6 Michiel van Leeuwen (email: mvl+moz@) 2006-09-17 13:10:45 PDT
My initial thought was to disable dragging of a completer recurring set of items. (Dragging one occurence is no problem ofcourse) It's not clear what it means, and i think we can go away with it disabled for 0.3.
Then i thought that for some cases, it is clear what should be changed. If an item recurs every month on the 5th, and you drag to the 6th, it is pretty clear that the rule should update. If it recurs every second monday, and you drag it to the thirds wednesday, it is not that clear. We could enable dragging for the simple cases, those where we know what to do.

In the long run, we need to think more about dragging and recurring items. Do we want to model the paper calendar idea more, where you always work on the occurences?
Comment 7 Michael Büttner (no reviews TFN) 2006-09-21 04:02:24 PDT
(In reply to comment #6)
> If it recurs every second monday, and you drag it
> to the thirds wednesday, it is not that clear. We could enable dragging for the
> simple cases, those where we know what to do.
iCal handles those cases similar as you described it. For simple rules (e.g. every day, for 5 occurrences) it is possible to change the series. More complex rules can't be changed and therefore exceptions are created for those specific occurrences that the user wants to change. I personally could imagine that users might be confused why certain series can be changed while others rufuse to be modifed as a whole and exceptions are created. Wouldn't it be better to be consistent and stick to one solution? And since complex rules (e.g. last workday in month, etc.) can't be changed, I'd propose to always create exceptions if the user changes an occurrence.
Comment 8 Dan Mosedale (:dmose) 2006-09-25 12:22:45 PDT
I like the idea of making dragging events in 0.3 always apply to occurrences.  It's consistent, and any edit to the entire pattern that you want to make can also be done via the dialog.  This means, I suspect, that it would still be possible to  trigger this bug by editing just the start and end dates in the dialog and not fixing up the recurrence sub-dialog.  However, that makes this bug somewhat harder to stumble upon, so I think it's something we could live with for 0.3
Comment 9 Dan Mosedale (:dmose) 2006-09-25 12:26:23 PDT
Let's leave this bug for the underlying problem, and make dragging always apply to the occurrence in bug 352862.
Comment 10 Sebastian Schwieger 2007-09-12 04:22:14 PDT
(In reply to comment #0)
> User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.3)
> Gecko/20060426 Firefox/1.5.0.3
> Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.0.3)
> Gecko/20060426 Firefox/1.5.0.3
> 
> Problem with displaing items with recurrences after drag and drop or simply
> change date
> 
> Reproducible: Always
> 
> Steps to Reproduce:
> 1. create new event (8th of May) with monthly repeating (8th of every month)
> 2. open event again and change date from 8th to 10th (without changing
> repeating) or just drag&drop
> 3. press OK button -> event does not apppers on 10th May (first problem)

Event appears on 10th of May by now (maybe fixed by bug 268613). The reccurrance rule is still not updated.

Comment 11 Simon Paquet [:sipaq] 2007-09-12 10:08:11 PDT
This is WFM now with yesterday's build Lightning on WinXP.

Note You need to log in before you can comment on or make changes to this bug.