From b11c50945ddb4f15bd8f6da09b704a70c7e6fc2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alicia=20Garc=C3=ADa?= Date: Thu, 29 Aug 2024 16:28:28 +0200 Subject: [PATCH 1/2] LPD-34910 remove LPD-10701 from properties --- .../src/main/resources/content/Language.properties | 2 -- portal-impl/src/portal.properties | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/modules/apps/portal-language/portal-language-lang/src/main/resources/content/Language.properties b/modules/apps/portal-language/portal-language-lang/src/main/resources/content/Language.properties index f522e24b5ecd0e..da9f4b5adfa854 100644 --- a/modules/apps/portal-language/portal-language-lang/src/main/resources/content/Language.properties +++ b/modules/apps/portal-language/portal-language-lang/src/main/resources/content/Language.properties @@ -7402,8 +7402,6 @@ feature.flag.LPD-7822.description=Dynamically apply updates to the settings and feature.flag.LPD-7822.title=Dynamically Update Search Index Settings and Mappings feature.flag.LPD-10588.description=Utility page for cookie policy lists and describes all cookies in use. Users can add and update cookies in the list with the cookie object. When the cookie manager is enabled, Analytics Cloud only tracks data from users who consent to statistics cookies. feature.flag.LPD-10588.title=Analytics Cloud Cookie Control -feature.flag.LPD-10701.description=Users can configure a display date for documents to be scheduled. -feature.flag.LPD-10701.title=Display Date for Documents and Media feature.flag.LPD-10703.description=Users can view actions and information related to workflow when reviewing a change in a publication. feature.flag.LPD-10703.title=Enhance Publications Review Changes Screen With Workflow Information and Functionality feature.flag.LPD-11147.description=Users can configure the URL path for different asset types. diff --git a/portal-impl/src/portal.properties b/portal-impl/src/portal.properties index 92a3d9050c5545..a3168c5dd2f293 100644 --- a/portal-impl/src/portal.properties +++ b/portal-impl/src/portal.properties @@ -6363,11 +6363,6 @@ # feature.flag.LPD-10588=false - # - # Env: LIFERAY_FEATURE_PERIOD_FLAG_PERIOD__UPPERCASEL__UPPERCASEP__UPPERCASED__MINUS__NUMBER1__NUMBER0__NUMBER7__NUMBER0__NUMBER1_ - # - feature.flag.LPD-10701=false - # # Env: LIFERAY_FEATURE_PERIOD_FLAG_PERIOD__UPPERCASEL__UPPERCASEP__UPPERCASED__MINUS__NUMBER1__NUMBER0__NUMBER7__NUMBER0__NUMBER3_ # @@ -6902,11 +6897,6 @@ # feature.flag.LPD-10588.type=release - # - # Env: LIFERAY_FEATURE_PERIOD_FLAG_PERIOD__UPPERCASEL__UPPERCASEP__UPPERCASED__MINUS__NUMBER1__NUMBER0__NUMBER7__NUMBER0__NUMBER1__PERIOD_TYPE - # - feature.flag.LPD-10701.type=release - # # Env: LIFERAY_FEATURE_PERIOD_FLAG_PERIOD__UPPERCASEL__UPPERCASEP__UPPERCASED__MINUS__NUMBER1__NUMBER0__NUMBER7__NUMBER0__NUMBER3__PERIOD_TYPE # From 7861958bc8b40b07e89d72e7efa42ffac5cca642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alicia=20Garc=C3=ADa?= Date: Thu, 29 Aug 2024 16:54:23 +0200 Subject: [PATCH 2/2] LPD-34910 remove calls for the FF --- .../context/DLViewEntriesDisplayContext.java | 7 ------ ...efaultDLViewFileVersionDisplayContext.java | 7 ------ .../action/EditFileEntryMVCActionCommand.java | 9 ++------ .../document_library/edit_file_entry.jsp | 12 +++++----- .../resources/document_library/init.jsp | 1 - .../document_library/search_resources.jsp | 8 +++---- ...upload_multiple_file_entries_resources.jsp | 12 +++++----- .../document_library/view_entries.jsp | 8 +++---- .../view_file_entry_descriptive.jsp | 4 ++-- .../v1_0/converter/DocumentDTOConverter.java | 7 +----- .../resource/v1_0/DocumentResourceImpl.java | 22 +++---------------- .../document-library-web/fileEntry.spec.ts | 7 +----- .../impl/DLFileEntryLocalServiceImpl.java | 11 +--------- 13 files changed, 28 insertions(+), 87 deletions(-) diff --git a/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/display/context/DLViewEntriesDisplayContext.java b/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/display/context/DLViewEntriesDisplayContext.java index f79bd3d5e46d34..c67e540e2de5ed 100644 --- a/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/display/context/DLViewEntriesDisplayContext.java +++ b/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/display/context/DLViewEntriesDisplayContext.java @@ -25,7 +25,6 @@ import com.liferay.document.library.web.internal.security.permission.resource.DLFolderPermission; import com.liferay.portal.kernel.dao.search.SearchContainer; import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.feature.flag.FeatureFlagManagerUtil; import com.liferay.portal.kernel.model.ResourceConstants; import com.liferay.portal.kernel.model.Role; import com.liferay.portal.kernel.model.User; @@ -296,12 +295,6 @@ public String getViewFileEntryURL(FileEntry fileEntry) { } public boolean hasApprovedVersion(long fileEntryId) { - if (!FeatureFlagManagerUtil.isEnabled( - _themeDisplay.getCompanyId(), "LPD-10701")) { - - return false; - } - DLFileVersion dlFileVersion = DLFileVersionLocalServiceUtil.fetchLatestFileVersion( fileEntryId, false, WorkflowConstants.STATUS_APPROVED); diff --git a/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/display/context/DefaultDLViewFileVersionDisplayContext.java b/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/display/context/DefaultDLViewFileVersionDisplayContext.java index 64ebc1b4bbdd16..d9ae2ace55aaa1 100644 --- a/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/display/context/DefaultDLViewFileVersionDisplayContext.java +++ b/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/display/context/DefaultDLViewFileVersionDisplayContext.java @@ -39,7 +39,6 @@ import com.liferay.frontend.taglib.clay.servlet.taglib.util.DropdownItemListBuilder; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.feature.flag.FeatureFlagManagerUtil; import com.liferay.portal.kernel.language.LanguageUtil; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; @@ -256,12 +255,6 @@ public UUID getUuid() { @Override public boolean hasApprovedVersion() { - if (!FeatureFlagManagerUtil.isEnabled( - _fileVersion.getCompanyId(), "LPD-10701")) { - - return false; - } - DLFileVersion dlFileVersion = DLFileVersionLocalServiceUtil.fetchLatestFileVersion( _fileVersion.getFileEntryId(), false, diff --git a/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/portlet/action/EditFileEntryMVCActionCommand.java b/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/portlet/action/EditFileEntryMVCActionCommand.java index 49dfc6393e4e65..45428a69f87e40 100644 --- a/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/portlet/action/EditFileEntryMVCActionCommand.java +++ b/modules/apps/document-library/document-library-web/src/main/java/com/liferay/document/library/web/internal/portlet/action/EditFileEntryMVCActionCommand.java @@ -50,7 +50,6 @@ import com.liferay.petra.string.StringPool; import com.liferay.portal.configuration.metatype.bnd.util.ConfigurableUtil; import com.liferay.portal.kernel.exception.PortalException; -import com.liferay.portal.kernel.feature.flag.FeatureFlagManagerUtil; import com.liferay.portal.kernel.json.JSONArray; import com.liferay.portal.kernel.json.JSONFactory; import com.liferay.portal.kernel.json.JSONObject; @@ -518,9 +517,7 @@ private void _addPublishedDocumentMessage( ActionRequest actionRequest, FileVersion fileVersion, ThemeDisplay themeDisplay) { - if (!FeatureFlagManagerUtil.isEnabled("LPD-10701") || - !fileVersion.isScheduled()) { - + if (!fileVersion.isScheduled()) { String portletResource = ParamUtil.getString( actionRequest, "portletResource"); @@ -996,9 +993,7 @@ private Date _getDisplayDate( TimeZone timeZone) throws PortalException { - if (addDynamic || !PropsValues.SCHEDULER_ENABLED || - !FeatureFlagManagerUtil.isEnabled("LPD-10701")) { - + if (addDynamic || !PropsValues.SCHEDULER_ENABLED) { return null; } diff --git a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/edit_file_entry.jsp b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/edit_file_entry.jsp index 3d10778136d9ae..6a7293dcb35cbf 100644 --- a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/edit_file_entry.jsp +++ b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/edit_file_entry.jsp @@ -543,18 +543,16 @@ renderResponse.setTitle(headerTitle); - + - -

- -

+

+ +

- -
+

diff --git a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/init.jsp b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/init.jsp index 39cb1121032e6b..b696555efcb444 100644 --- a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/init.jsp +++ b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/init.jsp @@ -56,7 +56,6 @@ page import="com.liferay.frontend.taglib.clay.servlet.taglib.util.DropdownItemLi page import="com.liferay.item.selector.ItemSelector" %><%@ page import="com.liferay.portal.configuration.module.configuration.ConfigurationProviderUtil" %><%@ page import="com.liferay.portal.kernel.dao.search.RowChecker" %><%@ -page import="com.liferay.portal.kernel.feature.flag.FeatureFlagManagerUtil" %><%@ page import="com.liferay.portal.kernel.lock.Lock" %><%@ page import="com.liferay.portal.kernel.repository.model.RepositoryEntry" %><%@ page import="com.liferay.portal.kernel.servlet.SessionErrors" %><%@ diff --git a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/search_resources.jsp b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/search_resources.jsp index 562069c2ed268c..fc82998ff424f9 100644 --- a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/search_resources.jsp +++ b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/search_resources.jsp @@ -200,7 +200,7 @@ entriesChecker.setRememberCheckBoxStateURLRegex("^(?!.*" + liferayPortletRespons

- + - + <% String displayDateString = StringPool.BLANK; @@ -370,7 +370,7 @@ entriesChecker.setRememberCheckBoxStateURLRegex("^(?!.*" + liferayPortletRespons cssClass="table-cell-expand-smallest" name="status" > - + - + <% String displayDateString = StringPool.BLANK; diff --git a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/upload_multiple_file_entries_resources.jsp b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/upload_multiple_file_entries_resources.jsp index d6945b5b20ad4e..c37d47825922f3 100644 --- a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/upload_multiple_file_entries_resources.jsp +++ b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/upload_multiple_file_entries_resources.jsp @@ -375,20 +375,18 @@ else { id="dlFileEntryExpirationDatePanel" markupView="lexicon" persistState="<%= true %>" - title='<%= FeatureFlagManagerUtil.isEnabled(themeDisplay.getCompanyId(), "LPD-10701") ? "schedule" : "expiration-date" %>' + title="schedule" > - -

- -

+

+ +

- -
+

diff --git a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/view_entries.jsp b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/view_entries.jsp index 6bd038bd4e0042..3b5c3798ead3d5 100644 --- a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/view_entries.jsp +++ b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/view_entries.jsp @@ -156,7 +156,7 @@ DLViewEntriesDisplayContext dlViewEntriesDisplayContext = new DLViewEntriesDispl

- + - + <% String displayDateString = StringPool.BLANK; @@ -339,7 +339,7 @@ DLViewEntriesDisplayContext dlViewEntriesDisplayContext = new DLViewEntriesDispl cssClass="table-cell-expand-smallest" name="status" > - + - + <% String displayDateString = StringPool.BLANK; diff --git a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/view_file_entry_descriptive.jsp b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/view_file_entry_descriptive.jsp index 6fd6f605fa4322..59ece86227abb0 100644 --- a/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/view_file_entry_descriptive.jsp +++ b/modules/apps/document-library/document-library-web/src/main/resources/META-INF/resources/document_library/view_file_entry_descriptive.jsp @@ -119,7 +119,7 @@ else { - + - + <% String displayDateString = StringPool.BLANK; diff --git a/modules/apps/headless/headless-delivery/headless-delivery-impl/src/main/java/com/liferay/headless/delivery/internal/dto/v1_0/converter/DocumentDTOConverter.java b/modules/apps/headless/headless-delivery/headless-delivery-impl/src/main/java/com/liferay/headless/delivery/internal/dto/v1_0/converter/DocumentDTOConverter.java index 8796acf166e778..885339808c1246 100644 --- a/modules/apps/headless/headless-delivery/headless-delivery-impl/src/main/java/com/liferay/headless/delivery/internal/dto/v1_0/converter/DocumentDTOConverter.java +++ b/modules/apps/headless/headless-delivery/headless-delivery-impl/src/main/java/com/liferay/headless/delivery/internal/dto/v1_0/converter/DocumentDTOConverter.java @@ -54,7 +54,6 @@ import com.liferay.petra.function.transform.TransformUtil; import com.liferay.petra.string.StringPool; import com.liferay.portal.kernel.comment.CommentManager; -import com.liferay.portal.kernel.feature.flag.FeatureFlagManagerUtil; import com.liferay.portal.kernel.model.Group; import com.liferay.portal.kernel.repository.model.FileEntry; import com.liferay.portal.kernel.repository.model.FileVersion; @@ -159,11 +158,7 @@ public Document toDTO(DTOConverterContext dtoConverterContext) setDateExpired(fileEntry::getExpirationDate); setDateModified(fileEntry::getModifiedDate); - if (FeatureFlagManagerUtil.isEnabled( - fileEntry.getCompanyId(), "LPD-10701")) { - - setDatePublished(fileEntry::getDisplayDate); - } + setDatePublished(fileEntry::getDisplayDate); setDescription(fileEntry::getDescription); setDocumentFolderId(fileEntry::getFolderId); diff --git a/modules/apps/headless/headless-delivery/headless-delivery-impl/src/main/java/com/liferay/headless/delivery/internal/resource/v1_0/DocumentResourceImpl.java b/modules/apps/headless/headless-delivery/headless-delivery-impl/src/main/java/com/liferay/headless/delivery/internal/resource/v1_0/DocumentResourceImpl.java index 4a5d8d970ebe48..1deb0b05f5e896 100644 --- a/modules/apps/headless/headless-delivery/headless-delivery-impl/src/main/java/com/liferay/headless/delivery/internal/resource/v1_0/DocumentResourceImpl.java +++ b/modules/apps/headless/headless-delivery/headless-delivery-impl/src/main/java/com/liferay/headless/delivery/internal/resource/v1_0/DocumentResourceImpl.java @@ -50,7 +50,6 @@ import com.liferay.petra.string.StringPool; import com.liferay.portal.events.ServicePreAction; import com.liferay.portal.events.ThemeServicePreAction; -import com.liferay.portal.kernel.feature.flag.FeatureFlagManagerUtil; import com.liferay.portal.kernel.log.Log; import com.liferay.portal.kernel.log.LogFactoryUtil; import com.liferay.portal.kernel.repository.model.FileEntry; @@ -382,12 +381,7 @@ public Document patchDocument(Long documentId, MultipartBody multipartBody) fileName = document.getFileName(); title = document.getTitle(); description = document.getDescription(); - - if (FeatureFlagManagerUtil.isEnabled( - contextCompany.getCompanyId(), "LPD-10701")) { - - displayDate = document.getDatePublished(); - } + displayDate = document.getDatePublished(); expirationDate = document.getDateExpired(); } @@ -579,11 +573,7 @@ private Document _addDocument( title = document.getTitle(); description = document.getDescription(); - if (FeatureFlagManagerUtil.isEnabled( - contextCompany.getCompanyId(), "LPD-10701")) { - - displayDate = document.getDatePublished(); - } + displayDate = document.getDatePublished(); expirationDate = document.getDateExpired(); } @@ -1018,13 +1008,7 @@ private Document _updateDocument( fileName = document.getFileName(); title = document.getTitle(); description = document.getDescription(); - - if (FeatureFlagManagerUtil.isEnabled( - contextCompany.getCompanyId(), "LPD-10701")) { - - displayDate = document.getDatePublished(); - } - + displayDate = document.getDatePublished(); expirationDate = document.getDateExpired(); } diff --git a/modules/test/playwright/tests/document-library-web/fileEntry.spec.ts b/modules/test/playwright/tests/document-library-web/fileEntry.spec.ts index 3b6f80ba8e6133..558228d06ff2b2 100644 --- a/modules/test/playwright/tests/document-library-web/fileEntry.spec.ts +++ b/modules/test/playwright/tests/document-library-web/fileEntry.spec.ts @@ -32,12 +32,7 @@ export const testSearchInDlPortlet = mergeTests( 'LPS-178052': true, }) ); -export const testFeatureFlagsEnabled = mergeTests( - baseTest, - featureFlagsTest({ - 'LPD-10701': true, - }) -); +export const testFeatureFlagsEnabled = mergeTests(baseTest); export const testUploadMultipleFieldsWithCustomDocumentType = mergeTests(baseTest); diff --git a/portal-impl/src/com/liferay/portlet/documentlibrary/service/impl/DLFileEntryLocalServiceImpl.java b/portal-impl/src/com/liferay/portlet/documentlibrary/service/impl/DLFileEntryLocalServiceImpl.java index 3b81fcb86178d2..1700168620ebcc 100644 --- a/portal-impl/src/com/liferay/portlet/documentlibrary/service/impl/DLFileEntryLocalServiceImpl.java +++ b/portal-impl/src/com/liferay/portlet/documentlibrary/service/impl/DLFileEntryLocalServiceImpl.java @@ -77,7 +77,6 @@ import com.liferay.portal.kernel.dao.orm.RestrictionsFactoryUtil; import com.liferay.portal.kernel.exception.PortalException; import com.liferay.portal.kernel.exception.SystemException; -import com.liferay.portal.kernel.feature.flag.FeatureFlagManagerUtil; import com.liferay.portal.kernel.interval.IntervalActionProcessor; import com.liferay.portal.kernel.io.ByteArrayFileInputStream; import com.liferay.portal.kernel.language.LanguageUtil; @@ -404,9 +403,7 @@ public void checkFileEntries(long companyId, long checkInterval) long userId = _getActiveCompanyAdminUserId(companyId); - if (FeatureFlagManagerUtil.isEnabled(companyId, "LPD-10701")) { - _checkFileEntriesByDisplayDate(companyId, date, userId); - } + _checkFileEntriesByDisplayDate(companyId, date, userId); _checkFileVersionsByExpirationDate(companyId, date, userId); @@ -3057,12 +3054,6 @@ private String _getNextVersion( } private int _getStatus(Date date, DLFileVersion dlFileVersion, int status) { - if (!FeatureFlagManagerUtil.isEnabled( - dlFileVersion.getCompanyId(), "LPD-10701")) { - - return status; - } - if ((status == WorkflowConstants.STATUS_APPROVED) && (dlFileVersion.getDisplayDate() != null) && date.before(dlFileVersion.getDisplayDate())) {