dlsc-software-consulting-gmbh / CalendarFX

A Java framework for creating sophisticated calendar views (JavaFX 8, 9, 10, and 11)
http://www.dlsc.com
Apache License 2.0
792 stars 170 forks source link

Support defining exceptions for recurrence rules #53

Open mkroening opened 5 years ago

mkroening commented 5 years ago

"There is currently no support for defining exceptions for recurrence rules. In most calendar applications, when the user edits a recurrent entry, the user will be asked whether he wants to change just this one recurrence or the whole series. This feature is currently not supported but will be in one of the next releases." (CalendarFX manual - Known Issues)

This issue is meant to track any progress on this. I think that, without this feature, this library is nearly unusable for many use cases (including mine).

Dialog of GNOME Calendar 3.32.2, when pressing apply after editing a recurring event for reference: gnome-calendar-edit-recurring

Has work on this started already? How can I help?

dlemmermann commented 5 years ago

Work has not started, yet, no. Feel free to fire away. You would need to listen to calendar change events. If the changed event is a recurring one then you need to bring up the dialog you posted. Based on the response you have to update the model accordingly, e.g. modify the RRULE string to include the exception for the dragged item.

mkroening commented 5 years ago

Thanks for the update! I'll look into it, although I can't say how much time I can spare in the coming weeks.

mkroening commented 5 years ago

I am trying to get some progress on this for weeks but there are a few things I need help with:

  1. I currently intercept CalendarEvents in DateControlSkin::calendarChanged. Is that the best place to do that?

  2. I don't seem to get enough information from the events. A event does not seem to carry the information which recurrence was changed (see sample event).

  3. Furthermore if changing a recurring event the same (determined using System.identityHashCode) event is being processed multiple times.

  4. Would it be okay to use an Alert for the dialog or is it necessary to make a custom Control with a custom Skin?

Sample event (Changed the recurrence of 2019-10-19):

CalendarEvent [
  entry=Entry [
    title=New Entry 2,
    id=0, fullDay=false,
    startDate=2019-10-12,
    endDate=2019-10-12,
    startTime=19:15,
    endTime=20:15,
    zoneId=Europe/Berlin,
    recurring = true,
    rrule = RRULE:FREQ=DAILY,
    recurrence = false
  ],
  calendar=Calendar [
    name=Birthdays,
     style=style6,
     readOnly=false
  ],
  oldInterval=null,
  oldFullDay=false,
  oldText=New Entry 1,
  oldCalendar=null,
  eventType=ENTRY_TITLE_CHANGED,
  target=Calendar [
    name=Birthdays,
    style=style6,
    readOnly=false
  ],
  consumed=false,
  source=Calendar [
    name=Birthdays,
    style=style6,
    readOnly=false
  ]
]
dlemmermann commented 4 years ago

Has there been any progress on this in the meantime? I totally forgot to follow up on this.

mkroening commented 4 years ago

Not really. Some months ago, I played around a bit (mwkroening/CalendarFX/recurrence-exceptions), but was not able to progress any further as explained in my last comment.

This is required for a long time side project of mine, which I infrequently work on. Since it is not anywhere near completion, this issue is not time crucial for me.

dlemmermann commented 3 years ago

Any update?

mkroening commented 3 years ago

No, sorry.

I did not work on the side project or this issue for that matter in the meantime, and I am not sure, if I ever will, to be honest.