Merge branch 'sprint/zentaopms256_lanzongjun' into 'zentaopms_256'
* finish task #75318#75327#75328 See merge request easycorp/zentaopms!6075
This commit is contained in:
@@ -1078,7 +1078,14 @@ class product extends control
|
||||
public function ajaxGetPlans($productID, $branch = 0, $planID = 0, $fieldID = '', $needCreate = false, $expired = '', $param = '')
|
||||
{
|
||||
$param = strtolower($param);
|
||||
$plans = $this->loadModel('productplan')->getPairs($productID, $branch, $expired, strpos($param, 'skipparent') !== false);
|
||||
if(strpos($param, 'getpairsforstory') === false)
|
||||
{
|
||||
$plans = $this->loadModel('productplan')->getPairs($productID, $branch, $expired, strpos($param, 'skipparent') !== false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$plans = $this->loadModel('productplan')->getPairsForStory($productID, $branch, $param);
|
||||
}
|
||||
$field = $fieldID !== '' ? "plans[$fieldID]" : 'plan';
|
||||
$multiple = strpos($param, 'multiple') === false ? '' : 'multiple';
|
||||
$output = html::select($field, $plans, $planID, "class='form-control chosen' $multiple");
|
||||
|
||||
@@ -408,7 +408,7 @@ class story extends control
|
||||
$this->view->users = $users;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch, 'skipParent|unexpired|noclosed'));
|
||||
$this->view->plans = str_replace('2030-01-01', $this->lang->story->undetermined, $this->loadModel('productplan')->getPairsForStory($productID, $branch == 0 ? '' : $branch, 'skipParent|unexpired|noclosed'));
|
||||
$this->view->planID = $planID;
|
||||
$this->view->source = $source;
|
||||
$this->view->sourceNote = $sourceNote;
|
||||
|
||||
@@ -238,7 +238,7 @@ function loadPlanForSiblings(productID, branch, branchIndex)
|
||||
{
|
||||
/* Load plan */
|
||||
if(branch == '0') branch = '';
|
||||
planLink = createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=' + branch + '&planID=' + $('#plan').val() + '&fieldID=' + branchIndex + '&needCreate=false&expired=unexpired¶m=skipParent,' + config.currentMethod);
|
||||
planLink = createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=' + branch + '&planID=0&fieldID=' + branchIndex + '&needCreate=false&expired=unexpired¶m=skipParent|getpairsforstory,' + config.currentMethod);
|
||||
if(branchIndex > 0)
|
||||
{
|
||||
var $planIdBox = $('.addBranchesBox'+ branchIndex +' #planIdBox');
|
||||
|
||||
@@ -322,6 +322,7 @@ $lang->story->errorDuplicateStory = $lang->SRCommon . '%s not exist';
|
||||
$lang->story->confirmRecallChange = "After undo the change, the story content will revert to the version before the change. Are you sure you want to undo?";
|
||||
$lang->story->confirmRecallReview = "Are you sure you want to withdraw the review?";
|
||||
$lang->story->noStoryToTask = "Only the activated {$lang->SRCommon} can be converted into a task!";
|
||||
$lang->story->ignoreClosedStory = "{$lang->SRCommon} %s status is closed, and the operation has been filtered.";
|
||||
|
||||
$lang->story->form = new stdclass();
|
||||
$lang->story->form->area = 'Story Bereich';
|
||||
|
||||
@@ -322,6 +322,7 @@ $lang->story->errorDuplicateStory = $lang->SRCommon . '%s not exist';
|
||||
$lang->story->confirmRecallChange = "After undo the change, the story content will revert to the version before the change. Are you sure you want to undo?";
|
||||
$lang->story->confirmRecallReview = "Are you sure you want to withdraw the review?";
|
||||
$lang->story->noStoryToTask = "Only the activated {$lang->SRCommon} can be converted into a task!";
|
||||
$lang->story->ignoreClosedStory = "{$lang->SRCommon} %s status is closed, and the operation has been filtered.";
|
||||
|
||||
$lang->story->form = new stdclass();
|
||||
$lang->story->form->area = 'Scope';
|
||||
|
||||
@@ -322,6 +322,7 @@ $lang->story->errorDuplicateStory = $lang->SRCommon . '%s not exist';
|
||||
$lang->story->confirmRecallChange = "After undo the change, the story content will revert to the version before the change. Are you sure you want to undo?";
|
||||
$lang->story->confirmRecallReview = "Are you sure you want to withdraw the review?";
|
||||
$lang->story->noStoryToTask = "Only the activated {$lang->SRCommon} can be converted into a task!";
|
||||
$lang->story->ignoreClosedStory = "{$lang->SRCommon} %s status is closed, and the operation has been filtered.";
|
||||
|
||||
$lang->story->form = new stdclass();
|
||||
$lang->story->form->area = 'Périmètre';
|
||||
|
||||
@@ -322,6 +322,7 @@ $lang->story->errorDuplicateStory = $lang->SRCommon . '%s不存在';
|
||||
$lang->story->confirmRecallChange = "撤销变更后,需求内容会回退至变更前的版本,您确定要撤销吗?";
|
||||
$lang->story->confirmRecallReview = "您确定要撤回评审吗?";
|
||||
$lang->story->noStoryToTask = "只有激活的{$lang->SRCommon}才能转为任务!";
|
||||
$lang->story->ignoreClosedStory = "{$lang->SRCommon} %s 状态为已关闭,本次操作已被过滤。";
|
||||
|
||||
$lang->story->form = new stdclass();
|
||||
$lang->story->form->area = "该{$lang->SRCommon}所属范围";
|
||||
|
||||
@@ -2542,9 +2542,15 @@ class storyModel extends model
|
||||
$storyIdList = $this->post->storyIdList;
|
||||
$assignedTo = $this->post->assignedTo;
|
||||
$oldStories = $this->getByList($storyIdList);
|
||||
$ignoreStories = '';
|
||||
foreach($storyIdList as $storyID)
|
||||
{
|
||||
$oldStory = $oldStories[$storyID];
|
||||
if($oldStory->status == 'closed')
|
||||
{
|
||||
$ignoreStories .= "#{$storyID},";
|
||||
continue;
|
||||
}
|
||||
if($assignedTo == $oldStory->assignedTo) continue;
|
||||
|
||||
$story = new stdclass();
|
||||
@@ -2557,6 +2563,11 @@ class storyModel extends model
|
||||
|
||||
$allChanges[$storyID] = common::createChanges($oldStory, $story);
|
||||
}
|
||||
if($ignoreStories)
|
||||
{
|
||||
$ignoreStories = trim($ignoreStories, ',');
|
||||
echo js::alert(sprintf($this->lang->story->ignoreClosedStory, $ignoreStories));
|
||||
}
|
||||
return $allChanges;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,6 +128,11 @@ function loadProductBranches(productID)
|
||||
loadModuleForSiblings(productID, 0, 0)
|
||||
loadPlanForSiblings(productID, 0, 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
loadProductModules(productID, 0);
|
||||
loadProductPlans(productID, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -191,7 +196,7 @@ function loadProductPlans(productID, branch)
|
||||
if(!branch) branch = 0;
|
||||
var expired = config.currentMethod == 'create' ? 'unexpired' : '';
|
||||
planLink = createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=' + branch + '&planID=' + $('#plan').val() + '&fieldID=&needCreate=true&expired='+ expired +'¶m=skipParent,' + config.currentMethod);
|
||||
var $planIdBox = $('#planIdBox');
|
||||
var $planIdBox = $('.switchBranch #planIdBox');
|
||||
$planIdBox.load(planLink, function()
|
||||
{
|
||||
$planIdBox.find('#plan').chosen();
|
||||
|
||||
Reference in New Issue
Block a user