* Finish task #7552.
This commit is contained in:
@@ -600,7 +600,7 @@ class upgradeModel extends model
|
||||
$this->saveLogs('Execute 12_3_3');
|
||||
$this->execSQL($this->getUpgradeFile('12.3.3'));
|
||||
$this->addPriv12_3_3();
|
||||
|
||||
$this->processImport2TaskBugs();//Code for task #7552
|
||||
}
|
||||
|
||||
$this->deletePatch();
|
||||
@@ -775,6 +775,7 @@ class upgradeModel extends model
|
||||
case '12_3':
|
||||
case '12_3_1':
|
||||
case '12_3_2': $confirmContent .= file_get_contents($this->getUpgradeFile('12.3.2'));
|
||||
case '12_3_3': $confirmContent .= file_get_contents($this->getUpgradeFile('12.3.3'));
|
||||
}
|
||||
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
|
||||
}
|
||||
@@ -1768,6 +1769,28 @@ class upgradeModel extends model
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process bugs which import to project tasks but canceled.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function processImport2TaskBugs()
|
||||
{
|
||||
$this->saveLogs('Run Method ' . __FUNCTION__);
|
||||
$bugs = $this->dao->select('t1.id')->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_TASK)->alias('t2')->on('t1.toTask = t2.id')
|
||||
->where('t1.toTask')->ne(0)
|
||||
->andWhere('t1.status')->eq('active')
|
||||
->andWhere('t2.canceledBy')->ne('')
|
||||
->fetchPairs();
|
||||
|
||||
$this->dao->update(TABLE_BUG)->set('toTask')->eq(0)->where('id')->in($bugs)->exec();
|
||||
$this->saveLogs($this->dao->get());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete company field for the table of zt_config and zt_groupPriv.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user