* task 2011
This commit is contained in:
@@ -730,6 +730,7 @@ class bug extends control
|
||||
|
||||
$bug = $this->bug->getById($bugID);
|
||||
$productID = $bug->product;
|
||||
$bugs = $this->bug->getProductBugPairs($productID);
|
||||
$this->bug->setMenu($this->products, $productID);
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve;
|
||||
@@ -737,6 +738,7 @@ class bug extends control
|
||||
$this->view->position[] = $this->lang->bug->resolve;
|
||||
|
||||
$this->view->bug = $bug;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->users = $this->user->getPairs('nodeleted', $bug->openedBy);
|
||||
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($productID);
|
||||
$this->view->actions = $this->action->getList('bug', $bugID);
|
||||
|
||||
@@ -709,6 +709,28 @@ class bugModel extends model
|
||||
return $bugs;
|
||||
}
|
||||
|
||||
/**
|
||||
* get Product Bug Pairs
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function getProductBugPairs($productID)
|
||||
{
|
||||
$bugs = array('' => '');
|
||||
$data = $this->dao->select('id, title')->from(TABLE_BUG)
|
||||
->where('product')->eq((int)$productID)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')
|
||||
->fetchAll();
|
||||
foreach($data as $bug)
|
||||
{
|
||||
$bugs[$bug->id] = $bug->id . ':' . $bug->title;
|
||||
}
|
||||
return $bugs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bugs according to buildID and productID.
|
||||
*
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</tr>
|
||||
<tr id='duplicateBugBox' class='hide'>
|
||||
<th><?php echo $lang->bug->duplicateBug;?></th>
|
||||
<td><?php echo html::input('duplicateBug', '', "class='form-control'");?></td>
|
||||
<td><?php echo html::select('duplicateBug', $bugs, '', "class='form-control chosen' ");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->bug->resolvedBuild;?></th>
|
||||
|
||||
@@ -621,6 +621,7 @@ class story extends control
|
||||
/* Get story and product. */
|
||||
$story = $this->story->getById($storyID);
|
||||
$product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fields('name, id')->fetch();
|
||||
$stories = $this->story->getProductStoryPairs($product->id);
|
||||
|
||||
/* Set menu. */
|
||||
$this->product->setMenu($this->product->getPairs(), $product->id);
|
||||
@@ -635,6 +636,7 @@ class story extends control
|
||||
|
||||
$this->view->product = $product;
|
||||
$this->view->story = $story;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
$this->display();
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
</tr>
|
||||
<tr id='duplicateStoryBox' style='display:none'>
|
||||
<th><?php echo $lang->story->duplicateStory;?></th>
|
||||
<td><?php echo html::input('duplicateStory', '', 'class=form-control');?></td><td></td>
|
||||
<td>
|
||||
<?php echo html::select('duplicateStory', $stories, '', "class='form-control chosen' ");?>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr id='childStoriesBox' style='display:none'>
|
||||
<th><?php echo $lang->story->childStories;?></th>
|
||||
|
||||
Reference in New Issue
Block a user