diff --git a/db/update17.4.sql b/db/update17.4.sql index 9b2e71b002..3c90e379ff 100644 --- a/db/update17.4.sql +++ b/db/update17.4.sql @@ -200,3 +200,20 @@ ALTER TABLE `zt_sqlview` ENGINE='InnoDB'; ALTER TABLE `zt_searchindex` ADD FULLTEXT `title_content` (`title`, `content`); ALTER TABLE `zt_searchindex` DROP INDEX `title`; ALTER TABLE `zt_searchindex` DROP INDEX `content`; + +ALTER TABLE `zt_productplan` ADD `createdBy` varchar(30) NOT NULL AFTER `closedReason`; +ALTER TABLE `zt_productplan` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +ALTER TABLE `zt_release` ADD `createdBy` varchar(30) NOT NULL AFTER `subStatus`; +ALTER TABLE `zt_release` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +ALTER TABLE `zt_testtask` ADD `createdBy` varchar(30) NOT NULL AFTER `subStatus`; +ALTER TABLE `zt_testtask` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +INSERT IGNORE INTO `zt_workflowfield` (`module`, `field`, `type`, `length`, `name`, `control`, `expression`, `options`, `default`, `rules`, `placeholder`, `order`, `searchOrder`, `exportOrder`, `canExport`, `canSearch`, `isValue`, `readonly`, `buildin`, `role`, `desc`, `createdBy`, `createdDate`, `editedBy`, `editedDate`) VALUES +('testtask', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 393, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('testtask', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 394, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('productplan', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 11, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('productplan', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 12, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('release', 'createdBy', 'varchar', '30', '由谁创建', 'select', '', 'user', '', '', '', 14, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'), +('release', 'createdDate', 'datetime', '', '创建时间', 'datetime', '', '', '', '', '', 15, 0, 0, '0', '0', '0', '1', 1, 'buildin', '', '', '2022-08-02 14:49', '', '0000-00-00 00:00:00'); diff --git a/db/zentao.sql b/db/zentao.sql index 53175ed5a4..9cbb9bb4e9 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -1091,6 +1091,8 @@ CREATE TABLE IF NOT EXISTS `zt_productplan` ( `end` date NOT NULL, `order` text NOT NULL, `closedReason` varchar(20) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), @@ -1242,6 +1244,8 @@ CREATE TABLE IF NOT EXISTS `zt_release` ( `notify` varchar(255), `status` varchar(20) NOT NULL default 'normal', `subStatus` varchar(30) NOT NULL default '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), @@ -1671,6 +1675,8 @@ CREATE TABLE IF NOT EXISTS `zt_testtask` ( `testreport` mediumint(8) unsigned NOT NULL, `auto` varchar(10) NOT NULL DEFAULT 'no', `subStatus` varchar(30) NOT NULL default '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 60ef97b0b1..dd4f15306f 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -996,14 +996,7 @@ class baseRouter if($writable) { $ztSessionHandler = new ztSessionHandler($_GET['tid']); - session_set_save_handler( - array($ztSessionHandler, "open"), - array($ztSessionHandler, "close"), - array($ztSessionHandler, "read"), - array($ztSessionHandler, "write"), - array($ztSessionHandler, "destroy"), - array($ztSessionHandler, "gc") - ); + session_set_save_handler($ztSessionHandler, true); } } @@ -3107,7 +3100,7 @@ class EndResponseException extends \Exception * * @package framework */ -class ztSessionHandler +class ztSessionHandler implements SessionHandlerInterface { public $sessSavePath; public $tagID; diff --git a/framework/model.class.php b/framework/model.class.php index 3ae6f6d4be..2bd51df082 100644 --- a/framework/model.class.php +++ b/framework/model.class.php @@ -157,6 +157,21 @@ class model extends baseModel } if(empty($relations)) $relations = $this->dao->select('next, actions')->from(TABLE_WORKFLOWRELATION)->where('prev')->eq($moduleName)->fetchPairs(); + $this->loadModel('flow'); + + $approvalProgressMenu = ''; + if($type == 'view' && !empty($this->config->openedApproval) && commonModel::hasPriv('approval', 'progress')) + { + $flow = $this->loadModel('workflow', 'flow')->getByModule($moduleName); + if($flow->approval == 'enabled') + { + $approvalID = isset($data->approval) ? $data->approval : 0; + $extraClass = strpos(',testsuite,build,release,productplan,', ",{$moduleName},") !== false ? 'btn-link' : ''; + $approvalProgressMenu .= "
"; + $approvalProgressMenu .= baseHTML::a(helper::createLink('approval', 'progress', "approvalID={$approvalID}", '', true), $this->lang->flow->approvalProgress, "class='btn {$extraClass} iframe'"); + } + } + $menu = ''; if($show) { @@ -164,8 +179,10 @@ class model extends baseModel { if(strpos($action->position, $type) === false || $action->show != $show) continue; - $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); + $menu .= $this->flow->buildActionMenu($moduleName, $action, $data, $type, $relations); } + + if($approvalProgressMenu) $menu .= $approvalProgressMenu; } else { @@ -174,10 +191,12 @@ class model extends baseModel { if(strpos($action->position, $type) === false) continue; - if($type == 'view' || $action->show == 'direct') $menu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); - if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->loadModel('flow')->buildActionMenu($moduleName, $action, $data, $type, $relations); + if($type == 'view' || $action->show == 'direct') $menu .= $this->flow->buildActionMenu($moduleName, $action, $data, $type, $relations); + if($type == 'browse' && $action->show == 'dropdownlist') $dropdownMenu .= $this->flow->buildActionMenu($moduleName, $action, $data, $type, $relations); } + if($approvalProgressMenu) $menu .= $approvalProgressMenu; + if($type == 'browse' && $dropdownMenu) { $menu .= "
moduleName, $this->methodName); foreach($menus as $menuItem) { diff --git a/module/build/lang/de.php b/module/build/lang/de.php index 9ffa1dfda4..d714465ad7 100644 --- a/module/build/lang/de.php +++ b/module/build/lang/de.php @@ -68,3 +68,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, erstellt von $actor, Build $extra.' . "\n"; $lang->backhome = 'zurück'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/en.php b/module/build/lang/en.php index 79cd2f6480..73ec7a1d33 100644 --- a/module/build/lang/en.php +++ b/module/build/lang/en.php @@ -68,3 +68,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, created by $actor, Build $extra.' . "\n"; $lang->backhome = 'back'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/fr.php b/module/build/lang/fr.php index cbf8cc4469..48326670ad 100644 --- a/module/build/lang/fr.php +++ b/module/build/lang/fr.php @@ -68,3 +68,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, Build $extra créé par $actor.' . "\n"; $lang->backhome = 'Retour'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/vi.php b/module/build/lang/vi.php index adf75db272..e0080ba5da 100644 --- a/module/build/lang/vi.php +++ b/module/build/lang/vi.php @@ -64,3 +64,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, được tạo bởi $actor, Bản dựng $extra.' . "\n"; $lang->backhome = 'Trở lại'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/model.php b/module/build/model.php index 599601c50a..edb29c9298 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -72,6 +72,7 @@ class buildModel extends model ->beginIF($projectID)->andWhere('t1.project')->eq((int)$projectID)->fi() ->beginIF($type == 'product' and $param)->andWhere('t1.product')->eq($param)->fi() ->beginIF($type == 'bysearch')->andWhere($param)->fi() + ->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); diff --git a/module/caselib/lang/de.php b/module/caselib/lang/de.php index 652875e151..d36368dae3 100644 --- a/module/caselib/lang/de.php +++ b/module/caselib/lang/de.php @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Do you want to delete this library?'; $lang->caselib->noModule = '
You have no modules.
Manage it now.
'; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/en.php b/module/caselib/lang/en.php index 652875e151..d36368dae3 100644 --- a/module/caselib/lang/en.php +++ b/module/caselib/lang/en.php @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Do you want to delete this library?'; $lang->caselib->noModule = '
You have no modules.
Manage it now.
'; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/fr.php b/module/caselib/lang/fr.php index 9f02e7f2e9..0b62e64e5f 100644 --- a/module/caselib/lang/fr.php +++ b/module/caselib/lang/fr.php @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Voulez vous supprimer cette library ?'; $lang->caselib->noModule = "
Vous n'avez aucun modules.
Gérer les modules maintenant.
"; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/vi.php b/module/caselib/lang/vi.php index 48202a34e2..468d4ff3d9 100644 --- a/module/caselib/lang/vi.php +++ b/module/caselib/lang/vi.php @@ -39,3 +39,6 @@ $lang->caselib->legendDesc = 'Mô tả'; $lang->caselib->libraryDelete = 'Bạn có muốn xóa thư viện này?'; $lang->caselib->noModule = '
Chưa có Module.
Quản lý ngay.
'; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/zh-cn.php b/module/caselib/lang/zh-cn.php index e54c946d4e..06c5ee8d67 100644 --- a/module/caselib/lang/zh-cn.php +++ b/module/caselib/lang/zh-cn.php @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = '描述'; $lang->caselib->libraryDelete = '您确认要删除该用例库吗?'; $lang->caselib->noModule = '
您现在还没有模块信息
请维护用例库模块
'; + +$lang->caselib->featureBar['browse']['all'] = '所有'; +$lang->caselib->featureBar['browse']['wait'] = '待评审'; diff --git a/module/caselib/model.php b/module/caselib/model.php index 977bc56463..011c9e1c01 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -220,13 +220,14 @@ class caselibModel extends model $browseType = ($browseType == 'bymodule' and $this->session->libBrowseType and $this->session->libBrowseType != 'bysearch') ? $this->session->libBrowseType : $browseType; $cases = array(); - if($browseType == 'bymodule' or $browseType == 'all' or $browseType == 'wait') + if($browseType == 'bymodule' or $browseType == 'all' or $browseType == 'wait' or $browseType == 'review') { $cases = $this->dao->select('*')->from(TABLE_CASE) ->where('lib')->eq((int)$libID) ->andWhere('product')->eq(0) ->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi() ->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi() + ->beginIF($browseType == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', `reviewers`)")->fi() ->andWhere('deleted')->eq('0') ->orderBy($sort)->page($pager)->fetchAll('id'); } diff --git a/module/caselib/view/browse.html.php b/module/caselib/view/browse.html.php index 20a7880ebc..da0d3bd499 100644 --- a/module/caselib/view/browse.html.php +++ b/module/caselib/view/browse.html.php @@ -40,10 +40,12 @@ js::set('flow', $config->global->flow);
testcase->needReview && empty($config->testcase->forceReview)) unset($lang->caselib->featureBar['browse']['wait']); + foreach($lang->caselib->featureBar['browse'] as $featureType => $label) { - echo html::a($this->inlink('browse', "libID=$libID&browseType=all"), "{$lang->testcase->allCases}", '', "id='allTab' class='btn btn-link'"); - if($config->testcase->needReview or !empty($config->testcase->forceReview)) echo html::a($this->inlink('browse', "libID=$libID&browseType=wait"), "" . $lang->testcase->statusList['wait'] . "", '', "id='waitTab' class='btn btn-link'"); + $activeClass = $browseType == $featureType ? 'btn-active-text' : ''; + echo html::a(inlink('browse', "libID=$libID&browseType=$featureType"), "$label", '',"class='btn btn-link $activeClass' data-app={$app->tab} id=" . $featureType .'Tab'); } ?> testcase->bySearch;?> diff --git a/module/ci/control.php b/module/ci/control.php index 1118fef65f..5c5ea8fdc2 100644 --- a/module/ci/control.php +++ b/module/ci/control.php @@ -149,16 +149,18 @@ class ci extends control ->fetch(); $testtask = new stdclass(); - $testtask->product = $productID; - $testtask->name = !empty($post->name) ? $post->name : sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s')); - $testtask->owner = $this->app->user->account; - $testtask->project = $lastProject->project; - $testtask->execution = $lastProject->id; - $testtask->build = 'trunk'; - $testtask->auto = strtolower($testType); - $testtask->begin = date('Y-m-d'); - $testtask->end = date('Y-m-d', time() + 24 * 3600); - $testtask->status = 'done'; + $testtask->product = $productID; + $testtask->name = !empty($post->name) ? $post->name : sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s')); + $testtask->owner = $this->app->user->account; + $testtask->project = $lastProject->project; + $testtask->execution = $lastProject->id; + $testtask->build = 'trunk'; + $testtask->auto = strtolower($testType); + $testtask->begin = date('Y-m-d'); + $testtask->end = date('Y-m-d', time() + 24 * 3600); + $testtask->status = 'done'; + $testtask->createdBy = $this->app->user->account; + $testtask->createdDate = helper::now(); $this->dao->insert(TABLE_TESTTASK)->data($testtask)->exec(); $taskID = $this->dao->lastInsertId(); diff --git a/module/common/model.php b/module/common/model.php index 4f68d398e7..b9a4def805 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -3373,6 +3373,45 @@ EOD; return $Parsedown->text($markdown); } + + /** + * Sort featureBar. + * + * @param string $module + * @param string $method + * @static + * @access public + * @return bool + */ + public static function sortFeatureMenu($module = '', $method = '') + { + global $lang, $app; + + $module = $module ? $module : $app->rawModule; + $method = $method ? $method : $app->rawMethod; + + /* It will be sorted according to the workflow in the future */ + if(!empty($lang->featureBarSort[$module][$method])) + { + $featureBar = array(); + if(empty($lang->$module->featureBar[$method])) return false; + foreach($lang->$module->featureBar[$method] as $key => $label) + { + foreach($lang->featureBarSort[$module][$method] as $currentKey => $afterKey) + { + if($key == $currentKey) continue; + $featureBar[$method][$key] = $label; + if($key == $afterKey && !empty($lang->$module->featureBar[$method][$currentKey])) + { + $featureBar[$method][$currentKey] = $lang->$module->featureBar[$method][$currentKey]; + } + } + } + $lang->$module->featureBar = $featureBar; + } + + return true; + } } class common extends commonModel diff --git a/module/convert/converter/redmine1.1.php b/module/convert/converter/redmine1.1.php index 6c2962f9b8..63b665daf5 100644 --- a/module/convert/converter/redmine1.1.php +++ b/module/convert/converter/redmine1.1.php @@ -385,7 +385,9 @@ class redmine11ConvertModel extends redmineConvertModel /* Insert into zentao */ foreach($productPlans as $id => $productPlan) { - $productPlan->product = $this->map['products'][$productPlan->execution_id]; + $productPlan->product = $this->map['products'][$productPlan->execution_id]; + $productPlan->createdBy = $this->app->user->account; + $productPlan->createdDate = helper::now(); unset($productPlan->id); unset($productPlan->execution_id); $this->dao->dbh($this->dbh)->insert(TABLE_PRODUCTPLAN)->data($productPlan)->exec(); @@ -395,7 +397,9 @@ class redmine11ConvertModel extends redmineConvertModel foreach($this->map['products'] as $productID) { $productPlan = $this->dao->dbh($this->dbh)->select("name as title, createdDate as begin")->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch(); - $productPlan->product = $productID; + $productPlan->product = $productID; + $productPlan->createdBy = $this->app->user->account; + $productPlan->createdDate = helper::now(); $this->dao->dbh($this->dbh)->insert(TABLE_PRODUCTPLAN)->data($productPlan)->exec(); $this->map['planOfProduct'][$productID] = $this->dao->lastinsertID(); } diff --git a/module/convert/model.php b/module/convert/model.php index 8ad71afe3d..152fe6578b 100644 --- a/module/convert/model.php +++ b/module/convert/model.php @@ -989,12 +989,14 @@ class convertModel extends model if(empty($data->RELEASEDATE)) continue; $release = new stdclass(); - $release->product = $build->product; - $release->build = $buildID; - $release->name = $build->name; - $release->date = $build->date; - $release->desc = $data->DESCRIPTION; - $release->status = 'normal'; + $release->product = $build->product; + $release->build = $buildID; + $release->name = $build->name; + $release->date = $build->date; + $release->desc = $data->DESCRIPTION; + $release->status = 'normal'; + $release->createdBy = $this->app->user->account; + $release->createdDate = helper::now(); $this->dao->dbh($this->dbh)->insert(TABLE_RELEASE)->data($release)->exec(); $releaseID = $this->dao->dbh($this->dbh)->lastInsertID(); diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index e2c713bd1e..e3a93dd771 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -513,6 +513,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = 'Ich bin beteiligt.'; $lang->execution->doingProject = 'Laufende Projekte'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index ee0fd4982f..37254e4b4c 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -513,6 +513,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = 'Mine'; $lang->execution->doingProject = 'Ongoing Projects'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 9915245c72..60f4d20c71 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -513,6 +513,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = "J'étais impliqué"; $lang->execution->doingProject = 'Projets en cours'; diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php index c1f02f6280..242f3d7b1a 100644 --- a/module/execution/lang/vi.php +++ b/module/execution/lang/vi.php @@ -418,6 +418,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = 'Tôi tham gia'; $lang->execution->doingProject = 'Hiện trường'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index ea81fd5260..5025ccf4de 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -513,6 +513,8 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['build']['all'] = '所有版本'; + $lang->execution->myExecutions = '我参与的'; $lang->execution->doingProject = '进行中的项目'; diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 2cca80f2ba..512b25aae3 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -48,6 +48,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
+ execution->featureBar['all'] as $key => $label):?> $label";?> {$pager->recTotal}";?> diff --git a/module/execution/view/build.html.php b/module/execution/view/build.html.php index b8287370df..3f2e90bc4b 100644 --- a/module/execution/view/build.html.php +++ b/module/execution/view/build.html.php @@ -16,14 +16,14 @@
- createLink('execution', 'story', "executionID=$execution->id&orderBy=order_desc&type=all"), "{$lang->all}" . ($type == 'all' ? " {$pager->recTotal}" : ''), '', "class='btn btn-link" . ($type == 'all' ? " btn-active-text" : '') . "'"); - echo html::a($this->createLink('execution', 'story', "executionID=$execution->id&orderBy=order_desc&type=unclosed"), "{$lang->story->unclosed}" . ($type == 'unclosed' ? " {$pager->recTotal}" : ''), '', "class='btn btn-link" . ($type == 'unclosed' ? " btn-active-text" : '') . "'"); - } - ?> + story->featureBar['browse'] as $featureType => $label):?> + + $label";?> + {$pager->recTotal}";?> + id&orderBy=order_desc&type=$featureType"), $label, '', "class='btn btn-link $active'");?> + product->searchStory;?>
diff --git a/module/execution/view/task.html.php b/module/execution/view/task.html.php index aaca5d0609..6b722f4ed8 100644 --- a/module/execution/view/task.html.php +++ b/module/execution/view/task.html.php @@ -59,6 +59,7 @@ body {margin-bottom: 25px;}
type == 'ops' && $menuItem->name == 'needconfirm') continue; diff --git a/module/product/model.php b/module/product/model.php index 1986d788de..bda572234c 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -272,7 +272,7 @@ class productModel extends model ->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->products)->fi() ->andWhere('t1.vision')->eq($this->config->vision)->fi() ->beginIF($status == 'noclosed')->andWhere('t1.status')->ne('closed')->fi() - ->beginIF($status != 'all' and $status != 'noclosed' and $status != 'involved')->andWhere('t1.status')->in($status)->fi() + ->beginIF(!in_array($status, array('all', 'noclosed', 'involved', 'review'), true))->andWhere('t1.status')->in($status)->fi() ->beginIF($status == 'involved') ->andWhere('t1.PO', true)->eq($this->app->user->account) ->orWhere('t1.QD')->eq($this->app->user->account) @@ -280,6 +280,10 @@ class productModel extends model ->orWhere('t1.createdBy')->eq($this->app->user->account) ->markRight(1) ->fi() + ->beginIF($status == 'review') + ->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)") + ->andWhere('t1.reviewStatus')->eq('doing') + ->fi() ->orderBy('t2.order_asc, t1.line_desc, t1.order_asc') ->beginIF($limit > 0)->limit($limit)->fi() ->fetchAll('id'); diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 0ac5a3c677..9b7c2c1119 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -13,6 +13,7 @@