* Optimize bug edit, change render stories with ajax.
This commit is contained in:
+19
-3
@@ -1185,7 +1185,6 @@ class bug extends control
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->executions = $executions;
|
||||
$this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'all', 'id_desc', 0, 'full', 'story', false);
|
||||
$this->view->branchOption = $branchOption;
|
||||
$this->view->branchTagOption = $branchTagOption;
|
||||
$this->view->tasks = $this->task->getExecutionTaskPairs($bug->execution);
|
||||
@@ -1202,7 +1201,7 @@ class bug extends control
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return 1
|
||||
* @return int
|
||||
*/
|
||||
public function ajaxGetAllBuilds($bugID)
|
||||
{
|
||||
@@ -1254,7 +1253,7 @@ class bug extends control
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return 1
|
||||
* @return int
|
||||
*/
|
||||
public function ajaxGetTestTasks($bugID)
|
||||
{
|
||||
@@ -1265,6 +1264,23 @@ class bug extends control
|
||||
return print(helper::jsonEncode($testTasks));
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajax get stories.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function ajaxGetStories($bugID)
|
||||
{
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'all', 'id_desc', 0, 'full', 'story', false);
|
||||
if(isset($stories[0])) unset($stories[0]);
|
||||
$stories = $this->bug->convertArrayToObjectArray($stories);
|
||||
|
||||
return print(helper::jsonEncode($stories));
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch edit bug.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user