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

JournalArticleLocalService getOldestArticle gives back the newest version

    Details

      Description

      Reproduction steps

      1) Create a vanilla DXP with de-59-7010
      2) For database use MySQL 5.7
      3) Login as admin
      4) Create a basic web content
      5) Publish it
      6) Apply 4-5 changes on the content, publish after each one
      7) Go to Control Panel -> Configuration -> Server Administration -> Script
      8) Call any or both of the following scripts:
      long groupId = 20142;
      String articleId = "32323";

      article = com.liferay.journal.service.JournalArticleLocalServiceUtil.getOldestArticle(groupId, articleId);

      out.println(article.getContent());
      OR

      long groupId = 20142;
      String articleId = "32323";

      article = com.liferay.journal.service.JournalArticleLocalServiceUtil.getOldestArticle(groupId, articleId);

      out.println(article.getVersion());
      Expected behavior:
      We receive the oldest version of the text or in the second case, the number should be 1

      Actual behavior:
      We receive the newest article

        Attachments

          Activity

            People

            Assignee:
            beck.liu Beck Liu
            Reporter:
            laszlo.pap Laszlo Pap
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.0.0 DXP FP67
                7.0.X
                7.1.10 DXP FP5
                7.1.10.1 SP1
                7.1.2 CE GA3
                7.1.X
                Master