Attempting to add or modify a calendar causes error: Recurrence Pattern::Until must be > current date.

Version 1



    Attempting to add or modify a calendar causes error:

    Recurrence Pattern::Until must be > current date.



    Cause:  There are incorrectly configured Exceptions that show as Re-occuring but have an end date in the past.

    These are the steps that fixed this issue in one database on one calendar based on certain Exceptions that were improperly configured.  These steps may need to be slightly altered depending on the DB and calendar having the problem:
    Backup the HEAT database before performing any of these changes.
    1.    Copy the Definition column contents for the calendar to a text editor.  To do this:
              a.    Run the following SQL statement:
                      SELECT * FROM [HEATSM].[dbo].[Frs_def_hours_of_operation]
              b.    Find the proper calendar from the results of above statement.
              c.    Highlight the contents of the Definition column for this calendar and copy it.
              d.    Open a text editor and paste this data.
    2.    Manually modify the text file contents for the known bad exceptions by locating the “{Name” of the Exception, then find the entry value that states something similar to below:
    {Frequency:"Weekly",Until:new Date("2015-05-14T00:00:00"),
    3.    Change this value to the following:
    4.    Repeat the text file alterations for all known {Name values that have an “Until:new Date..” entry in the past.
    5.    Once all the Exceptions have been modified, run a SQL statement to repopulate this Definition data with the corrections back into the Frs_def_hours_of_operation table using an UPDATE statement WHERE the RecID = the RecID of the proper calendar.
    NOTE:  Be sure when copy/paste/modification of the data into the text editor that you do not change the formatting of the data in any manner, for example, do not word wrap it or add carriage returns or spaces etc.
    6.    After running the UPDATE statement to re-populate the fixed Definition data, refresh the application and go to the affected calendar. 
    7.    The open days may look off because setting the EndDate “Until” value to null has altered the exceptions to a state of not having an end date. 
    8.    Delete the bad Exceptions for the calendar; after each Exception is deleted the calendar will populate properly.