diff --git a/framework/router.class.php b/framework/router.class.php
index 886f787f23..d04fb6d4a3 100755
--- a/framework/router.class.php
+++ b/framework/router.class.php
@@ -203,12 +203,12 @@ class router extends baseRouter
/* Record hour unit. */
$config->hourUnit = 'h';
- if($hourKey == STORYPOINT_KEY) $config->hourUnit = 'SP';
- if($hourKey == FUNCTIONPOINT_KEY) $config->hourUnit = 'FP';
+ if($hourKey == STORYPOINT_KEY) $config->hourUnit = 'sp';
+ if($hourKey == FUNCTIONPOINT_KEY) $config->hourUnit = 'fp';
$model = new stdclass();
$model->model = 'scrum';
- if($this->session->PRJ) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->PRJ}")->fetch();
+ //if($this->session->PRJ) $model = $this->dbh->query('SELECT model FROM' . TABLE_PROJECT . "WHERE id = {$this->session->PRJ}")->fetch();
$iterationKey = $projectKey;
if(isset($model->model) && $model->model == 'waterfall') $projectKey = STAGE_KEY;
@@ -244,7 +244,7 @@ class router extends baseRouter
if($this->dbh and !empty($this->config->db->name) and !defined('IN_UPGRADE'))
{
/* Get story concept in project and product. */
- $URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and lang = \"{$this->clientLang}\"")->fetchAll();
+ $URSRList = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URSRList' and `key` = \"{$config->URSR}\"")->fetchAll();
/* Get UR pairs and SR pairs. */
$URPairs = array();
diff --git a/module/block/view/executionblock.html.php b/module/block/view/executionblock.html.php
index c2195be134..90872be781 100644
--- a/module/block/view/executionblock.html.php
+++ b/module/block/view/executionblock.html.php
@@ -10,6 +10,7 @@
* @link http://www.zentao.net
*/
?>
+
" . $lang->execution->create, '', "class='btn btn-primary'")?>
@@ -51,15 +52,13 @@
- hours->totalEstimate . ' ' . $lang->execution->workHourUnit;?> |
- hours->totalConsumed . ' ' . $lang->execution->workHourUnit;?> |
- hours->totalLeft . ' ' . $lang->execution->workHourUnit;?> |
+ hours->totalEstimate . $lang->execution->workHourUnit;?> |
+ hours->totalConsumed . $lang->execution->workHourUnit;?> |
+ hours->totalLeft . $lang->execution->workHourUnit;?> |
-
-
- hours->progress;?>%
-
+
|
diff --git a/module/block/view/projectblock.html.php b/module/block/view/projectblock.html.php
index b40b243a19..8d5cd06af9 100644
--- a/module/block/view/projectblock.html.php
+++ b/module/block/view/projectblock.html.php
@@ -33,7 +33,7 @@
teamCount;?> |
- consumed . ' ' . $lang->execution->workHourUnit;?> |
+ consumed . $lang->execution->workHourUnit;?> |
app->getClientLang(), ['zh-cn','zh-tw']) ? number_format((float)$project->budget / 10000, 2) . $this->lang->project->tenThousand : number_format((float)$project->budget, 2);?>
budget != 0 ? zget($lang->project->currencySymbol, $project->budgetUnit) . ' ' . $programBudget : $lang->project->future;?> |
leftStories;?> |
diff --git a/module/block/view/scrumlistblock.html.php b/module/block/view/scrumlistblock.html.php
index d1f62b4676..aaa9cd6499 100644
--- a/module/block/view/scrumlistblock.html.php
+++ b/module/block/view/scrumlistblock.html.php
@@ -52,9 +52,9 @@
- hours->totalEstimate . ' ' . $lang->execution->workHourUnit;?> |
- hours->totalConsumed . ' ' . $lang->execution->workHourUnit;?> |
- hours->totalLeft . ' ' . $lang->execution->workHourUnit;?> |
+ hours->totalEstimate . $lang->execution->workHourUnit;?> |
+ hours->totalConsumed . $lang->execution->workHourUnit;?> |
+ hours->totalLeft . $lang->execution->workHourUnit;?> |
diff --git a/module/block/view/taskblock.html.php b/module/block/view/taskblock.html.php
index 376df8196d..0b513de61b 100644
--- a/module/block/view/taskblock.html.php
+++ b/module/block/view/taskblock.html.php
@@ -46,7 +46,7 @@
| task->priList, $task->pri, $task->pri)?> |
createLink('task', 'view', "taskID=$task->id", '', '', $task->project), $task->name)?> |
- estimate . ' ' . $lang->execution->workHourUnit;?> |
+ estimate . $lang->execution->workHourUnit;?> |
deadline, 0, 4) > 0) echo $task->deadline;?> |
processStatus('task', $task);?>
diff --git a/module/bug/control.php b/module/bug/control.php
index b26f0d792a..9b89aeb762 100644
--- a/module/bug/control.php
+++ b/module/bug/control.php
@@ -435,11 +435,6 @@ class bug extends control
if($runID and $resultID) extract($this->bug->getBugInfoFromResult($resultID, 0, 0, isset($stepIdList) ? $stepIdList : ''));// If set runID and resultID, get the result info by resultID as template.
if(!$runID and $caseID) extract($this->bug->getBugInfoFromResult($resultID, $caseID, $version, isset($stepIdList) ? $stepIdList : ''));// If not set runID but set caseID, get the result info by resultID and case info.
- if($testtask)
- {
- $testtask = $this->loadModel('testtask')->getById($testtask);
- $buildID = $testtask->build;
- }
/* If bugID setted, use this bug as template. */
if(isset($bugID))
@@ -456,7 +451,15 @@ class bug extends control
$assignedTo = $bug->assignedTo;
$deadline = $bug->deadline;
$color = $bug->color;
+ $testtask = $bug->testtask;
}
+
+ if($testtask)
+ {
+ $testtask = $this->loadModel('testtask')->getById($testtask);
+ $buildID = $testtask->build;
+ }
+
if(isset($todoID))
{
$todo = $this->loadModel('todo')->getById($todoID);
@@ -687,6 +690,7 @@ class bug extends control
if(!$bug) die(js::error($this->lang->notFound) . js::locate('back'));
if($bug->project) $this->session->project = $bug->project;
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->project);
+ $this->session->set('storyList', '', 'product');
$this->bug->checkBugExecutionPriv($bug);
diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php
index 385f57a88a..23c9d36510 100644
--- a/module/bug/view/create.html.php
+++ b/module/bug/view/create.html.php
@@ -317,7 +317,7 @@ js::set('blockID', $blockID);
-
+ id);?>
diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php
index 75f67b7adc..1ac48f8c66 100644
--- a/module/bug/view/view.html.php
+++ b/module/bug/view/view.html.php
@@ -85,7 +85,7 @@
common::printIcon('bug', 'close', $params, $bug, 'button', '', '', 'text-danger iframe showinonlybody', true);
common::printIcon('bug', 'activate', $params, $bug, 'button', '', '', 'text-success iframe showinonlybody', true);
- common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='product'", $lang->bug->toStory);
+ common::printIcon('bug', 'toStory', "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id", $bug, 'button', $lang->icons['story'], '', '', '', "data-app='" . ($this->app->openApp == 'project' ? 'project' : 'product') . "'", $lang->bug->toStory);
common::printIcon('bug', 'createCase', $convertParams, $bug, 'button', 'sitemap');
echo $this->buildOperateMenu($bug, 'view');
diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php
index 7a2c9ee2c5..372158f140 100644
--- a/module/common/lang/menu.php
+++ b/module/common/lang/menu.php
@@ -170,8 +170,6 @@ $lang->product->dividerMenu = $config->URAndSR ? ',requirement,set,' : ',track,s
$lang->project->homeMenu = new stdclass();
$lang->project->homeMenu->browse = array('link' => ($config->systemMode == 'new' ? $lang->project->list : $lang->executionCommon) . '|project|browse|', 'alias' => 'batchedit,create');
-$lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
-
/* Scrum menu. */
$lang->scrum->menu = new stdclass();
$lang->scrum->menu->index = array('link' => "{$lang->dashboard}|project|index|project=%s");
@@ -185,6 +183,8 @@ $lang->scrum->menu->release = array('link' => "{$lang->release->common}|projec
$lang->scrum->menu->dynamic = array('link' => "$lang->dynamic|project|dynamic|project=%s");
$lang->scrum->menu->settings = array('link' => "$lang->settings|project|view|project=%s", 'subModule' => 'stakeholder', 'alias' => 'edit,manageproducts,group,managemembers,manageview,managepriv,whitelist,addwhitelist');
+$lang->scrum->dividerMenu = ',execution,programplan,doc,dynamic,';
+
/* Scrum menu order. */
$lang->scrum->menuOrder[5] = 'index';
$lang->scrum->menuOrder[10] = 'execution';
@@ -540,4 +540,6 @@ $lang->navGroup->entry = 'admin';
$lang->navGroup->extension = 'admin';
$lang->navGroup->action = 'admin';
-$lang->navGroup->tree = 'tree';
+$lang->navGroup->search = 'search';
+$lang->navGroup->index = 'index';
+$lang->navGroup->tree = 'tree';
diff --git a/module/custom/model.php b/module/custom/model.php
index b468fab544..91f7308d9c 100644
--- a/module/custom/model.php
+++ b/module/custom/model.php
@@ -484,7 +484,7 @@ class customModel extends model
* Get UR and SR pairs.
*
* @access public
- * @return void
+ * @return array
*/
public function getURSRPairs()
{
@@ -494,6 +494,11 @@ class customModel extends model
->andWhere('module')->eq('custom')
->andWhere('section')->eq('URSRList')
->fetchAll();
+ if(empty($langData))
+ {
+ $URSR = $this->loadModel('setting')->getURSR();
+ $langData = $this->dao->select('`key`, `value`, `system`')->from(TABLE_LANG)->where('`key`')->eq($URSR)->andWhere('module')->eq('custom')->andWhere('section')->eq('URSRList')->fetchAll();
+ }
$URSRPairs = array();
foreach($langData as $id => $content)
@@ -509,11 +514,16 @@ class customModel extends model
* Get UR pairs.
*
* @access public
- * @return void
+ * @return array
*/
public function getURPairs()
{
$URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('lang')->eq($this->app->clientLang)->fetchPairs();
+ if(empty($URSRList))
+ {
+ $URSR = $this->loadModel('setting')->getURSR();
+ $URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('`key`')->eq($URSR)->fetchPairs();
+ }
$URPairs = array();
foreach($URSRList as $key => $value)
@@ -529,11 +539,16 @@ class customModel extends model
* Get SR pairs.
*
* @access public
- * @return void
+ * @return array
*/
public function getSRPairs()
{
$URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('lang')->eq($this->app->clientLang)->fetchPairs();
+ if(empty($URSRList))
+ {
+ $URSR = $this->loadModel('setting')->getURSR();
+ $URSRList = $this->dao->select('`key`,`value`')->from(TABLE_LANG)->where('module')->eq('custom')->andWhere('section')->eq('URSRList')->andWhere('`key`')->eq($URSR)->fetchPairs();
+ }
$SRPairs = array();
foreach($URSRList as $key => $value)
@@ -549,7 +564,7 @@ class customModel extends model
* Get UR and SR list.
*
* @access public
- * @return void
+ * @return array
*/
public function getURSRList()
{
@@ -561,6 +576,11 @@ class customModel extends model
->andWhere('module')->eq('custom')
->andWhere('section')->eq('URSRList')
->fetchAll();
+ if(empty($langData))
+ {
+ $URSR = $this->loadModel('setting')->getURSR();
+ $langData = $this->dao->select('`key`, `value`, `system`')->from(TABLE_LANG)->where('`key`')->eq($URSR)->andWhere('module')->eq('custom')->andWhere('section')->eq('URSRList')->fetchAll();
+ }
$URSRList = array();
foreach($langData as $id => $content)
diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php
index 5b8e661d3e..6ecb67a29f 100644
--- a/module/execution/lang/de.php
+++ b/module/execution/lang/de.php
@@ -20,7 +20,7 @@ $lang->execution->project = 'Project';
$lang->execution->execName = 'Execution Name';
$lang->execution->execCode = 'Execution Code';
$lang->execution->execType = 'Execution Type';
-$lang->execution->statge = 'Stage';
+$lang->execution->stage = 'Stage';
$lang->execution->pri = 'Priorität';
$lang->execution->openedBy = 'OpenedBy';
$lang->execution->openedDate = 'OpenedDate';
diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php
index de995d3193..23da343dff 100644
--- a/module/execution/lang/en.php
+++ b/module/execution/lang/en.php
@@ -20,7 +20,7 @@ $lang->execution->project = 'Project';
$lang->execution->execName = 'Execution Name';
$lang->execution->execCode = 'Execution Code';
$lang->execution->execType = 'Execution Type';
-$lang->execution->statge = 'Stage';
+$lang->execution->stage = 'Stage';
$lang->execution->pri = 'Priority';
$lang->execution->openedBy = 'OpenedBy';
$lang->execution->openedDate = 'OpenedDate';
diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php
index 1a7b3dc0f9..ab7290e61e 100644
--- a/module/execution/lang/fr.php
+++ b/module/execution/lang/fr.php
@@ -20,7 +20,7 @@ $lang->execution->project = 'Project';
$lang->execution->execName = 'Execution Name';
$lang->execution->execCode = 'Execution Code';
$lang->execution->execType = 'Execution Type';
-$lang->execution->statge = 'Etape';
+$lang->execution->stage = 'Etape';
$lang->execution->pri = 'Priorité';
$lang->execution->openedBy = 'Ouvert par';
$lang->execution->openedDate = "Date d'ouverture";
diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php
index 667c32b1cd..ce60cbfa02 100644
--- a/module/execution/lang/vi.php
+++ b/module/execution/lang/vi.php
@@ -20,7 +20,7 @@ $lang->execution->project = 'Project';
$lang->execution->execName = 'Execution Name';
$lang->execution->execCode = 'Execution Code';
$lang->execution->execType = 'Execution Type';
-$lang->execution->statge = 'Giai đoạn';
+$lang->execution->stage = 'Giai đoạn';
$lang->execution->pri = 'Ưu tiên';
$lang->execution->openedBy = 'Mở bởi';
$lang->execution->openedDate = 'Ngày mở';
diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php
index 288ba21af7..c326d385bf 100644
--- a/module/execution/lang/zh-cn.php
+++ b/module/execution/lang/zh-cn.php
@@ -20,7 +20,7 @@ $lang->execution->project = '所属项目';
$lang->execution->execName = '执行名称';
$lang->execution->execCode = '执行代号';
$lang->execution->execType = '执行类型';
-$lang->execution->statge = '阶段';
+$lang->execution->stage = '阶段';
$lang->execution->pri = '优先级';
$lang->execution->openedBy = '由谁创建';
$lang->execution->openedDate = '创建日期';
diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php
index e67b079dbc..26c147b698 100644
--- a/module/group/lang/resource.php
+++ b/module/group/lang/resource.php
@@ -167,23 +167,24 @@ if($config->systemMode == 'new')
$lang->resource->program->unbindWhitelist = 'unbindWhitelist';
$lang->resource->program->export = 'export';
- $lang->program->methodOrder[10] = 'browse';
- $lang->program->methodOrder[15] = 'product';
- $lang->program->methodOrder[20] = 'create';
- $lang->program->methodOrder[25] = 'edit';
- $lang->program->methodOrder[30] = 'view';
- $lang->program->methodOrder[35] = 'start';
- $lang->program->methodOrder[40] = 'suspend';
- $lang->program->methodOrder[45] = 'close';
- $lang->program->methodOrder[50] = 'activate';
- $lang->program->methodOrder[55] = 'delete';
- $lang->program->methodOrder[60] = 'project';
- $lang->program->methodOrder[65] = 'stakeholder';
- $lang->program->methodOrder[67] = 'createStakeholder';
- $lang->program->methodOrder[70] = 'unlinkStakeholder';
- $lang->program->methodOrder[75] = 'batchUnlinkStakeholders';
- $lang->program->methodOrder[80] = 'export';
- $lang->program->methodOrder[85] = 'unbindWhitelist';
+ $lang->program->methodOrder[5] = 'browse';
+ $lang->program->methodOrder[10] = 'view';
+ $lang->program->methodOrder[15] = 'product';
+ $lang->program->methodOrder[20] = 'create';
+ $lang->program->methodOrder[25] = 'edit';
+ $lang->program->methodOrder[30] = 'view';
+ $lang->program->methodOrder[35] = 'start';
+ $lang->program->methodOrder[40] = 'suspend';
+ $lang->program->methodOrder[45] = 'activate';
+ $lang->program->methodOrder[50] = 'close';
+ $lang->program->methodOrder[55] = 'delete';
+ $lang->program->methodOrder[60] = 'project';
+ $lang->program->methodOrder[65] = 'stakeholder';
+ $lang->program->methodOrder[70] = 'createStakeholder';
+ $lang->program->methodOrder[75] = 'unlinkStakeholder';
+ $lang->program->methodOrder[80] = 'batchUnlinkStakeholders';
+ $lang->program->methodOrder[85] = 'unbindWhitelist';
+ $lang->program->methodOrder[90] = 'export';
/* Project. */
$lang->resource->project = new stdclass();
diff --git a/module/my/control.php b/module/my/control.php
index dd332beb33..bc44cf44c6 100644
--- a/module/my/control.php
+++ b/module/my/control.php
@@ -872,7 +872,7 @@ class my extends control
$this->view->position[] = $this->lang->my->preference;
$this->view->URSRList = $this->loadModel('custom')->getURSRPairs();
- $this->view->URSR = isset($this->config->URSR) ? $this->config->URSR : $this->setting->getItem('owner=system&module=custom&key=URSR');
+ $this->view->URSR = $this->setting->getURSR();
$this->view->programLink = isset($this->config->programLink) ? $this->config->programLink : 'program-browse';
$this->view->productLink = isset($this->config->productLink) ? $this->config->productLink : 'product-all';
$this->view->projectLink = isset($this->config->projectLink) ? $this->config->projectLink : 'project-browse';
diff --git a/module/product/model.php b/module/product/model.php
index ae59211dc9..37612d6bab 100644
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -261,14 +261,14 @@ class productModel extends model
{
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getProductPairs();
- $orderBy = !empty($this->config->product->orderBy) ? $this->config->product->orderBy : 'isClosed';
- $products = $this->dao->select('*, IF(INSTR(" closed", status) < 2, 0, 1) AS isClosed')
- ->from(TABLE_PRODUCT)
- ->where('deleted')->eq(0)
- ->beginIF($programID)->andWhere('program')->eq($programID)->fi()
- ->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
- ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->products)->fi()
- ->orderBy($orderBy)
+ $products = $this->dao->select('*, IF(INSTR(" closed", t1.status) < 2, 0, 1) AS isClosed, t1.id AS id, t1.name AS name')
+ ->from(TABLE_PRODUCT)->alias('t1')
+ ->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id')
+ ->where('t1.deleted')->eq(0)
+ ->beginIF($programID)->andWhere('t1.program')->eq($programID)->fi()
+ ->beginIF(strpos($mode, 'noclosed') !== false)->andWhere('t1.status')->ne('closed')->fi()
+ ->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->products)->fi()
+ ->orderBy('t2.order_asc, t1.line_desc, t1.order_asc')
->fetchPairs('id', 'name');
return $products;
}
diff --git a/module/product/view/view.html.php b/module/product/view/view.html.php
index 68b24c2c45..292e74605e 100644
--- a/module/product/view/view.html.php
+++ b/module/product/view/view.html.php
@@ -22,13 +22,6 @@
id;?> code;?> name;?>
desc;?>
-
- product->typeAB . ':' . zget($lang->product->typeList, $product->type);?>
- product->status . ':' . $this->processStatus('product', $product);?>
- deleted):?>
- product->deleted;?>
-
-
type == 'platform'):?>
@@ -81,7 +74,7 @@
createdDate, DT_DATE1);?> |
- | product->status;?> |
+ productCommon . $lang->product->status;?> |
product->statusList, $product->status);?> |
product->acl;?> |
product->aclList[$product->acl];?> |
diff --git a/module/project/control.php b/module/project/control.php
index 69892e43e0..e71bd75e0f 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -921,6 +921,8 @@ class project extends control
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('group', "projectID=$projectID&programID=$programID")));
}
+ $this->project->setMenu($projectID);
+
$group = $this->group->getById($groupID);
$this->view->title = $group->name . $this->lang->colon . $this->lang->group->manageView;
@@ -991,6 +993,7 @@ class project extends control
$this->view->changelogs = ',' . join(',', $changelog) . ',';
$this->view->groupPrivs = $groupPrivs;
$this->view->groupID = $groupID;
+ $this->view->projectID = $projectID;
$this->view->menu = $menu;
$this->view->version = $version;
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php
index 8411af5e8e..85e98aadc3 100644
--- a/module/project/lang/zh-cn.php
+++ b/module/project/lang/zh-cn.php
@@ -97,7 +97,7 @@ $lang->project->ev = 'EV';
$lang->project->sv = 'SV%';
$lang->project->ac = 'AC';
$lang->project->cv = 'CV%';
-$lang->project->teamCount = '成员';
+$lang->project->teamCount = '人数';
$lang->project->longTime = '长期';
$lang->project->future = '待定';
$lang->project->moreProject = '更多项目';
diff --git a/module/project/model.php b/module/project/model.php
index 04b820635b..3583f803ce 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -1607,8 +1607,9 @@ class projectModel extends model
public function setMenu($objectID)
{
$project = $this->getByID($objectID);
- $this->lang->project->menu = $this->lang->{$project->model}->menu;
- $this->lang->project->menuOrder = $this->lang->{$project->model}->menuOrder;
+ $this->lang->project->menu = $this->lang->{$project->model}->menu;
+ $this->lang->project->menuOrder = $this->lang->{$project->model}->menuOrder;
+ $this->lang->project->dividerMenu = $this->lang->{$project->model}->dividerMenu;
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
common::setMenuVars('project', $objectID);
diff --git a/module/project/view/managepriv.html.php b/module/project/view/managepriv.html.php
index ffc6326693..6c8eae9057 100644
--- a/module/project/view/managepriv.html.php
+++ b/module/project/view/managepriv.html.php
@@ -22,7 +22,7 @@
.checkbox-right{padding-left:0px !important;}
td.menus {border-right: 0;padding-right: 0;width: 220px !important;}
-td.menus + td {border-left: 0;}
+td.menus + td {border-left: 0;}
.menus .checkbox-primary {float: left; width: 220px;}
.menus .checkbox-primary:first-child {float: left; width: auto;}
.menus a {margin-left: 10px;}
@@ -67,8 +67,8 @@ td.menus + td {border-left: 0;}
name;?>
-
- {$lang->group->all}", '', "class='btn btn-link btn-active-text'")?>
+
+ {$lang->group->all}", '', "class='btn btn-link btn-active-text'")?>
@@ -164,7 +164,7 @@ $(document).ready(function()
})
/**
- * 勾选浏览列表标签时,自动勾选下面的所有标签。
+ * 勾选浏览列表标签时,自动勾选下面的所有标签。
* Check all tabs when the Browse list tab is selected.
*/
$('.menus input[value=browse]').change(function()
diff --git a/module/projectstory/control.php b/module/projectstory/control.php
index 7251244514..f9fde8c05d 100644
--- a/module/projectstory/control.php
+++ b/module/projectstory/control.php
@@ -52,14 +52,12 @@ class projectStory extends control
* @access public
* @return void
*/
- public function track($productID = 0, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
+ public function track($projectID = 0, $productID = 0, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
- if(empty($productID)) $productID = key($this->products);
+ $products = $this->loadModel('product')->getProductPairsByProject($projectID);
+ if(empty($productID)) $productID = key($products);
- $this->lang->story->requirement = str_replace($this->lang->URCommon, $this->lang->URCommon, $this->lang->story->requirement);
- $this->lang->story->story = str_replace($this->lang->SRCommon, $this->lang->SRCommon, $this->lang->story->story);
-
- echo $this->fetch('story', 'track', "productID=$productID&branch=$branch&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
+ echo $this->fetch('story', 'track', "productID=$productID&branch=$branch&projectID=$projectID&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
}
/**
diff --git a/module/search/control.php b/module/search/control.php
index 9f10bff29b..9224a5c7d2 100644
--- a/module/search/control.php
+++ b/module/search/control.php
@@ -11,6 +11,18 @@
*/
class search extends control
{
+ /**
+ * Determine whether to display the effort object.
+ *
+ * @access public
+ * @return void
+ */
+ public function __construct($module = '', $method = '')
+ {
+ parent::__construct($module, $method);
+ if(!isset($this->config->maxVersion)) unset($this->lang->search->modules['effort']);
+ }
+
/**
* Build search form.
*
@@ -186,7 +198,6 @@ class search extends control
if(empty($type)) $type = $this->post->type;
if(empty($type) and ($recTotal != 0 or $pageID != 1)) $type = $this->session->searchIngType;
$type = (empty($type) or $type[0] == 'all') ? 'all' : $type;
- //if($objectType != 'all') $type = explode('', $objectType);
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $this->config->search->recPerPage, $pageID);
diff --git a/module/search/lang/zh-cn.php b/module/search/lang/zh-cn.php
index b4a236692f..139d468d5c 100644
--- a/module/search/lang/zh-cn.php
+++ b/module/search/lang/zh-cn.php
@@ -76,7 +76,7 @@ $lang->search->modules['bug'] = 'Bug';
$lang->search->modules['case'] = '用例';
$lang->search->modules['doc'] = '文档';
$lang->search->modules['todo'] = '待办';
-$lang->search->modules['build'] = 'Build';
+$lang->search->modules['build'] = '版本';
$lang->search->modules['effort'] = '日志';
$lang->search->modules['caselib'] = '测试库';
$lang->search->modules['product'] = $lang->productCommon;
diff --git a/module/setting/model.php b/module/setting/model.php
index 46d5989b45..8fc6d443f3 100644
--- a/module/setting/model.php
+++ b/module/setting/model.php
@@ -14,10 +14,10 @@
class settingModel extends model
{
//-------------------------------- methods for get, set and delete setting items. ----------------------------//
-
+
/**
* Get value of an item.
- *
+ *
* @param string $paramString see parseItemParam();
* @access public
* @return misc
@@ -29,7 +29,7 @@ class settingModel extends model
/**
* Get some items.
- *
+ *
* @param string $paramString see parseItemParam();
* @access public
* @return array
@@ -40,10 +40,10 @@ class settingModel extends model
}
/**
- * Set value of an item.
- *
- * @param string $path system.common.global.sn or system.common.sn
- * @param string $value
+ * Set value of an item.
+ *
+ * @param string $path system.common.global.sn or system.common.sn
+ * @param string $value
* @access public
* @return void
*/
@@ -78,12 +78,12 @@ class settingModel extends model
/**
* Batch set items, the example:
- *
+ *
* $path = 'system.mail';
* $items->turnon = true;
* $items->smtp->host = 'localhost';
*
- * @param string $path like system.mail
+ * @param string $path like system.mail
* @param array|object $items the items array or object, can be mixed by one level or two levels.
* @access public
* @return bool
@@ -112,7 +112,7 @@ class settingModel extends model
/**
* Delete items.
- *
+ *
* @param string $paramString see parseItemParam();
* @access public
* @return void
@@ -124,7 +124,7 @@ class settingModel extends model
/**
* Parse the param string for select or delete items.
- *
+ *
* @param string $paramString owner=xxx&key=sn and so on.
* @access public
* @return array
@@ -132,7 +132,7 @@ class settingModel extends model
public function parseItemParam($paramString)
{
/* Parse the param string into array. */
- parse_str($paramString, $params);
+ parse_str($paramString, $params);
/* Init fields not set in the param string. */
$fields = 'owner,module,section,key';
@@ -144,7 +144,7 @@ class settingModel extends model
/**
* Create a DAO object to select or delete one or more records.
- *
+ *
* @param array $params the params parsed by parseItemParam() method.
* @param string $method select|delete.
* @access public
@@ -162,7 +162,7 @@ class settingModel extends model
/**
* Get config of system and one user.
*
- * @param string $account
+ * @param string $account
* @access public
* @return array
*/
@@ -189,10 +189,10 @@ class settingModel extends model
}
//-------------------------------- methods for version and sn. ----------------------------//
-
+
/**
* Get the version of current zentaopms.
- *
+ *
* Since the version field not saved in db. So if empty, return 0.3 beta.
*
* @access public
@@ -206,9 +206,21 @@ class settingModel extends model
}
/**
- * Update version
- *
- * @param string $version
+ * Get URSR.
+ *
+ * @access public
+ * @return int
+ */
+ public function getURSR()
+ {
+ if(isset($this->config->URSR)) return $this->config->URSR;
+ return $this->getItem('owner=system&module=custom&key=URSR');
+ }
+
+ /**
+ * Update version
+ *
+ * @param string $version
* @access public
* @return void
*/
@@ -219,7 +231,7 @@ class settingModel extends model
/**
* Set the sn of current zentaopms.
- *
+ *
* @access public
* @return void
*/
@@ -231,8 +243,8 @@ class settingModel extends model
/**
* Compute a SN. Use the server ip, and server software string as seed, and an rand number, two micro time
- *
- * Note: this sn just to unique this zentaopms. No any private info.
+ *
+ * Note: this sn just to unique this zentaopms. No any private info.
*
* @access public
* @return string
@@ -246,8 +258,8 @@ class settingModel extends model
/**
* Judge a sn needed update or not.
- *
- * @param string $sn
+ *
+ * @param string $sn
* @access public
* @return bool
*/
diff --git a/module/story/control.php b/module/story/control.php
index 169e69a8f8..0dcbb673db 100644
--- a/module/story/control.php
+++ b/module/story/control.php
@@ -1380,10 +1380,10 @@ class story extends control
* @access public
* @return void
*/
- public function track($productID, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
+ public function track($productID, $branch = 0, $projectID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Set menu. The projectstory module does not execute. */
- if($this->app->rawModule == 'story')
+ if(!$projectID)
{
$products = $this->product->getPairs();
$productID = $this->product->saveState($productID, $products);
@@ -1403,7 +1403,11 @@ class story extends control
$pager = new pager($recTotal, $recPerPage, $pageID);
$tracks = $this->story->getTracks($productID, $branch, $pager);
- if($this->app->rawModule == 'projectstory') $projectProducts = $this->product->getProducts($this->session->project);
+ if($projectID)
+ {
+ $this->loadModel('project')->setMenu($projectID);
+ $projectProducts = $this->product->getProducts($projectID);
+ }
$this->view->title = $this->lang->story->track;
$this->view->position[] = $this->lang->story->track;
diff --git a/module/story/model.php b/module/story/model.php
index fcaac7084e..b72b4d0c5e 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -3484,7 +3484,7 @@ class storyModel extends model
common::printIcon('story', 'review', $vars . "&from=$story->from", $story, 'list', 'search', '', '', false, "data-group=$story->from");
common::printIcon('story', 'close', $vars, $story, 'list', '', '', 'iframe', true);
common::printIcon('story', 'edit', $vars . "&from=$story->from", $story, 'list', '', '', '', false, "data-group=$story->from");
- common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap');
+ common::printIcon('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$vars", $story, 'list', 'sitemap', '', '', false, "data-app='qa'");
common::printIcon('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&storyID=$story->id", $story, 'list', 'split', '', '', '', '', $this->lang->story->subdivide);
if($this->app->rawModule == 'projectstory') common::printIcon('projectstory', 'unlinkStory', "projectID={$this->session->project}&storyID=$story->id", '', 'list', 'unlink', 'hiddenwin');
}
diff --git a/module/story/view/zerocase.html.php b/module/story/view/zerocase.html.php
index 7711ca80cd..3e1d3ac7fc 100644
--- a/module/story/view/zerocase.html.php
+++ b/module/story/view/zerocase.html.php
@@ -60,7 +60,7 @@
id);?>
pri;?>' title='story->priList, $story->pri);?>'>story->priList, $story->pri)?> |
- title, '', "data-app='{$this->app->openApp}'");?> |
+ title, '', "data-app='product'");?> |
planTitle;?> |
story->sourceList[$story->source];?> |
openedBy);?> |
diff --git a/module/testcase/control.php b/module/testcase/control.php
index f3ff078d2c..3f74721bbb 100644
--- a/module/testcase/control.php
+++ b/module/testcase/control.php
@@ -273,6 +273,10 @@ class testcase extends control
{
$this->loadModel('execution')->setMenu($this->session->execution);
}
+ else
+ {
+ $this->qa->setMenu($this->products, $productID, $branch);
+ }
$testcaseID = ($from and strpos('testcase|work|contribute', $from)) ? $param : 0;
$bugID = $from == 'bug' ? $param : 0;
diff --git a/module/todo/control.php b/module/todo/control.php
index d751c4c6a4..25c7374816 100644
--- a/module/todo/control.php
+++ b/module/todo/control.php
@@ -423,7 +423,6 @@ class todo extends control
else
{
$this->todo->delete(TABLE_TODO, $todoID);
- $this->loadModel('action')->create('todo', $todoID, 'erased');
/* if ajax request, send result. */
if($this->server->ajax)