NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      Summary

      Team Calendars only imports .ics files that respects the RFC-2445. However, the Team Calendars plugin expects that the end date exists for every event, which is not actually mandatory according to the mentioned RFC:

      2. A calendar entry with a "DTSTART" property but no "DTEND"
      property does not take up any time. It is intended to represent
      an event that is associated with a given calendar date and time
      of day, such as an anniversary. Since the event does not take up
      any time, it MUST NOT be used to record busy time no matter what
      the value for the "TRANSP" property.

      Steps to Reproduce

      1. Install a Team Calendars in your Confluence
      2. Import a Calendar using the ConfluenceTeamCalendars_webcal.ics file attached to this report.

      Expected Results

      • The Calendars is imported as expected.

      Actual Results

      • The below exception is thrown in the atlassian-confluence.log file and the Calendar is not imported:
        2016-10-24 15:30:05,210 ERROR [ajp-nio-8001-exec-6] [extra.calendar3.xwork.ImportSubCalendarAction] execute Unable to import events of type other
         -- referer: http://quicksilver/confluence/calendar/mycalendar.action | url: /confluence/plugins/calendar/importsubcalendar.action | traceId: cfae990fa67f73ba | userName: admin | action: importsubcalendar
        java.lang.NullPointerException
        	at com.atlassian.confluence.extra.calendar3.DefaultActiveObjectsServiceWrapper.createEventEntity(DefaultActiveObjectsServiceWrapper.java:93)
        	at com.atlassian.confluence.extra.calendar3.DefaultActiveObjectsServiceWrapper.createEventEntity(DefaultActiveObjectsServiceWrapper.java:77)
        	at com.atlassian.confluence.extra.calendar3.calendarstore.AbstractCalendarDataStore.setSubCalendarContent(AbstractCalendarDataStore.java:1114)
        	at com.atlassian.confluence.extra.calendar3.calendarstore.AbstractPeopleHandlingSubCalendarDataStore.setSubCalendarContent(AbstractPeopleHandlingSubCalendarDataStore.java:124)
        	at com.atlassian.confluence.extra.calendar3.calendarstore.SanboxSubCalendarDataStoreCachingDecorator.setSubCalendarContent(SanboxSubCalendarDataStoreCachingDecorator.java:149)
        	at com.atlassian.confluence.extra.calendar3.calendarstore.DelegatingCalendarDataStore.setSubCalendarContent(DelegatingCalendarDataStore.java:234)
        	at com.atlassian.confluence.extra.calendar3.DefaultCalendarManager.setSubCalendarContent(DefaultCalendarManager.java:1808)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:483)
        	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        	at com.atlassian.plugins.spring.interceptor.plugin.ExportableInterceptorAdapter$WrappedMethodInvocation.proceed(ExportableInterceptorAdapter.java:53)
        	at com.atlassian.plugins.spring.interceptor.spi.SpringInterceptorAdapter$SpringMethodInvocationAdapter.proceed(SpringInterceptorAdapter.java:50)
        	at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:16)
        	at com.atlassian.plugins.spring.interceptor.spi.SpringInterceptorAdapter.invoke(SpringInterceptorAdapter.java:23)
        	at sun.reflect.GeneratedMethodAccessor1098.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:483)
        	at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
        	at com.sun.proxy.$Proxy287.invoke(Unknown Source)
        	at com.atlassian.plugins.spring.interceptor.plugin.ExportableInterceptorAdapter.invoke(ExportableInterceptorAdapter.java:26)
        	at sun.reflect.GeneratedMethodAccessor1103.invoke(Unknown Source)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        	at java.lang.reflect.Method.invoke(Method.java:483)
        

      Notes

      • The code for DefaultActiveObjectsServiceWrapper.java:93 is:
        Date endDate = endDateProperty.getDate();
        

      Workaround

      • Remove the events that do not have DTEND defined, or add a DTEND line for the events in those .ics file.

      You may use the ics_modified.js to parse the ics file to automatically add the DTEND attribute to those events that are missing.

      1. Save the ics file in a temporary folder.
      2. Save the script file in the same folder.
      3. Open a terminal window and change directory to the folder above.
      4. Run the script providing the filename as an argument and directing the output to another file.
        node ./ics_modified.js iCal.ics > iCal_parsed.ics
        
      5. Import the parsed ics file to Confluence.

            [CONFSERVER-48870] Cannot Import ICS File When an Event Does Not Have DTEND

            No work has yet been logged on this issue.

              Unassigned Unassigned
              emallmann Eduardo Mallmann (Inactive)
              Affected customers:
              9 This affects my team
              Watchers:
              14 Start watching this issue

                Created:
                Updated: