Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-64361

Expiration date can be set prior to the display date and possibly be set prior to the current date as well

    Details

      Description

      Description
      The issue is that the expiration date can be set prior to the display date for components, such as Announcements and WCM.

      As a precursor of finding this issue, a previous issue was discovered where the expiration date can be set prior to the current date.
      Here are a couple references to tickets that resolved this issue:

      Although this issue is resolved in WCM, and Announcements, there are other components that have an expirationDate that should be validated with the current date as well.

      I have reached out to the Support Forums regarding this issue: https://in.liferay.com/web/support/forums/-/message_boards/message/19457724
      They noted that the components: Polls and Asset Entries also have expiration dates.

      This ticket will focus on implementing validation regarding expiration dates for the current date and the display date (depending on whether the display date is available).

      Steps to Reproduce - Display Date

      1. Add Announcements portlet
      2. Manage entries
        1. Distribution Scope: General
      3. Add Entry
        1. Title: Test
        2. Set the Display date to be 7 days from now
        3. Set the expiration date to be 6 days from now
      4. Hit Save

      Expected Results
      The publishing fails and a validation error occurs since the expiration date is prior to the display date.
      Actual Results
      The Alert is still published.

      Steps to Reproduce - Current Date

      1. Add Polls Display portlet
      2. Add a poll
        1. Title: Test
        2. Poll Question: Test
        3. Expiration date: Any day before current date
        4. Choice A: 123
        5. Choice B: 456
        6. Save

      Expected Results
      The poll creation fails and a validation error occurs since the expiration date is prior to the current date.
      Actual Results
      The poll is still created.

      Master
      Reproduced - 7223a10e482106d688bb3d7b38f2663f6863723c

        Attachments

        1. fix1_62.png
          fix1_62.png
          60 kB
        2. fix1.png
          fix1.png
          16 kB
        3. fix2_62.png
          fix2_62.png
          38 kB
        4. fix2.png
          fix2.png
          27 kB
        5. reproduce1.png
          reproduce1.png
          24 kB
        6. reproduce2.png
          reproduce2.png
          29 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 47 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 CE RC1