* Finish Task #5379,#5398
This commit is contained in:
@@ -1670,7 +1670,13 @@ class bugModel extends model
|
||||
{
|
||||
$datas = $this->dao->select('openedBuild as name, count(openedBuild) as value')->from(TABLE_BUG)->where($this->reportCondition())->groupBy('openedBuild')->orderBy('value DESC')->fetchAll('name');
|
||||
if(!$datas) return array();
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($this->session->product, $branch = 0, $params = '');
|
||||
$products = $this->session->product;
|
||||
preg_match('/`product` IN \((?P<productIds>.+)\)/', $this->reportCondition(), $matchs);
|
||||
if(!empty($matchs) and isset($matchs['productIds']))
|
||||
{
|
||||
$products = strtr($matchs['productIds'], array('\'' => ''));
|
||||
}
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($products, $branch = 0, $params = '');
|
||||
/* Deal with the situation that a bug maybe associate more than one openedBuild. */
|
||||
foreach($datas as $buildIDList => $data)
|
||||
{
|
||||
|
||||
@@ -138,6 +138,7 @@ class release extends control
|
||||
if(!$release) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$stories = array();
|
||||
/*task 5379*/
|
||||
if($link == 'false')
|
||||
{
|
||||
$stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)
|
||||
|
||||
@@ -585,7 +585,7 @@ class storyModel extends model
|
||||
foreach($storyIDList as $storyID)
|
||||
{
|
||||
if($data->pris[$storyID] == 'ditto') $data->pris[$storyID] = isset($prev['pri']) ? $prev['pri'] : 0;
|
||||
if($data->branches[$storyID] == 'ditto') $data->branches[$storyID] = isset($prev['branch']) ? $prev['branch'] : 0;
|
||||
if(isset($data->branches) and $data->branches[$storyID] == 'ditto') $data->branches[$storyID] = isset($prev['branch']) ? $prev['branch'] : 0;
|
||||
if($data->modules[$storyID] == 'ditto') $data->modules[$storyID] = isset($prev['module']) ? $prev['module'] : 0;
|
||||
if($data->plans[$storyID] == 'ditto') $data->plans[$storyID] = isset($prev['plan']) ? $prev['plan'] : 0;
|
||||
if($data->sources[$storyID] == 'ditto') $data->sources[$storyID] = isset($prev['source']) ? $prev['source'] : '';
|
||||
@@ -1063,6 +1063,7 @@ class storyModel extends model
|
||||
|
||||
$this->dao->update(TABLE_STORY)->data($story)->autoCheck()->where('id')->eq((int)$storyID)->exec();
|
||||
$this->dao->update(TABLE_STORYSTAGE)->set('stage')->eq($stage)->where('story')->eq((int)$storyID)->exec();
|
||||
$this->setStage($storyID);
|
||||
if(!dao::isError()) $allChanges[$storyID] = common::createChanges($oldStory, $story);
|
||||
}
|
||||
if($ignoreStories) echo js::alert(sprintf($this->lang->story->ignoreChangeStage, $ignoreStories));
|
||||
|
||||
Reference in New Issue
Block a user