diff --git a/db/update18.1.sql b/db/update18.1.sql new file mode 100644 index 0000000000..58c3759859 --- /dev/null +++ b/db/update18.1.sql @@ -0,0 +1 @@ +DELETE FROM `zt_config` WHERE module = 'datatable' AND section = 'executionAll'; diff --git a/db/zentaopms284.sql b/db/zentaopms284.sql index 91fe06b398..c9978a3866 100644 --- a/db/zentaopms284.sql +++ b/db/zentaopms284.sql @@ -4,3 +4,5 @@ REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, ` REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, `vision`) SELECT `lang`, `module`, 'agileplusClassify', `key`, `value`, `system`, `vision` FROM `zt_lang` WHERE `module` = 'process' and `section` = 'classify' ORDER BY id ASC; UPDATE `zt_project` AS parent INNER JOIN (select `id`,`parent`,`attribute` from `zt_project` where `parent` != 0 and `type` = 'stage') AS child ON parent.`id` = child.`parent` SET parent.`attribute`='mix' where parent.`grade`=1 and parent.`type`='stage' and parent.`attribute` != child.`attribute`; + +REPLACE INTO `zt_grouppriv` (SELECT `group`,`module`,'batchChangeStatus' FROM `zt_grouppriv` WHERE `module` = 'execution' AND `method` = 'batchEdit'); diff --git a/extension/lite/custom/ext/lang/de/lite.php b/extension/lite/custom/ext/lang/de/lite.php index 5d0451d9c9..f30d921aba 100644 --- a/extension/lite/custom/ext/lang/de/lite.php +++ b/extension/lite/custom/ext/lang/de/lite.php @@ -1,9 +1,9 @@ custom->execution = 'Kanban'; -$lang->custom->closedExecution = 'Closed ' . $lang->custom->execution; +$lang->custom->executionCommon = 'Kanban'; +$lang->custom->closedExecution = 'Closed ' . $lang->custom->executionCommon; $lang->custom->notice->readOnlyOfExecution = "If Change Forbidden, any change on tasks, builds, efforts and stories of the closed {$lang->executionCommon} is also forbidden."; -$lang->custom->moduleName['execution'] = $lang->custom->execution; +$lang->custom->moduleName['execution'] = $lang->custom->executionCommon; $lang->custom->task = new stdClass(); $lang->custom->task->fields['required'] = $lang->custom->required; diff --git a/extension/lite/custom/ext/lang/en/lite.php b/extension/lite/custom/ext/lang/en/lite.php index 5d0451d9c9..f30d921aba 100644 --- a/extension/lite/custom/ext/lang/en/lite.php +++ b/extension/lite/custom/ext/lang/en/lite.php @@ -1,9 +1,9 @@ custom->execution = 'Kanban'; -$lang->custom->closedExecution = 'Closed ' . $lang->custom->execution; +$lang->custom->executionCommon = 'Kanban'; +$lang->custom->closedExecution = 'Closed ' . $lang->custom->executionCommon; $lang->custom->notice->readOnlyOfExecution = "If Change Forbidden, any change on tasks, builds, efforts and stories of the closed {$lang->executionCommon} is also forbidden."; -$lang->custom->moduleName['execution'] = $lang->custom->execution; +$lang->custom->moduleName['execution'] = $lang->custom->executionCommon; $lang->custom->task = new stdClass(); $lang->custom->task->fields['required'] = $lang->custom->required; diff --git a/extension/lite/custom/ext/lang/fr/lite.php b/extension/lite/custom/ext/lang/fr/lite.php index 5d0451d9c9..f30d921aba 100644 --- a/extension/lite/custom/ext/lang/fr/lite.php +++ b/extension/lite/custom/ext/lang/fr/lite.php @@ -1,9 +1,9 @@ custom->execution = 'Kanban'; -$lang->custom->closedExecution = 'Closed ' . $lang->custom->execution; +$lang->custom->executionCommon = 'Kanban'; +$lang->custom->closedExecution = 'Closed ' . $lang->custom->executionCommon; $lang->custom->notice->readOnlyOfExecution = "If Change Forbidden, any change on tasks, builds, efforts and stories of the closed {$lang->executionCommon} is also forbidden."; -$lang->custom->moduleName['execution'] = $lang->custom->execution; +$lang->custom->moduleName['execution'] = $lang->custom->executionCommon; $lang->custom->task = new stdClass(); $lang->custom->task->fields['required'] = $lang->custom->required; diff --git a/extension/lite/custom/ext/lang/zh-cn/lite.php b/extension/lite/custom/ext/lang/zh-cn/lite.php index 5e687e8001..f5db97c8b8 100644 --- a/extension/lite/custom/ext/lang/zh-cn/lite.php +++ b/extension/lite/custom/ext/lang/zh-cn/lite.php @@ -1,9 +1,9 @@ custom->execution = '看板'; -$lang->custom->closedExecution = '已关闭' . $lang->custom->execution; -$lang->custom->notice->readOnlyOfExecution = "禁止修改后,已关闭{$lang->custom->execution}下的任务、日志以及关联目标都禁止修改。"; +$lang->custom->executionCommon = '看板'; +$lang->custom->closedExecution = '已关闭' . $lang->custom->executionCommon; +$lang->custom->notice->readOnlyOfExecution = "禁止修改后,已关闭{$lang->custom->executionCommon}下的任务、日志以及关联目标都禁止修改。"; -$lang->custom->moduleName['execution'] = $lang->custom->execution; +$lang->custom->moduleName['execution'] = $lang->custom->executionCommon; $lang->custom->task = new stdClass(); $lang->custom->task->fields['required'] = $lang->custom->required; diff --git a/module/admin/config.php b/module/admin/config.php index a90737592c..6739ff17f1 100755 --- a/module/admin/config.php +++ b/module/admin/config.php @@ -21,7 +21,7 @@ $config->admin->menuGroup['convert'] = array('convert'); $config->admin->menuModuleGroup['model']['custom|set'] = array('project', 'issue', 'risk', 'opportunity', 'nc'); $config->admin->menuModuleGroup['model']['custom|required'] = array('project', 'build'); $config->admin->menuModuleGroup['feature']['custom|set'] = array('todo', 'block', 'story', 'task', 'bug', 'testcase', 'testtask', 'feedback', 'user', 'ticket'); -$config->admin->menuModuleGroup['feature']['custom|required'] = array('bug', 'doc', 'product', 'story', 'productplan', 'release', 'task', 'testcase', 'testsuite', 'testtask', 'testreport', 'caselib', 'doc', 'feedback', 'user'); +$config->admin->menuModuleGroup['feature']['custom|required'] = array('bug', 'doc', 'product', 'story', 'productplan', 'release', 'task', 'testcase', 'testsuite', 'testtask', 'testreport', 'caselib', 'doc', 'feedback', 'user', 'execution'); $config->admin->menuModuleGroup['template']['custom|set'] = array('baseline'); if($config->vision == 'lite') { diff --git a/module/admin/lang/menu.php b/module/admin/lang/menu.php index 5a3e04a771..52175bb54a 100644 --- a/module/admin/lang/menu.php +++ b/module/admin/lang/menu.php @@ -98,7 +98,7 @@ $lang->admin->menuList->model['tabMenu']['menuOrder']['waterfall']['5'] = 'stage $lang->admin->menuList->feature['subMenu']['my'] = array('link' => "{$lang->my->common}|custom|set|module=todo&field=priList", 'exclude' => 'set,required'); $lang->admin->menuList->feature['subMenu']['product'] = array('link' => "{$lang->productCommon}|custom|required|module=product", 'exclude' => 'set,required', 'alias' => 'browsestoryconcept,product'); -$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|"); +$lang->admin->menuList->feature['subMenu']['execution'] = array('link' => "{$lang->execution->common}|custom|required|module=execution", 'exclude' => 'required,set', 'alias' => 'execution'); $lang->admin->menuList->feature['subMenu']['qa'] = array('link' => "{$lang->qa->common}|custom|required|module=bug", 'exclude' => 'set,required'); $lang->admin->menuList->feature['subMenu']['kanban'] = array('link' => "{$lang->kanban->common}|custom|kanban|"); $lang->admin->menuList->feature['subMenu']['doc'] = array('link' => "{$lang->doc->common}|custom|required|module=doc", 'exclude' => 'required'); @@ -112,8 +112,8 @@ $lang->admin->menuList->feature['tabMenu']['product']['story'] = array('li $lang->admin->menuList->feature['tabMenu']['product']['productplan'] = array('link' => "{$lang->productplan->shortCommon}|custom|required|module=productplan", 'exclude' => 'custom-required'); $lang->admin->menuList->feature['tabMenu']['product']['release'] = array('link' => "{$lang->release->common}|custom|required|module=release", 'exclude' => 'custom-required'); -$lang->admin->menuList->feature['tabMenu']['execution']['execution'] = array('link' => "{$lang->execution->common}|custom|execution|"); -$lang->admin->menuList->feature['tabMenu']['execution']['task'] = array('link' => "{$lang->task->common}|custom|required|module=task", 'links' => array('custom|set|module=task&field=priList')); +$lang->admin->menuList->feature['tabMenu']['execution']['execution'] = array('link' => "{$lang->execution->common}|custom|required|module=execution", 'links' => array("custom|execution|"), 'alias' => 'execution', 'exclude' => 'custom-required'); +$lang->admin->menuList->feature['tabMenu']['execution']['task'] = array('link' => "{$lang->task->common}|custom|required|module=task", 'links' => array('custom|set|module=task&field=priList'), 'exclude' => 'custom-required'); $lang->admin->menuList->feature['tabMenu']['qa']['bug'] = array('link' => "{$lang->bug->common}|custom|required|module=bug", 'links' => array("custom|set|module=bug&field=priList"), 'exclude' => 'custom-required,custom-set'); $lang->admin->menuList->feature['tabMenu']['qa']['testcase'] = array('link' => "{$lang->testcase->common}|custom|required|module=testcase", 'links' => array("custom|set|module=testcase&field=priList"), 'exclude' => 'custom-required,custom-set'); diff --git a/module/admin/model.php b/module/admin/model.php index 9c8585eebf..b06e55e5ce 100755 --- a/module/admin/model.php +++ b/module/admin/model.php @@ -402,7 +402,7 @@ class adminModel extends model foreach($orders as $index => $menuKey) { $menuList->$menuKey = $this->lang->admin->menuList->$menuKey; - $menuList->$menuKey['order'] = $index; + $menuList->{$menuKey}['order'] = $index; } $this->lang->admin->menuList = $menuList; diff --git a/module/company/control.php b/module/company/control.php index ee554b926c..b978bff34f 100755 --- a/module/company/control.php +++ b/module/company/control.php @@ -222,11 +222,11 @@ class company extends control $this->view->projects = array($this->lang->company->project) + $projects;; /* Get executions' list.*/ - $executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode|multiple'); - $executionsList = $this->execution->getByIdList(array_keys($executions)); - foreach($executionsList as $executionID => $execution) + $executions = $this->loadModel('execution')->getPairs(0, 'all', 'nocode|multiple'); + $executionList = $this->execution->getByIdList(array_keys($executions)); + foreach($executionList as $executionID => $execution) { - if(isset($projects[$execution->project])) $executions[$execution->id] = $projects[$execution->project] . '/' . $executions[$execution->id]; + if(isset($projects[$execution->project])) $executions[$execution->id] = $projects[$execution->project] . $executions[$execution->id]; } $executions = array($this->lang->execution->common) + $executions; diff --git a/module/custom/config.php b/module/custom/config.php index 5e1fc06856..d13809c919 100644 --- a/module/custom/config.php +++ b/module/custom/config.php @@ -71,4 +71,4 @@ $config->custom->fieldList['doc'] = 'keywords,content'; $config->custom->fieldList['user']['create'] = 'dept,role,email,commiter'; $config->custom->fieldList['user']['edit'] = 'dept,role,email,commiter,skype,qq,mobile,phone,address,zipcode,dingding,slack,whatsapp,weixin'; -$config->custom->notSetMethods = array('required', 'browsestoryconcept', 'product', 'role'); +$config->custom->notSetMethods = array('required', 'browsestoryconcept', 'product', 'role', 'execution'); diff --git a/module/custom/control.php b/module/custom/control.php index 58e1d34591..1a1f8e835b 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -546,9 +546,8 @@ class custom extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } - $this->view->title = $this->lang->custom->execution; - $this->view->position[] = $this->lang->custom->common; - $this->view->position[] = $this->view->title; + $this->view->title = $this->lang->custom->executionCommon; + $this->view->module = 'execution'; $this->display(); } diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index c50057573e..a60abfa439 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -55,7 +55,7 @@ $lang->custom->role = 'Role'; $lang->custom->dept = 'Dept'; $lang->custom->code = $lang->code; $lang->custom->setCode = 'Enable or Disable Code'; -$lang->custom->execution = 'Execution'; +$lang->custom->executionCommon = 'Execution'; $lang->custom->selectDefaultProgram = 'Please select default program'; $lang->custom->defaultProgram = 'Default program'; $lang->custom->modeManagement = 'Mode Management'; @@ -98,6 +98,10 @@ $lang->custom->project->defaultCurrency = 'Default Currency'; $lang->custom->project->fields['required'] = $lang->custom->required; $lang->custom->project->fields['unitList'] = 'Unit List'; +$lang->custom->execution = new stdClass(); +$lang->custom->execution->fields['required'] = $lang->custom->required; +$lang->custom->execution->fields['execution'] = 'Close Setting'; + $lang->custom->product = new stdClass(); $lang->custom->product->fields['required'] = $lang->custom->required; $lang->custom->product->fields['browsestoryconcept'] = 'Story Concpet'; @@ -289,7 +293,7 @@ $lang->custom->CRKanban[0] = 'Change Forbidden'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Plan'; -$lang->custom->moduleName['execution'] = $lang->custom->execution; +$lang->custom->moduleName['execution'] = $lang->custom->executionCommon; $lang->custom->conceptQuestions['overview'] = "Which combination of management fits your company?"; $lang->custom->conceptQuestions['URAndSR'] = "Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?"; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index b650794ae8..8c29df5c94 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -55,7 +55,7 @@ $lang->custom->role = 'Role'; $lang->custom->dept = 'Dept'; $lang->custom->code = $lang->code; $lang->custom->setCode = 'Enable or Disable Code'; -$lang->custom->execution = 'Execution'; +$lang->custom->executionCommon = 'Execution'; $lang->custom->selectDefaultProgram = 'Please select default program'; $lang->custom->defaultProgram = 'Default program'; $lang->custom->modeManagement = 'Mode Management'; @@ -98,6 +98,10 @@ $lang->custom->project->defaultCurrency = 'Default Currency'; $lang->custom->project->fields['required'] = $lang->custom->required; $lang->custom->project->fields['unitList'] = 'Unit List'; +$lang->custom->execution = new stdClass(); +$lang->custom->execution->fields['required'] = $lang->custom->required; +$lang->custom->execution->fields['execution'] = 'Close Setting'; + $lang->custom->product = new stdClass(); $lang->custom->product->fields['required'] = $lang->custom->required; $lang->custom->product->fields['browsestoryconcept'] = 'Story Concpet'; @@ -289,7 +293,7 @@ $lang->custom->CRKanban[0] = 'Change Forbidden'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Plan'; -$lang->custom->moduleName['execution'] = $lang->custom->execution; +$lang->custom->moduleName['execution'] = $lang->custom->executionCommon; $lang->custom->conceptQuestions['overview'] = "Which combination of management fits your company?"; $lang->custom->conceptQuestions['URAndSR'] = "Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?"; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 6b6be4b13d..609cad69a4 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -55,7 +55,7 @@ $lang->custom->role = 'Role'; $lang->custom->dept = 'Dept'; $lang->custom->code = $lang->code; $lang->custom->setCode = 'Activer ou Désactiver le Code'; -$lang->custom->execution = 'Execution'; +$lang->custom->executionCommon = 'Execution'; $lang->custom->selectDefaultProgram = 'Please select default program'; $lang->custom->defaultProgram = 'Default program'; $lang->custom->modeManagement = 'Mode Management'; @@ -98,6 +98,10 @@ $lang->custom->project->defaultCurrency = 'Default Currency'; $lang->custom->project->fields['required'] = $lang->custom->required; $lang->custom->project->fields['unitList'] = 'Unit List'; +$lang->custom->execution = new stdClass(); +$lang->custom->execution->fields['required'] = $lang->custom->required; +$lang->custom->execution->fields['execution'] = 'Close Setting'; + $lang->custom->product = new stdClass(); $lang->custom->product->fields['required'] = $lang->custom->required; $lang->custom->product->fields['browsestoryconcept'] = 'Story Concpet'; @@ -289,7 +293,7 @@ $lang->custom->CRKanban[0] = 'Change Forbidden'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Plan'; -$lang->custom->moduleName['execution'] = $lang->custom->execution; +$lang->custom->moduleName['execution'] = $lang->custom->executionCommon; $lang->custom->conceptQuestions['overview'] = "Quelle combinaison de gestion convient le mieux à votre entreprise ?"; $lang->custom->conceptQuestions['URAndSR'] = "Do you want to use the concept of {$lang->URCommon} and {$lang->SRCommon} in ZenTao?"; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 8571ef1a50..ae60c824fb 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -55,7 +55,7 @@ $lang->custom->role = '职位'; $lang->custom->dept = '部门'; $lang->custom->code = $lang->code; $lang->custom->setCode = '是否启用代号'; -$lang->custom->execution = '执行'; +$lang->custom->executionCommon = '执行'; $lang->custom->selectDefaultProgram = '请选择一个默认项目集'; $lang->custom->defaultProgram = '默认项目集'; $lang->custom->modeManagement = '模式管理'; @@ -85,7 +85,7 @@ $lang->custom->saveTips = '点击保存后,则以当前%s为默认 $lang->custom->numberError = '区间必须大于零'; -$lang->custom->closedExecution = '已关闭' . $lang->custom->execution; +$lang->custom->closedExecution = '已关闭' . $lang->custom->executionCommon; $lang->custom->closedKanban = '已关闭' . $lang->custom->kanban; $lang->custom->closedProduct = '已关闭' . $lang->productCommon; @@ -98,6 +98,10 @@ $lang->custom->project->defaultCurrency = '默认货币'; $lang->custom->project->fields['required'] = $lang->custom->required; $lang->custom->project->fields['unitList'] = '预算单位'; +$lang->custom->execution = new stdClass(); +$lang->custom->execution->fields['required'] = $lang->custom->required; +$lang->custom->execution->fields['execution'] = '关闭设置'; + $lang->custom->product = new stdClass(); $lang->custom->product->fields['required'] = $lang->custom->required; $lang->custom->product->fields['browsestoryconcept'] = '需求概念'; @@ -185,7 +189,7 @@ $lang->custom->notice->required = '页面提交时,选中的字段 $lang->custom->notice->conceptResult = '我们已经根据您的选择为您设置了 %s-%s 模式,使用%s + %s。'; $lang->custom->notice->conceptPath = '您可以在:后台 -> 自定义 -> 流程页面修改。'; $lang->custom->notice->readOnlyOfProduct = '禁止修改后,已关闭' . $lang->productCommon . '下的' . $lang->SRCommon . '、Bug、用例、日志、发布、计划都禁止修改。'; -$lang->custom->notice->readOnlyOfExecution = "禁止修改后,已关闭{$lang->custom->execution}下的任务、版本、日志以及关联需求都禁止修改。"; +$lang->custom->notice->readOnlyOfExecution = "禁止修改后,已关闭{$lang->custom->executionCommon}下的任务、版本、日志以及关联需求都禁止修改。"; $lang->custom->notice->readOnlyOfKanban = "禁止修改后,已关闭{$lang->custom->kanban}下的卡片以及相关设置都禁止修改。"; $lang->custom->notice->URSREmpty = '自定义需求名称不能为空!'; $lang->custom->notice->valueEmpty = '值不能为空!'; @@ -289,7 +293,7 @@ $lang->custom->CRKanban[0] = '禁止修改'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = '计划'; -$lang->custom->moduleName['execution'] = $lang->custom->execution; +$lang->custom->moduleName['execution'] = $lang->custom->executionCommon; $lang->custom->conceptQuestions['overview'] = "下述哪种组合方式更适合您公司的管理现状?"; $lang->custom->conceptQuestions['URAndSR'] = "是否启用{$lang->URCommon}和{$lang->SRCommon}概念?"; diff --git a/module/custom/view/execution.html.php b/module/custom/view/execution.html.php index a7a95c9179..fb4908c478 100644 --- a/module/custom/view/execution.html.php +++ b/module/custom/view/execution.html.php @@ -10,38 +10,41 @@ */ ?> getModuleRoot() . 'common/view/header.html.php';?> -
-
-
-
- custom->product->fields['product'];?> +
+ vision == 'rnd') include 'sidebar.html.php';?> +
+ +
+
+ custom->product->fields['product'];?> +
-
- - - - - - - - - - - - - - -
custom->closedExecution;?> - CRExecution) ? $config->CRExecution : 0;?> - custom->CRExecution as $key => $value):?> - - -
-  custom->notice->readOnlyOfExecution;?> -
- -
- + + + + + + + + + + + + + + +
custom->closedExecution;?> + CRExecution) ? $config->CRExecution : 0;?> + custom->CRExecution as $key => $value):?> + + +
+  custom->notice->readOnlyOfExecution;?> +
+ +
+ +
diff --git a/module/execution/view/batchedit.html.php b/module/execution/view/batchedit.html.php index ff8f7af6b4..5b95828e0f 100755 --- a/module/execution/view/batchedit.html.php +++ b/module/execution/view/batchedit.html.php @@ -41,7 +41,6 @@ $PM = $from == 'execution' ? 'execPM' : 'PM'; $type = $from == 'execution' ? 'execType' : 'type'; $desc = $from == 'execution' ? 'execDesc' : 'desc'; - $status = $from == 'execution' ? 'execStatus' : 'status'; ?>
'>
@@ -64,7 +63,6 @@ '>execution->QD;?> '>execution->RD;?> '>execution->$type;?> - '>execution->$status;?> execution->begin;?> execution->end;?> '>execution->$desc;?> @@ -92,7 +90,7 @@ tab == 'project' and isset($project) and ($project->model == 'agileplus' or $project->model == 'waterfallplus')):?> execution->typeList, $executions[$executionID]->type);?> - name, "class='form-control'");?> + name, "class='form-control' id='names{$executionID}'");?> setCode) or $config->setCode == 1):?> code, "id='codes{$executionID}' class='form-control'");?> @@ -107,7 +105,6 @@ execution->lifeTimeList, $executions[$executionID]->lifetime, 'class=form-control');?> - '>execution->statusList, $executions[$executionID]->status, 'class=form-control');?> begin, "id='begins{$executionID}' class='form-control form-date' onchange='computeWorkDays(this.id)'");?> end, "id='ends{$executionID}' class='form-control form-date' onchange='computeWorkDays(this.id)'");?> '>desc, "rows='1' class='form-control autosize'");?> diff --git a/module/file/model.php b/module/file/model.php index 73cc168963..a11d334653 100755 --- a/module/file/model.php +++ b/module/file/model.php @@ -1172,13 +1172,16 @@ class fileModel extends model /** * Process file info for object. * - * @param string $objectType - * @param object $oldObject - * @param object $newObject + * @param string $objectType + * @param object $oldObject + * @param object $newObject + * @param string $extra + * @param string $filesName + * @param string $labelsName * @access public * @return void */ - public function processFile4Object($objectType, $oldObject, $newObject) + public function processFile4Object($objectType, $oldObject, $newObject, $extra = '', $filesName = 'files', $labelsName = 'labels') { $oldFiles = empty($oldObject->files) ? '' : join(',', array_keys($oldObject->files)); $deleteFiles = $newObject->deleteFiles; @@ -1193,7 +1196,7 @@ class fileModel extends model } $this->updateObjectID($this->post->uid, $oldObject->id, $objectType); - $addedFiles = $this->saveUpload($objectType, $oldObject->id); + $addedFiles = $this->saveUpload($objectType, $oldObject->id, $extra, $filesName, $labelsName); $addedFiles = empty($addedFiles) ? '' : ',' . join(',', array_keys($addedFiles)); $newObject->files = trim($oldFiles . $addedFiles, ','); diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 282a72fb0d..ac6c5c578b 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -802,6 +802,7 @@ $lang->resource->execution->browse = 'browse'; $lang->resource->execution->create = 'createExec'; $lang->resource->execution->edit = 'editAction'; $lang->resource->execution->batchedit = 'batchEditAction'; +$lang->resource->execution->batchchangestatus = 'batchChangeStatus'; $lang->resource->execution->start = 'startAction'; $lang->resource->execution->activate = 'activateAction'; $lang->resource->execution->putoff = 'delayAction'; @@ -860,6 +861,7 @@ $lang->execution->methodOrder[10] = 'browse'; $lang->execution->methodOrder[15] = 'create'; $lang->execution->methodOrder[20] = 'edit'; $lang->execution->methodOrder[25] = 'batchedit'; +$lang->execution->methodOrder[27] = 'batchchangestatus'; $lang->execution->methodOrder[30] = 'start'; $lang->execution->methodOrder[35] = 'activate'; $lang->execution->methodOrder[40] = 'putoff'; @@ -1425,7 +1427,7 @@ $lang->resource->custom = new stdclass(); $lang->resource->custom->index = 'index'; $lang->resource->custom->set = 'set'; $lang->resource->custom->product = 'productName'; -$lang->resource->custom->execution = 'execution'; +$lang->resource->custom->execution = 'executionCommon'; $lang->resource->custom->required = 'required'; $lang->resource->custom->restore = 'restore'; $lang->resource->custom->flow = 'flow'; diff --git a/module/product/model.php b/module/product/model.php index cad0c55a83..f8108bc37a 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -1144,7 +1144,8 @@ class productModel extends model $this->config->product->search['queryID'] = $queryID; $this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs($productIdList, (empty($branchParam) or $branchParam == 'all') ? '' : $branchParam); - $product = ($this->app->tab == 'project' and empty($productID)) ? $products : array($productID => $products[$productID]); + $product = ($this->app->tab == 'project' and empty($productID)) ? $products : array(); + if(empty($product) and isset($products[$productID])) $product = array($productID => $products[$productID]); $this->config->product->search['params']['product']['values'] = $product + array('all' => $this->lang->product->allProduct); diff --git a/module/programplan/model.php b/module/programplan/model.php index 15d82b1d11..746d1b9cd5 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -1616,4 +1616,64 @@ class programplanModel extends model $this->updateSubStageAttr($childID, $attribute, $withDeleted); } } + + /** + * Get plan and its children. + * + * @param string|int|array $planIdList + * @access public + * @return array + */ + public function getSelfAndChildrenList($planIdList) + { + if(is_numeric($planIdList)) $planIdList = (array)$planIdList; + + $planList = $this->dao->select('t2.*')->from(TABLE_EXECUTION)->alias('t1') + ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('FIND_IN_SET(t1.id,t2.`path`)') + ->where('t1.id')->in($planIdList) + ->andWhere('t2.deleted')->eq(0) + ->fetchAll('id'); + + $selfAndChildrenList = array(); + foreach($planIdList as $planID) + { + if(!isset($selfAndChildrenList[$planID])) $selfAndChildrenList[$planID] = array(); + foreach($planList as $plan) + { + if(strpos($plan->path, ",$planID,") !== false) $selfAndChildrenList[$planID][$plan->id] = $plan; + } + } + + return $selfAndChildrenList; + } + + /** + * Get plan's siblings. + * + * @param string|int|array $planIdList + * @access public + * @return array + */ + public function getSiblings($planIdList) + { + if(is_numeric($planIdList)) $planIdList = (array)$planIdList; + + $siblingsList = $this->dao->select('t1.*')->from(TABLE_EXECUTION)->alias('t1') + ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.parent=t2.parent') + ->where('t2.id')->in($planIdList) + ->andWhere('t1.deleted')->eq(0) + ->fetchAll('id'); + + $siblingStages = array(); + foreach($planIdList as $planID) + { + if(!isset($siblingStages[$planID])) $siblingStages[$planID] = array(); + foreach($siblingsList as $sibling) + { + if($siblingsList[$planID]->parent == $sibling->parent) $siblingStages[$planID][$sibling->id] = $sibling; + } + } + + return $siblingStages; + } } diff --git a/module/project/control.php b/module/project/control.php index 089447b42f..06fa156006 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -1103,19 +1103,30 @@ class project extends control if(!empty($execution->tasks) or !empty($execution->children)) $showToggleIcon = true; } - $this->view->executionStats = $executionStats; - $this->view->showToggleIcon = $showToggleIcon; - $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID, 'all', '', false); - $this->view->productID = $productID; - $this->view->product = $this->product->getByID($productID); - $this->view->projectID = $projectID; - $this->view->project = $project; - $this->view->projects = $projects; - $this->view->pager = $pager; - $this->view->orderBy = $orderBy; - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->status = $status; - $this->view->isStage = (isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false; + $changeStatusHtml = "
"; + $changeStatusHtml .= ""; + $changeStatusHtml .= "
"; + + $this->view->executionStats = $executionStats; + $this->view->showToggleIcon = $showToggleIcon; + $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID, 'all', '', false); + $this->view->productID = $productID; + $this->view->product = $this->product->getByID($productID); + $this->view->projectID = $projectID; + $this->view->project = $project; + $this->view->projects = $projects; + $this->view->pager = $pager; + $this->view->orderBy = $orderBy; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->status = $status; + $this->view->isStage = (isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false; + $this->view->changeStatusHtml = common::hasPriv('execution', 'batchChangeStatus') ? $changeStatusHtml : ''; $this->display(); } diff --git a/module/project/js/execution.js b/module/project/js/execution.js index 49a94fd3f4..0f8faf74d9 100644 --- a/module/project/js/execution.js +++ b/module/project/js/execution.js @@ -229,7 +229,7 @@ function showEditCheckbox(show) if(show) { $('.table-nest-title').prepend("
").addClass('table-nest-title-edit'); - var tableFooter = "
"; + var tableFooter = "
" + changeStatusHtml + "
"; $('#executionForm').attr('action', createLink('execution', 'batchEdit')); $('.table-footer').prepend(tableFooter).show(); $('body').scroll(); @@ -242,3 +242,24 @@ function showEditCheckbox(show) $('#executionForm').removeAttr('action'); } } + +/** + * Set the color of the badge to white. + * + * @param object obj + * @param bool isShow + * @access public + * @return void + */ +function setBadgeStyle(obj, isShow) +{ + var $label = $(obj); + if(isShow == true) + { + $label.find('.label-badge').css({"color":"#fff", "border-color":"#fff"}); + } + else + { + $label.find('.label-badge').css({"color":"#838a9d", "border-color":"#838a9d"}); + } +} diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 9485fb7828..c1eff7b9e3 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -13,6 +13,7 @@ execution->pageExecSummary);?> execution->executionSummary);?> execution->checkedExecutions);?> +