This commit is contained in:
tianshujie98
2021-03-03 09:41:59 +08:00
56 changed files with 462 additions and 269 deletions
+4 -2
View File
@@ -171,7 +171,7 @@ class router extends baseRouter
$commonSettings = array();
try
{
$commonSettings = $this->dbh->query('SELECT section, `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND (`module`='custom' or `module`='common') and `key` in ('sprintConcept', 'hourPoint', 'URSR', 'mode')")->fetchAll();
$commonSettings = $this->dbh->query('SELECT section, `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND (`module`='custom' or `module`='common') and `key` in ('sprintConcept', 'hourPoint', 'URSR', 'mode', 'URAndSR')")->fetchAll();
}
catch (PDOException $exception)
{
@@ -179,7 +179,7 @@ class router extends baseRouter
}
}
$hourKey = $planKey = $URSR = 0;
$hourKey = $planKey = $URSR = $URAndSR = 0;
$mode = 'new';
$projectKey = empty($this->config->isINT) ? ITERATION_KEY : SPRINT_KEY;
@@ -188,6 +188,7 @@ class router extends baseRouter
if($setting->key == 'sprintConcept') $projectKey = $setting->value;
if($setting->key == 'hourPoint') $hourKey = $setting->value;
if($setting->key == 'URSR') $URSR = $setting->value;
if($setting->key == 'URAndSR') $URAndSR = $setting->value;
if($setting->key == 'mode' and $setting->section == 'global') $mode = $setting->value;
}
@@ -215,6 +216,7 @@ class router extends baseRouter
/* User preference init. */
$config->URSR = $URSR;
$config->URAndSR = $URAndSR;
$config->programLink = 'program-pgmbrowse';
$config->productLink = 'product-all';
$config->projectLink = 'program-prjbrowse';
+13 -1
View File
@@ -11,8 +11,20 @@
*/
class bug extends control
{
public $products = array();
/**
* All products.
*
* @var array
* @access public
*/
public $products = array();
/**
* Project id.
*
* @var int
* @access public
*/
public $projectID = 0;
/**
+14
View File
@@ -11,8 +11,22 @@
*/
class caselib extends control
{
/**
* All products.
*
* @var array
* @access public
*/
public $products = array();
/**
* Construct function.
*
* @param string $moduleName
* @param string $methodName
* @access public
* @return void
*/
public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
+3 -3
View File
@@ -188,7 +188,7 @@ $lang->product->menu->home = 'Home|product|index|';
$lang->product->menu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit');
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
@@ -307,7 +307,7 @@ $lang->my->menu->contacts = 'Contacts|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
if($config->URAndSR) $lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assigntome';
@@ -315,7 +315,7 @@ $lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
f($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
+3 -3
View File
@@ -188,7 +188,7 @@ $lang->product->menu->home = 'Home|product|index|';
$lang->product->menu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit');
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
@@ -307,7 +307,7 @@ $lang->my->menu->contacts = 'Contacts|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
if($config->URAndSR) $lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assigntome';
@@ -315,7 +315,7 @@ $lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
+3 -3
View File
@@ -188,7 +188,7 @@ $lang->product->menu->home = 'Home|product|index|';
$lang->product->menu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit');
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
@@ -307,7 +307,7 @@ $lang->my->menu->contacts = 'Contacts|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
if($config->URAndSR) $lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assigntome';
@@ -315,7 +315,7 @@ $lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
+3 -3
View File
@@ -188,7 +188,7 @@ $lang->product->menu->home = 'Home|product|index|';
$lang->product->menu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit');
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
@@ -307,7 +307,7 @@ $lang->my->menu->contacts = 'Contacts|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = 'Task|my|work|mode=task';
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
if($config->URAndSR) $lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assigntome';
@@ -315,7 +315,7 @@ $lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
+3 -3
View File
@@ -187,7 +187,7 @@ $lang->product->menu->home = '主页|product|index|';
$lang->product->menu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit,manageline');
$lang->product->viewMenu = new stdclass();
$lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed&param=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
$lang->product->viewMenu->plan = array('link' => "计划|productplan|browse|productID=%s", 'subModule' => 'productplan');
$lang->product->viewMenu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release');
@@ -306,7 +306,7 @@ $lang->my->menu->contacts = '联系人|my|managecontacts|';
$lang->my->workMenu = new stdclass();
$lang->my->workMenu->task = '任务|my|work|mode=task';
$lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
if($config->URAndSR) $lang->my->workMenu->requirement = "$lang->URCommon|my|work|mode=requirement";
$lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
$lang->my->workMenu->testcase = '用例|my|work|mode=testcase&type=assigntome';
@@ -314,7 +314,7 @@ $lang->my->workMenu->testtask = '测试单|my|work|mode=testtask&type=wait';
$lang->my->contributeMenu = new stdclass();
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
$lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
if($config->URAndSR) $lang->my->contributeMenu->requirement = "$lang->URCommon|my|contribute|mode=requirement";
$lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=story";
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
$lang->my->contributeMenu->testcase = '用例|my|contribute|mode=testcase&type=openedbyme';
+24
View File
@@ -538,6 +538,30 @@ class custom extends control
$this->display();
}
/**
* Set flow.
*
* @access public
* @return void
*/
public function flow()
{
if($_POST)
{
$this->custom->setConcept();
$this->loadModel('setting')->setItem('system.custom.URAndSR', $this->post->URAndSR);
$this->app->loadLang('common');
$locate = inlink('flow');
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate));
}
$this->view->title = $this->lang->custom->flow;
$this->view->position[] = $this->lang->custom->flow;
$this->display();
}
/**
* Set Mode.
*
+15 -7
View File
@@ -139,7 +139,7 @@ $lang->custom->user->fields['statusList'] = 'Status';
$lang->custom->user->fields['contactField'] = 'Available Contact';
$lang->custom->user->fields['deleted'] = 'Show deleted user';
$lang->custom->system = array('required', 'score');
$lang->custom->system = array('required', 'flow', 'score');
$lang->custom->block = new stdclass();
$lang->custom->block->fields['closed'] = 'Closed Block';
@@ -190,8 +190,18 @@ $lang->custom->weekend = 'Weekend';
$lang->custom->weekendList[2] = '2-Day Off';
$lang->custom->weekendList[1] = '1-Day Off';
$lang->custom->sprintConceptList[0] = 'Program - Product - Iteration';
$lang->custom->sprintConceptList[1] = 'Program - Product - Sprint';
global $config;
if($config->systemMode == 'classic')
{
$lang->custom->sprintConceptList[0] = 'Product - Project';
$lang->custom->sprintConceptList[1] = 'Product - Iteration';
$lang->custom->sprintConceptList[2] = 'Product - Sprint';
}
else
{
$lang->custom->sprintConceptList[0] = 'Program - Product - Iteration';
$lang->custom->sprintConceptList[1] = 'Program - Product - Sprint';
}
$lang->custom->workingList['full'] = 'Full Management of Dev';
@@ -212,10 +222,8 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
$lang->custom->moduleName['productplan'] = 'Plan';
$lang->custom->moduleName['project'] = $lang->sprintCommon;
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
$lang->custom->conceptQuestions['story'] = "2. Do you use the concept of requirement or user story in your company?";
$lang->custom->conceptQuestions['requirementpoint'] = "3. Do you use hours or function points to make estimations in your company?";
$lang->custom->conceptQuestions['storypoint'] = "3. Do you use hours or story points to make estimations in your company?";
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptOptions = new stdclass;
$lang->custom->conceptOptions->story = array();
+15 -7
View File
@@ -139,7 +139,7 @@ $lang->custom->user->fields['statusList'] = 'Status';
$lang->custom->user->fields['contactField'] = 'Available Contact';
$lang->custom->user->fields['deleted'] = 'Deleted User';
$lang->custom->system = array('required', 'score');
$lang->custom->system = array('required', 'flow', 'score');
$lang->custom->block = new stdclass();
$lang->custom->block->fields['closed'] = 'Closed Block';
@@ -190,8 +190,18 @@ $lang->custom->weekend = 'Weekend';
$lang->custom->weekendList[2] = '2-Day Off';
$lang->custom->weekendList[1] = '1-Day Off';
$lang->custom->sprintConceptList[0] = 'Program - Product - Iteration';
$lang->custom->sprintConceptList[1] = 'Program - Product - Sprint';
global $config;
if($config->systemMode == 'classic')
{
$lang->custom->sprintConceptList[0] = 'Product - Project';
$lang->custom->sprintConceptList[1] = 'Product - Iteration';
$lang->custom->sprintConceptList[2] = 'Product - Sprint';
}
else
{
$lang->custom->sprintConceptList[0] = 'Program - Product - Iteration';
$lang->custom->sprintConceptList[1] = 'Program - Product - Sprint';
}
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
@@ -212,10 +222,8 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
$lang->custom->moduleName['productplan'] = 'Plan';
$lang->custom->moduleName['project'] = $lang->sprintCommon;
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
$lang->custom->conceptQuestions['story'] = "2. Do you use the concept of requirement or user story in your company?";
$lang->custom->conceptQuestions['requirementpoint'] = "3. Do you use hours or function points to make estimations in your company?";
$lang->custom->conceptQuestions['storypoint'] = "3. Do you use hours or story points to make estimations in your company?";
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptOptions = new stdclass;
$lang->custom->conceptOptions->story = array();
+15 -7
View File
@@ -139,7 +139,7 @@ $lang->custom->user->fields['statusList'] = 'Statut';
$lang->custom->user->fields['contactField'] = 'Contact';
$lang->custom->user->fields['deleted'] = 'Parti';
$lang->custom->system = array('required', 'score');
$lang->custom->system = array('required', 'flow', 'score');
$lang->custom->block = new stdclass();
$lang->custom->block->fields['closed'] = 'Bloc Fermé';
@@ -190,8 +190,18 @@ $lang->custom->weekend = 'Weekend';
$lang->custom->weekendList[2] = '2-Jour';
$lang->custom->weekendList[1] = '1-Jour';
$lang->custom->sprintConceptList[0] = 'Program - Product - Iteration';
$lang->custom->sprintConceptList[1] = 'Program - Product - Sprint';
global $config;
if($config->systemMode == 'classic')
{
$lang->custom->sprintConceptList[0] = 'Product - Project';
$lang->custom->sprintConceptList[1] = 'Product - Iteration';
$lang->custom->sprintConceptList[2] = 'Product - Sprint';
}
else
{
$lang->custom->sprintConceptList[0] = 'Program - Product - Iteration';
$lang->custom->sprintConceptList[1] = 'Program - Product - Sprint';
}
$lang->custom->workingList['full'] = 'Application Lifecycle Management';
@@ -212,10 +222,8 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
$lang->custom->moduleName['productplan'] = 'Plan';
$lang->custom->moduleName['project'] = $lang->sprintCommon;
$lang->custom->conceptQuestions['overview'] = "1. Quelle combinaison de gestion convient le mieux à votre entreprise ?";
$lang->custom->conceptQuestions['story'] = "2. Utilisez-vous le concept d'exigence ou de user story dans votre entreprise ?";
$lang->custom->conceptQuestions['requirementpoint'] = "3. Utilisez-vous des heures ou des points de fonction pour faire des estimations dans votre entreprise ?";
$lang->custom->conceptQuestions['storypoint'] = "3. Utilisez-vous des heures ou des points de Story pour faire des estimations dans votre entreprise ?";
$lang->custom->conceptQuestions['overview'] = "1. Quelle combinaison de gestion convient le mieux à votre entreprise ?";
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptOptions = new stdclass;
$lang->custom->conceptOptions->story = array();
+15 -7
View File
@@ -139,7 +139,7 @@ $lang->custom->user->fields['statusList'] = 'Tình trạng';
$lang->custom->user->fields['contactField'] = 'Liên hệ có sẵn';
$lang->custom->user->fields['deleted'] = 'Người dùng đã xóa';
$lang->custom->system = array('required', 'score');
$lang->custom->system = array('required', 'flow', 'score');
$lang->custom->block = new stdclass();
$lang->custom->block->fields['closed'] = 'Đã đóng Block';
@@ -190,8 +190,18 @@ $lang->custom->weekend = 'Cuối tuần';
$lang->custom->weekendList[2] = '2 ngày nghỉ';
$lang->custom->weekendList[1] = '1 ngày nghỉ';
$lang->custom->sprintConceptList[0] = 'Program - Product - Iteration';
$lang->custom->sprintConceptList[1] = 'Program - Product - Sprint';
global $config;
if($config->systemMode == 'classic')
{
$lang->custom->sprintConceptList[0] = 'Product - Project';
$lang->custom->sprintConceptList[1] = 'Product - Iteration';
$lang->custom->sprintConceptList[2] = 'Product - Sprint';
}
else
{
$lang->custom->sprintConceptList[0] = 'Program - Product - Iteration';
$lang->custom->sprintConceptList[1] = 'Program - Product - Sprint';
}
$lang->custom->workingList['full'] = 'Quản lý vòng đời ứng dụng';
@@ -212,10 +222,8 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
$lang->custom->moduleName['productplan'] = 'Kế hoạch';
$lang->custom->moduleName['project'] = $lang->sprintCommon;
$lang->custom->conceptQuestions['overview'] = "1. Sự kết hợp quản lý nào phù hợp với công ty của bạn?";
$lang->custom->conceptQuestions['story'] = "2. Bạn có sử dụng mô hình điều kiện hay câu chuyện người dùng trong doanh nghiệp của bạn?";
$lang->custom->conceptQuestions['requirementpoint'] = "3. Do you use hours or function points to make estimations in your company?";
$lang->custom->conceptQuestions['storypoint'] = "3. Bạn có dùng giờ hoặc điểm để tạo dự kiến trong doanh nghiệp của bạn ?";
$lang->custom->conceptQuestions['overview'] = "1. Sự kết hợp quản lý nào phù hợp với công ty của bạn?";
$lang->custom->conceptQuestions['URAndSR'] = "2. Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?";
$lang->custom->conceptOptions = new stdclass;
$lang->custom->conceptOptions->story = array();
+19 -7
View File
@@ -140,7 +140,7 @@ $lang->custom->user->fields['statusList'] = '状态';
$lang->custom->user->fields['contactField'] = '可用联系方式';
$lang->custom->user->fields['deleted'] = '列出已删除用户';
$lang->custom->system = array('required', 'score');
$lang->custom->system = array('required', 'flow', 'score');
$lang->custom->block = new stdclass();
$lang->custom->block->fields['closed'] = '关闭的区块';
@@ -191,8 +191,18 @@ $lang->custom->weekend = '休息日';
$lang->custom->weekendList[2] = '双休';
$lang->custom->weekendList[1] = '单休';
$lang->custom->sprintConceptList[0] = '项目 - 产品 - 迭代';
$lang->custom->sprintConceptList[1] = '项目 - 产品 - 冲刺';
global $config;
if($config->systemMode == 'classic')
{
$lang->custom->sprintConceptList[0] = '产品 - 项目';
$lang->custom->sprintConceptList[1] = '产品 - 迭代';
$lang->custom->sprintConceptList[2] = '产品 - 冲刺';
}
else
{
$lang->custom->sprintConceptList[0] = '项目 - 产品 - 迭代';
$lang->custom->sprintConceptList[1] = '项目 - 产品 - 冲刺';
}
$lang->custom->workingList['full'] = '完整研发管理工具';
@@ -213,16 +223,18 @@ $lang->custom->moduleName['product'] = $lang->productCommon;
$lang->custom->moduleName['productplan'] = '计划';
$lang->custom->moduleName['project'] = $lang->sprintCommon;
$lang->custom->conceptQuestions['overview'] = "1. 下述哪种组合方式更适合您公司的管理现状?";
$lang->custom->conceptQuestions['story'] = "2. 您公司是在使用需求概念还是用户故事概念?";
$lang->custom->conceptQuestions['requirementpoint'] = "3. 您公司是在使用工时还是功能点来做规模估算?";
$lang->custom->conceptQuestions['storypoint'] = "3. 您公司是在使用工时还是故事点来做规模估算?";
$lang->custom->conceptQuestions['overview'] = "1. 下述哪种组合方式更适合您公司的管理现状?";
$lang->custom->conceptQuestions['URAndSR'] = "2. 是否启用{$lang->URCommon}和{$lang->SRCommon}概念?";
$lang->custom->conceptOptions = new stdclass;
$lang->custom->conceptOptions->story = array();
$lang->custom->conceptOptions->story['0'] = '需求';
$lang->custom->conceptOptions->story['1'] = '故事';
$lang->custom->conceptOptions->URAndSR = array();
$lang->custom->conceptOptions->URAndSR['1'] = '是';
$lang->custom->conceptOptions->URAndSR['0'] = '否';
$lang->custom->conceptOptions->hourPoint = array();
$lang->custom->conceptOptions->hourPoint['0'] = '工时';
$lang->custom->conceptOptions->hourPoint['1'] = '故事点';
+55
View File
@@ -0,0 +1,55 @@
<?php
/**
* The html template file of deny method of user module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package ZenTaoPMS
* @version $Id: deny.html.php 4129 2013-01-18 01:58:14Z wwccss $
*/
?>
<?php if(isset($this->config->conceptSetted)):?>
<?php include 'header.html.php';?>
<?php else:?>
<?php include '../../common/view/header.lite.html.php';?>
<?php endif;?>
<?php if(isset($this->config->conceptSetted)):?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<div class='heading'>
<strong><?php echo $lang->custom->flow?></strong>
</div>
</div>
<?php else:?>
<div class='container'>
<div class='modal-dialog'>
<div class='modal-header'>
<strong><?php echo $lang->custom->flow?></strong>
</div>
<?php endif;?>
<form class='form-ajax' method='post'>
<div class='modal-body'>
<div class="form-group">
<label><?php echo $lang->custom->conceptQuestions['overview']?></label>
<div class="checkbox"> <?php echo html::radio('sprintConcept', $lang->custom->sprintConceptList, zget($this->config->custom, 'sprintConcept', '0'))?> </div>
</div>
<div class="form-group">
<label><?php echo $lang->custom->conceptQuestions['URAndSR']?></label>
<div class="checkbox"> <?php echo html::radio('URAndSR', $lang->custom->conceptOptions->URAndSR, zget($this->config->custom, 'URAndSR', '0'));?></div>
</div>
<div class="form-group">
<label></label>
<div><?php echo html::submitButton();?></div>
</div>
</div>
</form>
<?php if(isset($this->config->conceptSetted)):?>
<?php include '../../common/view/footer.html.php';?>
<?php else:?>
<?php echo js::execute($pageJS);?>
</div>
</div>
</body>
</html>
<?php endif;?>
+16 -18
View File
@@ -319,7 +319,6 @@ $lang->resource->product->edit = 'edit';
$lang->resource->product->batchEdit = 'batchEdit';
$lang->resource->product->delete = 'delete';
$lang->resource->product->roadmap = 'roadmap';
$lang->resource->product->doc = 'doc';
$lang->resource->product->dynamic = 'dynamic';
$lang->resource->product->project = 'project';
$lang->resource->product->dashboard = 'dashboard';
@@ -341,19 +340,18 @@ $lang->product->methodOrder[20] = 'edit';
$lang->product->methodOrder[25] = 'batchEdit';
$lang->product->methodOrder[35] = 'delete';
$lang->product->methodOrder[40] = 'roadmap';
//$lang->product->methodOrder[45] = 'doc';
$lang->product->methodOrder[50] = 'dynamic';
$lang->product->methodOrder[55] = 'project';
$lang->product->methodOrder[60] = 'dashboard';
$lang->product->methodOrder[65] = 'close';
$lang->product->methodOrder[70] = 'updateOrder';
$lang->product->methodOrder[75] = 'all';
$lang->product->methodOrder[80] = 'manageLine';
$lang->product->methodOrder[85] = 'build';
$lang->product->methodOrder[90] = 'export';
$lang->product->methodOrder[95] = 'whitelist';
$lang->product->methodOrder[100] = 'addWhitelist';
$lang->product->methodOrder[105] = 'unbindWhielist';
$lang->product->methodOrder[45] = 'dynamic';
$lang->product->methodOrder[50] = 'project';
$lang->product->methodOrder[55] = 'dashboard';
$lang->product->methodOrder[60] = 'close';
$lang->product->methodOrder[65] = 'updateOrder';
$lang->product->methodOrder[70] = 'all';
$lang->product->methodOrder[75] = 'manageLine';
$lang->product->methodOrder[80] = 'build';
$lang->product->methodOrder[85] = 'export';
$lang->product->methodOrder[90] = 'whitelist';
$lang->product->methodOrder[95] = 'addWhitelist';
$lang->product->methodOrder[100] = 'unbindWhielist';
/* Branch. */
$lang->resource->branch = new stdclass();
@@ -989,8 +987,8 @@ $lang->job->methodOrder[25] = 'exec';
$lang->resource->doc = new stdclass();
$lang->resource->doc->index = 'index';
$lang->resource->doc->browse = 'browse';
$lang->resource->doc->createlib = 'createLib';
$lang->resource->doc->editlib = 'editLib';
$lang->resource->doc->createlib = 'createlib';
$lang->resource->doc->editlib = 'editlib';
$lang->resource->doc->deleteLib = 'deleteLib';
$lang->resource->doc->create = 'create';
$lang->resource->doc->view = 'view';
@@ -1006,9 +1004,9 @@ $lang->resource->doc->collect = 'collect';
$lang->doc->methodOrder[0] = 'index';
$lang->doc->methodOrder[5] = 'browse';
$lang->doc->methodOrder[10] = 'createLib';
$lang->doc->methodOrder[10] = 'createlib';
$lang->doc->methodOrder[15] = 'editLib';
$lang->doc->methodOrder[20] = 'deleteLib';
$lang->doc->methodOrder[20] = 'deletelib';
$lang->doc->methodOrder[25] = 'create';
$lang->doc->methodOrder[30] = 'view';
$lang->doc->methodOrder[35] = 'edit';
+1 -1
View File
@@ -87,7 +87,7 @@ body.menu-hide {padding-left: 0;}
#searchbox .dropdown-menu > li {display: none}
#searchbox .dropdown-menu > li.search-type-all {width: 100%; display: block;}
#searchbox .dropdown-menu > li:hover {position: relative;}
#searchbox .dropdown-menu.show-quick-go.with-active {position: absolute; top: -395px; max-height: 392px; padding-top: 30px;}
#searchbox .dropdown-menu.show-quick-go.with-active {position: absolute; top: -365px; max-height: 362px; padding-top: 30px;}
#searchbox .dropdown-menu.show-quick-go > li {display: block;}
#searchbox .dropdown-menu.show-quick-go > li.active {width: 100%; position: absolute; top: 0; left: 0; right: 0;}
#searchbox .dropdown-menu>li.active>a, #searchbox .dropdown-menu>li.selected>a { position: relative; color: #fff; background-color: #16a8f8;}
+1 -1
View File
@@ -908,7 +908,7 @@ class product extends control
$this->view->extra = $extra;
$this->view->products = $products;
$this->view->projectID = $moduleGroup == 'project' ? $this->session->PRJ : 0;
$this->view->programs = $this->loadModel('program')->getPGMOption();
$this->view->programs = $this->loadModel('program')->getPGMPairs(true);
$this->view->openGroup = $moduleGroup;
$this->display();
}
-1
View File
@@ -12,7 +12,6 @@
$lang->product->common = $lang->productCommon;
$lang->product->index = $lang->productCommon . 'Home';
$lang->product->browse = 'Story Liste';
$lang->product->product = "{$lang->productCommon} Liste";
$lang->product->dynamic = 'Verlauf';
$lang->product->view = 'Übersicht';
$lang->product->edit = "{$lang->productCommon} bearbeiten";
-1
View File
@@ -12,7 +12,6 @@
$lang->product->common = $lang->productCommon;
$lang->product->index = $lang->productCommon . ' Home';
$lang->product->browse = 'Story List';
$lang->product->product = "{$lang->productCommon} List";
$lang->product->dynamic = 'Dynamics';
$lang->product->view = "{$lang->productCommon} Detail";
$lang->product->edit = "Edit {$lang->productCommon}";
-1
View File
@@ -12,7 +12,6 @@
$lang->product->common = $lang->productCommon;
$lang->product->index = 'Accueil ' . $lang->productCommon;
$lang->product->browse = 'Liste Stories';
$lang->product->product = "Liste {$lang->productCommon}";
$lang->product->dynamic = 'Historique';
$lang->product->view = "{$lang->productCommon} Détail";
$lang->product->edit = "Editer {$lang->productCommon}";
-1
View File
@@ -12,7 +12,6 @@
$lang->product->common = $lang->productCommon;
$lang->product->index = 'Trang '.$lang->productCommon;
$lang->product->browse = 'Danh sách câu chuyện';
$lang->product->product = "{$lang->productCommon} List";
$lang->product->dynamic = 'Lịch sử';
$lang->product->view = "Chi tiết {$lang->productCommon}";
$lang->product->edit = "Sửa {$lang->productCommon}";
+1 -2
View File
@@ -12,8 +12,7 @@
$lang->product->common = $lang->productCommon . '视图';
$lang->product->index = $lang->productCommon . '主页';
$lang->product->browse = "{$lang->SRCommon}列表";
$lang->product->product = "{$lang->productCommon}列表";
$lang->product->dynamic = '产品动态';
$lang->product->dynamic = $lang->productCommon . '动态';
$lang->product->view = "{$lang->productCommon}概况";
$lang->product->edit = "编辑{$lang->productCommon}";
$lang->product->batchEdit = '批量编辑';
+1 -1
View File
@@ -12,7 +12,7 @@
$lang->product->common = $lang->productCommon . '視圖';
$lang->product->index = $lang->productCommon . '主頁';
$lang->product->browse = "{$lang->SRCommon}列表";
$lang->product->dynamic = '產品動態';
$lang->product->dynamic = $lang->productCommon . '動態';
$lang->product->view = "{$lang->productCommon}概況";
$lang->product->edit = "編輯{$lang->productCommon}";
$lang->product->batchEdit = '批量編輯';
+5 -4
View File
@@ -887,7 +887,7 @@ class productModel extends model
->fetchAll('id');
/* Determine how to display the name of the program. */
$programList = $this->loadModel('program')->getParentPairs();
$programList = $this->loadModel('program')->getParentPairs('', 'noclosed');
foreach($projectList as $id => $project) $projectList[$id]->programName = $programList[$project->parent];
return $projectList;
@@ -1542,18 +1542,19 @@ class productModel extends model
}
/**
* Create the link from module,method,extra
* Create the link from module,method,extra,branch.
*
* @param string $module
* @param string $method
* @param mix $extra
* @param string $extra
* @param bool $branch
* @access public
* @return void
*/
public function getProductLink($module, $method, $extra, $branch = false)
{
$link = '';
if(strpos('programplan,product,roadmap,bug,testcase,testtask,story,qa,testsuite,testreport,build,projectrelease,projectstory,caselib', $module) !== false)
if(strpos('programplan,product,roadmap,bug,testcase,testtask,story,qa,testsuite,testreport,build,projectrelease,projectstory', $module) !== false)
{
if($module == 'product' && $method == 'project')
{
+2 -1
View File
@@ -12,7 +12,8 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class="main-row" <?php if(isonlybody()) echo 'style="padding-top: 0px;"';?>>
<?php $style = isonlybody() ? 'style="padding-top: 0px;"' : '';?>
<div id='mainContent' class="main-row" <?php echo $style;?>>
<div class="col-8 main-col">
<div class="row">
<div class="col-sm-12">
+55 -53
View File
@@ -110,6 +110,9 @@ class program extends control
*/
public function PGMProduct($programID = 0, $browseType = 'noclosed', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
{
$programID = $this->program->savePGMState($programID, $this->program->getPGMPairs());
setCookie("lastPGM", $programID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
$program = $this->program->getPGMByID($programID);
if(empty($program) || $program->type != 'program') die(js::error($this->lang->notFound) . js::locate('back'));
@@ -152,6 +155,7 @@ class program extends control
public function PGMCreate($parentProgramID = 0)
{
$this->lang->navGroup->program = 'program';
$parentProgram = $this->program->getPGMByID($parentProgramID);
if($_POST)
@@ -166,14 +170,14 @@ class program extends control
$this->view->title = $this->lang->program->PGMCreate;
$this->view->position[] = $this->lang->program->PGMCreate;
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst');
$this->view->poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst');
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
$this->view->parentProgram = $parentProgram;
$this->view->parents = $this->program->getParentPairs();
$this->view->PGMList = $this->program->getPGMList();
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->view->remainBudget = $this->program->getParentRemainBudget($parentProgram);
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst');
$this->view->poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst');
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
$this->view->parentProgram = $parentProgram;
$this->view->parents = $this->program->getParentPairs();
$this->view->PGMList = $this->program->getPGMList();
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->view->availableBudget = $this->program->getAvailableBudget($parentProgram);
$this->display();
}
@@ -189,9 +193,6 @@ class program extends control
{
$this->lang->navGroup->program = 'program';
$program = $this->program->getPGMByID($programID);
$parentProgram = $program->parent ? $this->program->getPGMByID($program->parent) : '';
if($_POST)
{
$changes = $this->program->PGMUpdate($programID);
@@ -205,21 +206,23 @@ class program extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inLink('PGMBrowse')));
}
$parents = $this->program->getParentPairs();
$program = $this->program->getPGMByID($programID);
$parentProgram = $program->parent ? $this->program->getPGMByID($program->parent) : '';
$parents = $this->program->getParentPairs();
unset($parents[$programID]);
$this->view->title = $this->lang->program->PGMEdit;
$this->view->position[] = $this->lang->program->PGMEdit;
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst', $program->PM);
$this->view->poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst');
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
$this->view->program = $program;
$this->view->parents = $parents;
$this->view->PGMList = $this->program->getPGMList();
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->view->parentProgram = $parentProgram;
$this->view->remainBudget = $this->program->getParentRemainBudget($parentProgram) + (float)$program->budget;
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst', $program->PM);
$this->view->poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst');
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
$this->view->program = $program;
$this->view->parents = $parents;
$this->view->PGMList = $this->program->getPGMList();
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->view->parentProgram = $parentProgram;
$this->view->availableBudget = $this->program->getAvailableBudget($parentProgram) + (float)$program->budget;
$this->display();
}
@@ -721,17 +724,17 @@ class program extends control
}
/**
* Ajax get parent remain budget.
* Ajax get available budget.
*
* @param int $parentProgramID
* @access public
* @return void
*/
public function ajaxGetParentRemainBudget($parentProgramID)
public function ajaxGetAvailableBudget($parentProgramID)
{
$parentProgram = $this->program->getPGMByID($parentProgramID);
$remainBudget = $this->program->getParentRemainBudget($parentProgram);
echo number_format($remainBudget, 2);
$parentProgram = $this->program->getPGMByID($parentProgramID);
$availableBudget = $this->program->getAvailableBudget($parentProgram);
echo number_format($availableBudget, 2);
}
/**
@@ -892,8 +895,9 @@ class program extends control
$acl = 'private';
$auth = 'extend';
$products = array();
$productPlans = array();
$products = array();
$productPlans = array();
$parentProgram = $this->program->getPGMByID($programID);
if($copyProjectID)
{
@@ -914,33 +918,31 @@ class program extends control
}
}
$parentProgram = $this->program->getPGMByID($programID);
$this->view->title = $this->lang->program->PRJCreate;
$this->view->position[] = $this->lang->program->PRJCreate;
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst');
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
$this->view->copyProjects = $this->program->getPRJPairsByModel();
$this->view->products = $products;
$this->view->allProducts = array('0' => '') + $this->program->getPGMProductPairs($programID);
$this->view->productPlans = array('0' => '') + $productPlans;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
$this->view->programID = $programID;
$this->view->model = $model;
$this->view->name = $name;
$this->view->code = $code;
$this->view->team = $team;
$this->view->acl = $acl;
$this->view->auth = $auth;
$this->view->whitelist = $whitelist;
$this->view->copyProjectID = $copyProjectID;
$this->view->from = $from;
$this->view->programList = $this->program->getParentPairs();
$this->view->parentProgram = $parentProgram;
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
$this->view->remainBudget = $this->program->getParentRemainBudget($parentProgram);
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst');
$this->view->users = $this->user->getPairs('noclosed|nodeleted');
$this->view->copyProjects = $this->program->getPRJPairsByModel();
$this->view->products = $products;
$this->view->allProducts = array('0' => '') + $this->program->getPGMProductPairs($programID);
$this->view->productPlans = array('0' => '') + $productPlans;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
$this->view->programID = $programID;
$this->view->model = $model;
$this->view->name = $name;
$this->view->code = $code;
$this->view->team = $team;
$this->view->acl = $acl;
$this->view->auth = $auth;
$this->view->whitelist = $whitelist;
$this->view->copyProjectID = $copyProjectID;
$this->view->from = $from;
$this->view->programList = $this->program->getParentPairs();
$this->view->parentProgram = $parentProgram;
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
$this->view->availableBudget = $this->program->getAvailableBudget($parentProgram);
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->display();
}
@@ -1041,7 +1043,7 @@ class program extends control
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
$this->view->from = $from;
$this->view->parentProgram = $parentProgram;
$this->view->remainBudget = $this->program->getParentRemainBudget($parentProgram) + (float)$project->budget;
$this->view->availableBudget = $this->program->getAvailableBudget($parentProgram) + (float)$project->budget;
$this->view->budgetUnitList = $this->program->getBudgetUnitList();
$this->display();
+2 -2
View File
@@ -293,13 +293,13 @@ function setBudgetTipsAndAclList(parentProgramID)
{
if(parentProgramID != 0)
{
$.get(createLink('program', 'ajaxGetParentRemainBudget', "parentProgramID=" + parentProgramID), function(remainBudget)
$.get(createLink('program', 'ajaxGetAvailableBudget', "parentProgramID=" + parentProgramID), function(availableBudget)
{
parentProgram = PGMList[parentProgramID];
programBudget = parentProgram.budget;
PGMBudgetUnit = currencySymbol[parentProgram.budgetUnit];
budgetNotes = programBudget != 0 ? (PGMParentBudget + PGMBudgetUnit + remainBudget) : '';
budgetNotes = programBudget != 0 ? (PGMParentBudget + PGMBudgetUnit + availableBudget) : '';
$('#budget').attr('placeholder', budgetNotes);
});
$('.aclBox').html($('#subPGMAcl').html());
+1 -1
View File
@@ -250,7 +250,7 @@ $lang->program->stakeholderType = 'Stakeholder type';
$lang->program->isStakeholderKey = 'Key stakeholder';
$lang->program->importStakeholder = 'Import program';
$lang->program->PGMManageMembers = 'Program Team';
$lang->program->PGMParentBudget = 'Parent program remain budget:';
$lang->program->PGMParentBudget = 'Parent program surplus budget:';
$lang->program->beyondParentBudget = 'The remaining budget of the owned program has been exceeded.';
$lang->program->PGMBeginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
$lang->program->PGMEndGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
+1 -1
View File
@@ -250,7 +250,7 @@ $lang->program->stakeholderType = 'Stakeholder type';
$lang->program->isStakeholderKey = 'Key stakeholder';
$lang->program->importStakeholder = 'Import program';
$lang->program->PGMManageMembers = 'Program Team';
$lang->program->PGMParentBudget = 'Parent program remain budget:';
$lang->program->PGMParentBudget = 'Parent program surplus budget:';
$lang->program->beyondParentBudget = 'The remaining budget of the owned program has been exceeded.';
$lang->program->PGMBeginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
$lang->program->PGMEndGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
+1 -1
View File
@@ -250,7 +250,7 @@ $lang->program->stakeholderType = 'Stakeholder type';
$lang->program->isStakeholderKey = 'Key stakeholder';
$lang->program->importStakeholder = 'Import program';
$lang->program->PGMManageMembers = 'Program Team';
$lang->program->PGMParentBudget = 'Parent program remain budget:';
$lang->program->PGMParentBudget = 'Parent program surplus budget:';
$lang->program->beyondParentBudget = 'The remaining budget of the owned program has been exceeded.';
$lang->program->PGMBeginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
$lang->program->PGMEndGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
+1 -1
View File
@@ -250,7 +250,7 @@ $lang->program->stakeholderType = 'Stakeholder type';
$lang->program->isStakeholderKey = 'Key stakeholder';
$lang->program->importStakeholder = 'Import program';
$lang->program->PGMManageMembers = 'Program Team';
$lang->program->PGMParentBudget = 'Parent program remain budget:';
$lang->program->PGMParentBudget = 'Parent program surplus budget:';
$lang->program->beyondParentBudget = 'The remaining budget of the owned program has been exceeded.';
$lang->program->PGMBeginLetterParent = "Parent begin date: %s, begin date should be > = parent begin date.";
$lang->program->PGMEndGreaterParent = "Parent end date: %s, end date should be < = parent end date.";
+15 -41
View File
@@ -39,29 +39,19 @@ class programModel extends model
/**
* Get program pairs.
*
* @param bool $isQueryAll
* @access public
* @return array
*/
public function getPGMPairs()
public function getPGMPairs($isQueryAll = false)
{
return $this->dao->select('id, name')->from(TABLE_PROGRAM)
->where('type')->eq('program')
->andWhere('deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->programs)->fi()
->beginIF(!$this->app->user->admin and !$isQueryAll)->andWhere('id')->in($this->app->user->view->programs)->fi()
->fetchPairs();
}
/**
* Get program option.
*
* @access public
* @return array
*/
public function getPGMOption()
{
return $this->dao->select('id,name')->from(TABLE_PROGRAM)->where('type')->eq('program')->andWhere('deleted')->eq(0)->fetchPairs();
}
/**
* Get the product associated with the program.
*
@@ -192,8 +182,8 @@ class programModel extends model
$program->budgetUnit = $parentProgram->budgetUnit;
if(isset($program->budget) and $parentProgram->budget != 0)
{
$parentRemainBudget = $this->getParentRemainBudget($parentProgram);
if($program->budget > $parentRemainBudget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
$availableBudget = $this->getAvailableBudget($parentProgram);
if($program->budget > $availableBudget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
}
if(dao::isError()) return false;
@@ -307,8 +297,8 @@ class programModel extends model
$program->budgetUnit = $parentProgram->budgetUnit;
if($program->budget != 0 and $parentProgram->budget != 0)
{
$parentRemainBudget = $this->getParentRemainBudget($parentProgram);
if($program->budget > $parentRemainBudget + $oldProgram->budget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
$availableBudget = $this->getAvailableBudget($parentProgram);
if($program->budget > $availableBudget + $oldProgram->budget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
}
}
if(dao::isError()) return false;
@@ -725,13 +715,13 @@ class programModel extends model
}
/**
* Get parent remain budget.
* Get available budget.
*
* @param object $parentProgram
* @access public
* @return int
*/
public function getParentRemainBudget($parentProgram)
public function getAvailableBudget($parentProgram)
{
if(empty($parentProgram)) return;
@@ -751,11 +741,11 @@ class programModel extends model
* @access public
* @return array
*/
public function getParentPairs($model = '')
public function getParentPairs($model = '', $mode = '')
{
$modules = $this->dao->select('id,name,parent,path,grade')->from(TABLE_PROGRAM)
->where('type')->eq('program')
->andWhere('status')->ne('closed')
->beginIF(strpos($mode, 'noclosed') === false)->andWhere('status')->ne('closed')->fi()
->andWhere('deleted')->eq(0)
->beginIF($model)->andWhere('model')->eq($model)->fi()
->orderBy('grade desc, `order`')
@@ -1518,8 +1508,8 @@ class programModel extends model
$project->budgetUnit = $parentProgram->budgetUnit;
if(isset($project->budget) and $parentProgram->budget != 0)
{
$parentRemainBudget = $this->getParentRemainBudget($parentProgram);
if($project->budget > $parentRemainBudget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
$availableBudget = $this->getAvailableBudget($parentProgram);
if($project->budget > $availableBudget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
}
/* Judge products not empty. */
@@ -1702,8 +1692,8 @@ class programModel extends model
$project->budgetUnit = $parentProgram->budgetUnit;
if($project->budget != 0 and $parentProgram->budget != 0)
{
$parentRemainBudget = $this->getParentRemainBudget($parentProgram);
if($project->budget > $parentRemainBudget + $oldProject->budget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
$availableBudget = $this->availableBudget($parentProgram);
if($project->budget > $availableBudget + $oldProject->budget) dao::$errors['budget'] = $this->lang->program->beyondParentBudget;
}
}
@@ -1896,19 +1886,6 @@ class programModel extends model
$title = "title='{$project->name}'";
}
$PRJProgram = '';
if($id == 'PRJProgram' and $project->parent != 0)
{
$programList = $this->getPGMOption();
$programIndex = $programID ? strpos($project->path, (string)$programID) : 0;
$projectIndex = strpos($project->path, $project->id);
$programPath = explode(',' , substr($project->path, $programIndex, $projectIndex - $programIndex));
foreach($programPath as $program)
{
if($program) $PRJProgram .= '/' . zget($programList, $program);
}
$title = "title='{$PRJProgram}'";
}
if($id == 'PRJBudget')
{
$programBudget = in_array($this->app->getClientLang(), ['zh-cn','zh-tw']) && $project->budget >= 10000 ? number_format($project->budget / 10000, 1) . $this->lang->program->tenThousand : number_format((float)$project->budget, 1);
@@ -1939,9 +1916,6 @@ class programModel extends model
if($project->model === 'waterfall') echo "<span class='project-type-label label label-outline label-warning'>{$this->lang->program->waterfall}</span>";
if($project->model === 'scrum') echo "<span class='project-type-label label label-outline label-info'>{$this->lang->program->scrum}</span>";
break;
case 'PRJProgram':
echo $PRJProgram;
break;
case 'PM':
$user = $this->loadModel('user')->getByID($project->PM, 'account');
$userID = !empty($user) ? $user->id : '';
+1 -1
View File
@@ -66,7 +66,7 @@
<th><?php echo $lang->program->PGMBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->PGMParentBudget . zget($lang->program->currencySymbol, $parentProgram->budgetUnit) . $remainBudget : '';?>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->PGMParentBudget . zget($lang->program->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon fix-border'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
+1 -1
View File
@@ -44,7 +44,7 @@
<th><?php echo $lang->program->PGMBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->PGMParentBudget . zget($lang->program->currencySymbol, $parentProgram->budgetUnit) . $remainBudget : '';?>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->PGMParentBudget . zget($lang->program->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', $program->budget != 0 ? $program->budget : '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . ($program->budget == 0 ? 'disabled ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
+1 -1
View File
@@ -51,7 +51,7 @@
<th><?php echo $lang->program->PRJBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->PGMParentBudget . zget($lang->program->currencySymbol, $parentProgram->budgetUnit) . $remainBudget : '';?>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->PGMParentBudget . zget($lang->program->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
+1 -1
View File
@@ -49,7 +49,7 @@
<th><?php echo $lang->program->PRJBudget;?></th>
<td>
<div class='input-group'>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->PGMParentBudget . zget($lang->program->currencySymbol, $parentProgram->budgetUnit) . $remainBudget : '';?>
<?php $placeholder = ($parentProgram and $parentProgram->budget != 0) ? 'placeholder=' . $lang->program->PGMParentBudget . zget($lang->program->currencySymbol, $parentProgram->budgetUnit) . $availableBudget : '';?>
<?php echo html::input('budget', $project->budget != 0 ? $project->budget : '', "class='form-control' " . (strpos($requiredFields, 'budget') !== false ? 'required ' : '') . ($project->budget == 0 ? 'disabled ' : '') . $placeholder);?>
<?php if($parentProgram):?>
<span class='input-group-addon'><?php echo zget($budgetUnitList, $parentProgram->budgetUnit);?></span>
+2 -1
View File
@@ -12,7 +12,8 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class="main-row" <?php if(isonlybody()) echo 'style="padding-top: 0px;"';?>>
<?php $style = isonlybody() ? 'style="padding-top: 0px;"' : '';?>
<div id='mainContent' class="main-row" <?php echo $style;?>>
<div class="col-8 main-col">
<div class="row">
<div class="col-sm-6">
+2 -1
View File
@@ -88,7 +88,8 @@ class projectStory extends control
*/
public function view($storyID)
{
echo $this->fetch('story', 'view', "storyID=$storyID");
$story = $this->loadModel('story')->getByID($storyID);
echo $this->fetch('story', 'view', "storyID=$storyID&version=$story->version&param=" . $this->session->PRJ);
}
/**
+5 -4
View File
@@ -1,8 +1,9 @@
<?php
$lang->projectstory->common = 'Anforderungen an Projekte';
$lang->projectstory->index = 'Fordern Sie Homepage';
$lang->projectstory->view = 'Story Detail';
$lang->projectstory->track = 'Matrix der Verfolgung';
$lang->projectstory->common = "Project {$lang->SRCommon}";
$lang->projectstory->index = "{$lang->SRCommon} Home";
$lang->projectstory->view = "{$lang->SRCommon} Detail";
$lang->projectstory->story = "{$lang->SRCommon} List";
$lang->projectstory->track = 'Tracking Matrix';
$lang->projectstory->linkStory = 'Linked' . $lang->SRCommon;
$lang->projectstory->unlinkStory = 'Unlinked' . $lang->SRCommon;
+4 -3
View File
@@ -1,7 +1,8 @@
<?php
$lang->projectstory->common = 'Project Requirements';
$lang->projectstory->index = 'Request Home';
$lang->projectstory->view = 'Story Detail';
$lang->projectstory->common = "Project {$lang->SRCommon}";
$lang->projectstory->index = "{$lang->SRCommon} Home";
$lang->projectstory->view = "{$lang->SRCommon} Detail";
$lang->projectstory->story = "{$lang->SRCommon} List";
$lang->projectstory->track = 'Tracking Matrix';
$lang->projectstory->linkStory = 'Linked' . $lang->SRCommon;
$lang->projectstory->unlinkStory = 'Unlinked' . $lang->SRCommon;
+5 -4
View File
@@ -1,8 +1,9 @@
<?php
$lang->projectstory->common = 'Exigences du projet';
$lang->projectstory->index = 'Exigences Accueil';
$lang->projectstory->view = 'Story Detail';
$lang->projectstory->track = 'Matrice de suivi';
$lang->projectstory->common = "Project {$lang->SRCommon}";
$lang->projectstory->index = "{$lang->SRCommon} Home";
$lang->projectstory->view = "{$lang->SRCommon} Detail";
$lang->projectstory->story = "{$lang->SRCommon} List";
$lang->projectstory->track = 'Tracking Matrix';
$lang->projectstory->linkStory = 'Linked' . $lang->SRCommon;
$lang->projectstory->unlinkStory = 'Unlinked' . $lang->SRCommon;
+5 -4
View File
@@ -1,8 +1,9 @@
<?php
$lang->projectstory->common = 'Yêu cầu dự án';
$lang->projectstory->index = 'Yêu cầu trang nhà';
$lang->projectstory->view = 'Story Detail';
$lang->projectstory->track = 'Theo dõi ma trận';
$lang->projectstory->common = "Project {$lang->SRCommon}";
$lang->projectstory->index = "{$lang->SRCommon} Home";
$lang->projectstory->view = "{$lang->SRCommon} Detail";
$lang->projectstory->story = "{$lang->SRCommon} List";
$lang->projectstory->track = 'Tracking Matrix';
$lang->projectstory->linkStory = 'Linked' . $lang->SRCommon;
$lang->projectstory->unlinkStory = 'Unlinked' . $lang->SRCommon;
+4 -3
View File
@@ -1,7 +1,8 @@
<?php
$lang->projectstory->common = '项目需求';
$lang->projectstory->index = '需求主页';
$lang->projectstory->view = '需求详情';
$lang->projectstory->common = "项目{$lang->SRCommon}";
$lang->projectstory->index = "{$lang->SRCommon}主页";
$lang->projectstory->view = "{$lang->SRCommon}详情";
$lang->projectstory->story = "{$lang->SRCommon}列表";
$lang->projectstory->track = '矩阵';
$lang->projectstory->linkStory = '关联' . $lang->SRCommon;
$lang->projectstory->unlinkStory = '移除' . $lang->SRCommon;
+6
View File
@@ -11,6 +11,12 @@
*/
class qa extends control
{
/**
* Project id.
*
* @var int
* @access public
*/
public $projectID;
/**
+55 -44
View File
@@ -3630,59 +3630,70 @@ class storyModel extends model
*/
public function getTracks($productID = 0, $branch = 0, $pager = null)
{
$sourcePageID = $pager->pageID;
$requirements = $this->getProductStories($productID, $branch, 0, 'all', 'requirement', 'id_desc', true, '', $pager);
if($pager->pageID != $sourcePageID)
{
$requirements = array();
$pager->pageID = $sourcePageID;
}
$tracks = array();
$sourcePageID = $pager->pageID;
$excludeStories = false;
foreach($requirements as $requirement)
if($this->config->URAndSR)
{
$stories = $this->getRelation($requirement->id, 'requirement');
$stories = empty($stories) ? array() : $stories;
foreach($stories as $id => $title)
$requirements = $this->getProductStories($productID, $branch, 0, 'all', 'requirement', 'id_desc', true, '', $pager);
if($pager->pageID != $sourcePageID)
{
$stories[$id] = new stdclass();
$stories[$id]->title = $title;
$stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
$stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
$stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id);
if(isset($this->config->maxVersion))
{
$stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
$stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION)
->where('AType')->eq('design')
->andWhere('BType')->eq('commit')
->andWhere('AID')->in(array_keys($stories[$id]->designs))
->fetchPairs();
}
$requirements = array();
$pager->pageID = $sourcePageID;
}
$requirement->track = $stories;
foreach($requirements as $requirement)
{
$stories = $this->getRelation($requirement->id, 'requirement');
$stories = empty($stories) ? array() : $stories;
foreach($stories as $id => $title)
{
$stories[$id] = new stdclass();
$stories[$id]->title = $title;
$stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
$stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
$stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id);
if(isset($this->config->maxVersion))
{
$stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
$stories[$id]->revisions = $this->dao->select('BID, extra')->from(TABLE_RELATION)
->where('AType')->eq('design')
->andWhere('BType')->eq('commit')
->andWhere('AID')->in(array_keys($stories[$id]->designs))
->fetchPairs();
}
}
$requirement->track = $stories;
}
$tracks = $requirements;
/* Get no requirements story. */
$excludeStories = $this->dao->select('BID')->from(TABLE_RELATION)
->where('AType')->eq('requirement')
->andWhere('BType')->eq('story')
->andWhere('relation')->eq('subdivideinto')
->andWhere('product')->eq($productID)
->fetchPairs('BID', 'BID');
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $excludeStories);
if($stories) $pager->recTotal += 1;
}
else
{
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $excludeStories, $pager);
}
/* Get no requirements story. */
$subdividedStories = $this->dao->select('BID')->from(TABLE_RELATION)
->where('AType')->eq('requirement')
->andWhere('BType')->eq('story')
->andWhere('relation')->eq('subdivideinto')
->andWhere('product')->eq($productID)
->fetchPairs('BID', 'BID');
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $subdividedStories);
if($stories) $pager->recTotal += 1;
if(count($requirements) < $pager->recPerPage)
if(count($tracks) < $pager->recPerPage)
{
foreach($stories as $id => $story)
{
$stories[$id] = new stdclass();
$stories[$id]->title = $story->title;
$stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
$stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
$stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id);
$stories[$id]->title = $story->title;
$stories[$id]->cases = $this->loadModel('testcase')->getStoryCases($id);
$stories[$id]->bugs = $this->loadModel('bug')->getStoryBugs($id);
$stories[$id]->tasks = $this->loadModel('task')->getStoryTasks($id);
if(isset($this->config->maxVersion))
{
$stories[$id]->designs = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
@@ -3694,10 +3705,10 @@ class storyModel extends model
}
}
$requirements['noRequirement'] = $stories;
$tracks['noRequirement'] = $stories;
}
return $requirements;
return $tracks;
}
/**
+1 -1
View File
@@ -122,7 +122,7 @@
<?php endif;?>
<?php endif;?>
</tr>
<?php if($type == 'story'):?>
<?php if($type == 'story' and $this->config->URAndSR):?>
<tr>
<th><?php echo $lang->story->requirement;?></th>
<td colspan=2><?php echo html::select('URS[]', $URS, '', "class='form-control chosen' multiple");?></td>
+4
View File
@@ -24,6 +24,7 @@
<table class='table table-bordered' id="trackList">
<thead>
<tr class='text-center'>
<?php if($config->URAndSR):?>
<th <?php echo $style;?>>
<?php if($this->app->rawModule == 'projectstory'): ?>
<div class="dropdown">
@@ -38,6 +39,7 @@
<?php echo $lang->story->requirement;?>
<?php endif;?>
</th>
<?php endif;?>
<th><?php echo $lang->story->story;?></th>
<th><?php echo $lang->story->tasks;?></th>
<?php if(isset($config->maxVersion)):?>
@@ -55,12 +57,14 @@
<?php $track = ($key == 'noRequirement') ? $requirement : $requirement->track;?>
<?php $rowspan = count($track);?>
<tr>
<?php if($config->URAndSR):?>
<td <?php if($rowspan != 0) echo "rowspan=" . $rowspan;?> class='requirement'>
<?php if($key != 'noRequirement'):?>
<span class="label label-primary label-outline"><?php echo zget($lang->story->statusList, $requirement->status);?></span>
<?php endif;?>
<?php echo $key == 'noRequirement' ? $lang->story->noRequirement : html::a($this->createLink($module, 'view', "storyID=$requirement->id"), $requirement->title, '', "title=$requirement->title data-group='$openGroup'");?>
</td>
<?php endif;?>
<?php if(count($track) != 0):?>
<?php $i = 1;?>
<?php foreach($track as $storyID => $story):?>
+6 -2
View File
@@ -398,13 +398,16 @@
<div class="cell">
<div class='tabs'>
<ul class='nav nav-tabs'>
<?php if($this->config->URAndSR):?>
<li class='active'><a href='#legendStories' data-toggle='tab'><?php echo $story->type == 'story' ? $lang->story->requirement : $lang->story->story;?></a></li>
<?php endif;?>
<?php if($story->type == 'story'):?>
<li><a href='#legendProjectAndTask' data-toggle='tab'><?php echo $lang->story->legendProjectAndTask;?></a></li>
<li class="<?php if(!$this->config->URAndSR) echo 'active';?>"><a href='#legendProjectAndTask' data-toggle='tab'><?php echo $lang->story->legendProjectAndTask;?></a></li>
<?php endif;?>
<li><a href='#legendRelated' data-toggle='tab'><?php echo $lang->story->legendRelated;?></a></li>
</ul>
<div class='tab-content'>
<?php if($this->config->URAndSR):?>
<div class='tab-pane active' id='legendStories'>
<ul class="list-unstyled">
<?php
@@ -421,9 +424,10 @@
<?php if(!empty($relations)) echo html::a('javascript:void(0)', $lang->story->unlink . $linkLang, '', "class='btn btn-info' id='unlinkStory'");?></li>
</ul>
</div>
<?php endif;?>
<?php if($story->type == 'story'):?>
<div class='tab-pane' id='legendProjectAndTask'>
<div class="tab-pane <?php if(!$this->config->URAndSR) echo 'active';?>" id='legendProjectAndTask'>
<ul class="list-unstyled">
<?php
foreach($story->tasks as $projectTasks)
+14 -1
View File
@@ -11,7 +11,20 @@
*/
class testcase extends control
{
public $products = array();
/**
* All products.
*
* @var array
* @access public
*/
public $products = array();
/**
* Project id.
*
* @var int
* @access public
*/
public $projectID = 0;
/**
+14
View File
@@ -11,8 +11,22 @@
*/
class testsuite extends control
{
/**
* All products.
*
* @var array
* @access public
*/
public $products = array();
/**
* Construct function.
*
* @param string $moduleName
* @param string $methodName
* @access public
* @return void
*/
public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
+14 -1
View File
@@ -11,7 +11,20 @@
*/
class testtask extends control
{
public $products = array();
/**
* All products.
*
* @var array
* @access public
*/
public $products = array();
/**
* Project id.
*
* @var int
* @access public
*/
public $projectID = 0;
/**
+2
View File
@@ -26,3 +26,5 @@ $config->todo->list->customBatchEditFields = 'pri,desc,beginAndEnd,status';
$config->todo->custom = new stdclass();
$config->todo->custom->batchCreateFields = 'type,pri,desc,beginAndEnd';
$config->todo->custom->batchEditFields = 'pri,beginAndEnd,status';
$config->todo->moduleList = array('bug', 'task', 'story', 'issue', 'risk', 'review', 'testtask', 'feedback');
+5 -5
View File
@@ -22,7 +22,7 @@ class todoModel extends model
public function create($date, $account)
{
$objectType = $this->post->type;
$hasObject = in_array($objectType, array('bug', 'task', 'story', 'issue', 'risk', 'review', 'testtask', 'feedback'));
$hasObject = in_array($objectType, $this->config->todo->moduleList);
if($hasObject && $objectType) $idvalue = $this->post->uid ? $this->post->$objectType : $this->post->idvalue;
$todo = fixer::input('post')
@@ -34,7 +34,7 @@ class todoModel extends model
->setIF($this->post->begin == false, 'begin', '2400')
->setIF($this->post->begin == false or $this->post->end == false, 'end', '2400')
->stripTags($this->config->todo->editor->create['id'], $this->config->allowedTags)
->remove('bug, task, story, issue, risk, review, testtask, uid, feedback')
->remove(implode(',', $this->config->todo->moduleList) . ',uid')
->get();
if($todo->end < $todo->begin)
@@ -171,10 +171,10 @@ class todoModel extends model
public function update($todoID)
{
$oldTodo = $this->dao->findById((int)$todoID)->from(TABLE_TODO)->fetch();
if(in_array($oldTodo->type, array('bug', 'task', 'story', 'issue', 'risk', 'review', 'testtask', 'feedback'))) $oldTodo->name = '';
if(in_array($oldTodo->type, $this->config->todo->moduleList)) $oldTodo->name = '';
$objectType = $this->post->type;
$hasObject = in_array($objectType, array('bug', 'task', 'story', 'issue', 'risk', 'review', 'testtask', 'feedback'));
$hasObject = in_array($objectType, $this->config->todo->moduleList);
if($hasObject && $objectType) $idvalue = $this->post->uid ? $this->post->$objectType : $this->post->idvalue;
$todo = fixer::input('post')
->cleanInt('pri, begin, end, private')
@@ -186,7 +186,7 @@ class todoModel extends model
->setIF($this->post->end == false, 'end', '2400')
->setDefault('private', 0)
->stripTags($this->config->todo->editor->edit['id'], $this->config->allowedTags)
->remove('bug, task, story, feedback, issue, risk, review, testtask, feedback, uid')
->remove(implode(',', $this->config->todo->moduleList) . 'uid')
->get();
if($todo->end < $todo->begin)
+3 -4
View File
@@ -3993,7 +3993,7 @@ class upgradeModel extends model
$data = fixer::input('post')->get();
$account = isset($this->app->user->account) ? $this->app->user->account : '';
if(!isset($data->programs) && $data->programID == '')
if(isset($data->newProgram))
{
/* Insert program. */
$program = new stdclass();
@@ -4009,7 +4009,7 @@ class upgradeModel extends model
$this->app->loadLang('program');
$this->app->loadLang('project');
$this->lang->project->name = $this->lang->program->PGMName;
$this->lang->project->name = $this->lang->program->PGMName;
$this->dao->insert(TABLE_PROJECT)->data($program)
->batchcheck('name,begin', 'notempty')
@@ -4066,7 +4066,7 @@ class upgradeModel extends model
if(!isset($data->sprints)) return array($programID, 0, $lineID);
if(!isset($data->projects))
if(isset($data->newProject))
{
if(!$this->post->longTime and !$this->post->end) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->program->end)));
@@ -4201,7 +4201,6 @@ class upgradeModel extends model
$data = new stdClass();
$data->realBegan = $minRealBegan ? substr($minRealBegan, 0, 10) : '0000-00-00';
$data->status = $PRJStatus;
$PRJStatus = $this->dao->select('status')->from(TABLE_PROJECT)->where('id')->eq($projectID)->fetch('status');
if($PRJStatus == 'closed')
@@ -9,14 +9,12 @@
<div class='input-group'>
<?php echo html::select("programs", $programs, $programID, "class='form-control hidden pgm-exist' onchange='getProjectByProgram(this)'");?>
<?php echo html::input("PGMName", isset($programName) ? $programName : '', "class='form-control pgm-no-exist'");?>
<?php if(count($programs)):?>
<span class='input-group-addon'>
<div class="checkbox-primary">
<input type="checkbox" name="newProgram" value="0" checked onchange="toggleProgram(this)" id="newProgram0" />
<label for="newProgram0"><?php echo $lang->upgrade->newProgram;?></label>
</div>
</span>
<?php endif;?>
</div>
<?php echo html::hidden('programID', '');?>
</td>