Author Topic: Repeating Event Exceptions  (Read 5212 times)

gwest39

  • Newbie
  • *
  • Posts: 20
    • View Profile
Repeating Event Exceptions
« on: October 29, 2010, 02:49:24 AM »
I have been working on creating the ability to have exceptions for repeating events and I am posting what I have done so far. The exceptions are added to a new `og_project_event_exceptions` table. The only two values in the table are 'event_id' and 'exception_date'.

I have attached an image of a user interface to add and remove exceptions that has been added to the "Repeating Events" section when editing an event. At this time, the user interface is not completely functional as intended. Currently, you can add one exception at a time by entering in a value in the date field next to the "Add" button. You then need to save the event to add the single exception in that field when the form is submitted. To add more exceptions you would have to edit the event again and put in another date.  The user interface currently will also show and list the event exceptions for the event (showing them in the database date format for now). You cannot delete exceptions through the user interface at this time, but you can delete them manually from the database (I hope to add this functionality in the next version).

For the way it is intended to work, Javascript would be used to modify the list of exception dates in the select box using the "Add" and "Remove" buttons. Clicking the "Add" button would add the exception entered in the date field to the list below it and then you would submit the whole list when you save the event.  Clicking the "Remove" button would clear the selected exceptions from the list. When the event is saved, all the exceptions for that event would be removed from the database and replaced with the modified list submitted.

I was mainly trying to create this event exception functionality as simply as I could and in as little time as possible to meet our needs. There are several things that could be more fully and better implemented in later versions, but this is functional enough for now. It would also be best to have the event exceptions defined as their own model among other things.

I also added the ability to export the event exceptions when exporting a calendar in iCal format since we also needed that functionality. It cannot, however, import exceptions in iCal format at this time.

I have attached instructions on how to add this functionally in a file called "Event Exceptions V1-2.txt" attached to this post. I have also included the full PHP files that have been modified from FengOffice version 1.7.2 in a file called "Event Exceptions V1-2.zip". (You need to be logged-in to access the attached files.)
« Last Edit: November 02, 2010, 12:17:23 AM by gwest39 »

gwest39

  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: Repeating Event Exceptions
« Reply #1 on: November 02, 2010, 01:37:51 AM »
Another user interface to implement exceptions would be to give the user an option to either "Edit this Occurance" or "Edit this Series" when the user clicks to edit an event. If they choose "Edit this Occurance" an exception can automatically be added for the date they clicked on and a new event with the same properties as the original event (except for the repeating part) would be created for them to edit.

In order for this to work, Feng Office would have to add an extra value to the URL links when clicking on an event that would include the actual date of the event you are clicking on. Currently, the links only include the event id, so it just shows the start date of the repeating event when you click to view it in the calendar.

franponce87

  • Administrator
  • Hero Member
  • *****
  • Posts: 1819
    • View Profile
    • Email
Re: Repeating Event Exceptions
« Reply #2 on: November 02, 2010, 11:32:41 AM »
Great job gwest39! I am sure many people will be using this feature! Thanks for your contribution!

Keep up the good work

Best regards,
Francisco
Would you like to install Feng Office Professional or Enterprise Edition in your servers? No problem! Read this article!

deoman

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Repeating Event Exceptions
« Reply #3 on: March 31, 2012, 11:14:06 AM »
how to solve this problem in version 2.0?

 

anything