* [refac feedback #10430] Send taskIdList param by get.
This commit is contained in:
@@ -172,6 +172,7 @@ $filter->testcase->export = new stdclass();
|
||||
$filter->testcase->groupcase = new stdclass();
|
||||
$filter->testcase->view = new stdclass();
|
||||
$filter->testreport->default = new stdclass();
|
||||
$filter->testreport->create = new stdclass();
|
||||
$filter->testsuite->default = new stdclass();
|
||||
$filter->testsuite->library = new stdclass();
|
||||
$filter->testtask->default = new stdclass();
|
||||
@@ -403,6 +404,7 @@ $filter->testreport->default->cookie['lastProject'] = 'int';
|
||||
$filter->testreport->default->cookie['preProductID'] = 'int';
|
||||
$filter->testreport->default->cookie['projectMode'] = 'code';
|
||||
$filter->testreport->default->cookie['preBranch'] = 'reg::word';
|
||||
$filter->testreport->create->get['taskIdList'] = 'reg::any';
|
||||
|
||||
$filter->testsuite->default->cookie['lastCaseLib'] = 'int';
|
||||
$filter->testsuite->default->cookie['lastProduct'] = 'int';
|
||||
|
||||
@@ -104,12 +104,13 @@ class testreport extends control
|
||||
{
|
||||
$param = '';
|
||||
if($objectType == 'product' && $extra) $param = "objectID={$extra}&objectType=testtask";
|
||||
if(strpos('|project|execution|', $objectType) !== false && ($extra || !empty($_POST['taskIdList'])))
|
||||
if(in_array($objectType, array('project', 'execution')) && ($extra || !empty($_POST['taskIdList']))) $param = "objectID={$objectID}&objectType={$objectType}&extra={$extra}";
|
||||
if($param)
|
||||
{
|
||||
$param = "objectID={$objectID}&objectType={$objectType}";
|
||||
$param .= isset($_POST['taskIdList']) ? '&extra=' . join(',', $_POST['taskIdList']) : '&extra=' . $extra;
|
||||
$url = $this->createLink('testreport', 'create', $param);
|
||||
if(!empty($_POST['taskIdList'])) $url .= (strpos($url, '?') !== false ? '&' : '?') . 'taskIdList=' . implode(',', $_POST['taskIdList']);
|
||||
$this->locate($url);
|
||||
}
|
||||
if($param) $this->locate($this->createLink('testreport', 'create', $param));
|
||||
}
|
||||
|
||||
$this->session->set('reportList', $this->app->getURI(true), $this->app->tab);
|
||||
@@ -162,6 +163,7 @@ class testreport extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => inlink('view', "reportID={$reportID}"), 'id' => $reportID));
|
||||
}
|
||||
|
||||
if($this->get->taskIdList) $extra = $this->get->taskIdList;
|
||||
if($objectType == 'testtask') list($objectID, $task, $productID) = $this->testreportZen->assignTaskParisForCreate($objectID, $extra);
|
||||
|
||||
if(!$objectID) return $this->send(array('result' => 'fail', 'load' => array('confirm' => $this->lang->testreport->noObjectID, 'confirmed' => inlink('browse', "proudctID={$productID}"), 'canceled' => inlink('browse', "proudctID={$productID}"))));
|
||||
|
||||
Reference in New Issue
Block a user