diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 137cdcddbc..42de4de738 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ stages: - sonar - unit_test - uitest + - notify - cleanup_packages - package sonarqube: @@ -31,7 +32,7 @@ unit_test: - "/home/gitlab-runner/bin/zentao-unittest.sh ${CI_PROJECT_DIR}" allow_failure: true only: - - master + - master - merge_requests uitest: stage: uitest @@ -39,14 +40,16 @@ uitest: - "/home/gitlab-runner/bin/zentao-uitest.sh ${CI_PROJECT_DIR}" allow_failure: true only: - - master + - master + - merge_requests +notify: + stage: notify + script: + - "/home/gitlab-runner/bin/ci-notify.php" + when: on_success + only: + - master - merge_requests -#notify: -# script: -# - 'curl --location --request POST ''http://api.lf.oop.cc/api/v1/xuan/chatMessage'' --header ''Content-Type: application/json'' --data-raw ''{"gid": "84be4c6e-02e3-4fdc-b081-318c0c1eca02", "title": "开源包下载地址", "content": "点击查看详情链接", "url": "http://10.0.7.242:8080/allpacks/"}''' -# when: on_success -# only: -# - master cleanup_packages: stage: cleanup_packages script: diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 60fc4a7905..39f11e328c 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -82,7 +82,7 @@ $lang->action->dynamic->all = '所有'; $lang->action->dynamic->hidden = '已隐藏'; $lang->action->dynamic->search = '搜索'; -$lang->action->periods['all'] = $lang->action->dynamic->all; +$lang->action->periods['all'] = '全部'; $lang->action->periods['today'] = $lang->action->dynamic->today; $lang->action->periods['yesterday'] = $lang->action->dynamic->yesterday; $lang->action->periods['thisweek'] = $lang->action->dynamic->thisWeek; diff --git a/module/action/view/trash.html.php b/module/action/view/trash.html.php index a4cc1ffe9e..5ac3abe485 100755 --- a/module/action/view/trash.html.php +++ b/module/action/view/trash.html.php @@ -14,7 +14,7 @@ + diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 87c8b9fac9..07eede8d97 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -317,12 +317,12 @@ $lang->execution->groups['finishedBy'] = '完成者分组'; $lang->execution->groups['closedBy'] = '关闭者分组'; $lang->execution->groups['type'] = '类型分组'; -$lang->execution->groupFilter['story']['all'] = '所有'; +$lang->execution->groupFilter['story']['all'] = '全部'; $lang->execution->groupFilter['story']['linked'] = "已关联{$lang->SRCommon}的任务"; -$lang->execution->groupFilter['pri']['all'] = '所有'; +$lang->execution->groupFilter['pri']['all'] = '全部'; $lang->execution->groupFilter['pri']['noset'] = '未设置'; $lang->execution->groupFilter['assignedTo']['undone'] = '未完成'; -$lang->execution->groupFilter['assignedTo']['all'] = '所有'; +$lang->execution->groupFilter['assignedTo']['all'] = '全部'; $lang->execution->byQuery = '搜索'; @@ -501,7 +501,7 @@ $lang->execution->typeList['stage'] = '阶段'; $lang->execution->typeList['sprint'] = $lang->executionCommon; $lang->execution->typeList['kanban'] = '看板'; -$lang->execution->featureBar['task']['all'] = $lang->execution->allTasks; +$lang->execution->featureBar['task']['all'] = '全部'; $lang->execution->featureBar['task']['unclosed'] = $lang->execution->unclosed; $lang->execution->featureBar['task']['assignedtome'] = $lang->execution->assignedToMe; $lang->execution->featureBar['task']['myinvolved'] = $lang->execution->myInvolved; @@ -509,17 +509,17 @@ $lang->execution->featureBar['task']['assignedbyme'] = $lang->execution->assigne $lang->execution->featureBar['task']['needconfirm'] = "{$lang->SRCommon}变更"; $lang->execution->featureBar['task']['status'] = $lang->execution->statusSelects['']; -$lang->execution->featureBar['all']['all'] = $lang->execution->all; +$lang->execution->featureBar['all']['all'] = '全部'; $lang->execution->featureBar['all']['undone'] = $lang->execution->undone; $lang->execution->featureBar['all']['wait'] = $lang->execution->statusList['wait']; $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList['doing']; $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; -$lang->execution->featureBar['bug']['all'] = '所有'; +$lang->execution->featureBar['bug']['all'] = '全部'; $lang->execution->featureBar['bug']['unresolved'] = '未解决'; -$lang->execution->featureBar['build']['all'] = '所有版本'; +$lang->execution->featureBar['build']['all'] = '全部版本'; $lang->execution->myExecutions = '我参与的'; $lang->execution->doingProject = '进行中的项目'; diff --git a/module/execution/view/grouptask.html.php b/module/execution/view/grouptask.html.php index 6446735df7..7e107fb0fa 100644 --- a/module/execution/view/grouptask.html.php +++ b/module/execution/view/grouptask.html.php @@ -33,7 +33,7 @@ - {$lang->execution->allTasks} {$allCount}", '', "class='btn btn-link btn-active-text'");?> + {$lang->execution->featureBar['task']['all']} {$allCount}", '', "class='btn btn-link btn-active-text'");?>
diff --git a/module/execution/view/taskkanban.html.php b/module/execution/view/taskkanban.html.php index 2a9b390200..759c214457 100644 --- a/module/execution/view/taskkanban.html.php +++ b/module/execution/view/taskkanban.html.php @@ -116,7 +116,7 @@ ';?> ' . html::a(helper::createLink('execution', 'importBug', "execution=$execution->id", '', true), $lang->execution->importBug, '', "class='iframe' data-width='90%'") . '';?> - ' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe'") . '';?> + ' . html::a(helper::createLink('task', 'create', "execution=$execution->id", '', true), $lang->task->create, '', "class='iframe' data-width='80%'") . '';?> ' . html::a(helper::createLink('task', 'batchCreate', "execution=$execution->id", '', true), $lang->execution->batchCreateTask, '', "class='iframe' data-width=90%") . '';?>
diff --git a/module/execution/view/testcase.html.php b/module/execution/view/testcase.html.php index cf13103010..5dd81e5f50 100644 --- a/module/execution/view/testcase.html.php +++ b/module/execution/view/testcase.html.php @@ -13,7 +13,7 @@
- {$lang->execution->all}", '', "class='btn btn-link btn-active-text'");?> + {$lang->execution->featureBar['all']['all']}", '', "class='btn btn-link btn-active-text'");?>
id", '', '', '', true), " " . $lang->testcase->create, '', "class='btn btn-primary' data-app='{$this->app->tab}'");?> diff --git a/module/gitlab/lang/de.php b/module/gitlab/lang/de.php index f3b3b2d451..905a04cbea 100644 --- a/module/gitlab/lang/de.php +++ b/module/gitlab/lang/de.php @@ -206,8 +206,8 @@ $lang->gitlab->branch->create = 'Create'; $lang->gitlab->branch->lastCommitter = 'Last Committer'; $lang->gitlab->branch->lastCommittedDate = 'Last Committed Date'; $lang->gitlab->branch->accessLevel = "Branch protection list"; -$lang->gitlab->branch->mergeAllowed = "Merge Allowed"; -$lang->gitlab->branch->pushAllowed = "Push Allowed"; +$lang->gitlab->branch->mergeAllowed = "Allowed to merge"; +$lang->gitlab->branch->pushAllowed = "Allowed to push"; $lang->gitlab->branch->placeholderSearch = "Branch name"; $lang->gitlab->branch->placeholderSelect = "Branch name"; $lang->gitlab->branch->confirmDelete = 'Branch will be writable for developers. Are you sure?'; diff --git a/module/gitlab/lang/en.php b/module/gitlab/lang/en.php index f3b3b2d451..905a04cbea 100644 --- a/module/gitlab/lang/en.php +++ b/module/gitlab/lang/en.php @@ -206,8 +206,8 @@ $lang->gitlab->branch->create = 'Create'; $lang->gitlab->branch->lastCommitter = 'Last Committer'; $lang->gitlab->branch->lastCommittedDate = 'Last Committed Date'; $lang->gitlab->branch->accessLevel = "Branch protection list"; -$lang->gitlab->branch->mergeAllowed = "Merge Allowed"; -$lang->gitlab->branch->pushAllowed = "Push Allowed"; +$lang->gitlab->branch->mergeAllowed = "Allowed to merge"; +$lang->gitlab->branch->pushAllowed = "Allowed to push"; $lang->gitlab->branch->placeholderSearch = "Branch name"; $lang->gitlab->branch->placeholderSelect = "Branch name"; $lang->gitlab->branch->confirmDelete = 'Branch will be writable for developers. Are you sure?'; diff --git a/module/gitlab/lang/fr.php b/module/gitlab/lang/fr.php index f3b3b2d451..905a04cbea 100644 --- a/module/gitlab/lang/fr.php +++ b/module/gitlab/lang/fr.php @@ -206,8 +206,8 @@ $lang->gitlab->branch->create = 'Create'; $lang->gitlab->branch->lastCommitter = 'Last Committer'; $lang->gitlab->branch->lastCommittedDate = 'Last Committed Date'; $lang->gitlab->branch->accessLevel = "Branch protection list"; -$lang->gitlab->branch->mergeAllowed = "Merge Allowed"; -$lang->gitlab->branch->pushAllowed = "Push Allowed"; +$lang->gitlab->branch->mergeAllowed = "Allowed to merge"; +$lang->gitlab->branch->pushAllowed = "Allowed to push"; $lang->gitlab->branch->placeholderSearch = "Branch name"; $lang->gitlab->branch->placeholderSelect = "Branch name"; $lang->gitlab->branch->confirmDelete = 'Branch will be writable for developers. Are you sure?'; diff --git a/module/gitlab/lang/zh-cn.php b/module/gitlab/lang/zh-cn.php index 402c550fbf..8412e6ff18 100644 --- a/module/gitlab/lang/zh-cn.php +++ b/module/gitlab/lang/zh-cn.php @@ -206,8 +206,8 @@ $lang->gitlab->branch->create = '创建'; $lang->gitlab->branch->lastCommitter = '最后提交'; $lang->gitlab->branch->lastCommittedDate = '最后修改时间'; $lang->gitlab->branch->accessLevel = "分支保护列表"; -$lang->gitlab->branch->mergeAllowed = "允许合并到"; -$lang->gitlab->branch->pushAllowed = "允许推送到"; +$lang->gitlab->branch->mergeAllowed = "允许合并"; +$lang->gitlab->branch->pushAllowed = "允许推送"; $lang->gitlab->branch->placeholderSearch = "请输入分支名称"; $lang->gitlab->branch->placeholderSelect = "请选择分支"; $lang->gitlab->branch->confirmDelete = '确定删除分支保护?'; diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index a0ff9f225b..6ddb8fbeeb 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -1666,6 +1666,7 @@ $lang->resource->report->bugCreate = 'bugCreate'; $lang->resource->report->bugAssign = 'bugAssign'; $lang->resource->report->workload = 'workload'; $lang->resource->report->annualData = 'annual'; +$lang->resource->report->allAnnualData = 'viewEveryoneAnnual'; $lang->report->methodOrder[0] = 'index'; $lang->report->methodOrder[5] = 'projectDeviation'; diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index dcd4e1040c..9883b42ea9 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -157,24 +157,28 @@ .executionName .delayed {margin-right: 10px;} #kanbanBox {position: relative;} -#regionTabs {background-color: #efefef; z-index: 100; display: flex;} +#regionTabs {background-color: #efefef; z-index: 100; display: flex; align-items: center; gap: 1.5rem; justify-content: space-between;} #regionTabs .leftBtn.disabled i, #regionTabs .rightBtn.disabled i{color: #c2c2c2;} +#regionTabs .leftBtn i, #regionTabs .rightBtn i{vertical-align: 1px;} #regionTabs .icon-angle-left, #regionTabs .icon-angle-right {font-size: 20px; vertical-align: -webkit-baseline-middle;} -#regionNavTabs {display: inline-flex; overflow: hidden; width: 100%; padding-left: 10px;} -#regionNavTabs > ul {display: inline-flex; border-bottom: unset;} -#regionNavTabs > ul > li {padding: 6px 15px; margin-bottom: 6px; border-radius: 4px 4px 0px 0px;} -#regionNavTabs > ul > li.active {background-color: #fff;} -#regionNavTabs > ul > li.active::before {content: ''; width: 10px; height: 10px; position: absolute; left: -10px; top: 21px; background: radial-gradient(circle at 0% 0%,transparent 10px,#fff 0);} -#regionNavTabs > ul > li.active::after {content: ''; width: 10px; height: 10px; position: absolute; left: calc(100%); top: 21px; background: radial-gradient(circle at 100% 0%,transparent 10px,#fff 0);} -#regionNavTabs > ul > li > a {max-width: 195px; overflow: hidden; white-space: nowrap; padding: 0; background-color: transparent;} -#regionNavTabs > ul > li.active > a:before {background: unset;} +#regionNavTabs {display: inline-flex; overflow: hidden;} +.leftBtn.hidden + #regionNavTabs {padding-left: 10px;} +#regionNavTabs > ul {display: inline-flex; border-bottom: none; margin-bottom: -3px;} +#regionNavTabs > ul > li {padding: 0; text-align: center;} +#regionNavTabs > ul > li > a {min-width: 134px; overflow: hidden; white-space: nowrap; z-index: 0; position: relative; padding: 1.7rem; margin-left: -20px; background: none; outline: 0;} +#regionNavTabs > ul > li:first-child > a {margin-left: 0;} +#regionNavTabs > ul > li.active > a {z-index: 1;} +#regionNavTabs > ul > li.active > a::before {background-color: #fff;} +#regionNavTabs > ul > li > a:before {content: ""; position: absolute; top: -1rem; left: 0; background: #f8f8f8; height: 100%; width: 100%; z-index: -1; border-top-left-radius: 1rem; border-top-right-radius: 1rem; transform: perspective(0.5rem) rotateX(2deg); transform-origin: bottom;} +#regionNavTabs > ul > li > a > span {vertical-align: bottom; overflow: hidden; max-width: 6em; white-space: nowrap; display: inline-block;} +#regionNavTabs > ul > li.active > a > span {color: #2b80ff!important;} #regionTabs.affixed {margin-bottom: 5px; position: fixed; top: 0px;} #regionTabs.affixed + #kanbanContainer .kanban-board.kanban-affixed > .kanban-header {margin-top: 30px;} #regionTabs.affixed + #kanbanContainer .kanban-board.kanban-affixed > .kanban-header + .kanban-lane {margin-top: 38px;} #regionTabs.affixed ul > li {margin-bottom: 0px !important;} #regionTabs .region-actions .dropdown-menu {top: 25px;} #region-tab-actions {display: none;} -#region-tab-actions.active {display: flex; position: relative; right: 0px; top: -2px;} +#region-tab-actions.active {display: flex;} .region {display: none;} .region.active {display: block;} .region.active.notAll {margin-top: -5px;} diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 761dc7b57d..d55be5e3bd 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -1865,6 +1865,8 @@ function swipeRegionNavTabs($object, direction) { /* If you swipe left, the distance is equal to the item's left. */ distance = - itemLeft + radius - ($item.prev().hasClass('active') ? radiusWidth : 0); + /* tab overlap width */ + distance += 20; if($item.prev().length == 0) { distance = 0; @@ -1882,6 +1884,7 @@ function swipeRegionNavTabs($object, direction) { /* If you swipe right, the distance is equal to the left distance of item plus the width of item minus the width of the regionNavTabs. */ distance = offsetWidth - itemOffset - radius + nextRadius - radiusWidth * 2; + distance += 20; if($item.next().length == 0) { distance = - objectWidth + offsetWidth - radiusWidth * 2; @@ -1922,6 +1925,7 @@ function initRegionTabs() if(acitiveItemLeft + distance < 0) { distance = - acitiveItemLeft; + distance += 20; if($acitiveItem.prev().length == 0) { distance = 0; @@ -1932,6 +1936,7 @@ function initRegionTabs() else if(acitiveItemWidth + acitiveItemLeft + distance + radiusWidth * 2 > regionTabsWidth && acitiveItemLeft != 0 && acitiveItemWidth != 0) { distance = regionTabsWidth - acitiveItemWidth - acitiveItemLeft + (distance != 0 ? - radiusWidth * 2 : radiusWidth); + distance += 20; if($acitiveItem.next().length == 0) { distance = regionTabsWidth - acitiveItemWidth - acitiveItemLeft - radiusWidth * 2; diff --git a/module/my/view/todo.html.php b/module/my/view/todo.html.php index a672b419a5..22533a65a5 100644 --- a/module/my/view/todo.html.php +++ b/module/my/view/todo.html.php @@ -92,7 +92,7 @@ app->clientLang == 'en' ? "style='width:80px'" : '';?> title=todo->pri;?>> priAB);?> todo->name);?> - todo->assignedBy);?> + todo->assignedTo);?> todo->beginAB);?> todo->endAB);?> todo->status);?> @@ -115,7 +115,7 @@ todo->typeList, $todo->type, '');?> pri;?>' title='todo->priList, $todo->pri, $todo->pri);?>'>todo->priList, $todo->pri)?> createLink('todo', 'view', "id=$todo->id&from=my", '', true), $todo->name, '', "data-toggle='modal' data-width='80%' data-type='iframe' data-title='" . $lang->todo->view . "' data-icon='check'");?> - assignedBy);?> + assignedTo);?> begin;?> end;?> todo->statusList[$todo->status];?> diff --git a/module/product/lang/de.php b/module/product/lang/de.php index 2d2dd903e8..448a936116 100644 --- a/module/product/lang/de.php +++ b/module/product/lang/de.php @@ -186,7 +186,7 @@ $lang->product->statusList['closed'] = 'Geschlossen'; global $config; if($config->systemMode == 'new') { - $lang->product->aclList['private'] = "Private {$lang->productCommon} (Stakeholders and owner of the respective program, team members and stakeholders of the associated project can access)"; + $lang->product->aclList['private'] = "Private {$lang->productCommon} (Manager and Stakeholders of the respective program, team members and stakeholders of the associated project can access)"; } else { diff --git a/module/product/lang/en.php b/module/product/lang/en.php index 78f79cae43..d5c1248166 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -186,7 +186,7 @@ $lang->product->statusList['closed'] = 'Closed'; global $config; if($config->systemMode == 'new') { - $lang->product->aclList['private'] = "Private {$lang->productCommon} (Stakeholders and owner of the respective program, team members and stakeholders of the associated project can access)"; + $lang->product->aclList['private'] = "Private {$lang->productCommon} (Manager and Stakeholders of the respective program, team members and stakeholders of the associated project can access)"; } else { diff --git a/module/product/lang/fr.php b/module/product/lang/fr.php index a7e23ce195..5dd20995a5 100644 --- a/module/product/lang/fr.php +++ b/module/product/lang/fr.php @@ -186,7 +186,7 @@ $lang->product->statusList['closed'] = 'Fermé'; global $config; if($config->systemMode == 'new') { - $lang->product->aclList['private'] = "Private {$lang->productCommon} (Stakeholders and owner of the respective program, team members and stakeholders of the associated project can access)"; + $lang->product->aclList['private'] = "Private {$lang->productCommon} (Manager and Stakeholders of the respective program, team members and stakeholders of the associated project can access)"; } else { diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 6bed7d52d0..9f3bc3955b 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -207,7 +207,7 @@ $lang->product->noModule = "
您现在还没有模块信息
$lang->product->noProduct = "暂时没有{$lang->productCommon}。"; $lang->product->noMatched = '找不到包含"%s"的' . $lang->productCommon; -$lang->product->featureBar['browse']['allstory'] = $lang->product->allStory; +$lang->product->featureBar['browse']['allstory'] = '全部'; $lang->product->featureBar['browse']['unclosed'] = $lang->product->unclosed; $lang->product->featureBar['browse']['assignedtome'] = $lang->product->assignedToMe; $lang->product->featureBar['browse']['openedbyme'] = $lang->product->openedByMe; @@ -216,7 +216,7 @@ $lang->product->featureBar['browse']['reviewbyme'] = $lang->product->reviewByM $lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory; $lang->product->featureBar['browse']['more'] = $lang->more; -$lang->product->featureBar['all']['all'] = '所有' . $lang->productCommon; +$lang->product->featureBar['all']['all'] = '全部' . $lang->productCommon; $lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed; $lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed']; diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 9960a70f92..48cfe38868 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -388,8 +388,10 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
createLink('story', 'batchEdit', "productID=$productID&projectID=$projectID&branch=$branch&storyType=$storyType"); + foreach($stories as $story) $storyProductIds[$story->product] = $story->product; + $storyProductID = count($storyProductIds) > 1 ? 0 : $productID; + $disabled = $canBatchEdit ? '' : "disabled='disabled'"; + $actionLink = $this->createLink('story', 'batchEdit', "productID=$storyProductID&projectID=$projectID&branch=$branch&storyType=$storyType"); ?> edit, "data-form-action='$actionLink' $disabled");?> diff --git a/module/product/view/track.html.php b/module/product/view/track.html.php index 7a515e738e..dfedd53cbe 100644 --- a/module/product/view/track.html.php +++ b/module/product/view/track.html.php @@ -72,7 +72,7 @@ $story):?> - ';?> + 0) echo '';?> parent) and $story->parent > 0):?>lang->story->childrenAB;?> createLink($module, 'view', "storyID=$storyID"), $story->title, '',"title='$story->title' data-app='$tab'");?> @@ -108,7 +108,7 @@ createLink('bug', 'view', "bugID=$bugID"), $bug->title, '', "title='$bug->title'") . '
';?> - ';?> + 0) echo '';?> diff --git a/module/productplan/lang/zh-cn.php b/module/productplan/lang/zh-cn.php index 766defd14e..4a93f1a59d 100644 --- a/module/productplan/lang/zh-cn.php +++ b/module/productplan/lang/zh-cn.php @@ -135,7 +135,7 @@ $lang->productplan->endLetterChildTip = "父计划[%s]的完成日期:%s, $lang->productplan->beginLetterParentTip = "子计划[%s]的开始日期:%s,不能小于父计划的开始日期: %s"; $lang->productplan->endGreaterParentTip = "子计划[%s]的完成日期:%s,不能大于父计划的完成日期: %s"; -$lang->productplan->featureBar['browse']['all'] = '所有'; +$lang->productplan->featureBar['browse']['all'] = '全部'; $lang->productplan->featureBar['browse']['undone'] = '未完成'; $lang->productplan->featureBar['browse']['wait'] = '未开始'; $lang->productplan->featureBar['browse']['doing'] = '进行中'; diff --git a/module/program/css/browse.css b/module/program/css/browse.css index 67db67ad80..ac6ac02bce 100644 --- a/module/program/css/browse.css +++ b/module/program/css/browse.css @@ -12,9 +12,11 @@ tbody.sortable > tr > td.sort-handler {color: #3c4353 !important;} .has-prefix > span {flex: none;} .has-prefix > a {padding-left: 5px;} -.has-suffix > a {max-width: calc(100% - 100px); padding-right: 5px; color: #0c60e1; display: inline-block; max-width: calc(100% - 50px);} +.has-suffix > a {padding-right: 5px; color: #0c60e1; display: inline-block; max-width: calc(100% - 50px);} +.is-nest-child span.table-nest-icon {visibility: hidden; width: 0;} div.checkbox-primary + span.table-nest-icon {margin-left: 0px !important;} + #checkAll + label.hover:after {border-width: 0px;} .c-budget {width:100px; text-align: right; padding-right:16px !important;} -.c-status {width: 65px !important;} \ No newline at end of file +.c-status {width: 65px !important;} diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index a7c9452f73..be8d971ddc 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -143,7 +143,7 @@ $lang->program->statusList['doing'] = '进行中'; $lang->program->statusList['suspended'] = '已挂起'; $lang->program->statusList['closed'] = '已关闭'; -$lang->program->featureBar['browse']['all'] = '所有'; +$lang->program->featureBar['browse']['all'] = '全部'; $lang->program->featureBar['browse']['unclosed'] = '未关闭'; $lang->program->featureBar['browse']['wait'] = '未开始'; $lang->program->featureBar['browse']['doing'] = '进行中'; diff --git a/module/program/view/browse.html.php b/module/program/view/browse.html.php index a259bdc4c5..ea68ed1c09 100644 --- a/module/program/view/browse.html.php +++ b/module/program/view/browse.html.php @@ -29,7 +29,6 @@ $label";?> - $lang->program->showClosed), '', $this->cookie->showClosed ? 'checked=checked' : '');?> $lang->project->edit), '', $this->cookie->editProject ? 'checked=checked' : '');?> user->search;?>
diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 5e4b4bd225..1c566719c3 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -245,14 +245,14 @@ $lang->project->modelList['scrum'] = "Scrum"; $lang->project->modelList['waterfall'] = "瀑布"; $lang->project->modelList['kanban'] = "看板"; -$lang->project->featureBar['browse']['all'] = '所有'; +$lang->project->featureBar['browse']['all'] = '全部'; $lang->project->featureBar['browse']['undone'] = '未完成'; $lang->project->featureBar['browse']['wait'] = '未开始'; $lang->project->featureBar['browse']['doing'] = '进行中'; $lang->project->featureBar['browse']['suspended'] = '已挂起'; $lang->project->featureBar['browse']['closed'] = '已关闭'; -$lang->project->featureBar['build']['all'] = '所有版本'; +$lang->project->featureBar['build']['all'] = '全部版本'; $lang->project->aclList['private'] = "私有 (只有项目负责人、团队成员和干系人可访问)"; $lang->project->aclList['open'] = "公开 (有项目视图权限即可访问)"; diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index db8759d557..a87eb8463a 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -34,7 +34,7 @@ Build:{$build->name}" : ''; $module = $type != 'bysearch' ? "¶m=$param" : ''; - echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=all$module"), "{$lang->bug->allBugs}" . ($type == 'all' ? " {$pager->recTotal}$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'"); + echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=all$module"), "{$lang->bug->featureBar['browse']['all']}" . ($type == 'all' ? " {$pager->recTotal}$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'"); echo html::a($this->inlink('bug', "projectID={$project->id}&productID={$productID}&branch=$branchID&orderBy=status,id_desc&build=$buildID&type=unresolved$module"), "{$lang->bug->unResolved}" . ($type == 'unresolved' ? " {$pager->recTotal}$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'"); ?> bug->search;?> diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php index 2ae7484bee..d557bc92ab 100644 --- a/module/project/view/view.html.php +++ b/module/project/view/view.html.php @@ -210,7 +210,7 @@ project->end;?> - end;?> + end = $project->end == LONG_TIME ? $this->lang->project->longTime : $project->end;;?> project->realEndAB;?> realEnd == '0000-00-00' ? '' : $project->realEnd;?> @@ -246,6 +246,8 @@ taskCount;?> bug->common;?> bugCount;?> + project->budget;?> + budget;?> diff --git a/module/projectstory/lang/zh-cn.php b/module/projectstory/lang/zh-cn.php index 567ac9cbd0..24a4aa54bd 100644 --- a/module/projectstory/lang/zh-cn.php +++ b/module/projectstory/lang/zh-cn.php @@ -24,7 +24,7 @@ $lang->projectstory->batchUnlinkTip = '其他需求已经移除,如下需求 global $app; $app->loadLang('product'); -$lang->projectstory->featureBar['story']['allstory'] = $lang->product->allStory; +$lang->projectstory->featureBar['story']['allstory'] = '全部'; $lang->projectstory->featureBar['story']['unclosed'] = $lang->product->unclosed; $lang->projectstory->featureBar['story']['draft'] = $lang->product->draftStory; $lang->projectstory->featureBar['story']['reviewing'] = $lang->product->reviewingStory; diff --git a/module/release/lang/zh-cn.php b/module/release/lang/zh-cn.php index e40eddf76f..d76ce29615 100644 --- a/module/release/lang/zh-cn.php +++ b/module/release/lang/zh-cn.php @@ -95,6 +95,6 @@ $lang->release->notifyList['ET'] = "所在{$lang->execution->common}团队成员 $lang->release->notifyList['PT'] = "所在项目团队成员"; $lang->release->notifyList['CT'] = "抄送给"; -$lang->release->featureBar['browse']['all'] = $lang->release->all; +$lang->release->featureBar['browse']['all'] = '全部'; $lang->release->featureBar['browse']['normal'] = $lang->release->statusList['normal']; $lang->release->featureBar['browse']['terminate'] = $lang->release->statusList['terminate']; diff --git a/module/report/control.php b/module/report/control.php index bb22198742..c620e28464 100644 --- a/module/report/control.php +++ b/module/report/control.php @@ -292,6 +292,8 @@ class report extends control $this->loadModel('dept'); $this->loadModel('user'); + $super = common::hasPriv('report', 'allAnnualData'); + $firstAction = $this->dao->select('*')->from(TABLE_ACTION)->orderBy('id')->limit(1)->fetch(); $currentYear = date('Y'); $firstYear = empty($firstAction) ? $currentYear : substr($firstAction->date, 0, 4); @@ -329,7 +331,7 @@ class report extends control $noDepartment = array('0' => '/' . $this->lang->dept->noDepartment); $depts = $this->dept->getOptionMenu(); - if(!$this->app->user->admin) + if(!$super) { $depts = ($dept and isset($depts[$dept])) ? array($dept => $depts[$dept]) : $noDepartment; } diff --git a/module/report/lang/en.php b/module/report/lang/en.php index b2c6275cf3..b43e6e8acd 100644 --- a/module/report/lang/en.php +++ b/module/report/lang/en.php @@ -9,16 +9,17 @@ * @version $Id: en.php 5080 2013-07-10 00:46:59Z wyd621@gmail.com $ * @link http://www.zentao.net */ -$lang->report->index = 'Report Home'; -$lang->report->list = 'Report'; -$lang->report->item = 'Item'; -$lang->report->value = 'Value'; -$lang->report->percent = '%'; -$lang->report->undefined = 'Undefined'; -$lang->report->query = 'Query'; -$lang->report->annual = 'Annual Summary'; -$lang->report->project = 'Project'; -$lang->report->PO = 'PO'; +$lang->report->index = 'Report Home'; +$lang->report->list = 'Report'; +$lang->report->item = 'Item'; +$lang->report->value = 'Value'; +$lang->report->percent = '%'; +$lang->report->undefined = 'Undefined'; +$lang->report->query = 'Query'; +$lang->report->annual = 'Annual Summary'; +$lang->report->project = 'Project'; +$lang->report->PO = 'PO'; +$lang->report->viewEveryoneAnnual = 'View everyone annual summary'; $lang->report->colors[] = 'AFD8F8'; $lang->report->colors[] = 'F6BD0F'; diff --git a/module/report/lang/zh-cn.php b/module/report/lang/zh-cn.php index b7988f9880..3ed99b8ad6 100644 --- a/module/report/lang/zh-cn.php +++ b/module/report/lang/zh-cn.php @@ -9,16 +9,17 @@ * @version $Id: zh-cn.php 5080 2013-07-10 00:46:59Z wyd621@gmail.com $ * @link http://www.zentao.net */ -$lang->report->index = '统计首页'; -$lang->report->list = '统计报表'; -$lang->report->item = '条目'; -$lang->report->value = '值'; -$lang->report->percent = '百分比'; -$lang->report->undefined = '未设定'; -$lang->report->query = '查询'; -$lang->report->annual = '年度总结'; -$lang->report->project = '项目'; -$lang->report->PO = 'PO'; +$lang->report->index = '统计首页'; +$lang->report->list = '统计报表'; +$lang->report->item = '条目'; +$lang->report->value = '值'; +$lang->report->percent = '百分比'; +$lang->report->undefined = '未设定'; +$lang->report->query = '查询'; +$lang->report->annual = '年度总结'; +$lang->report->project = '项目'; +$lang->report->PO = 'PO'; +$lang->report->viewEveryoneAnnual = '查看所有人年度总结'; $lang->report->colors[] = 'AFD8F8'; $lang->report->colors[] = 'F6BD0F'; diff --git a/module/report/model.php b/module/report/model.php index 23dbb69c1b..1c91a1fe6f 100644 --- a/module/report/model.php +++ b/module/report/model.php @@ -98,12 +98,13 @@ class reportModel extends model */ public function getExecutions($begin = 0, $end = 0) { - $tasks = $this->dao->select('t1.*, t2.name as executionName, t3.name as projectName')->from(TABLE_TASK)->alias('t1') + $permission = common::hasPriv('report', 'showProject') or $this->app->user->admin; + $tasks = $this->dao->select('t1.*, t2.name as executionName, t3.name as projectName')->from(TABLE_TASK)->alias('t1') ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.execution = t2.id') ->leftJoin(TABLE_PROJECT)->alias('t3')->on('t1.project = t3.id') ->where('t1.status')->ne('cancel') ->andWhere('t1.deleted')->eq(0) - ->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi() + ->beginIF(!$permission)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi() ->andWhere('t2.deleted')->eq(0) ->andWhere('t1.parent')->lt(1) ->andWhere('t2.status')->eq('closed') @@ -140,11 +141,12 @@ class reportModel extends model */ public function getProducts($conditions, $storyType = 'story') { - $products = $this->dao->select('t1.id as id, t1.code, t1.name, t1.PO')->from(TABLE_PRODUCT)->alias('t1') + $permission = common::hasPriv('report', 'showProduct') or $this->app->user->admin; + $products = $this->dao->select('t1.id as id, t1.code, t1.name, t1.PO')->from(TABLE_PRODUCT)->alias('t1') ->leftJoin(TABLE_PROGRAM)->alias('t2')->on('t1.program = t2.id') ->where('t1.deleted')->eq(0) ->beginIF(strpos($conditions, 'closedProduct') === false)->andWhere('t1.status')->ne('closed')->fi() - ->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->products)->fi() + ->beginIF(!$permission)->andWhere('t1.id')->in($this->app->user->view->products)->fi() ->orderBy('t2.order_asc, t1.line_desc, t1.order_asc') ->fetchAll('id'); diff --git a/module/story/control.php b/module/story/control.php index 16b4b7158b..4f2d88331f 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -606,7 +606,7 @@ class story extends control /* Init vars. */ $planID = $plan; - $pri = 0; + $pri = 3; $estimate = ''; $title = ''; $spec = ''; @@ -750,6 +750,7 @@ class story extends control $this->loadModel('file'); $this->app->loadLang('bug'); $story = $this->story->getById($storyID, 0, true); + $this->commonAction($storyID); if(!empty($_POST)) { @@ -793,8 +794,6 @@ class story extends control return print(js::locate($this->createLink($this->app->rawModule, 'view', $params), 'parent')); } - $this->commonAction($storyID); - /* Sort products. */ $myProducts = array(); $othersProducts = array(); @@ -847,7 +846,7 @@ class story extends control if($product->type == 'normal' and !empty($story->branch)) $this->view->moduleOptionMenu += $this->tree->getModulesName($story->module); $branch = $product->type == 'branch' ? ($story->branch > 0 ? $story->branch : '0') : 'all'; - $productStories = $this->story->getProductStoryPairs($story->product, $branch, 0, 'all', 'id_desc', 0, ''); + $productStories = $this->story->getProductStoryPairs($story->product, $branch, 0, 'all', 'id_desc', 0, '', $story->type); $this->view->title = $this->lang->story->edit . "STORY" . $this->lang->colon . $this->view->story->title; $this->view->position[] = $this->lang->story->edit; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index cbce6c57b7..70c5f3cfe7 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -460,7 +460,7 @@ $lang->story->subDivideTip['subStory'] = '子需求无法细分'; $lang->story->subDivideTip['notWait'] = '该需求%s,无法进行细分操作'; $lang->story->subDivideTip['notActive'] = '需求不是激活状态,无法进行细分操作'; -$lang->story->featureBar['browse']['all'] = $lang->all; +$lang->story->featureBar['browse']['all'] = '全部'; $lang->story->featureBar['browse']['unclosed'] = $lang->story->unclosed; $lang->story->featureBar['browse']['draft'] = $lang->story->statusList['draft']; $lang->story->featureBar['browse']['reviewing'] = $lang->story->statusList['reviewing']; diff --git a/module/story/model.php b/module/story/model.php index 148c1a957e..da1161f4a3 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -497,11 +497,12 @@ class storyModel extends model { if(empty($title)) continue; + $stories->reviewer[$i] = array_filter($stories->reviewer[$i]); if(empty($stories->reviewer[$i]) and empty($stories->reviewerDitto[$i])) $stories->reviewer[$i] = array(); $reviewers = (isset($stories->reviewDitto[$i])) ? $reviewers : $stories->reviewer[$i]; $stories->reviewer[$i] = $reviewers; $_POST['reviewer'][$i] = $reviewers; - if(empty(array_filter($stories->reviewer[$i])) and $forceReview) + if(empty($stories->reviewer[$i]) and $forceReview) { dao::$errors[] = $this->lang->story->errorEmptyReviewedBy; return false; @@ -4273,7 +4274,7 @@ class storyModel extends model { $menu .= "
"; } - + $menu .= $this->buildMenu('story', 'edit', $params . "&kanbanGroup=default&storyType=$story->type", $story, $type, '', '', 'showinonlybody'); $tab = $this->app->tab == 'project' ? 'project' : 'qa'; diff --git a/module/task/config.php b/module/task/config.php index 6a67b81f84..b0bca1614c 100644 --- a/module/task/config.php +++ b/module/task/config.php @@ -45,10 +45,10 @@ $config->task->defaultLoadCount = 50; $config->task->custom = new stdclass(); $config->task->custom->createFields = $config->task->customCreateFields; -$config->task->custom->batchCreateFields = 'module,story,assignedTo,estimate,desc,pri'; +$config->task->custom->batchCreateFields = 'module,story,assignedTo,estimate,estStarted,deadline,desc,pri'; $config->task->custom->batchEditFields = 'module,assignedTo,status,pri,estimate,record,left'; -$config->task->excludeCheckFileds = ',pri,estStartedDitto,deadlineDitto,parent,regions,lanes,'; +$config->task->excludeCheckFileds = ',pri,estStartedDitto,deadlineDitto,parent,regions,lanes,vision,region,'; $config->task->datatable = new stdclass(); $config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'assignedTo', 'finishedBy', 'estimate', 'consumed', 'left', 'progress', 'deadline', 'actions'); diff --git a/module/task/control.php b/module/task/control.php index 8fa8b9b497..e47e6d6074 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1149,7 +1149,7 @@ class task extends control $kanbanData = $this->loadModel('kanban')->getRDKanban($task->execution, $execLaneType, 'id_desc', 0, $execGroupBy, $rdSearchValue); $kanbanData = json_encode($kanbanData); - return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)")); + return print(js::reload('parent') . js::execute("parent.parent.updateKanban($kanbanData)")); } if($from == 'taskkanban') { @@ -1159,9 +1159,9 @@ class task extends control $kanbanData = $kanbanData[$kanbanType]; $kanbanData = json_encode($kanbanData); - return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban(\"task\", $kanbanData)")); + return print(js::reload('parent') . js::execute("parent.parent.updateKanban(\"task\", $kanbanData)")); } - return print(js::closeModal('parent.parent', 'this')); + return print(js::reload('parent') . js::execute("if(typeof(parent.parent.ajaxRefresh) == 'function') parent.parent.ajaxRefresh()")); } return print(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent')); } @@ -1199,7 +1199,7 @@ class task extends control $actionID = $this->loadModel('action')->create('task', $estimate->task, 'EditEstimate', $this->post->work); $this->action->logHistory($actionID, $changes); - $url = $this->session->estimateList ? $this->session->estimateList : inlink('record', "taskID={$estimate->task}"); + $url = $this->session->estimateList ? $this->session->estimateList : inlink('recordEstimate', "taskID={$estimate->task}"); return print(js::locate($url, 'parent')); } diff --git a/module/task/css/create.css b/module/task/css/create.css index b1d4fbd6ee..c668eb1d93 100644 --- a/module/task/css/create.css +++ b/module/task/css/create.css @@ -14,7 +14,7 @@ #testStoryBox table tr td input {border: 0px;} #testStoryBox table tr td .input-group .input-group-addon {border-left: 1px solid #dcdcdc; border-right: 1px solid #dcdcdc;} #testStoryBox table button.btn {border: 0px;} -#testStoryBox .c-name {width: 300px;} +#testStoryBox .c-name {width: 120px;} #testStoryBox .c-pri, #testStoryBox .c-estimate, #testStoryBox .c-actions {width: 70px;} #testStoryBox .c-date {width: 140px;} #testStoryBox .c-assignedTo {width: 100px; padding: 7px;} diff --git a/module/task/js/view.js b/module/task/js/view.js index 111813487d..45c9d15b55 100644 --- a/module/task/js/view.js +++ b/module/task/js/view.js @@ -1,6 +1,7 @@ $(function() { if(config.onlybody == 'yes') $('.main-actions').css('width', '100%'); + limitIframeLevel(); }); function assign(taskID, assignedTo) @@ -10,7 +11,20 @@ function assign(taskID, assignedTo) $('.assign').load(createLink('user', 'ajaxGetUser', 'taskID=' + taskID + '&assignedTo=' + assignedTo)); } -$(document).ready(function() +/** + * Ajax refresh + * + * @access public + * @return void + */ +function ajaxRefresh() { - limitIframeLevel(); -}); + $.get(location.href, function(data) + { + $data = $(data); + $('#actionbox ol.histories-list').html($data.find('#actionbox ol.histories-list').html()); + $('.side-col').html($data.find('.side-col').html()); + + if($('#actionbox ol.histories-list #lastComment').length > 0) $('#actionbox ol.histories-list #lastComment').kindeditor(); + }); +} diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index 995fb04143..a4b271b2e0 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -165,6 +165,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field) 30) break;?> + diff --git a/module/task/view/finish.html.php b/module/task/view/finish.html.php index 896ee890f5..42f5af056e 100644 --- a/module/task/view/finish.html.php +++ b/module/task/view/finish.html.php @@ -56,19 +56,23 @@
task->hour;?>
- - - team) ? $lang->task->consumed : $lang->task->myConsumed;?> - team) ? $task->consumed : (float)$task->myConsumed;?> - " . (float)$consumed . " " . $lang->workingHour . html::hidden('consumed', $consumed); - js::set('consumed', $consumed); - ?> +
+
team) ? $lang->task->consumed : $lang->task->myConsumed;?>
+
+ team) ? $task->consumed : (float)$task->myConsumed;?> + " . (float)$consumed . " " . $lang->workingHour . html::hidden('consumed', $consumed); + js::set('consumed', $consumed); + ?> +
+
+ + '> - team) and $task->mode == 'linear') ? $lang->task->transferTo : $lang->task->assign;?> + task->assign;?> team) and $task->mode == 'linear') @@ -83,11 +87,25 @@ - team) ? $lang->task->realStarted : $lang->task->my . $lang->task->realStarted;?> -
realStarted != '0000-00-00 00:00:00' ? $task->realStarted : '', "class='form-control form-datetime'");?>
+ task->realStarted;?> + +
+ realStarted; + $readonly = 'readonly'; + if(helper::isZeroDate($realStarted)) + { + $realStarted = ''; + $readonly = ''; + } + ?> + +
+ + - team) ? $lang->task->finishedDate : $lang->task->my . $lang->task->finishedDate;?> + task->finishedDate;?>
diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index 6b1dae6b4b..e9295dfee2 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -250,7 +250,7 @@ $lang->testcase->action->unlinkedfromproject = array('main' => '$date, 由 testcase->action->linked2execution = array('main' => '$date, 由 $actor 关联到' . $lang->executionCommon . ' $extra。'); $lang->testcase->action->unlinkedfromexecution = array('main' => '$date, 由 $actor 从' . $lang->executionCommon . ' $extra 移除。'); -$lang->testcase->featureBar['browse']['all'] = $lang->testcase->allCases; +$lang->testcase->featureBar['browse']['all'] = '全部'; $lang->testcase->featureBar['browse']['wait'] = '待评审'; $lang->testcase->featureBar['browse']['needconfirm'] = $lang->testcase->needConfirm; $lang->testcase->featureBar['browse']['group'] = '分组查看'; diff --git a/module/testcase/model.php b/module/testcase/model.php index 29aa2d91dd..31b49ffd65 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -2504,8 +2504,8 @@ class testcaseModel extends model return $this->buildMenu('testcase', 'confirmstorychange', $params, $case, 'browse', 'confirm', 'hiddenwin', '', '', '', $this->lang->confirm); } - $menu .= $this->buildMenu('testtask', 'results', "runID=0&$params", $case, 'browse', '', '', 'iframe', true, "data-width='95%'"); $menu .= $this->buildMenu('testtask', 'runCase', "runID=0&$params&version=$case->version", $case, 'browse', 'play', '', 'runCase iframe', false, "data-width='95%'"); + $menu .= $this->buildMenu('testtask', 'results', "runID=0&$params", $case, 'browse', '', '', 'iframe', true, "data-width='95%'"); $editParams = $params; if($this->app->tab == 'project') $editParams .= "&comment=false&projectID={$this->session->project}"; diff --git a/module/testtask/js/results.js b/module/testtask/js/results.js index f9ee0f657c..b4f965d249 100644 --- a/module/testtask/js/results.js +++ b/module/testtask/js/results.js @@ -24,3 +24,4 @@ $(function() $('tr:first').click(); }); + diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php index 4739aa7e43..863099cbfe 100644 --- a/module/testtask/lang/zh-cn.php +++ b/module/testtask/lang/zh-cn.php @@ -148,7 +148,7 @@ $lang->testtask->finishedDateLess = '实际完成日期不能小于开始日期 $lang->testtask->finishedDateMore = '实际完成日期不能大于今天'; $lang->testtask->assignedToMe = '指派给我'; -$lang->testtask->allCases = '所有用例'; +$lang->testtask->allCases = '全部用例'; $lang->testtask->lblCases = '用例列表'; $lang->testtask->lblUnlinkCase = '移除用例'; diff --git a/module/testtask/model.php b/module/testtask/model.php index 7468f426b1..78c163c20b 100755 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1622,8 +1622,8 @@ class testtaskModel extends model common::printIcon('testcase', 'createBug', "product=$run->product&branch=$run->branch&extra=executionID=$task->execution,buildID=$task->build,caseID=$run->case,version=$run->version,runID=$run->id,testtask=$task->id", $run, 'list', 'bug', '', 'iframe', '', "data-width='90%'"); - common::printIcon('testtask', 'results', "id=$run->id", $run, 'list', '', '', 'iframe', '', "data-width='90%'"); common::printIcon('testtask', 'runCase', "id=$run->id", $run, 'list', 'play', '', 'runCase iframe', false, "data-width='95%'"); + common::printIcon('testtask', 'results', "id=$run->id", $run, 'list', '', '', 'iframe', '', "data-width='90%'"); if(common::hasPriv('testtask', 'unlinkCase', $run)) { diff --git a/module/tree/model.php b/module/tree/model.php index 8c8a2582ec..ed31f2a3d9 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1452,7 +1452,7 @@ class treeModel extends model $module = $this->getById((int)$moduleID); if(empty($module)) return array(); - return $this->dao->select('id')->from(TABLE_MODULE)->where("CONCAT(',', path, ',')")->like("%,$module->path,%")->andWhere('deleted')->eq(0)->fetchPairs(); + return $this->dao->select('id')->from(TABLE_MODULE)->where("CONCAT(',', path, ',')")->like("%$module->path%")->andWhere('deleted')->eq(0)->fetchPairs(); } /** diff --git a/test/data/user.yaml b/test/data/user.yaml index f1f96e460b..9891eb8a6d 100644 --- a/test/data/user.yaml +++ b/test/data/user.yaml @@ -29,7 +29,7 @@ fields: range: [],1-99,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,1-100,[]{4} - field: password note: "密码" - range: 123qwe!@#{346} + range: 123Qwe!@#{346} format: md5 - field: role note: "职位" diff --git a/test/lib/controlapi.php b/test/lib/controlapi.php index ca160059b4..23b4aa8beb 100755 --- a/test/lib/controlapi.php +++ b/test/lib/controlapi.php @@ -15,7 +15,7 @@ class apiCheckModel global $argv; $path = $argv[1]; $entries = ''; - if($argv[2]) $entries = $argv[2]; + if(isset($argv[2])) $entries = $argv[2]; $this->run($argv[1], $entries); } diff --git a/test/lib/db.class.php b/test/lib/db.class.php index e0cc0cf622..71a3b48d09 100644 --- a/test/lib/db.class.php +++ b/test/lib/db.class.php @@ -145,8 +145,14 @@ class db { $this->dao->query('DROP DATABASE IF EXISTS ' . $this->config->test->dbPrefix . $i); $this->dao->query('CREATE DATABASE ' . $this->config->test->dbPrefix . $i); - - shell_exec("mysql -h{$this->config->db->host} -u {$this->config->db->user} -p{$this->config->db->password} -P {$this->config->db->port} {$this->config->test->dbPrefix}{$i} < {$this->sqlFile}"); + if($this->config->db->host = 'localhost' and $this->config->db->port = '3306') + { + shell_exec("mysql -u {$this->config->db->user} -p{$this->config->db->password} {$this->config->test->dbPrefix}{$i} < {$this->sqlFile}"); + } + else + { + shell_exec("mysql -h{$this->config->db->host} -u {$this->config->db->user} -p{$this->config->db->password} -P {$this->config->db->port} {$this->config->test->dbPrefix}{$i} < {$this->sqlFile}"); + } } } } diff --git a/test/lib/utils.php b/test/lib/utils.php index 60e0f6a9d5..baa2b68448 100755 --- a/test/lib/utils.php +++ b/test/lib/utils.php @@ -218,12 +218,19 @@ function zdRun() function copyDB() { global $config, $dao; - - $dumpCommand = "mysqldump -h%s -P%s -u%s -p%s %s --add-drop-table=false > %s"; - $sqlFile = TEST_BASEHPATH . DS . 'tmp/raw.sql'; + $sqlFile = TEST_BASEHPATH . DS . 'tmp/raw.sql'; + if($config->db->host = 'localhost' and $config->db->port = '3306') + { + $dumpCommand = "mysqldump -u%s -p%s %s --add-drop-table=false > %s"; + $dumpCommand = sprintf($dumpCommand, $config->db->user, $config->db->password, $config->test->rawDB, $sqlFile); + } + else + { + $dumpCommand = "mysqldump -h%s -P%s -u%s -p%s %s --add-drop-table=false > %s"; + $dumpCommand = sprintf($dumpCommand, $config->db->host, $config->db->port, $config->db->user, $config->db->password, $config->test->rawDB, $sqlFile); + } $currentDBNum = $dao->query("select count(*) as num from information_schema.SCHEMATA where SCHEMA_NAME like '" . $config->test->dbPrefix . "%'")->fetch(); - $dumpCommand = sprintf($dumpCommand, $config->db->host, $config->db->port, $config->db->user, $config->db->password, $config->test->rawDB, $sqlFile); shell_exec($dumpCommand); $dbNum = $config->test->dbNum; @@ -238,7 +245,14 @@ function copyDB() { if($currentDBNum->num > 0) $dao->query('DROP DATABASE IF EXISTS ' . $db); $dao->query('CREATE DATABASE ' . $db); - shell_exec("mysql -h{$config->db->host} -P {$config->db->port} -u{$config->db->user} -p{$config->db->password} $db < $sqlFile"); + if($config->db->host = 'localhost' and $config->db->port = '3306') + { + shell_exec("mysql -u{$config->db->user} -p{$config->db->password} $db < $sqlFile"); + } + else + { + shell_exec("mysql -h{$config->db->host} -P {$config->db->port} -u{$config->db->user} -p{$config->db->password} $db < $sqlFile"); + } echo '数据库<' . $db . '>复制成功!' . PHP_EOL; } }