-
Type:
Bug
-
Status: Verified
-
Resolution: Unresolved
-
Affects Version/s: 7.0.X, 7.1.X, 7.2.X, 7.3.X, Master
-
Fix Version/s: None
-
Component/s: Web Content > Web Content Administration
-
Labels:
-
Fix Priority:3
-
Git Pull Request:
Steps to Reproduce:
- Create a web content first version.
- Update the web content and for the second version add a couple of title translations.
- Execute the following Groovy script (replacing groupId and companyId with your JournalArticle groupId and companyId table fields):
import com.liferay.journal.service.JournalArticleLocalServiceUtil; import java.util.Collections; import com.liferay.journal.constants.JournalArticleConstants; import com.liferay.journal.model.JournalArticle; import com.liferay.portal.kernel.dao.orm.QueryUtil; import com.liferay.portal.kernel.workflow.WorkflowConstants; long groupId = 20123L; long companyId = 20099L; int count = JournalArticleLocalServiceUtil.searchCount( companyId, groupId, Collections.emptyList(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, null, null, null, null, null, "BASIC-WEB-CONTENT", null, null, null, WorkflowConstants.STATUS_APPROVED, null, true); out.println("SearchCount count: " + count); List<JournalArticle> journalArticles = JournalArticleLocalServiceUtil.search( companyId, groupId, Collections.emptyList(), JournalArticleConstants.CLASSNAME_ID_DEFAULT, null, null, null, null, null, "BASIC-WEB-CONTENT", null, null, null, WorkflowConstants.STATUS_APPROVED, null, true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); out.println("Search count: " + journalArticles.size());
Actual Results:
Count printed differs between both queries.
Expected Results:
Printed count should be the same.