ltb-project / service-desk

Application for support team who need to check and reset user passwords
https://service-desk.readthedocs.io/
GNU General Public License v3.0
51 stars 20 forks source link

Search results are not sorted #182

Open cmaudoux opened 2 days ago

cmaudoux commented 2 days ago

Set params like this:

$attributes_map = array(
   'fullname' => array( 'attribute' => 'cn', 'faclass' => 'user-circle', 'type' => 'text' ),
    'identifier' => array( 'attribute' => 'uid', 'faclass' => 'id-card', 'type' => 'text' ),
    'mail' => array( 'attribute' => 'mail', 'faclass' => 'envelope-o', 'type' => 'mailto' ),
    'lastname' => array( 'attribute' => 'sn', 'faclass' => 'user', 'type' => 'text' ),
    'firstname' => array( 'attribute' => 'givenname', 'faclass' => 'user-o', 'type' => 'text' ),
...................

$search_attributes = array('sn', 'givenname', 'uid');
$search_use_substring_match = true;
$search_result_items = array('identifier', 'lastname', 'mail');
$search_result_title = "fullname";
$search_result_sortby = "lastname";
$search_result_linkto = array("fullname");

Maybe I do not understand and there is a misconfiguration... Results are not sorted by lastname or last column.

I tried $search_result_sortby = "sn"; and it is the same. Seems results are always sorted by mail...

image

image