diff --git a/module/project/control.php b/module/project/control.php
index cdfa144487..a48d5ff535 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -857,6 +857,9 @@ class project extends control
/**
* Create a project.
*
+ * @param string $projectID
+ * @param string $copyProjectID
+ *
* @access public
* @return void
*/
@@ -1305,8 +1308,8 @@ class project extends control
public function tree($projectID, $type = '')
{
$this->project->setMenu($this->projects, $projectID);
- $project = $this->loadModel('project')->getById($projectID);
- $tree = $this->project->getProjectTree($projectID);
+ $project = $this->loadModel('project')->getById($projectID);
+ $tree = $this->project->getProjectTree($projectID);
/* Save to session. */
$uri = $this->app->getURI(true);
@@ -1946,6 +1949,7 @@ class project extends control
*/
public function tips($projectID)
{
+ $this->view->project = $this->project->getById($projectID);
$this->view->projectID = $projectID;
$this->display('project', 'tips');
}
diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php
index 1d3c87c8c1..05e2cec285 100644
--- a/module/project/view/task.html.php
+++ b/module/project/view/task.html.php
@@ -49,6 +49,13 @@ js::set('browseType', $browseType);
if($useDatatable) include '../../common/view/datatable.html.php';
$customFields = $this->datatable->getSetting('project');
+ if($project->type == 'ops')
+ {
+ foreach($customFields as $id => $customField)
+ {
+ if($customField->id == 'story') unset($customFields[$id]);
+ }
+ }
$widths = $this->datatable->setFixedFieldWidth($customFields);
$columns = 0;
?>
diff --git a/module/project/view/taskheader.html.php b/module/project/view/taskheader.html.php
index 214756f2ab..e6590fc19e 100644
--- a/module/project/view/taskheader.html.php
+++ b/module/project/view/taskheader.html.php
@@ -28,6 +28,7 @@
foreach(customModel::getFeatureMenu('project', 'task') as $menuItem)
{
+ if($project->type == 'ops' && $menuItem->name == 'needconfirm') continue;
if(isset($menuItem->hidden)) continue;
$menuType = $menuItem->name;
if(strpos($menuType, 'QUERY') === 0)
@@ -73,6 +74,7 @@
foreach ($lang->project->groups as $key => $value)
{
if($key == '') continue;
+ if($project->type == 'ops' && $key == 'story') continue;
echo '
';
common::printLink('project', 'groupTask', "project=$projectID&groupBy=$key", $value);
}
diff --git a/module/project/view/tips.html.php b/module/project/view/tips.html.php
index b932b2b231..93e982f658 100644
--- a/module/project/view/tips.html.php
+++ b/module/project/view/tips.html.php
@@ -2,7 +2,7 @@
project->afterInfo;?>
createLink('project', 'team', "projectID=$projectID"), $lang->project->setTeam, '', "class='btn'");?>
- config->global->flow != 'onlyTask') echo html::a($this->createLink('project', 'linkstory', "projectID=$projectID"), $lang->project->linkStory, '', "class='btn'");?>
+ config->global->flow != 'onlyTask' && $project->type != 'ops') echo html::a($this->createLink('project', 'linkstory', "projectID=$projectID"), $lang->project->linkStory, '', "class='btn'");?>
createLink('task', 'create', "project=$projectID"), $lang->project->createTask, '', "class='btn'");?>
createLink('project', 'task', "projectID=$projectID"), $lang->project->goback, '', "class='btn'");?>
diff --git a/module/task/control.php b/module/task/control.php
index bc8da8d463..6efd176bda 100644
--- a/module/task/control.php
+++ b/module/task/control.php
@@ -152,6 +152,8 @@ class task extends control
/* Set Custom*/
foreach(explode(',', $this->config->task->customCreateFields) as $field) $customFields[$field] = $this->lang->task->$field;
+ if($project->type == 'ops') unset($customFields['story']);
+
$this->view->customFields = $customFields;
$this->view->showFields = $this->config->task->custom->createFields;
@@ -1172,14 +1174,17 @@ class task extends control
*/
public function export($projectID, $orderBy)
{
+ $project = $this->project->getById($projectID);
+ $allExportFields = $this->config->task->exportFields;
+ if($project->type == 'ops') $allExportFields = str_replace(' story,', '', $allExportFields);
+
if($_POST)
{
$this->loadModel('file');
- $taskLang = $this->lang->task;
- $taskConfig = $this->config->task;
+ $taskLang = $this->lang->task;
/* Create field lists. */
- $fields = $this->post->exportFields ? $this->post->exportFields : explode(',', $taskConfig->exportFields);
+ $fields = $this->post->exportFields ? $this->post->exportFields : explode(',', $allExportFields);
foreach($fields as $key => $fieldName)
{
$fieldName = trim($fieldName);
@@ -1286,7 +1291,7 @@ class task extends control
$this->fetch('file', 'export2' . $this->post->fileType, $_POST);
}
- $this->view->allExportFields = $this->config->task->exportFields;
+ $this->view->allExportFields = $allExportFields;
$this->view->customExport = true;
$this->display();
}
diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php
index a8c54b8ad4..da7d9e202f 100644
--- a/module/task/view/batchcreate.html.php
+++ b/module/task/view/batchcreate.html.php
@@ -16,7 +16,7 @@