* fix bug.
This commit is contained in:
@@ -37,7 +37,7 @@ class control extends baseControl
|
||||
|
||||
if(!isset($this->config->bizVersion)) return false;
|
||||
/* Code for task #9224. Set requiredFields for workflow. */
|
||||
if($this->dbh and $this->moduleName != 'upgrade' and $this->moduleName != 'install')
|
||||
if($this->dbh and $this->moduleName != 'upgrade' and $this->moduleName != 'install' and !defined('IN_INSTALL') and !defined('IN_UPGRADE'))
|
||||
{
|
||||
$this->checkRequireFlowField();
|
||||
|
||||
|
||||
@@ -1374,6 +1374,23 @@ class repoModel extends model
|
||||
$action->action = $scm == 'svn' ? 'svncommited' : 'gitcommited';
|
||||
$changes = $this->createActionChanges($log, $repoRoot, $scm);
|
||||
|
||||
if($objects['stories'])
|
||||
{
|
||||
$productsAndProjects = $this->getTaskProductsAndProjects($objects['stories']);
|
||||
foreach($objects['stories'] as $storyID)
|
||||
{
|
||||
$storyID = (int)$storyID;
|
||||
if(!isset($productsAndProjects[$storyID])) continue;
|
||||
|
||||
$action->objectType = 'story';
|
||||
$action->objectID = $storyID;
|
||||
$action->product = $productsAndProjects[$storyID]['product'];
|
||||
$action->project = $productsAndProjects[$storyID]['project'];
|
||||
|
||||
$this->saveRecord($action, $changes);
|
||||
}
|
||||
}
|
||||
|
||||
if($objects['tasks'])
|
||||
{
|
||||
$productsAndProjects = $this->getTaskProductsAndProjects($objects['tasks']);
|
||||
|
||||
+11
-9
@@ -117,19 +117,21 @@ class taskModel extends model
|
||||
{
|
||||
if($storyID) $testStoryIdList[$storyID] = $storyID;
|
||||
}
|
||||
$testStories = $this->dao->select('id,title')->from(TABLE_STORY)->where('id')->in($testStoryIdList)->fetchPairs('id', 'title');
|
||||
$testStories = $this->dao->select('id,title,version')->from(TABLE_STORY)->where('id')->in($testStoryIdList)->fetchAll('id');
|
||||
foreach($this->post->testStory as $i => $storyID)
|
||||
{
|
||||
if(!isset($testStories[$storyID])) continue;
|
||||
|
||||
$task->parent = $taskID;
|
||||
$task->story = $storyID;
|
||||
$task->name = $this->lang->task->lblTestStory . " #{$storyID} " . zget($testStories, $storyID);
|
||||
$task->pri = $this->post->testPri[$i];
|
||||
$task->estStarted = $this->post->testEstStarted[$i];
|
||||
$task->deadline = $this->post->testDeadline[$i];
|
||||
$task->assignedTo = $this->post->testAssignedTo[$i];
|
||||
$task->estimate = $this->post->testEstimate[$i];
|
||||
$task->parent = $taskID;
|
||||
$task->story = $storyID;
|
||||
$task->storyVersion = $testStories[$storyID]->version;
|
||||
$task->name = $this->lang->task->lblTestStory . " #{$storyID} " . $testStories[$storyID]->title;
|
||||
$task->pri = $this->post->testPri[$i];
|
||||
$task->estStarted = $this->post->testEstStarted[$i];
|
||||
$task->deadline = $this->post->testDeadline[$i];
|
||||
$task->assignedTo = $this->post->testAssignedTo[$i];
|
||||
$task->estimate = $this->post->testEstimate[$i];
|
||||
$task->left = $this->post->testEstimate[$i];
|
||||
$this->dao->insert(TABLE_TASK)->data($task)->exec();
|
||||
|
||||
$childTaskID = $this->dao->lastInsertID();
|
||||
|
||||
Reference in New Issue
Block a user