*+ finish the task #798.

This commit is contained in:
shiyangyangwork@yahoo.cn
2012-06-08 02:42:24 +00:00
parent f0730d6552
commit 8b550e887f
7 changed files with 99 additions and 0 deletions
+25
View File
@@ -273,6 +273,31 @@ class bugModel extends model
return $allChanges;
}
/**
* Assign a bug to a user again.
*
* @param int $bugID
* @access public
* @return void
*/
public function assign($bugID)
{
$now = helper::now();
$oldBug = $this->getById($bugID);
$bug = fixer::input('post')
->setDefault('lastEditedBy', $this->app->user->account)
->setDefault('lastEditedDate', $now)
->remove('comment')
->get();
$this->dao->update(TABLE_BUG)
->data($bug)
->autoCheck()
->where('id')->eq($bugID)->exec();
if(!dao::isError()) return common::createChanges($oldBug, $bug);
}
/**
* Confirm a bug.
*