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/build/view/view.html.php b/module/build/view/view.html.php
index 9070a25ab4..9ca7217e2d 100644
--- a/module/build/view/view.html.php
+++ b/module/build/view/view.html.php
@@ -343,7 +343,7 @@ tbody tr td:first-child input {display: none;}
|
builds) as $buildID):?>
- createLink('build', 'view', "buildID=$buildID") . "#app={$app->tab}", zget($buildPairs, $buildID)) . $lang->comma;?>
+ createLink('build', 'view', "buildID=$buildID") . "#app={$app->tab}", zget($buildPairs, $buildID)) . $lang->comma;?>
comma);?>
|
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/project/config.php b/module/project/config.php
index afbb5e6010..d3149df35e 100644
--- a/module/project/config.php
+++ b/module/project/config.php
@@ -11,7 +11,8 @@ $config->project->editor->activate = array('id' => 'comment', 'tools' => 'simple
$config->project->editor->view = array('id' => 'lastComment', 'tools' => 'simpleTools');
$config->project->list = new stdclass();
-$config->project->list->exportFields = 'id,parent,code,name,hasProduct,linkedProducts,status,begin,end,budget,PM,end,desc';
+$config->project->list->exportFields = 'id,code,name,hasProduct,linkedProducts,status,begin,end,budget,PM,end,desc';
+if($config->systemMode == 'ALM') $config->project->list->exportFields = substr_replace($config->project->list->exportFields, ',parent', 2, 0);
$config->project->create = new stdclass();
$config->project->edit = new stdclass();
diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php
index a1224679ee..3c3f5d52d3 100644
--- a/module/project/view/execution.html.php
+++ b/module/project/view/execution.html.php
@@ -42,10 +42,12 @@
$lang->programplan->stageCustom->task), '', $this->cookie->showTask ? 'checked=checked' : '');?>
+ model == 'waterfall'):?>
", '', "class='btn btn-icon text-primary switchBtn' title='{$lang->project->bylist}'");?>
createLink('programplan', 'browse', "projectID=$projectID&productID=$productID&type=gantt"), " ", '', "class='btn btn-icon switchBtn' title='{$lang->programplan->gantt}'");?>
+
" . $lang->export, '', "class='btn btn-link export'")?>
createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), "
" . $lang->programplan->create, '', "class='btn btn-primary'");?>
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;
diff --git a/module/transfer/control.php b/module/transfer/control.php
index 1f58dc5022..b9b7851107 100755
--- a/module/transfer/control.php
+++ b/module/transfer/control.php
@@ -159,14 +159,14 @@ class transfer extends control
if($model == 'story')
{
- $product = $this->loadModel('product')->getByID($this->session->storyPortParams['productID']);
+ $product = $this->loadModel('product')->getByID($this->session->storyTransferParams['productID']);
if($product->type == 'normal') unset($fields['branch']);
if($this->session->storyType == 'requirement') unset($fields['plan']);
}
if($model == 'bug')
{
- $product = $this->loadModel('product')->getByID($this->session->bugPortParams['productID']);
+ $product = $this->loadModel('product')->getByID($this->session->bugTransferParams['productID']);
if($product->type == 'normal') unset($fields['branch']);
if($product->shadow and ($this->app->tab == 'execution' or $this->app->tab == 'project')) unset($fields['product']);
}
diff --git a/module/transfer/model.php b/module/transfer/model.php
index 6ec348d984..0837f45652 100644
--- a/module/transfer/model.php
+++ b/module/transfer/model.php
@@ -56,16 +56,16 @@ class transferModel extends model
}
/**
- * Check tmpFile.
+ * Check tmp file.
*
* @access public
* @return void
*/
public function checkTmpFile()
{
- $file = $this->session->fileImportFileName;
- $tmpPath = $this->loadModel('file')->getPathOfImportedFile();
- $tmpFile = $tmpPath . DS . md5(basename($file));
+ $file = $this->session->fileImportFileName;
+ $tmpPath = $this->loadModel('file')->getPathOfImportedFile();
+ $tmpFile = $tmpPath . DS . md5(basename($file));
if($this->maxImport and file_exists($tmpFile)) return $tmpFile;
return false;
@@ -196,7 +196,7 @@ class transferModel extends model
$rows = $this->getRows($model, $fieldList);
if($model == 'story')
{
- $product = $this->loadModel('product')->getByID((int)$this->session->storyPortParams['productID']);
+ $product = $this->loadModel('product')->getByID((int)$this->session->storyTransferParams['productID']);
if($product and $product->shadow)
{
foreach($rows as $id => $row)