diff --git a/module/bug/view/edit.html.php b/module/bug/view/edit.html.php
index 24ccd1aa2e..f2411a486b 100644
--- a/module/bug/view/edit.html.php
+++ b/module/bug/view/edit.html.php
@@ -123,7 +123,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
-
multiple)) echo 'hide'?>'>
| bug->productplan;?> |
plan, "class='form-control chosen'");?>
diff --git a/module/execution/control.php b/module/execution/control.php
index 072219bda6..dc5f1977a1 100644
--- a/module/execution/control.php
+++ b/module/execution/control.php
@@ -1733,10 +1733,28 @@ class execution extends control
$this->view->linkedBranches = $linkedBranches;
}
+ if(!$project->hasProduct)
+ {
+ $shadowProduct = $this->loadModel('product')->getShadowProductByProject($project->id);
+ $productPlan = $this->loadModel('productplan')->getPairs($shadowProduct->id, '0,0', 'noclosed,unexpired', true);
+ }
+
if(!empty($_POST))
{
if(isset($_POST['attribute']) and in_array($_POST['attribute'], array('request', 'design', 'review'))) unset($_POST['plans']);
+ /* No product execution link plans. */
+ if(!$project->hasProduct and !empty($_POST['plans']))
+ {
+ $plansItem = array();
+ foreach($_POST['plans'] as $planItem)
+ {
+ if(empty($planItem[0][0])) continue;
+ $plansItem[] = $planItem[0][0];
+ }
+ $_POST['plans'] = array($_POST['products'][0] => array(0 => $plansItem));
+ }
+
$executionID = $this->execution->create($copyExecutionID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
diff --git a/module/execution/view/story.html.php b/module/execution/view/story.html.php
index 4d4d80de04..cbab8e4866 100644
--- a/module/execution/view/story.html.php
+++ b/module/execution/view/story.html.php
@@ -79,7 +79,7 @@
id", '', 'button', 'bar-chart muted');
- common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&executionID=$execution->id", " " . $lang->story->export, '', "class='btn btn-link export iframe'");
+ common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&executionID=$execution->id&browseType=$type&storyType=$storyType", " " . $lang->story->export, '', "class='btn btn-link export iframe'");
$canLinkStory = $execution->hasProduct or $execution->multiple;
if(common::canModify('execution', $execution))
@@ -253,6 +253,7 @@
foreach($setting as $key => $value)
{
if(!$execution->hasProduct and !$execution->multiple and $value->id == 'plan') continue;
+ if(!$execution->hasProduct and !$execution->multiple and $value->id == 'stage') continue;
if($value->show)
{
$this->datatable->printHead($value, $orderBy, $vars, $canBatchAction);
@@ -271,6 +272,7 @@
$value)
{
if(!$execution->hasProduct and !$execution->multiple and $value->id == 'plan') continue;
+ if(!$execution->hasProduct and !$execution->multiple and $value->id == 'stage') continue;
$this->story->printCell($value, $story, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', $storyType, $execution, $showBranch);
}
?>
@@ -285,6 +287,7 @@
$value)
{
if(!$execution->hasProduct and !$execution->multiple and $value->id == 'plan') continue;
+ if(!$execution->hasProduct and !$execution->multiple and $value->id == 'stage') continue;
$this->story->printCell($value, $child, $users, $branchOption, $storyStages, $modulePairs, $storyTasks, $storyBugs, $storyCases, $useDatatable ? 'datatable' : 'table', $storyType, $execution);
}?>
|
diff --git a/module/search/model.php b/module/search/model.php
index fb686c62ae..fda31e9aac 100644
--- a/module/search/model.php
+++ b/module/search/model.php
@@ -973,10 +973,11 @@ class searchModel extends model
if($this->app->user->admin) return $results;
$this->loadModel('doc');
- $products = $this->app->user->view->products;
- $programs = $this->app->user->view->programs;
- $projects = $this->app->user->view->projects;
- $executions = $this->app->user->view->sprints;
+ $products = $this->app->user->view->products;
+ $shadowProducts = $this->dao->select('id')->from(TABLE_PRODUCT)->where('shadow')->eq(1)->fetchPairs('id');
+ $programs = $this->app->user->view->programs;
+ $projects = $this->app->user->view->projects;
+ $executions = $this->app->user->view->sprints;
$objectPairs = array();
$total = count($results);
@@ -1014,6 +1015,7 @@ class searchModel extends model
foreach($objectIdList as $productID => $recordID)
{
if(strpos(",$products,", ",$productID,") === false) unset($results[$recordID]);
+ if(in_array($productID, $shadowProducts)) unset($results[$recordID]);
}
}
elseif($objectType == 'program')
diff --git a/module/story/control.php b/module/story/control.php
index 6cffa44848..0877c6779d 100755
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -1085,7 +1085,7 @@ class story extends control
}
/* Set ditto option for users. */
- $users = $this->loadModel('user')->getPairs('nodeleted');
+ $users = $this->loadModel('user')->getPairs('nodeleted|noclosed');
$users = array('' => '', 'ditto' => $this->lang->story->ditto) + $users;
/* Set Custom*/
@@ -2777,7 +2777,7 @@ class story extends control
$this->config->story->datatable->fieldList['plan']['dataSource'] = array('module' => 'productplan', 'method' => 'getPairs', 'params' => $productIdList);
}
- $this->post->set('rows', $this->story->getExportStorys($executionID, $orderBy));
+ $this->post->set('rows', $this->story->getExportStorys($executionID, $orderBy, $storyType));
$this->fetch('transfer', 'export', 'model=story');
}
@@ -2816,7 +2816,7 @@ class story extends control
if(isset($project->hasProduct) && !$project->hasProduct)
{
$filterFields = array('product,', 'branch,');
- if($project->model != 'scrum') $filterFields[] = 'plan';
+ if($project->model != 'scrum') $filterFields[] = 'plan,';
$this->config->story->exportFields = str_replace($filterFields, '', $this->config->story->exportFields);
}
diff --git a/module/story/model.php b/module/story/model.php
index ce627b9b37..e0f14160fc 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -4218,7 +4218,7 @@ class storyModel extends model
if($action == 'batchcreate' and $story->parent > 0) return false;
if($action == 'batchcreate' and $story->type == 'requirement' and $story->status != 'closed') return strpos('draft,reviewing,changing', $story->status) === false;
if($action == 'batchcreate' and $config->vision == 'lite' and ($story->status == 'active' and ($story->stage == 'wait' or $story->stage == 'projected'))) return true;
- /* Adjust code, hide split entry, fix bug #29432. */
+ /* Adjust code, hide split entry. */
if($action == 'batchcreate' and ($story->status != 'active' or (isset($shadowProducts[$story->product])) or (!isset($shadowProducts[$story->product]) && $story->stage != 'wait') or !empty($story->plan))) return false;
return true;
@@ -4489,7 +4489,7 @@ class storyModel extends model
$executionID = empty($execution) ? 0 : $execution->id;
- /* Adjust code, hide split entry, fix bug #29432. */
+ /* Adjust code, hide split entry. */
if(common::hasPriv('story', 'batchCreate') and !$execution->multiple and !$execution->hasProduct and false)
{
$isClick = $this->isClickable($story, 'batchcreate');
@@ -5878,13 +5878,16 @@ class storyModel extends model
*
* @param int $executionID
* @param string $orderBy
+ * @param string $storyType
* @access public
* @return void
*/
- public function getExportStorys($executionID, $orderBy = 'id_desc')
+ public function getExportStorys($executionID, $orderBy = 'id_desc', $storyType = 'story')
{
$this->loadModel('file');
$this->loadModel('branch');
+
+ $this->replaceURLang($storyType);
$storyLang = $this->lang->story;
$storyConfig = $this->config->story;