BUG 6588 Problems importing a process that has Report Tables
Fixed an issue whe a process is imported with Report Tables when there are duplicate fields
This commit is contained in:
@@ -1577,8 +1577,13 @@ class Processes {
|
||||
$oData->reportTables[$key]['REP_TAB_UID'] = $newGuid;
|
||||
}
|
||||
foreach ( $oData->reportTablesVars as $key => $val ) {
|
||||
$newGuid = $map[ $val['REP_TAB_UID'] ];
|
||||
$oData->reportTablesVars[$key]['REP_TAB_UID'] = $newGuid;
|
||||
if(isset($map[ $val['REP_TAB_UID'] ])){
|
||||
/*TODO: Why this can be not defined?? The scenario was when
|
||||
* imported an existing process but as a new one
|
||||
*/
|
||||
$newGuid = $map[ $val['REP_TAB_UID'] ];
|
||||
$oData->reportTablesVars[$key]['REP_TAB_UID'] = $newGuid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2146,7 +2151,7 @@ class Processes {
|
||||
if( $oContent->Exists($ConCategory, $ConParent, $ConId, $ConLang) ) {
|
||||
$oContent->removeContent($ConCategory, $ConParent, $ConId);
|
||||
}
|
||||
$oContent->addContent($ConCategory, $ConParent, $ConId, $ConLang);
|
||||
$oContent->addContent($ConCategory, $ConParent, $ConId, $ConLang,"");
|
||||
}
|
||||
} #@!neyek
|
||||
|
||||
|
||||
@@ -391,13 +391,16 @@ class ReportTables
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aVars = array();
|
||||
$aImportedVars = array();//This array will help to control if the variable already exist
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
if ($bWhitType) {
|
||||
$aVars[] = array('sFieldName' => $aRow['REP_VAR_NAME'], 'sType' => $aRow['REP_VAR_TYPE']);
|
||||
}
|
||||
else {
|
||||
$aVars[] = $aRow['REP_VAR_NAME'];
|
||||
}
|
||||
if ($bWhitType) {
|
||||
if(in_array($aRow['REP_VAR_NAME'],$aImportedVars)){
|
||||
$aImportedVars[]=$aRow['REP_VAR_NAME'];
|
||||
$aVars[] = array('sFieldName' => $aRow['REP_VAR_NAME'], 'sType' => $aRow['REP_VAR_TYPE']);
|
||||
}
|
||||
}else {
|
||||
$aVars[] = $aRow['REP_VAR_NAME'];
|
||||
}
|
||||
$oDataset->next();
|
||||
}
|
||||
return $aVars;
|
||||
|
||||
Reference in New Issue
Block a user