diff --git a/Makefile b/Makefile index cc8fefd074..0023128b24 100644 --- a/Makefile +++ b/Makefile @@ -153,6 +153,9 @@ zentaoxx: sed -i "s/'..\/..\/common\/view\/header.html.php'/\$$app->getModuleRoot() . 'common\/view\/header.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php sed -i "s/'..\/..\/common\/view\/footer.html.php'/\$$app->getModuleRoot() . 'common\/view\/footer.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php sed -i "s/\$$this->im->userGetChangedPassword()/array()/" zentaoxx/extension/xuan/im/control.php + sed -i "/.*->getAllDepts();/d" zentaoxx/extension/xuan/im/ext/bot/default.bot.php + sed -i "s/lang->user->status/lang->user->clientStatus/" zentaoxx/extension/xuan/im/ext/bot/default.bot.php + sed -i "s/.*->getRoleList();/"s/.*->getRoleList();/\$$depts = \$$this->im->loadModel('dept')->getDeptPairs();\n\$$deptList = array_map(function(\$$k, \$$v) {return (object)array('id' => \$$k, 'name' => \$$v);}, array_keys(\$$depts), \$$depts);\n\$$roleList = \$$this->im->lang->user->roleList;/"/" zentaoxx/extension/xuan/im/ext/bot/default.bot.php echo "ALTER TABLE \`zt_user\` ADD \`pinyin\` varchar(255) NOT NULL DEFAULT '' AFTER \`realname\`;" >> zentaoxx/db/xuanxuan.sql mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php cp tools/en2other.php zentaoxx/tools; cd zentaoxx/tools; php en2other.php ../ diff --git a/module/misc/lang/de.php b/module/misc/lang/de.php index 9d4b533cdb..3ad332de0f 100644 --- a/module/misc/lang/de.php +++ b/module/misc/lang/de.php @@ -194,7 +194,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; -$lang->misc->feature->all['18.0.beta2'][] = array('title' => "We have optimized the product with multi-branches/multi-platforms. It's supported to create siblings stories. It's possible for Plan, Build, and Release to link requirements or bugs beyond their parent branch. 5 BI big screens are newly added. ZenTao Client has implemented the robot chatting mechanism.", 'desc' => ''); +$lang->misc->feature->all['18.0.beta2'][] = array('title' => "We have optimized the product with multi-branches/multi-platforms. It's supported to create siblings stories. It's possible for Plan, Build, and Release to link requirements or bugs beyond their parent branch. ZenTao Client has implemented the robot chatting mechanism.", 'desc' => ''); $lang->misc->feature->all['18.0.beta1'][] = array('title' => "Multiple core processes in ZenTao are improved: A project without any product linked in is able to be created, as well as creating projects without sprints/iterations linked in; projects are able to link products beyond the father program; switch easily between ZenTao Lite mode and Full Lifecycle Management mode.", 'desc' => ''); $lang->misc->feature->all['17.8'][] = array('title' => "We have optimized the color of status in lists, as well as the dashboard color. At the same time, the page of the task effort has been improved.", 'desc' => ''); $lang->misc->feature->all['17.7'][] = array('title' => "The table is optimized in the transition version. At the same time, we have added the new feature of Work Order and get the Feedback features improved as well. Fix bugs.", 'desc' => ''); diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php index e8fddaf594..e672429a77 100644 --- a/module/misc/lang/en.php +++ b/module/misc/lang/en.php @@ -194,7 +194,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; -$lang->misc->feature->all['18.0.beta2'][] = array('title' => "We have optimized the product with multi-branches/multi-platforms. It's supported to create siblings stories. It's possible for Plan, Build, and Release to link requirements or bugs beyond their parent branch. 5 BI big screens are newly added. ZenTao Client has implemented the robot chatting mechanism.", 'desc' => ''); +$lang->misc->feature->all['18.0.beta2'][] = array('title' => "We have optimized the product with multi-branches/multi-platforms. It's supported to create siblings stories. It's possible for Plan, Build, and Release to link requirements or bugs beyond their parent branch. ZenTao Client has implemented the robot chatting mechanism.", 'desc' => ''); $lang->misc->feature->all['18.0.beta1'][] = array('title' => "Multiple core processes in ZenTao are improved: A project without any product linked in is able to be created, as well as creating projects without sprints/iterations linked in; projects are able to link products beyond the father program; switch easily between ZenTao Lite mode and Full Lifecycle Management mode.", 'desc' => ''); $lang->misc->feature->all['17.8'][] = array('title' => "We have optimized the color of status in lists, as well as the dashboard color. At the same time, the page of the task effort has been improved.", 'desc' => ''); $lang->misc->feature->all['17.7'][] = array('title' => "The table is optimized in the transition version. At the same time, we have added the new feature of Work Order and get the Feedback features improved as well. Fix bugs.", 'desc' => ''); diff --git a/module/misc/lang/fr.php b/module/misc/lang/fr.php index 35a3d8c558..b26fc968c7 100644 --- a/module/misc/lang/fr.php +++ b/module/misc/lang/fr.php @@ -194,7 +194,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; -$lang->misc->feature->all['18.0.beta2'][] = array('title' => "We have optimized the product with multi-branches/multi-platforms. It's supported to create siblings stories. It's possible for Plan, Build, and Release to link requirements or bugs beyond their parent branch. 5 BI big screens are newly added. ZenTao Client has implemented the robot chatting mechanism.", 'desc' => ''); +$lang->misc->feature->all['18.0.beta2'][] = array('title' => "We have optimized the product with multi-branches/multi-platforms. It's supported to create siblings stories. It's possible for Plan, Build, and Release to link requirements or bugs beyond their parent branch. ZenTao Client has implemented the robot chatting mechanism.", 'desc' => ''); $lang->misc->feature->all['18.0.beta1'][] = array('title' => "Multiple core processes in ZenTao are improved: A project without any product linked in is able to be created, as well as creating projects without sprints/iterations linked in; projects are able to link products beyond the father program; switch easily between ZenTao Lite mode and Full Lifecycle Management mode.", 'desc' => ''); $lang->misc->feature->all['17.8'][] = array('title' => "We have optimized the color of status in lists, as well as the dashboard color. At the same time, the page of the task effort has been improved.", 'desc' => ''); $lang->misc->feature->all['17.7'][] = array('title' => "The table is optimized in the transition version. At the same time, we have added the new feature of Work Order and get the Feedback features improved as well. Fix bugs.", 'desc' => ''); diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php index e0081a5b62..af87dc13da 100644 --- a/module/misc/lang/zh-cn.php +++ b/module/misc/lang/zh-cn.php @@ -194,7 +194,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; -$lang->misc->feature->all['18.0.beta2'][] = array('title' => '优化多分支/多平台产品,支持创建孪生需求,计划、版本、发布支持跨分支关联需求和bug,新增5个BI大屏,并且禅道客户端实现了机器人会话机制。', 'desc' => ''); +$lang->misc->feature->all['18.0.beta2'][] = array('title' => '优化多分支/多平台产品,支持创建孪生需求,计划、版本、发布支持跨分支关联需求和bug,并且禅道客户端实现了机器人会话机制。', 'desc' => ''); $lang->misc->feature->all['18.0.beta1'][] = array('title' => '主要对禅道多项核心流程进行改进,新增项目型项目、无迭代项目;支持项目跨项目集关联产品;支持轻量管理模式和全生命周期管理模式进行切换。', 'desc' => ''); $lang->misc->feature->all['17.8'][] = array('title' => '列表状态颜色、仪表盘颜色的改版和任务日志页面的优化。', 'desc' => ''); $lang->misc->feature->all['17.7'][] = array('title' => '过渡版本表格优化完成。新增工单功能,优化了反馈功能。修复Bug。', 'desc' => ''); diff --git a/module/story/control.php b/module/story/control.php index 33e028a84c..ae93eff8be 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -171,21 +171,27 @@ class story extends control /* Record submit review action. */ $story = $this->dao->findById((int)$storyID)->from(TABLE_STORY)->fetch(); - if($story->status == 'reviewing') $this->action->create('story', $storyID, 'submitReview'); + if($story->status == 'reviewing') + { + foreach($storyIds as $idItem) $this->action->create('story', $idItem, 'submitReview'); + } if($objectID != 0) { $object = $this->dao->findById((int)$objectID)->from(TABLE_PROJECT)->fetch(); if($object->type != 'project') { - $this->action->create('story', $storyID, 'linked2project', '', $object->project); + foreach($storyIds as $idItem) + { + $this->action->create('story', $idItem, 'linked2project', '', $object->project); - $actionType = $object->type == 'kanban' ? 'linked2kanban' : 'linked2execution'; - if($object->multiple) $this->action->create('story', $storyID, $actionType, '', $objectID); + $actionType = $object->type == 'kanban' ? 'linked2kanban' : 'linked2execution'; + if($object->multiple) $this->action->create('story', $idItem, $actionType, '', $objectID); + } } else { - $this->action->create('story', $storyID, 'linked2project', '', $objectID); + foreach($storyIds as $idItem) $this->action->create('story', $idItem, 'linked2project', '', $objectID); } } diff --git a/module/story/js/create.js b/module/story/js/create.js index 80f87bdbe7..0270259de3 100644 --- a/module/story/js/create.js +++ b/module/story/js/create.js @@ -320,7 +320,7 @@ function loadPlanForTwins(productID, branch, branchIndex) { /* Load plan */ if(branch == '0') branch = ''; - planLink = createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=' + branch + '&planID=0&fieldID=' + branchIndex + '&needCreate=false&expired=unexpired¶m=skipParent|forStory,' + config.currentMethod); + planLink = createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=' + branch + '&planID=0&fieldID=' + branchIndex + '&needCreate=false&expired=unexpired¶m=skipParent,forStory,' + config.currentMethod); if(branchIndex > 0) { var $planIdBox = $('.addBranchesBox'+ branchIndex +' #planIdBox'); diff --git a/module/story/model.php b/module/story/model.php index 6d39914d6d..05b0a9e251 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -6507,7 +6507,7 @@ class storyModel extends model $fieldName = $changeInfo['field']; $fieldValue = $changeInfo['new']; - if(strpos('product,branch,module,plan,spec,verify,files,reviewers', $fieldName) !== false) continue; + if(strpos('product,branch,module,plan,stage,stagedBy,spec,verify,files,reviewers', $fieldName) !== false) continue; $syncFieldList[$fieldName] = $fieldValue; } diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index f7b6c3b99a..aa4c55ddd8 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -84,7 +84,8 @@ foreach(explode(',', $showFields) as $field) '> - product][$story->branch]) ? array('' => '') + $plans[$story->product][$story->branch] : '', $story->plan, "class='form-control picker-select' data-drop-width='auto'");?> + parent < 0 ? "disabled='disabled'" : '';?> + product][$story->branch]) ? array('' => '') + $plans[$story->product][$story->branch] : '', $story->plan, "class='form-control picker-select' data-drop-width='auto' $planDisabled");?> diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index 738dc68901..6babe5138e 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -117,7 +117,7 @@ foreach(explode(',', $config->story->create->requiredFields) as $field) - + story->notice->branch;?> diff --git a/module/story/view/header.html.php b/module/story/view/header.html.php index 8339e13792..6b6835039c 100644 --- a/module/story/view/header.html.php +++ b/module/story/view/header.html.php @@ -105,6 +105,7 @@ function loadProductBranches(productID) $('.switchBranch').toggleClass('hidden'); $('.switchBranch').toggleClass('disable'); } + $('#storyNoticeBranch').closest('tr').addClass('hidden'); originProductType = newProductType; $('tr[class^="addBranchesBox"]').remove(); @@ -215,7 +216,7 @@ function loadProductPlans(productID, branch) var param = rawMethod == 'edit' ? 'skipParent|forStory' : 'skipParent'; var expired = config.currentMethod == 'create' ? 'unexpired' : ''; - var planLink = createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=' + branch + '&planID=' + $('#plan').val() + '&fieldID=&needCreate=true&expired='+ expired +'¶m=skipParent|forStory|' + config.currentMethod); + var planLink = createLink('product', 'ajaxGetPlans', 'productID=' + productID + '&branch=' + branch + '&planID=' + $('#plan').val() + '&fieldID=&needCreate=true&expired='+ expired +'¶m=skipParent,forStory,' + config.currentMethod); var $planIdBox = rawMethod == 'create' ? $('.switchBranch #planIdBox') : $('#planIdBox'); $planIdBox.load(planLink, function() diff --git a/xuanxuan/XUANVERSION b/xuanxuan/XUANVERSION index 790f3a6d6f..186234ed5e 100644 --- a/xuanxuan/XUANVERSION +++ b/xuanxuan/XUANVERSION @@ -1 +1 @@ -7ca69ef051899efdcd25a1aa997b0de62d3cccba +b82d2585f985d9b326c3afd83f0d0a88ca551d99 diff --git a/xuanxuan/extension/xuan/im/ext/bot/zentao.bot.php b/xuanxuan/extension/xuan/im/ext/bot/zentao.bot.php index 873e2c57d3..9ce59554f1 100644 --- a/xuanxuan/extension/xuan/im/ext/bot/zentao.bot.php +++ b/xuanxuan/extension/xuan/im/ext/bot/zentao.bot.php @@ -55,11 +55,15 @@ class zentaoBot extends xuanBot $this->commands[] = array('command' => $command, 'alias' => $this->lang->commands->$command->alias, 'description' => $this->lang->commands->$command->description, 'internal' => true); } + /* Backup user model of im module, load user module and restore. Use `$this->userModel` as user module from now on. */ + $imUser = $this->im->user; + $this->userModel = $this->im->loadModel('user'); + $this->im->user = $imUser; + $this->im->loadModel('task'); - $this->im->loadModel('user'); $this->im->app->loadClass('pager', $static = true); - $this->users = array_filter($this->im->user->getPairs('noclosed|noletter')); + $this->users = array_filter($this->userModel->getPairs('noclosed|noletter')); $this->taskStatusList = array_filter($this->im->lang->task->statusList); $this->help = $this->lang->help; @@ -971,11 +975,11 @@ class zentaoBot extends xuanBot { $this->im->loadModel('user'); - $user = $this->im->user->getByID($this->im->app->input['userID'], 'id'); + $user = $this->userModel->getByID($this->im->app->input['userID'], 'id'); /* Authorize him and save to session. */ - $user->rights = $this->im->user->authorize($user->account); - $user->groups = $this->im->user->getGroups($user->account); - $user->view = $this->im->user->grantUserView($user->account, $user->rights['acls'], $user->rights['projects']); + $user->rights = $this->userModel->authorize($user->account); + $user->groups = $this->userModel->getGroups($user->account); + $user->view = $this->userModel->grantUserView($user->account, $user->rights['acls'], $user->rights['projects']); $user->admin = strpos($this->im->app->company->admins, ",{$user->account},") !== false; global $app;