Expand my Community achievements bar.

AEM communities calendar component sorting the events

Avatar

Level 2

Hi All,

I am using AEM 6.1 communities calendar component. I am listing all the events within the given date in my page. Now i need to sort the events in descending order, currently the events are getting displayed in ascending order. Below is the query which gives me my events list,

/calendar.social.json?filter=true&_charset_=utf-8&timestamp=1490985000000&dates=2017-04-01_2020-05-09

In the query response i can see a value of  "sortOrder":"REVERSED_ORDER", I need to change the value so that i can achieve the desired sorting. I am not sure where or how exactly to change this value. Please provide your suggestions for the same.

Query Response (Partial ) :

   "configuration":{ 

      "pageSize":100,

      "sortOrder":"REVERSED_ORDER",

      "sortFields":[ 

         { 

            "key":"added",

            "value":false

         }

      ],

      "sortByItemsList":[ 

         "newest",

         "added",

         "latestActivityDate_dt"

      ],

      "tagFilterVal":null,

      "usingPrivilegedUsers":false,

      "tagFilterLimit":-1,

      "breadcrumbsEnabled":true,

      "subscriptionsAllowed":false,

      "analyticsTimeSelector":"total_tl",

      "followingAllowed":false,

      "moveAllowed":false,

      "isTaggingAllowed":false,

      "isRTEEnabled":true,

      "isDeleteAllowed":true,

      "isReplyAllowed":false,

      "isFeaturingContentAllowed":false,

      "isVotingAllowed":false,

      "isFlaggingAllowed":false,

      "isAttachmentAllowed":true,

      "isCustomFlagReasonAllowed":false,

      "isTranslateAllButtonAllowed":false,

      "isCloseAllowed":false,

      "isPinAllowed":false,

      "isDenyAllowed":false,

      "isEditAllowed":true

   }

I am using communities version 1.8.500

1 Reply

Avatar

Level 1

I too am having an issue with this on 6.3. my query is similar and the results are returning in reverse chronological order. I have searched the code base and cannot find a reference to  "sortOrder":"REVERSED_ORDER". I have tried altering the query parameters to include a "sortOrder" call, and there is no change. Additionally, I have searched for documentation regarding the API and there doesn't seem to be any. Can we please get some Adobe help here?

Current call looks like this:

.social.20.10.json?filter=true&_charset_=utf-8&timestamp=1534890060869&dates=2018-8-21_2018-8-21&timezone=America%2FNew_York