* Fix bug #17994.
This commit is contained in:
@@ -1941,12 +1941,12 @@ class bug extends control
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetUserBugs($userID = '', $id = '' , $appendID = '')
|
||||
public function ajaxGetUserBugs($userID = '', $id = '' , $appendID = 0)
|
||||
{
|
||||
if($userID == '') $userID = $this->app->user->id;
|
||||
$user = $this->loadModel('user')->getById($userID, 'id');
|
||||
$account = $user->account;
|
||||
$bugs = $this->bug->getUserBugPairs($account, true, '', '', '', $appendID);
|
||||
$bugs = $this->bug->getUserBugPairs($account, true, 0, '', '', $appendID);
|
||||
|
||||
if($id) return print(html::select("bugs[$id]", $bugs, '', 'class="form-control"'));
|
||||
return print(html::select('bug', $bugs, '', 'class=form-control'));
|
||||
|
||||
@@ -1558,16 +1558,16 @@ class bugModel extends model
|
||||
/**
|
||||
* Get bug pairs of a user.
|
||||
*
|
||||
* @param int $account
|
||||
* @param bool $appendProduct
|
||||
* @param int $limit
|
||||
* @param array $skipProductIDList
|
||||
* @param array $skipExecutionIDList
|
||||
* @param array $appendBugID
|
||||
* @param int $account
|
||||
* @param bool $appendProduct
|
||||
* @param int $limit
|
||||
* @param array $skipProductIDList
|
||||
* @param array $skipExecutionIDList
|
||||
* @param int|array $appendBugID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserBugPairs($account, $appendProduct = true, $limit = 0, $skipProductIDList = array(), $skipExecutionIDList = array(), $appendBugID = '')
|
||||
public function getUserBugPairs($account, $appendProduct = true, $limit = 0, $skipProductIDList = array(), $skipExecutionIDList = array(), $appendBugID = 0)
|
||||
{
|
||||
$bugs = array();
|
||||
$stmt = $this->dao->select('t1.id, t1.title, t2.name as product')
|
||||
|
||||
@@ -2564,7 +2564,7 @@ class story extends control
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetUserStories($userID = '', $id = '', $appendID = '')
|
||||
public function ajaxGetUserStories($userID = '', $id = '', $appendID = 0)
|
||||
{
|
||||
if($userID == '') $userID = $this->app->user->id;
|
||||
$user = $this->loadModel('user')->getById($userID, 'id');
|
||||
|
||||
@@ -3022,15 +3022,15 @@ class storyModel extends model
|
||||
/**
|
||||
* Get story pairs of a user.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $limit
|
||||
* @param string $type requirement|story
|
||||
* @param array $skipProductIDList
|
||||
* @param int $appendStoryID
|
||||
* @param string $account
|
||||
* @param string $limit
|
||||
* @param string $type requirement|story
|
||||
* @param array $skipProductIDList
|
||||
* @param int|array $appendStoryID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserStoryPairs($account, $limit = 10, $type = 'story', $skipProductIDList = array(), $appendStoryID = '')
|
||||
public function getUserStoryPairs($account, $limit = 10, $type = 'story', $skipProductIDList = array(), $appendStoryID = 0)
|
||||
{
|
||||
return $this->dao->select('id, title')
|
||||
->from(TABLE_STORY)
|
||||
|
||||
@@ -1649,7 +1649,7 @@ class task extends control
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetUserTasks($userID = '', $id = '', $status = '', $appendID = '')
|
||||
public function ajaxGetUserTasks($userID = '', $id = '', $status = '', $appendID = 0)
|
||||
{
|
||||
if($userID == '') $userID = $this->app->user->id;
|
||||
$user = $this->loadModel('user')->getById($userID, 'id');
|
||||
|
||||
@@ -2330,14 +2330,14 @@ class taskModel extends model
|
||||
/**
|
||||
* Get tasks pairs of a user.
|
||||
*
|
||||
* @param string $account
|
||||
* @param string $status
|
||||
* @param array $skipExecutionIDList
|
||||
* @param int $appendTaskID
|
||||
* @param string $account
|
||||
* @param string $status
|
||||
* @param array $skipExecutionIDList
|
||||
* @param int|array $appendTaskID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserTaskPairs($account, $status = 'all', $skipExecutionIDList = array(), $appendTaskID = '')
|
||||
public function getUserTaskPairs($account, $status = 'all', $skipExecutionIDList = array(), $appendTaskID = 0)
|
||||
{
|
||||
$stmt = $this->dao->select('t1.id, t1.name, t2.name as execution')
|
||||
->from(TABLE_TASK)->alias('t1')
|
||||
|
||||
@@ -1428,7 +1428,7 @@ class testtask extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function ajaxGetUserTestTasks($userID = '', $id = '', $status = '', $appendID = '')
|
||||
public function ajaxGetUserTestTasks($userID = '', $id = '', $status = '', $appendID = 0)
|
||||
{
|
||||
if($userID == '') $userID = $this->app->user->id;
|
||||
$user = $this->loadModel('user')->getById($userID, 'id');
|
||||
|
||||
@@ -1032,16 +1032,16 @@ class testtaskModel extends model
|
||||
/**
|
||||
* Get testtask pairs of a user.
|
||||
*
|
||||
* @param string $account
|
||||
* @param int $limit
|
||||
* @param string $status all|wait|doing|done|blocked
|
||||
* @param array $skipProductIDList
|
||||
* @param array $skipExecutionIDList
|
||||
* @param int $appendTestTaskID
|
||||
* @param string $account
|
||||
* @param int $limit
|
||||
* @param string $status all|wait|doing|done|blocked
|
||||
* @param array $skipProductIDList
|
||||
* @param array $skipExecutionIDList
|
||||
* @param int|array $appendTestTaskID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getUserTestTaskPairs($account, $limit = 0, $status = 'all', $skipProductIDList = array(), $skipExecutionIDList = array(), $appendTestTaskID = '')
|
||||
public function getUserTestTaskPairs($account, $limit = 0, $status = 'all', $skipProductIDList = array(), $skipExecutionIDList = array(), $appendTestTaskID = 0)
|
||||
{
|
||||
$stmt = $this->dao->select('t1.id, t1.name, t2.name as execution')
|
||||
->from(TABLE_TESTTASK)->alias('t1')
|
||||
|
||||
@@ -215,9 +215,9 @@ class todo extends control
|
||||
}
|
||||
}
|
||||
|
||||
$bugs = $this->bug->getUserBugPairs($account, true, '', '', '', isset($objectIDList['bug']) ? $objectIDList['bug'] : '');
|
||||
$tasks = $this->task->getUserTaskPairs($account, 'wait,doing', '', isset($objectIDList['task']) ? $objectIDList['task'] : '');
|
||||
$storys = $this->loadModel('story')->getUserStoryPairs($account, 10, 'story', '', isset($objectIDList['story']) ? $objectIDList['story'] : '');
|
||||
$bugs = $this->bug->getUserBugPairs($account, true, 0, '', '', isset($objectIDList['bug']) ? $objectIDList['bug'] : '');
|
||||
$tasks = $this->task->getUserTaskPairs($account, 'wait,doing', '', isset($objectIDList['task']) ? $objectIDList['task'] : '');
|
||||
$storys = $this->loadModel('story')->getUserStoryPairs($account, 10, 'story', '', isset($objectIDList['story']) ? $objectIDList['story'] : '');
|
||||
if($this->config->edition != 'open') $this->view->feedbacks = $this->loadModel('feedback')->getUserFeedbackPairs($account);
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
@@ -225,7 +225,7 @@ class todo extends control
|
||||
$risks = $this->loadmodel('risk')->getUserRiskPairs($account);
|
||||
$opportunities = $this->loadmodel('opportunity')->getUserOpportunityPairs($account);
|
||||
}
|
||||
$testtasks = $this->loadModel('testtask')->getUserTestTaskPairs($account, '', '', '', '', isset($objectIDList['testtask']) ? $objectIDList['testtask'] : '');
|
||||
$testtasks = $this->loadModel('testtask')->getUserTestTaskPairs($account, 0, 'all', '', '', isset($objectIDList['testtask']) ? $objectIDList['testtask'] : '');
|
||||
|
||||
/* Judge whether the edited todos is too large. */
|
||||
$countInputVars = count($editedTodos) * $columns;
|
||||
|
||||
@@ -29,6 +29,7 @@ function loadList(type, id, defaultType, idvalue)
|
||||
divID = '#nameBox';
|
||||
}
|
||||
|
||||
id = id ? id : '';
|
||||
var param = 'userID=' + userID + '&id=' + id;
|
||||
if(type == "task" || type == "testtask") param += '&status=';
|
||||
if(type == defaultType && idvalue != 0) param += '&idvalue=' + idvalue;
|
||||
|
||||
Reference in New Issue
Block a user