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;
|
$oData->reportTables[$key]['REP_TAB_UID'] = $newGuid;
|
||||||
}
|
}
|
||||||
foreach ( $oData->reportTablesVars as $key => $val ) {
|
foreach ( $oData->reportTablesVars as $key => $val ) {
|
||||||
$newGuid = $map[ $val['REP_TAB_UID'] ];
|
if(isset($map[ $val['REP_TAB_UID'] ])){
|
||||||
$oData->reportTablesVars[$key]['REP_TAB_UID'] = $newGuid;
|
/*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) ) {
|
if( $oContent->Exists($ConCategory, $ConParent, $ConId, $ConLang) ) {
|
||||||
$oContent->removeContent($ConCategory, $ConParent, $ConId);
|
$oContent->removeContent($ConCategory, $ConParent, $ConId);
|
||||||
}
|
}
|
||||||
$oContent->addContent($ConCategory, $ConParent, $ConId, $ConLang);
|
$oContent->addContent($ConCategory, $ConParent, $ConId, $ConLang,"");
|
||||||
}
|
}
|
||||||
} #@!neyek
|
} #@!neyek
|
||||||
|
|
||||||
|
|||||||
@@ -391,13 +391,16 @@ class ReportTables
|
|||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aVars = array();
|
$aVars = array();
|
||||||
|
$aImportedVars = array();//This array will help to control if the variable already exist
|
||||||
while ($aRow = $oDataset->getRow()) {
|
while ($aRow = $oDataset->getRow()) {
|
||||||
if ($bWhitType) {
|
if ($bWhitType) {
|
||||||
$aVars[] = array('sFieldName' => $aRow['REP_VAR_NAME'], 'sType' => $aRow['REP_VAR_TYPE']);
|
if(in_array($aRow['REP_VAR_NAME'],$aImportedVars)){
|
||||||
}
|
$aImportedVars[]=$aRow['REP_VAR_NAME'];
|
||||||
else {
|
$aVars[] = array('sFieldName' => $aRow['REP_VAR_NAME'], 'sType' => $aRow['REP_VAR_TYPE']);
|
||||||
$aVars[] = $aRow['REP_VAR_NAME'];
|
}
|
||||||
}
|
}else {
|
||||||
|
$aVars[] = $aRow['REP_VAR_NAME'];
|
||||||
|
}
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
}
|
}
|
||||||
return $aVars;
|
return $aVars;
|
||||||
|
|||||||
Reference in New Issue
Block a user