Sort aem 6.5 inbox based on column | Community
Skip to main content
manisha594391
Level 4
Feb 10, 2021 10:34 PM UTC
Solved

Sort aem 6.5 inbox based on column

Hi Team,

I have a requirement to sort aem 6.5 inbox based on custom column.

OOTB availability, steps-

1. Navigate to /aem/inbox

2. Select settings from right panel and opt sort

3. It opens a dialog which shows the fields which could be sorted (populated via /libs/cq/inbox/content/inbox/dialogs/inboxsettingsdialog/items/inboxsettingsform)

 

Now ,in the above dropdown I want my custom column name to be added and available for sorting.

I was able to achieve adding the new column in the dropdown. However the sort is not working as expected.

 

On click of save of this dialog it saves the data to /libs/cq/inbox/gui/components/inbox/preferences.json and the submitted json looks like below-

 

I wanted to understand in order to do this customization, what should be the sortByProperty value. Also, which ootb aem service gets invoked to do the sorting
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
Feb 12, 2021 10:13 PM UTC

Hi @manisha594391,

On submit of Inbox Settings dialog (after selecting sort property and sort order), this preference is saved to user node via a POST call to user path/preferences

(Eg: http://localhost:4502/home/users/8/8knGQKO0VU9chrDmTnwz/preferences - Cross check your preferences node in CRXDE after saving settings dialog, you should see the property named cq.inbox.settings ) 

This preferences are considered for Filtering while rendering the Active Inbox items and the implementation is hidden.

 

High level detail of OOTB flow for Inbox items display.

Customization in this case is like rewriting whole of the implementation. 

3 replies

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
Feb 12, 2021 10:13 PM UTC

Hi @manisha594391,

On submit of Inbox Settings dialog (after selecting sort property and sort order), this preference is saved to user node via a POST call to user path/preferences

(Eg: http://localhost:4502/home/users/8/8knGQKO0VU9chrDmTnwz/preferences - Cross check your preferences node in CRXDE after saving settings dialog, you should see the property named cq.inbox.settings ) 

This preferences are considered for Filtering while rendering the Active Inbox items and the implementation is hidden.

 

High level detail of OOTB flow for Inbox items display.

Customization in this case is like rewriting whole of the implementation. 

Translate
manisha594391
Level 4
Feb 18, 2021 10:42 PM UTC

Thanks @vijayalakshmi_s for the inputs.

I updated the settings and tried to enable sorting using column other than start date, may be "Assignee" for example.

As I mentioned earlier, the property "cq.inbox.settings" gets updated in the user preferences as below- { "sharingPreferences": { "sharesInboxWith": [], "rejectedRequests": [], "pendingRequestMap": {} }, "outOfOfficePreferences": { "isOutOfOffice": false, "dateRange": { "startTime": 1605739898157, "endTime": 0 }, "outOfOfficeDesignates": [], "isOutOfOfficeDesignateProvided": false }, "sortByProperty": "assignee", "sortOrder": "ASC" }

 

Now, here "sortByProperty" is set to assignee and the sortOrder is ASC. But still the data is not sorted based on "assignee column instead it continues to get sorted with "Start date" column.

To add "assignee" is available in the workflow metadata node.

Translate