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

Content-Elements API do not sort elements

    Details

      Description

      The sort parameter is not working for the content-elements API, not allowing developers to choose the field to sort by and the order. (The steps uses "title" as an example, the sort parameter should work on all the sortable fields).

       

      Steps to reproduce

       

      1.- Create a webContent with title "aContent"

      2.- Upload a document with title "bDocument"

      3.- Make a request to http://localhost:8080/o/headless-delivery/v1.0/sites/Guest/content-elements with sort=title:asc

       

      Expected result

      the server returns a list with "aContent" first and "bDocument" second.

       

      4.- Make a request to http://localhost:8080/o/headless-delivery/v1.0/sites/Guest/content-elements with sort=title:desc

       

      Expected result

      the server returns a list with "bDocument" first and "aContent" second.

       

      The current behavior is that the server returns the list in the same order in both cases, and not based in title but in dateCreated (that's why this bug does not have a "Current behavior" part because it depends on the creation order, not on the title.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              manoel.cyreno Manoel Cyreno
              Reporter:
              pablo.agulla Pablo Agulla
              Participants of an Issue:
              Recent user:
              Jason Pince
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                36 weeks, 6 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP7
                  7.2.X
                  7.3.3 CE GA4
                  7.3.10 DXP GA1
                  Master