* Fix bug #22693.
This commit is contained in:
@@ -298,7 +298,7 @@ class upgrade extends control
|
||||
}
|
||||
|
||||
/* When upgrading historical data as a project, handle products that are not linked with the project. */
|
||||
if(!empty($singleProducts)) $this->upgrade->computeProductAcl($singleProducts, $programID);
|
||||
if(!empty($singleProducts)) $this->upgrade->computeProductAcl($singleProducts, $programID, $lineID);
|
||||
|
||||
/* Process unlinked sprint and product. */
|
||||
foreach($linkedProducts as $productID => $product)
|
||||
@@ -353,7 +353,7 @@ class upgrade extends control
|
||||
}
|
||||
|
||||
/* When upgrading historical data as a project, handle products that are not linked with the project. */
|
||||
if(!empty($singleProducts)) $this->upgrade->computeProductAcl($singleProducts, $programID);
|
||||
if(!empty($singleProducts)) $this->upgrade->computeProductAcl($singleProducts, $programID, $lineID);
|
||||
}
|
||||
elseif($type == 'sprint')
|
||||
{
|
||||
|
||||
@@ -4802,7 +4802,7 @@ class upgradeModel extends model
|
||||
$this->dao->update(TABLE_RELEASE)->set('project')->eq($projectID)->where('product')->in($productIdList)->exec();
|
||||
|
||||
/* Compute product acl. */
|
||||
$this->computeProductAcl($productIdList, $programID);
|
||||
$this->computeProductAcl($productIdList, $programID, $lineID);
|
||||
|
||||
/* No project is created when there are no sprints. */
|
||||
if(!$sprintIdList) return;
|
||||
@@ -4941,10 +4941,11 @@ class upgradeModel extends model
|
||||
*
|
||||
* @param array $productIdList
|
||||
* @param int $programID
|
||||
* @param int $lineID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function computeProductAcl($productIdList = array(), $programID = 0)
|
||||
public function computeProductAcl($productIdList = array(), $programID = 0, $lineID = 0)
|
||||
{
|
||||
/* Compute product acl. */
|
||||
$products = $this->dao->select('id,program,acl')->from(TABLE_PRODUCT)->where('id')->in($productIdList)->fetchAll();
|
||||
@@ -4955,6 +4956,7 @@ class upgradeModel extends model
|
||||
$data = new stdclass();
|
||||
$data->program = $programID;
|
||||
$data->acl = $product->acl == 'custom' ? 'private' : $product->acl;
|
||||
$data->line = $lineID;
|
||||
|
||||
$this->dao->update(TABLE_PRODUCT)->data($data)->where('id')->eq($product->id)->exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user