PM-346 "Wrapped: Cannot fetch ColumnMap for undefined column: ..." SOLVED
Issue:
Al definir un nuevo campo para el CasesList en "ADMIN>Settings>CasesList", ocaciona un error
de "columna no definida" cuando se cambia de listados (siempre y cuando se haga el ordenamiento por el nuevo campo)
Cause:
Se esta tratando de ordenar la columna con el nuevo campo creado, sin tomar en cuenta que no puede estar
definido en los otros CasesList
Solution:
Se ha agregado validacion cuando un campo no este definido en el CasesList, si cumple con
esta condicion se setea el ordenamiento por la siguiente columna: APP_CACHE_VIEW.APP_NUMBER
This commit is contained in:
@@ -18,7 +18,7 @@ class Applications
|
||||
$sort = "APP_CACHE_VIEW.APP_NUMBER",
|
||||
$category = null,
|
||||
$configuration = true,
|
||||
$paged = false
|
||||
$paged = true
|
||||
) {
|
||||
$callback = isset($callback)? $callback : "stcCallback1001";
|
||||
$dir = isset($dir)? $dir : "DESC";
|
||||
@@ -443,10 +443,14 @@ class Applications
|
||||
}
|
||||
|
||||
//Add sortable options
|
||||
if ($sort != "") {
|
||||
$sortBk = $sort;
|
||||
|
||||
if ($sortBk != "") {
|
||||
$sort = "";
|
||||
|
||||
//Current delegation (*)
|
||||
if (($action == "sent" || $action == "search" || $action == "simple_search" || $action == "to_revise" || $action == "to_reassign") && ($status != "TO_DO")) {
|
||||
switch ($sort) {
|
||||
switch ($sortBk) {
|
||||
case "APP_CACHE_VIEW.APP_CURRENT_USER":
|
||||
$sort = "USRCR_" . $conf->userNameFormatGetFirstFieldByUsersTable();
|
||||
break;
|
||||
@@ -455,10 +459,12 @@ class Applications
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset( $oAppCache->confCasesList['PMTable'] ) && ! empty( $oAppCache->confCasesList['PMTable'] ) && $tableNameAux != '') {
|
||||
$sortTable = explode(".", $sort);
|
||||
$sortTable = explode(".", $sortBk);
|
||||
|
||||
$additionalTableUid = $oAppCache->confCasesList["PMTable"];
|
||||
|
||||
require_once 'classes/model/Fields.php';
|
||||
$oCriteria = new Criteria('workflow');
|
||||
|
||||
@@ -489,6 +495,15 @@ class Applications
|
||||
}
|
||||
}
|
||||
|
||||
if ($sort == "") {
|
||||
$sort = $sortBk;
|
||||
|
||||
if (!in_array($sortBk, $Criteria->getSelectColumns())) {
|
||||
$sort = AppCacheViewPeer::APP_NUMBER; //DEFAULT VALUE
|
||||
$dir = "DESC";
|
||||
}
|
||||
}
|
||||
|
||||
if ($dir == "DESC") {
|
||||
$Criteria->addDescendingOrderByColumn($sort);
|
||||
} else {
|
||||
|
||||
@@ -458,7 +458,7 @@ class Cases extends Api
|
||||
try {
|
||||
$dataList['userId'] = $this->getUserId();
|
||||
$dataList['action'] = 'paused';
|
||||
$dataList['paged'] = false;
|
||||
$dataList["paged"] = true;
|
||||
|
||||
$dataList['start'] = $start;
|
||||
$dataList['limit'] = $limit;
|
||||
|
||||
Reference in New Issue
Block a user