This commit is contained in:
sunguangming
2024-05-17 13:40:47 +08:00
parent ddfc5b96df
commit 035a221e71
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -2296,7 +2296,7 @@ class execution extends control
$this->execution->buildStorySearchForm($products, $branchGroups, $modules, $queryID, $actionURL, 'linkStory', $object);
$project = (strpos('sprint,stage,kanban', $object->type) !== false) ? $this->loadModel('project')->getByID($object->project) : $object;
$storyType = (($object->type == 'stage' && in_array($object->attribute, array('mix', 'request', 'design')) || $object->type == 'project')) ? $project->storyType : 'story';
$storyType = (($object->type == 'stage' && in_array($object->attribute, array('mix', 'request', 'design'))) || $object->type == 'project' || !$object->multiple) ? $project->storyType : 'story';
if($browseType == 'bySearch') $allStories = $this->story->getBySearch('all', '', $queryID, $orderBy, $objectID, $storyType);
if($browseType != 'bySearch') $allStories = $this->story->getProductStories(implode(',', array_keys($products)), $branchIDList, '0', 'active', $storyType, $orderBy, false, '', null);
+3 -1
View File
@@ -2864,7 +2864,7 @@ class executionModel extends model
$story = zget($storyList, $storyID, '');
if(empty($story)) continue;
if(strpos($project->storyType, "$story->type") === false) continue;
if($execution->type != 'project' && !($execution->type == 'stage' && in_array($execution->attribute, array('mix', 'request', 'design'))) && $story->type != 'story') continue;
if($execution->type != 'project' && !($execution->type == 'stage' && in_array($execution->attribute, array('mix', 'request', 'design'))) && $story->type != 'story' && $execution->multiple) continue;
if(!empty($lanes[$storyID])) $laneID = $lanes[$storyID];
$columnID = $this->kanban->getColumnIDByLaneID((int)$laneID, 'backlog');
@@ -4888,6 +4888,7 @@ class executionModel extends model
$executionData->project = $projectID;
$executionData->name = $project->name;
$executionData->grade = 1;
$executionData->storyType = $project->storyType;
$executionData->begin = $project->begin;
$executionData->end = $project->end;
$executionData->status = 'wait';
@@ -4947,6 +4948,7 @@ class executionModel extends model
$postData = new stdclass();
$postData->project = $projectID;
$postData->name = $project->name;
$postData->storyType = $project->storyType;
$postData->begin = $project->begin;
$postData->end = $project->end;
$postData->realBegan = $project->realBegan ? $project->realBegan : null;
+1 -1
View File
@@ -112,7 +112,7 @@ if(commonModel::isTutorialMode())
if($canOpreate['create']) $createItem[] = array('text' => $lang->story->create, 'url' => $createLink);
if($canOpreate['batchCreate']) $createItem[] = array('text' => $lang->story->batchCreate . $lang->SRCommon, 'url' => $batchCreateLink);
if(in_array($execution->attribute, array('mix', 'request', 'design')))
if(in_array($execution->attribute, array('mix', 'request', 'design')) || !$execution->multiple)
{
if($canOpreate['createEpic']) $createItem[] = array('text' => $lang->epic->create, 'url' => $createEpicLink);
if($canOpreate['batchCreateEpic']) $createItem[] = array('text' => $lang->epic->batchCreate . $lang->ERCommon, 'url' => $batchCreateEpicLink);
+1 -1
View File
@@ -258,7 +258,7 @@ class executionZen extends execution
}
$project = $this->loadModel('project')->fetchByID($execution->project);
if(!($execution->type == 'stage' && in_array($execution->attribute, array('mix', 'request', 'design')))) $project->storyType = 'story';
if(!($execution->type == 'stage' && in_array($execution->attribute, array('mix', 'request', 'design'))) && $project->multiple) $project->storyType = 'story';
$productPairs = $this->loadModel('product')->getProductPairsByProject($execution->id); // Get execution's product.
if(empty($productID)) $productID = (int)key($productPairs);