* [task#51754,done,2h,0h] Split the requirements validation change method.

This commit is contained in:
tanghucheng
2024-07-05 09:38:59 +08:00
committed by 胡方舟
parent cea5a59208
commit 524950541f
3 changed files with 17 additions and 2 deletions
+2
View File
@@ -805,6 +805,7 @@ $config->group->package->manageRequirement->privs['requirement-linkRequirements'
$config->group->package->manageRequirement->privs['requirement-batchEdit'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,or', 'order' => 110, 'depend' => array('product-requirement'), 'recommend' => array('requirement-edit'));
$config->group->package->manageRequirement->privs['requirement-batchChangeRoadmap'] = array('edition' => 'ipd', 'vision' => 'or', 'order' => 125, 'depend' => array('product-requirement'), 'recommend' => array('requirement-batchCreate', 'requirement-create', 'requirement-edit'));
$config->group->package->manageRequirement->privs['requirement-relation'] = array('edition' => 'max,ipd', 'vision' => 'rnd', 'order' => 130, 'depend' => array(), 'recommend' => array());
$config->group->package->manageRequirement->privs['requirement-processStoryChange'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,or', 'order' => 19, 'depend' => array('product-requirement'), 'recommend' => array());
$config->group->package->importRequirement = new stdclass();
$config->group->package->importRequirement->order = 20;
@@ -853,6 +854,7 @@ $config->group->package->manageEpic->privs['epic-batchChangeGrade'] = array('e
$config->group->package->manageEpic->privs['epic-batchChangePlan'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,or', 'order' => 103, 'depend' => array('product-epic'), 'recommend' => array('epic-edit'));
$config->group->package->manageEpic->privs['epic-batchEdit'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,or', 'order' => 110, 'depend' => array('product-epic'), 'recommend' => array('epic-edit'));
$config->group->package->manageEpic->privs['epic-batchChangeRoadmap'] = array('edition' => 'ipd', 'vision' => 'or', 'order' => 125, 'depend' => array('product-epic'), 'recommend' => array('epic-batchCreate', 'epic-create', 'epic-edit'));
$config->group->package->manageEpic->privs['epic-processStoryChange'] = array('edition' => 'open,biz,max,ipd', 'vision' => 'rnd,or', 'order' => 19, 'depend' => array('product-epic'), 'recommend' => array());
$config->group->package->importEpic = new stdclass();
$config->group->package->importEpic->order = 20;
+13
View File
@@ -431,4 +431,17 @@ class requirement extends control
{
echo $this->fetch('story', 'ajaxGetUserStories', "userID=$userID&id=$id&appendID=$appendID&storyType=requirement");
}
/**
* 需求的父需求变更时,子需求确认变更。
* Confirm the change of the parent story.
*
* @param int $storyID
* @access public
* @return void
*/
public function processStoryChange(int $storyID)
{
echo $this->fetch('story', 'processStoryChange', "storyID=$storyID");
}
}
+2 -2
View File
@@ -1931,7 +1931,7 @@ class storyTao extends storyModel
if(!isset($story->from)) $story->from = '';
$closeLink = helper::createLink($story->type, 'close', $params . "&from=$story->from");
$processStoryChangeLink = helper::createLink('story', 'processStoryChange', $params);
$processStoryChangeLink = helper::createLink($story->type, 'processStoryChange', $params);
$changeLink = helper::createLink($story->type, 'change', $params . "&from=$story->from");
$submitReviewLink = helper::createLink($story->type, 'submitReview', "storyID=$story->id");
$reviewLink = helper::createLink($story->type, 'review', $params . "&from=$story->from") . ($this->app->tab == 'project' ? '#app=project' : '');
@@ -1943,7 +1943,7 @@ class storyTao extends storyModel
/* If the story cannot be changed, render the close button. */
$canClose = common::hasPriv($story->type, 'close') && $this->isClickable($story, 'close');
if(!common::canBeChanged($story->type, $story)) return array(array('name' => 'close', 'hint' => $lang->close, 'data-toggle' => 'modal', 'url' => $canClose ? $closeLink : null, 'disabled' => !$canClose));
$canProcessChange = common::hasPriv('story', 'processStoryChange');
$canProcessChange = common::hasPriv($story->type, 'processStoryChange');
if(!empty($story->parentChanged)) return array(array('name' => 'processStoryChange', 'url' => $canProcessChange ? $processStoryChangeLink : null, 'disabled' => !$canProcessChange, 'innerClass' => 'ajax-submit'));
/* Change button. */