Details

    • Fix Priority:
      4
    • Affects Portal Version/s:
      6.1.30 EE GA3

      Description

      SO Announcements portlet won't send e-mail notifications due to displayDate problems.

      Here's my fix (it is fixed the same way on trunk):

      diff --git a/portlets/so-announcements-portlet/docroot/WEB-INF/src/com/liferay/so/announcements/portlet/AnnouncementsPortlet.java b/portlets/so-announcements-portlet/docroot/WEB-INF/src/com/liferay/so/announcements/portlet/AnnouncementsPortlet.java
      index 3017dee6..7f90c39 100644
      --- a/portlets/so-announcements-portlet/docroot/WEB-INF/src/com/liferay/so/announcements/portlet/AnnouncementsPortlet.java
      +++ b/portlets/so-announcements-portlet/docroot/WEB-INF/src/com/liferay/so/announcements/portlet/AnnouncementsPortlet.java
      @@ -24,7 +24,6 @@ import com.liferay.portal.kernel.json.JSONObject;
       import com.liferay.portal.kernel.portlet.LiferayPortletResponse;
       import com.liferay.portal.kernel.servlet.SessionErrors;
       import com.liferay.portal.kernel.servlet.SessionMessages;
      -import com.liferay.portal.kernel.util.CalendarFactoryUtil;
       import com.liferay.portal.kernel.util.GetterUtil;
       import com.liferay.portal.kernel.util.ParamUtil;
       import com.liferay.portal.kernel.util.WebKeys;
      @@ -210,16 +209,6 @@ public class AnnouncementsPortlet extends MVCPortlet {
       		boolean displayImmediately = ParamUtil.getBoolean(
       			actionRequest, "displayImmediately");
       
      -		if (displayImmediately) {
      -			Calendar calendar = CalendarFactoryUtil.getCalendar();
      -
      -			displayDateMonth = calendar.get(Calendar.MONTH);
      -			displayDateDay = calendar.get(Calendar.DAY_OF_MONTH);
      -			displayDateYear = calendar.get(Calendar.YEAR);
      -			displayDateHour = calendar.get(Calendar.HOUR_OF_DAY);
      -			displayDateMinute = calendar.get(Calendar.MINUTE);
      -		}
      -
       		int expirationDateMonth = ParamUtil.getInteger(
       			actionRequest, "expirationDateMonth");
       		int expirationDateDay = ParamUtil.getInteger(
      @@ -247,9 +236,9 @@ public class AnnouncementsPortlet extends MVCPortlet {
       			AnnouncementsEntryServiceUtil.addEntry(
       				themeDisplay.getPlid(), classNameId, classPK, title, content,
       				url, type, displayDateMonth, displayDateDay, displayDateYear,
      -				displayDateHour, displayDateMinute, expirationDateMonth,
      -				expirationDateDay, expirationDateYear, expirationDateHour,
      -				expirationDateMinute, priority, alert);
      +				displayDateHour, displayDateMinute, displayImmediately,
      +				expirationDateMonth, expirationDateDay, expirationDateYear,
      +				expirationDateHour, expirationDateMinute, priority, alert);
       		}
       		else {
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 32 weeks, 2 days ago

                  Packages

                  Version Package
                  2.1.X EE