Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-78467

Team Calendar reminder notifications not sent

    XMLWordPrintable

Details

    Description

      Issue Summary

      This is reproducible on Data Center: YES 

      • Reproduced in Confluence Server 7.13.3 w/ TC-7.1.4
      • Reproduced in Confluence DC 7.16.0 w/ TC-7.3.1
      • Reproduced in Confluence DC 8.0.2 w/ TC-8.0.7

      Steps to Reproduce

      1. Setup a fresh Confluence instance
      2. Create admin user with a valid email address
      3. Login as the admin user
        1. Create test user with a valid email address   
        2. Setup SMTP mail server > send test mail to confirm SMTP is working
        3. Go to Calendars (top menu)
        4. Add Calendar
        5. Set name, description, related space & time zone > click OK
        6. Click three dots (...) next the Calendar > Edit > Event Types
        7. Set reminder for event type Birthdays to 20 minuets > Click OK
      4. Login as test user
        1. Go to Calendars (top menu)
        2. Add Existing Calendar
        3. Search for calendars and add
      5. Login as admin user
        1. Go to Calendars (top menu)
        2. Add Event
        3. Type: Birthday
        4. Who: test user & admin user
        5. Summary: testing-reminders
        6. All day event: disable (uncheck)
        7. Start: Today, 20 minuets from now
        8. End: Today, 1hr after start
        9. Repeat: Does not repeat
        10. note that reminder is correctly reflected as 5 minutes before
        11. Event appears on calendar
      6. Login as test user
      7. Verify event is display and reminders are enabled
      8. Wait for the reminder notification
      9. No reminder is sent

      Expected Results

      Reminder notification is sent to the admin & test user 20 minuets prior to the start time of the event.

      Actual Results

      No reminder notifications are sent. The below exception is thrown in the atlassian-confluence.log file:

      022-04-14 20:48:49,274 ERROR [team-calendars-worker-1] [extra.calendar3.reminder.DefaultRemindingSettingHelper] enableRemindingForWatcher Could not enable reminding me option for admin on sub calendar Testing
       -- url: /rest/calendar-services/1.0/calendar/events.json | referer: http://localhost:8090/calendar/mycalendar.action | traceId: fbf8a21ca0e6f7ec | userName: admin
      
      2022-04-14 20:48:49,275 ERROR [team-calendars-worker-1] [extra.calendar3.reminder.DefaultRemindingSettingHelper] enableRemindingForWatcher Exception during enable reminding me
       -- url: /rest/calendar-services/1.0/calendar/events.json | referer: http://localhost:8090/calendar/mycalendar.action | traceId: fbf8a21ca0e6f7ec | userName: admin
      com.atlassian.activeobjects.internal.ActiveObjectsSqlException: There was a SQL exception thrown by the Active Objects library:
      Database:
          - name:PostgreSQL
          - version:9.6.24
          - minor version:6
          - major version:9
      Driver:
          - name:PostgreSQL JDBC Driver
          - version:42.2.18org.postgresql.util.PSQLException: ERROR: insert or update on table "AO_950DC3_TC_REMINDER_USERS" violates foreign key constraint "fk_ao_950dc3_tc_reminder_users_sub_calendar_id"
        Detail: Key (SUB_CALENDAR_ID)=(39a8eb77-dc03-473c-8209-b378f7e7706c) is not present in table "AO_950DC3_TC_SUBCALS".
          at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:95)
          at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.create(TenantAwareActiveObjects.java:267)
          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:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
          at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
          at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
          at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
          at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
          at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
          at com.sun.proxy.$Proxy2732.create(Unknown Source)
          at com.atlassian.confluence.extra.calendar3.calendarstore.AbstractCalendarDataStore.setReminderFor(AbstractCalendarDataStore.java:2060)
          at com.atlassian.confluence.extra.calendar3.calendarstore.AbstractCalendarDataStore.setReminderFor(AbstractCalendarDataStore.java:2045)
          at com.atlassian.confluence.extra.calendar3.calendarstore.SanboxSubCalendarDataStoreCachingDecorator.setReminderFor(SanboxSubCalendarDataStoreCachingDecorator.java:315)
          at com.atlassian.confluence.extra.calendar3.calendarstore.DelegatingCalendarDataStore.setReminderFor(DelegatingCalendarDataStore.java:662)
          at com.atlassian.confluence.extra.calendar3.DefaultCalendarManager.setReminderFor(DefaultCalendarManager.java:1416)
          at com.atlassian.confluence.extra.calendar3.reminder.DefaultRemindingSettingHelper.enableRemindingForWatcher(DefaultRemindingSettingHelper.java:56)
          at com.atlassian.confluence.extra.calendar3.notification.DefaultCalendarNotificationManager.lambda$notifySubCalendarCreatedOnEventCreation$4(DefaultCalendarNotificationManager.java:354)
          at com.atlassian.confluence.extra.calendar3.util.CalendarAsyncHelper.lambda$null$1(CalendarAsyncHelper.java:51)
          at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
          at com.atlassian.sal.spring.component.SpringHostContextAccessor.lambda$doInTransaction$0(SpringHostContextAccessor.java:70)
          at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
          at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:68)
          at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.access$001(ConfluenceSpringHostContextAccessor.java:21)
          at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.lambda$doInTransaction$3(ConfluenceSpringHostContextAccessor.java:72)
          at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
          at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
          at com.atlassian.confluence.spring.transaction.interceptor.ConfluenceSpringHostContextAccessor.doInTransaction(ConfluenceSpringHostContextAccessor.java:72)
          at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
          at sun.reflect.GeneratedMethodAccessor274.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
          at com.sun.proxy.$Proxy268.execute(Unknown Source)
          at sun.reflect.GeneratedMethodAccessor274.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
          at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
          at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
          at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
          at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
          at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
          at com.sun.proxy.$Proxy2781.execute(Unknown Source)
          at com.atlassian.confluence.extra.calendar3.util.CalendarAsyncHelper.lambda$doAsyncWithTransaction$2(CalendarAsyncHelper.java:49)
          at com.atlassian.confluence.extra.calendar3.util.DefaultAsynchronousTaskExecutor.lambda$wrap$1(DefaultAsynchronousTaskExecutor.java:87)
          at com.atlassian.confluence.extra.calendar3.util.DefaultAsynchronousTaskExecutor.lambda$submit$0(DefaultAsynchronousTaskExecutor.java:80)
          at com.atlassian.sal.core.executor.ThreadLocalDelegateCallable.call(ThreadLocalDelegateCallable.java:38)
          at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
          at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
          at com.atlassian.confluence.vcache.VCacheRequestContextOperations.lambda$withRequestContext$1(VCacheRequestContextOperations.java:59)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at java.lang.Thread.run(Thread.java:748)
      Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "AO_950DC3_TC_REMINDER_USERS" violates foreign key constraint "fk_ao_950dc3_tc_reminder_users_sub_calendar_id"
        Detail: Key (SUB_CALENDAR_ID)=(39a8eb77-dc03-473c-8209-b378f7e7706c) is not present in table "AO_950DC3_TC_SUBCALS".
          at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
          at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
          at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
          at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473)
          at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393)
          at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)
          at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:130)
          at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:1502)
          at net.java.ao.ForwardingPreparedStatement.executeUpdate(ForwardingPreparedStatement.java:45)
          at net.java.ao.ParameterMetadataCachingPreparedStatement.executeUpdate(ParameterMetadataCachingPreparedStatement.java:10)
          at net.java.ao.db.PostgreSQLDatabaseProvider.executeInsertReturningKey(PostgreSQLDatabaseProvider.java:336)
          at net.java.ao.DatabaseProvider.insertReturningKey(DatabaseProvider.java:1867)
          at net.java.ao.db.PostgreSQLDatabaseProvider.insertReturningKey(PostgreSQLDatabaseProvider.java:298)
          at net.java.ao.EntityManager.create(EntityManager.java:369)
          at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:93)
          ... 76 more 

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              dluong Duy Truong Luong
              f040be51555f Lou Paglaiccetti
              Votes:
              6 Vote for this issue
              Watchers:
              20 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: