PM-603 cases list con reprot tables eliminados SOLVED

- Cuando se borra un pmtable asociado a un cases list da un error por no encontrar los fields.
- cuando se borra la tabla se procede a poner en default la configuracion del cases list.
This commit is contained in:
Marco Antonio Nina
2014-10-16 12:25:45 -04:00
parent b81d78ff9d
commit 72c24f0f80
2 changed files with 14 additions and 3 deletions

View File

@@ -23,9 +23,14 @@ $conf = new Configurations();
try {
// the setup for search is the same as the Sent (participated)
$confCasesList = $conf->getConfiguration( 'casesList', ($action == 'search' || $action == 'simple_search') ? 'search' : $action );
$table = null;
if (isset($confCasesList['PMTable'])) {
$aditionalTable = new AdditionalTables();
$table = $aditionalTable->load($confCasesList['PMTable']);
}
$confCasesList = ($table != null) ? $confCasesList : array ();
$generalConfCasesList = $conf->getConfiguration( 'ENVIRONMENT_SETTINGS', '' );
} catch (Exception $e) {
$confCasesList = array ();
@@ -372,7 +377,7 @@ function getAdditionalFields($action, $confCasesList = array())
$config = new Configurations();
$arrayConfig = $config->casesListDefaultFieldsAndConfig($action);
if (is_array($confCasesList) && count($confCasesList) > 0 && count($confCasesList["second"]["data"]) > 0) {
if (is_array($confCasesList) && count($confCasesList) > 0 && isset($confCasesList["second"]) && count($confCasesList["second"]["data"]) > 0) {
//For the case list builder in the enterprise plugin
$caseColumns = array();
$caseReaderFields = array();

View File

@@ -27,6 +27,12 @@ Ext.onReady(function () {
case "FIELD_SAVE":
var rs = firstGrid.store.data.items;
if (pmTablesDropdown.getValue() == '') {
if (rs.length != 0) {
Ext.Msg.alert(_("ID_INFO"), _("ID_EMPTY_PMTABLE"));
return;
}
}
var fv = [];
for (i = 0; i <= rs.length - 1; i++) {