* Finish Task #5405
This commit is contained in:
@@ -136,10 +136,15 @@ class release extends control
|
||||
|
||||
$release = $this->release->getById((int)$releaseID, true);
|
||||
if(!$release) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$stories = array();
|
||||
if($link == 'false')
|
||||
{
|
||||
$stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)
|
||||
->beginIF($type == 'story')->orderBy($orderBy)->fi()
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
$stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)
|
||||
->beginIF($type == 'story')->orderBy($orderBy)->fi()
|
||||
->fetchAll('id');
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story');
|
||||
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($release->stories)->andWhere('branch')->eq($release->branch)->fetchPairs('story', 'stage');
|
||||
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
|
||||
|
||||
@@ -807,16 +807,16 @@ class testcase extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($caseID, $confirm = 'no')
|
||||
public function delete($caseID, $runID ,$confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->testcase->confirmDelete, inlink('delete', "caseID=$caseID&confirm=yes")));
|
||||
die(js::confirm($this->lang->testcase->confirmDelete, inlink('delete', "caseID=$caseID&runID=$runID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->testcase->delete(TABLE_CASE, $caseID);
|
||||
|
||||
$this->dao->delete()->from(TABLE_TESTRUN)->where('id')->eq($runID)->exec();
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
common::printIcon('testcase', 'edit',"caseID=$case->id", $case);
|
||||
if(!$isLibCase) common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$case->id", $case, 'button', 'copy');
|
||||
if($isLibCase and common::hasPriv('testsuite', 'createCase')) echo html::a($this->createLink('testsuite', 'createCase', "libID=$case->lib&moduleID=$case->module¶m=$case->id", $case), "<i class='icon-copy'></i>", '', "class='btn' title='{$lang->testcase->copy}'");
|
||||
common::printIcon('testcase', 'delete', "caseID=$case->id", $case, 'button', 'trash', 'hiddenwin');
|
||||
common::printIcon('testcase', 'delete', "caseID=$case->id&runID=$runID", $case, 'button', 'trash', 'hiddenwin');
|
||||
?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user