This commit is contained in:
Catouse
2014-08-22 15:28:18 +08:00
2 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -242,7 +242,7 @@ class dao
/**
* The count method, call sql::select() and from().
* use as $this->dao->count()->from(TABLE_BUG)->where('')->fetch('count');
* use as $this->dao->select()->from(TABLE_BUG)->where()->count();
*
* @access public
* @return void
+24
View File
@@ -984,6 +984,30 @@ class projectModel extends model
$this->action->create('bug', $key, 'Totask', '', $taskID);
$this->dao->update(TABLE_BUG)->set('toTask')->eq($taskID)->where('id')->eq($key)->exec();
/* activate bug if bug postponed. */
if($bug->status == 'resolved' && $bug->resolution == 'postponed')
{
$newBug = new stdclass();
$newBug->lastEditedBy = $this->app->user->account;
$newBug->lastEditedDate = $now;
$newBug->assignedDate = $now;
$newBug->status = 'active';
$newBug->resolvedDate = '0000-00-00';
$newBug->resolution = '';
$newBug->resolvedBy = '';
$newBug->resolvedBuild = '';
$newBug->closedBy = '';
$newBug->closedDate = '0000-00-00';
$newBug->duplicateBug = '0';
$this->dao->update(TABLE_BUG)->data($newBug)->autoCheck()->where('id')->eq($key)->exec();
$this->dao->update(TABLE_BUG)->set('activatedCount = activatedCount + 1')->where('id')->eq($key)->exec();
$actionID = $this->action->create('bug', $key, 'Activated');
$changes = common::createChanges($bug, $newBug);
$this->action->logHistory($actionID, $changes);
}
if(isset($task->assignedTo) and $task->assignedTo and $task->assignedTo != $bug->assignedTo)
{
$newBug = new stdClass();