* Adjust block method params type.
This commit is contained in:
+7
-11
@@ -178,15 +178,14 @@ class bug extends control
|
||||
* 创建一个bug。
|
||||
* Create a bug.
|
||||
*
|
||||
* @param string $productID
|
||||
* @param int $productID
|
||||
* @param string $branch
|
||||
* @param string $extras Other params, for example, executionID=10,moduleID=10.
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create(string $productID, string $branch = '', string $extras = '')
|
||||
public function create(int $productID, string $branch = '', string $extras = '')
|
||||
{
|
||||
$productID = (int)$productID;
|
||||
if($branch === '') $branch = (int)$this->cookie->preBranch;
|
||||
|
||||
$extras = str_replace(array(',', ' '), array('&', ''), $extras);
|
||||
@@ -305,16 +304,15 @@ class bug extends control
|
||||
* 查看一个bug。
|
||||
* View a bug.
|
||||
*
|
||||
* @param string $bugID
|
||||
* @param int $bugID
|
||||
* @param string $form
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function view(string $bugID, string $from = 'bug')
|
||||
public function view(int $bugID, string $from = 'bug')
|
||||
{
|
||||
/* Judge bug exits or not. */
|
||||
$bugID = (int)$bugID;
|
||||
$bug = $this->bug->getById($bugID, true);
|
||||
$bug = $this->bug->getById($bugID, true);
|
||||
if(!$bug) return print(js::error($this->lang->notFound) . js::locate($this->createLink('qa', 'index')));
|
||||
|
||||
$this->session->set('storyList', '', 'product');
|
||||
@@ -333,16 +331,14 @@ class bug extends control
|
||||
* 更新 bug 信息。
|
||||
* Edit a bug.
|
||||
*
|
||||
* @param string $bugID
|
||||
* @param int $bugID
|
||||
* @param bool $comment true|false
|
||||
* @param string $kanbanGroup
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function edit(string $bugID, bool $comment = false, string $kanbanGroup = 'default')
|
||||
public function edit(int $bugID, bool $comment = false, string $kanbanGroup = 'default')
|
||||
{
|
||||
$bugID = (int)$bugID;
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$oldBug = $this->bug->getByID($bugID);
|
||||
|
||||
@@ -1240,7 +1240,7 @@ class bugModel extends model
|
||||
$this->config->bug->search['params']['product']['values'] = $productParams;
|
||||
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productID);
|
||||
$this->config->bug->search['params']['module']['values'] = $modules;
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($productID, 0, 'id_desc', $projectID);
|
||||
$this->config->bug->search['params']['execution']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($productID, '0', 'id_desc', $projectID);
|
||||
$this->config->bug->search['params']['severity']['values'] = array(0 => '') + $this->lang->bug->severityList; //Fix bug #939.
|
||||
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getBuildPairs($productID, 'all', 'withbranch|releasetag');
|
||||
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
|
||||
|
||||
@@ -180,7 +180,7 @@ panel
|
||||
array('th' => $lang->bug->productplan, 'tr' => $bug->planName, 'url' => helper::createLink('productplan', 'view', "planID=$bug->plan&type=bug")),
|
||||
array('th' => $lang->bug->type, 'tr' => zget($lang->bug->typeList, $bug->type)),
|
||||
array('th' => $lang->bug->status, 'tr' => $this->processStatus('bug', $bug), 'class' => 'status-' . $bug->status),
|
||||
array('th' => $lang->bug->severity, 'tr' => severityLabel(zget($lang->bug->severityList, $bug->severity), set::level($bug->severity))),
|
||||
array('th' => $lang->bug->severity, 'tr' => severityLabel(set::level(zget($lang->bug->severityList, $bug->severity)), set::isIcon(true))),
|
||||
array('th' => $lang->bug->pri, 'tr' => priLabel(zget($lang->bug->priList, $bug->pri))),
|
||||
array('th' => $lang->bug->activatedCount, 'tr' => $bug->activatedCount),
|
||||
array('th' => $lang->bug->activatedDate, 'tr' => $bug->activatedDate),
|
||||
|
||||
Reference in New Issue
Block a user