Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
+4
-17
@@ -935,7 +935,7 @@ class bug extends control
|
||||
$bugs = $this->bug->getLinkBugs($bugID);
|
||||
|
||||
/* Build linkBug list.*/
|
||||
$output = '';
|
||||
$output = '';
|
||||
foreach($bugs as $bugId => $bugTitle)
|
||||
{
|
||||
$output .= '<li>';
|
||||
@@ -948,32 +948,19 @@ class bug extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: unlink related bug.
|
||||
* Unlink related bug.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @param int $bug2Unlink
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxUnlinkBug($bugID, $bug2Unlink = 0)
|
||||
public function unlinkBug($bugID, $bug2Unlink = 0)
|
||||
{
|
||||
/* Unlink related bug. */
|
||||
$this->bug->unlinkBug($bugID, $bug2Unlink);
|
||||
|
||||
/* Get current linkbugs. */
|
||||
$bugs = $this->bug->getLinkBugs($bugID);
|
||||
|
||||
/* Build linkBug list. */
|
||||
$output = '';
|
||||
foreach($bugs as $bugId => $bugTitle)
|
||||
{
|
||||
$output .= '<li>';
|
||||
$output .= html::a(inlink('view', "bugID=$bugId"), "#$bugId " . $bugTitle, '_blank');
|
||||
$output .= html::a("javascript:unlinkBug($bugID, $bugId)", '<i class="icon-remove"></i>', '', "title='{$this->lang->unlink}' style='float:right'");
|
||||
$output .= '</li>';
|
||||
}
|
||||
|
||||
die($output);
|
||||
die('success');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -65,8 +65,11 @@ function loadModuleRelated()
|
||||
*/
|
||||
function unlinkBug(bugID, bug2Unlink)
|
||||
{
|
||||
link = createLink('bug', 'ajaxUnlinkBug', 'bugID=' + bugID + '&bug2Unlink=' + bug2Unlink);
|
||||
$('#linkBugBox').load(link);
|
||||
link = createLink('bug', 'unlinkBug', 'bugID=' + bugID + '&bug2Unlink=' + bug2Unlink);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'success') $('#linkBugBox').load(createLink('bug', 'ajaxGetLinkBugs', 'bugID=' + bugID));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,7 +51,8 @@ $lang->bug->closedDate = 'Closed Date';
|
||||
$lang->bug->duplicateBug = 'Duplicate';
|
||||
$lang->bug->lastEditedBy = 'Last Edited By';
|
||||
$lang->bug->linkBug = 'Related';
|
||||
$lang->bug->linkBugs = 'Link bugs';
|
||||
$lang->bug->linkBugs = 'Link related bugs';
|
||||
$lang->bug->unlinkBug = 'Unlink related bug';
|
||||
$lang->bug->case = 'Case';
|
||||
$lang->bug->files = 'Files';
|
||||
$lang->bug->keywords = 'Keywords';
|
||||
|
||||
@@ -51,7 +51,8 @@ $lang->bug->closedDate = '关闭日期';
|
||||
$lang->bug->duplicateBug = '重复ID';
|
||||
$lang->bug->lastEditedBy = '最后修改者';
|
||||
$lang->bug->linkBug = '相关Bug';
|
||||
$lang->bug->linkBugs = '关联Bug';
|
||||
$lang->bug->linkBugs = '关联相关Bug';
|
||||
$lang->bug->unlinkBug = '移除相关Bug';
|
||||
$lang->bug->case = '相关用例';
|
||||
$lang->bug->files = '附件';
|
||||
$lang->bug->keywords = '关键词';
|
||||
|
||||
@@ -974,7 +974,7 @@ class story extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: unlink story.
|
||||
* Unlink story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param string $type
|
||||
@@ -982,25 +982,12 @@ class story extends control
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxUnlinkStory($storyID, $type = '', $story2Unlink = 0)
|
||||
public function unlinkStory($storyID, $type = '', $story2Unlink = 0)
|
||||
{
|
||||
/* Unlink related story if type is linkStories else unlink child story. */
|
||||
$this->story->unlinkStory($storyID, $type, $story2Unlink);
|
||||
|
||||
/* Get linkStories if type is linkStories else get childStories. */
|
||||
$stories = $this->story->getLinkedStories($storyID, $type);
|
||||
|
||||
/* Build linked stories list from. */
|
||||
$output = '';
|
||||
foreach($stories as $storyId => $storyTitle)
|
||||
{
|
||||
$output .= '<li>';
|
||||
$output .= html::a(inlink('view', "storyID=$storyId"), "#$storyId " . $storyTitle, '_blank');
|
||||
$output .= html::a("javascript:unlinkStory($storyID, \"$type\", $storyId)", '<i class="icon-remove"></i>', '', "title='{$this->lang->unlink}' style='float:right'");
|
||||
$output .= '</li>';
|
||||
}
|
||||
|
||||
die($output);
|
||||
die('success');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+10
-3
@@ -9,9 +9,16 @@
|
||||
*/
|
||||
function unlinkStory(storyID, linkType, story2Unlink)
|
||||
{
|
||||
link = createLink('story', 'ajaxUnlinkStory', 'storyID=' + storyID + '&type=' + linkType + '&story2Unlink=' + story2Unlink);
|
||||
if(linkType == 'linkStories') $('#linkStoriesBox').load(link);
|
||||
if(linkType == 'childStories') $('#childStoriesBox').load(link);
|
||||
link = createLink('story', 'unlinkStory', 'storyID=' + storyID + '&type=' + linkType + '&story2Unlink=' + story2Unlink);
|
||||
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'success')
|
||||
{
|
||||
if(linkType == 'linkStories') $('#linkStoriesBox').load(createLink('story', 'ajaxGetLinkedStories', 'storyID=' + storyID + '&type=' + linkType));
|
||||
if(linkType == 'childStories') $('#childStoriesBox').load(createLink('story', 'ajaxGetLinkedStories', 'storyID=' + storyID + '&type=' + linkType));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,6 +25,7 @@ $lang->story->view = "Info";
|
||||
$lang->story->tasks = "Tasks";
|
||||
$lang->story->taskCount = 'Tasks count';
|
||||
$lang->story->linkStory = 'Related story';
|
||||
$lang->story->unlinkStory = 'Unlink related story';
|
||||
$lang->story->export = "Export data";
|
||||
$lang->story->zeroCase = "Story of zero case";
|
||||
$lang->story->reportChart = "Report";
|
||||
|
||||
@@ -25,6 +25,7 @@ $lang->story->view = "需求详情";
|
||||
$lang->story->tasks = "相关任务";
|
||||
$lang->story->taskCount = '任务数';
|
||||
$lang->story->linkStory = '关联需求';
|
||||
$lang->story->unlinkStory = '移除相关需求';
|
||||
$lang->story->export = "导出数据";
|
||||
$lang->story->zeroCase = "零用例需求";
|
||||
$lang->story->reportChart = "统计报表";
|
||||
|
||||
@@ -439,7 +439,7 @@ class storyModel extends model
|
||||
->checkIF(isset($story->closedBy), 'closedReason', 'notempty')
|
||||
->checkIF(isset($story->closedReason) and $story->closedReason == 'done', 'stage', 'notempty')
|
||||
->checkIF(isset($story->closedReason) and $story->closedReason == 'duplicate', 'duplicateStory', 'notempty')
|
||||
->checkIF(isset($story->closedReason) and $story->closedReason == 'subdivided', 'childStories', 'notempty')
|
||||
//->checkIF(isset($story->closedReason) and $story->closedReason == 'subdivided', 'childStories', 'notempty')
|
||||
->where('id')->eq((int)$storyID)->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldStory, $story);
|
||||
|
||||
@@ -690,32 +690,19 @@ class testcase extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: unlink related case.
|
||||
* Unlink related case.
|
||||
*
|
||||
* @param int $caseID
|
||||
* @param int $case2Unlink
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxUnlinkCase($caseID, $case2Unlink = 0)
|
||||
public function unlinkCase($caseID, $case2Unlink = 0)
|
||||
{
|
||||
/* Unlink related case. */
|
||||
$this->testcase->unlinkCase($caseID, $case2Unlink);
|
||||
|
||||
/* Get current linkCases. */
|
||||
$cases = $this->testcase->getLinkCases($caseID);
|
||||
|
||||
/* Build linkCase list. */
|
||||
$output = '';
|
||||
foreach($cases as $caseId => $caseTitle)
|
||||
{
|
||||
$output .= '<li>';
|
||||
$output .= html::a(inlink('view', "caseID=$caseId"), "#$caseId " . $caseTitle, '_blank');
|
||||
$output .= html::a("javascript:unlinkCase($caseID, $caseId)", '<i class="icon-remove"></i>', '', "title='{$this->lang->unlink}' style='float:right'");
|
||||
$output .= '</li>';
|
||||
}
|
||||
|
||||
die($output);
|
||||
die('success');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -29,8 +29,11 @@ $(document).ready(function()
|
||||
*/
|
||||
function unlinkCase(caseID, case2Unlink)
|
||||
{
|
||||
link = createLink('testcase', 'ajaxUnlinkCase', 'caseID=' + caseID + '&case2Unlink=' + case2Unlink);
|
||||
$('#linkCaseBox').load(link);
|
||||
link = createLink('testcase', 'unlinkCase', 'caseID=' + caseID + '&case2Unlink=' + case2Unlink);
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(data == 'success') $('#linkCaseBox').load(createLink('testcase', 'ajaxGetLinkCases', 'caseID=' + caseID));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,7 +27,8 @@ $lang->testcase->real = 'Real';
|
||||
$lang->testcase->keywords = 'Keywords';
|
||||
$lang->testcase->files = 'Files';
|
||||
$lang->testcase->linkCase = 'Related cases';
|
||||
$lang->testcase->linkCases = 'Link cases';
|
||||
$lang->testcase->linkCases = 'Link related cases';
|
||||
$lang->testcase->unlinkCase = 'unlink related case';
|
||||
$lang->testcase->stage = 'Stage';
|
||||
$lang->testcase->lastEditedByAB = 'Last edited by';
|
||||
$lang->testcase->lastEditedDateAB = 'Last edited date';
|
||||
|
||||
@@ -27,7 +27,8 @@ $lang->testcase->real = '实际情况';
|
||||
$lang->testcase->keywords = '关键词';
|
||||
$lang->testcase->files = '附件';
|
||||
$lang->testcase->linkCase = '相关用例';
|
||||
$lang->testcase->linkCases = '关联用例';
|
||||
$lang->testcase->linkCases = '关联相关用例';
|
||||
$lang->testcase->unlinkCase = '移除相关用例';
|
||||
$lang->testcase->stage = '适用阶段';
|
||||
$lang->testcase->lastEditedByAB = '修改者';
|
||||
$lang->testcase->lastEditedDateAB = '修改日期';
|
||||
|
||||
Reference in New Issue
Block a user