BUG 11461 "User not in alfabetical order in Advance Search" SOLVED

- User not in alfabetical order in Advance Search
- Sorting problem in the dropdown "User", in Advanced Search, this are
  ordering by USERS.USR_LASTNAME field, which is incorrect
- Solved problem the ordering, has taken into account the settings
  made in ADMIN>Settings>Environment>UserNameDisplayFormat
- The ordering is in ascending
- The "All Users" and "Current User" wildcards will always be the first
- We have defined a new method in the "class.configuration.php" class which
  returns the field you should place your order to the users, this according
  to the settings made ..in ADMIN>Settings>Environment>UserNameDisplayFormat

* Available from version ProcessMaker-2.5.1-testing.3
This commit is contained in:
Victor Saisa Lopez
2013-06-18 16:25:05 -04:00
parent a2b850f272
commit 480e6b7711
3 changed files with 79 additions and 42 deletions

View File

@@ -413,27 +413,7 @@ class Applications
if (($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") && ($status != "TO_DO")) {
switch ($sort) {
case "APP_CACHE_VIEW.APP_CURRENT_USER":
$sort = "USRCR_USR_LASTNAME";
$confEnvSetting = $conf->getConfiguration("ENVIRONMENT_SETTINGS", "");
if (is_array($confEnvSetting)) {
$arrayAux = explode(" ", str_replace(array("(", ")", ","), array(null, null, null), $confEnvSetting["format"]));
if (isset($arrayAux[0])) {
switch (trim($arrayAux[0])) {
case "@userName":
$sort = "USRCR_USR_USERNAME";
break;
case "@firstName":
$sort = "USRCR_USR_FIRSTNAME";
break;
case "@lastName":
$sort = "USRCR_USR_LASTNAME";
break;
}
}
}
$sort = "USRCR_" . $conf->userNameFormatGetFirstFieldByUsersTable();
break;
case "APP_CACHE_VIEW.APP_TAS_TITLE":
$sort = "APPCVCR_APP_TAS_TITLE";