Affects Version/s: 7.0.0 Beta 8
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
- Add Announcements portlet
- Manage entries
- Distribution Scope: General
- Add Entry
- Title: Test
- Set the Display date to be 7 days from now
- Set the expiration date to be 6 days from now
- Hit Save
The publishing fails and a validation error occurs since the expiration date is prior to the display date.
The Alert is still published.
Steps to Reproduce - Current Date
- Add Polls Display portlet
- Add a poll
- Title: Test
- Poll Question: Test
- Expiration date: Any day before current date
- Choice A: 123
- Choice B: 456
The poll creation fails and a validation error occurs since the expiration date is prior to the current date.
The poll is still created.
Reproduced - 7223a10e482106d688bb3d7b38f2663f6863723c