When creating a project, the "Content aggregation" service is configured automatically with a order on "creationDate" as following:
<service id="org.ametys.web.service.FilteredContentsService"> <parameters> <header i18n="false">Actualités à la une</header> <content-types> <value>org.ametys.plugins.news.Content.news</value> </content-types> <metadataSetName>abstract</metadataSetName> <sortBy>[{"name":"lastValidationDate","sort":"DESC"}]</sortBy> <filterBy>{}</filterBy> <search> <entry> <sites>{"context":"CURRENT_SITE","sites":[]}</sites> <search-context>{"context":"CURRENT_SITE","page":null}</search-context> <context-lang>CURRENT</context-lang> <tags>HOME_NEWS</tags> </entry> </search> <nb-max>5</nb-max> <pagination></pagination> <mask-orphan>true</mask-orphan> <handle-user-access>true</handle-user-access> <rss>false</rss> <link/> <link-title/> <xslt>pages/services/filtered-contents/carousel.xsl</xslt> </parameters> </service>
If a user go to BO and edits the service parameters, the sorting creation date is lost because "creationDate" is not part of the available sort in service parameter combo box.
May be we should simply add the creationDate as a possible sort ?