From b33c6529534f4af0697e5a689c97ed851a8e8937 Mon Sep 17 00:00:00 2001 From: mayue Date: Tue, 28 Jun 2022 16:01:28 +0800 Subject: [PATCH 001/100] * Add some code. --- module/story/control.php | 23 ++++++++++++++++++++ module/story/js/create.js | 36 +++++++++++++++++++++++++++++-- module/story/model.php | 1 + module/story/view/create.html.php | 8 ++++++- 4 files changed, 65 insertions(+), 3 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index a97bad0cb6..ef6da62ed6 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -2591,4 +2591,27 @@ class story extends control } echo $status; } + + /** + * Ajax get story assignee. + * + * @param $type create|review|change + * + * @access public + * @return void + */ + public function ajaxGetAssignedTo($type = '', $assignees = '') + { + $users = $this->loadModel('user')->getPairs('noletter|noclosed'); + + if($type = 'create') + { + $selectUser = is_array($assignees) ? current($assignees) : ''; + + return print(html::select('assignedTo', $users, $selectUser, "class='from-control picker-select'")); + } + + return false; + + } } diff --git a/module/story/js/create.js b/module/story/js/create.js index 938aa71652..6ba0258b5f 100644 --- a/module/story/js/create.js +++ b/module/story/js/create.js @@ -16,6 +16,12 @@ $(function() }); $('#needNotReview').change(); + $('#reviewer').on('change', function() + { + loadAssignedTo(); + }); + $('#reviewer').change(); + // init pri selector $('#pri').on('change', function() { @@ -33,16 +39,42 @@ $(function() if($.inArray(source, feedbackSource) != -1) { $('#feedbackBox').removeClass('hidden'); - $('#reviewerBox').attr('colspan', 2); + $('#reviewerBox').attr('colspan', 1); + $('#assignedToBox').attr('colspan', 1); } else { $('#feedbackBox').addClass('hidden'); - $('#reviewerBox').attr('colspan', 4); + $('#reviewerBox').attr('colspan', 2); + $('#assignedToBox').attr('colspan', 2); } }); }); +function loadAssignedTo() +{ + var assignees = $('#reviewer').val(); + var link = createLink('story', 'ajaxGetAssignedTo', 'type=create&assignees=' + assignees); + $.post(link, function(data) + { + $('#assignedTo').replaceWith(data); + $('#assignedToBox .picker').remove(); + $('#assignedTo').picker(); + }); + + var colspan = $('#assignedToBox').attr('colspan'); + if(assignees && assignees.length == 1) + { + $('#assignedToBox').addClass('hidden'); + $('#reviewerBox').attr('colspan', colspan * 2); + } + else + { + $('#assignedToBox').removeClass('hidden'); + $('#reviewerBox').attr('colspan', colspan); + } +} + function refreshPlan() { loadProductPlans($('#product').val(), $('#branch').val()); diff --git a/module/story/model.php b/module/story/model.php index a667e0c34f..73373cf96f 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -219,6 +219,7 @@ class storyModel extends model ->setIF(!in_array($this->post->source, $this->config->story->feedbackSource), 'notifyEmail', '') ->setIF($executionID > 0, 'stage', 'projected') ->setIF($bugID > 0, 'fromBug', $bugID) + ->join('assignedTo', '') ->join('mailto', ',') ->stripTags($this->config->story->editor->create['id'], $this->config->allowedTags) ->remove('files,labels,reviewer,needNotReview,newStory,uid,contactListMenu,URS,region,lane') diff --git a/module/story/view/create.html.php b/module/story/view/create.html.php index 65afdf1cae..d86cb8df14 100644 --- a/module/story/view/create.html.php +++ b/module/story/view/create.html.php @@ -103,7 +103,7 @@ story->reviewedBy;?> - ' id='reviewerBox'> + ' id='reviewerBox'>
story->checkForceReview()):?>
@@ -124,6 +124,12 @@
+ ' id='assignedToBox'> +
+
story->assignedTo;?>
+ +
+ From 6f4e6390cba6163faf3aedf098b9fe18dfd919fb Mon Sep 17 00:00:00 2001 From: leiyong <1549684884@qq.com> Date: Wed, 29 Jun 2022 06:02:23 +0000 Subject: [PATCH 002/100] * It is judged that the project name cannot be empty. --- module/execution/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index bcfe9f25f4..4226b06b88 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -305,7 +305,7 @@ class executionModel extends model return false; } - if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end'], $_POST['name']); + if($this->config->systemMode == 'new' and !empty($_POST['name'])) $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end'], $_POST['name']); if(dao::isError()) return false; /* Determine whether to add a sprint or a stage according to the model of the execution. */ @@ -500,7 +500,7 @@ class executionModel extends model if(in_array($execution->status, array('closed', 'suspended'))) $this->computeBurn($executionID); - if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $execution->name); + if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project) and !empty($execution->name)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $execution->name); if(dao::isError()) return false; /* Child stage inherits parent stage permissions. */ @@ -869,7 +869,7 @@ class executionModel extends model ->remove('comment') ->get(); - if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $oldExecution->name); + if($this->config->systemMode == 'new' and !empty($oldExecution->name)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $oldExecution->name); if(dao::isError()) return false; $execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->putoff['id'], $this->post->uid); From 7b579cfa1fd687ef13352c42c6d471bb24d6700f Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Wed, 29 Jun 2022 15:37:04 +0800 Subject: [PATCH 003/100] * Fix bug#24395. --- module/common/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index bd2c824dc7..880ebdf6e6 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1667,19 +1667,19 @@ EOD; } else { - return html::a($link, "", $target, "class='btn btn-link $extraClass' title='$title' $misc", false); + return html::a($link, "", $target, "class='btn btn-link $extraClass' title=\"$title\" $misc", false); } } else { - return html::a($link, "", $target, "class='btn $extraClass' title='$title' $misc", false) . "\n"; + return html::a($link, "", $target, "class='btn $extraClass' title=\"$title\" $misc", false) . "\n"; } } else { if($type == 'list') { - return "\n"; + return "\n"; } } } From 727211ff467940d9c30783af1ee63f29f68df324 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Wed, 29 Jun 2022 15:49:05 +0800 Subject: [PATCH 004/100] * Fix lang file. --- extension/lite/action/ext/lang/de/lite.php | 11 ++--------- extension/lite/action/ext/lang/en/lite.php | 11 ++--------- extension/lite/action/ext/lang/fr/lite.php | 11 ++--------- extension/lite/action/ext/lang/zh-cn/lite.php | 7 ------- 4 files changed, 6 insertions(+), 34 deletions(-) diff --git a/extension/lite/action/ext/lang/de/lite.php b/extension/lite/action/ext/lang/de/lite.php index fb0fcbad1b..954a91a744 100644 --- a/extension/lite/action/ext/lang/de/lite.php +++ b/extension/lite/action/ext/lang/de/lite.php @@ -59,9 +59,9 @@ $lang->action->dynamicAction->task['linkchildtask'] = 'Link child Task'; $lang->action->label->createchildrenstory = "Create child story"; $lang->action->label->linkchildstory = "Link child story"; -$lang->action->label->unlinkchildrenstory = "CanceledLink child story"; +$lang->action->label->unlinkchildrenstory = "unlinked a child story"; $lang->action->label->linkparentstory = "Link parent story"; -$lang->action->label->unlinkparentstory = "From parent storyCanceledLink"; +$lang->action->label->unlinkparentstory = "CanceledLink from parent story "; $lang->action->label->deletechildrenstory = "Deleted child story"; $lang->action->search->label = array(); @@ -101,13 +101,6 @@ $lang->action->search->label['verified'] = $lang->action->label->ve $lang->action->search->label['login'] = $lang->action->label->login; $lang->action->search->label['logout'] = $lang->action->label->logout; -$lang->action->label->createchildrenstory = "Create child story"; -$lang->action->label->linkchildstory = "Link child story"; -$lang->action->label->unlinkchildrenstory = "unlinked a child story"; -$lang->action->label->linkparentstory = "Link parent story"; -$lang->action->label->unlinkparentstory = "CanceledLink from parent story "; -$lang->action->label->deletechildrenstory = "Deleted child story"; - $lang->action->desc->createchildrenstory = '$date, $actor Create child story $extra。' . "\n"; $lang->action->desc->linkchildstory = '$date, $actor Link child story $extra。' . "\n"; $lang->action->desc->unlinkchildrenstory = '$date, $actor Unlink child story $extra。' . "\n"; diff --git a/extension/lite/action/ext/lang/en/lite.php b/extension/lite/action/ext/lang/en/lite.php index fb0fcbad1b..954a91a744 100644 --- a/extension/lite/action/ext/lang/en/lite.php +++ b/extension/lite/action/ext/lang/en/lite.php @@ -59,9 +59,9 @@ $lang->action->dynamicAction->task['linkchildtask'] = 'Link child Task'; $lang->action->label->createchildrenstory = "Create child story"; $lang->action->label->linkchildstory = "Link child story"; -$lang->action->label->unlinkchildrenstory = "CanceledLink child story"; +$lang->action->label->unlinkchildrenstory = "unlinked a child story"; $lang->action->label->linkparentstory = "Link parent story"; -$lang->action->label->unlinkparentstory = "From parent storyCanceledLink"; +$lang->action->label->unlinkparentstory = "CanceledLink from parent story "; $lang->action->label->deletechildrenstory = "Deleted child story"; $lang->action->search->label = array(); @@ -101,13 +101,6 @@ $lang->action->search->label['verified'] = $lang->action->label->ve $lang->action->search->label['login'] = $lang->action->label->login; $lang->action->search->label['logout'] = $lang->action->label->logout; -$lang->action->label->createchildrenstory = "Create child story"; -$lang->action->label->linkchildstory = "Link child story"; -$lang->action->label->unlinkchildrenstory = "unlinked a child story"; -$lang->action->label->linkparentstory = "Link parent story"; -$lang->action->label->unlinkparentstory = "CanceledLink from parent story "; -$lang->action->label->deletechildrenstory = "Deleted child story"; - $lang->action->desc->createchildrenstory = '$date, $actor Create child story $extra。' . "\n"; $lang->action->desc->linkchildstory = '$date, $actor Link child story $extra。' . "\n"; $lang->action->desc->unlinkchildrenstory = '$date, $actor Unlink child story $extra。' . "\n"; diff --git a/extension/lite/action/ext/lang/fr/lite.php b/extension/lite/action/ext/lang/fr/lite.php index fb0fcbad1b..954a91a744 100644 --- a/extension/lite/action/ext/lang/fr/lite.php +++ b/extension/lite/action/ext/lang/fr/lite.php @@ -59,9 +59,9 @@ $lang->action->dynamicAction->task['linkchildtask'] = 'Link child Task'; $lang->action->label->createchildrenstory = "Create child story"; $lang->action->label->linkchildstory = "Link child story"; -$lang->action->label->unlinkchildrenstory = "CanceledLink child story"; +$lang->action->label->unlinkchildrenstory = "unlinked a child story"; $lang->action->label->linkparentstory = "Link parent story"; -$lang->action->label->unlinkparentstory = "From parent storyCanceledLink"; +$lang->action->label->unlinkparentstory = "CanceledLink from parent story "; $lang->action->label->deletechildrenstory = "Deleted child story"; $lang->action->search->label = array(); @@ -101,13 +101,6 @@ $lang->action->search->label['verified'] = $lang->action->label->ve $lang->action->search->label['login'] = $lang->action->label->login; $lang->action->search->label['logout'] = $lang->action->label->logout; -$lang->action->label->createchildrenstory = "Create child story"; -$lang->action->label->linkchildstory = "Link child story"; -$lang->action->label->unlinkchildrenstory = "unlinked a child story"; -$lang->action->label->linkparentstory = "Link parent story"; -$lang->action->label->unlinkparentstory = "CanceledLink from parent story "; -$lang->action->label->deletechildrenstory = "Deleted child story"; - $lang->action->desc->createchildrenstory = '$date, $actor Create child story $extra。' . "\n"; $lang->action->desc->linkchildstory = '$date, $actor Link child story $extra。' . "\n"; $lang->action->desc->unlinkchildrenstory = '$date, $actor Unlink child story $extra。' . "\n"; diff --git a/extension/lite/action/ext/lang/zh-cn/lite.php b/extension/lite/action/ext/lang/zh-cn/lite.php index 7c12ffc960..e350a4d18e 100644 --- a/extension/lite/action/ext/lang/zh-cn/lite.php +++ b/extension/lite/action/ext/lang/zh-cn/lite.php @@ -101,13 +101,6 @@ $lang->action->search->label['verified'] = $lang->action->label->ve $lang->action->search->label['login'] = $lang->action->label->login; $lang->action->search->label['logout'] = $lang->action->label->logout; -$lang->action->label->createchildrenstory = "创建子目标"; -$lang->action->label->linkchildstory = "关联子目标"; -$lang->action->label->unlinkchildrenstory = "取消关联子目标"; -$lang->action->label->linkparentstory = "关联到父目标"; -$lang->action->label->unlinkparentstory = "从父目标取消关联"; -$lang->action->label->deletechildrenstory = "删除子目标"; - $lang->action->desc->createchildrenstory = '$date, 由 $actor 创建子目标 $extra。' . "\n"; $lang->action->desc->linkchildstory = '$date, 由 $actor 关联子目标 $extra。' . "\n"; $lang->action->desc->unlinkchildrenstory = '$date, 由 $actor 移除子目标 $extra。' . "\n"; From 31ca138b18f57312655a405277bb148571790aac Mon Sep 17 00:00:00 2001 From: liyuchun <563917701@qq.com> Date: Wed, 29 Jun 2022 08:16:20 +0000 Subject: [PATCH 005/100] * Fix bug #23960. --- module/ci/model.php | 1 + module/design/css/linkcommit.css | 1 + 2 files changed, 2 insertions(+) diff --git a/module/ci/model.php b/module/ci/model.php index 5d89266128..076a2fc22c 100644 --- a/module/ci/model.php +++ b/module/ci/model.php @@ -281,6 +281,7 @@ class ciModel extends model } $this->dao->update(TABLE_MR)->data($newMR)->where('id')->eq($relateMR->id)->exec(); + $this->mr->linkObjects($relateMR); } elseif($status != 'success') { diff --git a/module/design/css/linkcommit.css b/module/design/css/linkcommit.css index d1a2a856a5..006029f60f 100644 --- a/module/design/css/linkcommit.css +++ b/module/design/css/linkcommit.css @@ -3,6 +3,7 @@ .searchBox .srearch-date{float: left; width: 20%} .searchBox h4{float:left;display: inline-block} .searchBox span{float:left;line-height:30px} +.body-modal .main-header {z-index: 5;} #logForm .table thead th{background: #efefef} #begin{margin-right:5px} #end{margin-left:5px} From 50dce20f6f0d169b81821b51e92a7666389d7e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Wed, 29 Jun 2022 16:19:54 +0800 Subject: [PATCH 006/100] * Code for action error. --- module/action/model.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index 3df166a917..0a515a7cd4 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -985,9 +985,9 @@ class actionModel extends model } $condition = "((product =',0,' or product=0) AND project = '0' AND execution = 0)"; - if(isset($productCondition)) $condition .= ' OR ' . $productCondition; - if(isset($projectCondition)) $condition .= ' OR ' . $projectCondition; - if(isset($executionCondition)) $condition .= ' OR ' . $executionCondition; + if(!empty($productCondition)) $condition .= ' OR ' . $productCondition; + if(!empty($projectCondition)) $condition .= ' OR ' . $projectCondition; + if(!empty($executionCondition)) $condition .= ' OR ' . $executionCondition; } $actionCondition = $this->getActionCondition(); From 21ea84f2f51dd6769f114022e97cec61f251518b Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 29 Jun 2022 16:21:06 +0800 Subject: [PATCH 007/100] * Add fields to integrate workflow and approval. --- db/update17.1.sql | 12 +++++++++++- db/zentao.sql | 3 +++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/db/update17.1.sql b/db/update17.1.sql index 15d43d1d73..1d27344aab 100644 --- a/db/update17.1.sql +++ b/db/update17.1.sql @@ -18,4 +18,14 @@ ALTER TABLE `zt_kanban` ADD `showWIP` enum('0','1') NOT NULL DEFAULT '1' AFTER ` ALTER TABLE `zt_kanban` ADD `alignment` varchar(10) NOT NULL DEFAULT 'center' AFTER `object`; ALTER TABLE `zt_module` ADD `from` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `type`; -ALTER TABLE `zt_workflow` ADD `approval` enum('enabled', 'disabled') NOT NULL DEFAULT 'disabled' AFTER `status`; \ No newline at end of file +ALTER TABLE `zt_workflow` ADD `approval` enum('enabled', 'disabled') NOT NULL DEFAULT 'disabled' AFTER `status`; +ALTER TABLE `zt_workflowaction` ADD `role` varchar(10) NOT NULL DEFAULT 'custom' AFTER `buildin`; +ALTER TABLE `zt_workflowfield` ADD `role` varchar(10) NOT NULL DEFAULT 'custom' AFTER `buildin`; +ALTER TABLE `zt_workflowlabel` ADD `role` varchar(10) NOT NULL DEFAULT 'custom' AFTER `buildin`; + +UPDATE `zt_workflowaction` SET `role` = 'buildin' WHERE `role` = 'custom' AND `buildin` = '1'; +UPDATE `zt_workflowaction` SET `role` = 'virtual' WHERE `role` = 'custom' AND `virtual` = '1'; +UPDATE `zt_workflowaction` SET `role` = 'default' WHERE `role` = 'custom' AND `action` IN ('browse', 'create', 'batchcreate', 'edit', 'view', 'delete', 'link', 'unlink', 'export', 'exporttemplate', 'import', 'showimport', 'report', 'assign', 'batchedit', 'batchassign'); +UPDATE `zt_workflowfield` SET `role` = 'buildin' WHERE `role` = 'custom' AND (`buildin` = '1' OR `field` = 'subStatus'); +UPDATE `zt_workflowfield` SET `role` = 'default' WHERE `role` = 'custom' AND `field` IN ('id', 'parent', 'assignedTo', 'status', 'createdBy', 'createdDate', 'editedBy', 'editedDate', 'assignedBy', 'assignedDate' 'mailto', 'deleted'); +UPDATE `zt_workflowlabel` SET `role` = 'buildin' WHERE `role` = 'custom' AND `buildin` = '1'; diff --git a/db/zentao.sql b/db/zentao.sql index f5aba4dff7..6508f23ac5 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -8524,6 +8524,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowaction` ( `show` enum('dropdownlist', 'direct') NOT NULL DEFAULT 'dropdownlist', `order` smallint(5) unsigned NOT NULL, `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', `virtual` tinyint(1) unsigned NOT NULL, `conditions` text NOT NULL, `verifications` text NOT NULL, @@ -8587,6 +8588,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowfield` ( `isValue` enum('0', '1') NOT NULL DEFAULT '0', `readonly` enum('0', '1') NOT NULL DEFAULT '0', `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', `desc` text NOT NULL, `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, @@ -8631,6 +8633,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlabel` ( `orderBy` text NOT NULL, `order` tinyint(3) NOT NULL, `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', `createdBy` char(30) NOT NULL, `createdDate` datetime NOT NULL, `editedBy` char(30) NOT NULL, From 49a1cfa087c4a973a091807a693d186612f8f6d5 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 29 Jun 2022 16:24:29 +0800 Subject: [PATCH 008/100] * Fix bug #24529. --- module/testcase/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/testcase/js/common.js b/module/testcase/js/common.js index d68f4b183f..e15400f349 100644 --- a/module/testcase/js/common.js +++ b/module/testcase/js/common.js @@ -403,7 +403,7 @@ function loadStories(productID, moduleID, num) */ function setModules(branchID, productID, num) { - moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=story&branch=' + branchID + '&num=' + num); + moduleLink = createLink('tree', 'ajaxGetModules', 'productID=' + productID + '&viewType=case&branch=' + branchID + '&num=' + num); $.get(moduleLink, function(modules) { if(!modules) modules = ''; From a4966c759b10a7c9fc3aa0645b92d98bb4fe34e3 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Wed, 29 Jun 2022 16:27:58 +0800 Subject: [PATCH 009/100] * Fix bug #24552. --- db/zentao.sql | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/db/zentao.sql b/db/zentao.sql index f5aba4dff7..15f867caff 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -13480,12 +13480,7 @@ REPLACE INTO `zt_zoutput` (`id`, `activity`, `name`, `content`, `optional`, `tai (246, 163, '《配置审计报告》', '', 'yes', '', '', 'admin', '2020-01-09 14:55:08', '', '0000-00-00 00:00:00', 605, '0'), (247, 166, '《度量分析计划》', '', 'yes', '', '', 'admin', '2020-01-09 14:55:08', '', '0000-00-00 00:00:00', 610, '0'), (248, 168, '项目度量数据库', '', 'yes', '', '', 'admin', '2020-01-09 14:55:08', '', '0000-00-00 00:00:00', 615, '0'), -(249, 172, '《量化项目管理及跟踪计划》', '', 'no', '', '', 'admin', '2020-01-09 14:59:04', '', '0000-00-00 00:00:00', 620, '0'), -(250, 170, '《决策分析报告》的决策分析评估表', '', 'no', '', '', 'admin', '2020-01-09 14:59:04', '', '0000-00-00 00:00:00', 625, '0'), -(251, 169, '《量化项目计划及跟踪表》', '', 'no', '', '', 'admin', '2020-01-09 14:59:04', '', '0000-00-00 00:00:00', 630, '0'), -(252, 173, '《决策分析报告》的评分表', '', 'no', '', '', 'admin', '2020-01-09 14:59:04', '', '0000-00-00 00:00:00', 635, '0'), -(253, 174, '《决策分析报告》的评分表', '', 'no', '', '', 'admin', '2020-01-09 14:59:04', '', '0000-00-00 00:00:00', 640, '0'), -(254, 175, '《决策分析报告》', '', 'no', '', '', 'admin', '2020-01-09 14:59:04', '', '0000-00-00 00:00:00', 645, '0'); +(249, 169, '《量化项目计划及跟踪表》', '', 'no', '', '', 'admin', '2020-01-09 14:59:04', '', '0000-00-00 00:00:00', 630, '0'); REPLACE INTO `zt_basicmeas` VALUES (2,'scale','project','userRequest','项目用户需求初始规模','pgmURInitScale','故事点或功能点','CREATE FUNCTION qc_pgmurinitscale($project int) returns float (10,2)\r\nbegin\r\n declare scale float(10,2) default 0__DELIMITER__\r\n declare inited int default 0__DELIMITER__\r\n select qc_cminited($project, \'URS\') into inited__DELIMITER__\r\n IF inited = 1 THEN\r\n select qc_initscale($project, \'URS\',\'requestEst\') into scale__DELIMITER__\r\n return scale__DELIMITER__\r\n ELSE \r\n return 0__DELIMITER__\r\n END IF__DELIMITER__\r\nend','{\"$project\":{\"showName\":\"\\u6240\\u5c5e\\u9879\\u76ee\",\"varName\":\"$project\",\"varType\":\"select\",\"options\":\"project\",\"defaultValue\":\"\"}}','项目每个产品的第一个用户需求规格说明书基线版本的规模之和','从基线表中查询该项目下面每个产品的第一个用户需求规模说明书版本,然后查询对应的需求,求和。','crontab','{\"week\":\"1,2,3,4,5,6,0\",\"type\":\"week\"}','00:00','','system','0000-00-00 00:00:00','admin','2020-07-07 14:19:41',10,'0'), From 815e95eb6cf81d9a72a5565633160c2460bd4ee4 Mon Sep 17 00:00:00 2001 From: sunjun Date: Wed, 29 Jun 2022 08:30:13 +0000 Subject: [PATCH 010/100] fixbug_24544 --- module/testcase/control.php | 1 + module/testcase/lang/de.php | 1 + module/testcase/lang/en.php | 1 + module/testcase/lang/fr.php | 1 + module/testcase/lang/zh-cn.php | 1 + module/testcase/model.php | 3 ++- 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index a336ab1962..b865791e27 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -2172,6 +2172,7 @@ class testcase extends control if(!empty($_POST)) { $this->testcase->importToLib($caseID); + if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); if(!empty($caseID)) return $this->send(array('result' => 'success', 'message' => $this->lang->importSuccess, 'closeModal' => true,)); return $this->send(array('result' => 'success', 'message' => $this->lang->importSuccess, 'locate' => 'reload')); } diff --git a/module/testcase/lang/de.php b/module/testcase/lang/de.php index 49cc37dfb2..75a624b4fc 100644 --- a/module/testcase/lang/de.php +++ b/module/testcase/lang/de.php @@ -94,6 +94,7 @@ $lang->testcase->mailto = 'Mailto'; $lang->testcase->deleted = 'Deleted'; $lang->testcase->browseUnits = 'Unit Test'; $lang->testcase->suite = 'Test Suite'; +$lang->testcase->lib = 'Lib'; $lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case. diff --git a/module/testcase/lang/en.php b/module/testcase/lang/en.php index bf6b80c707..9bb76c9391 100644 --- a/module/testcase/lang/en.php +++ b/module/testcase/lang/en.php @@ -94,6 +94,7 @@ $lang->testcase->mailto = 'Mailto'; $lang->testcase->deleted = 'Deleted'; $lang->testcase->browseUnits = 'Unit Test'; $lang->testcase->suite = 'Test Suite'; +$lang->testcase->lib = 'Lib'; $lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case. diff --git a/module/testcase/lang/fr.php b/module/testcase/lang/fr.php index 3a17ba1246..7e57f446e8 100644 --- a/module/testcase/lang/fr.php +++ b/module/testcase/lang/fr.php @@ -94,6 +94,7 @@ $lang->testcase->mailto = 'Mailto'; $lang->testcase->deleted = 'Deleted'; $lang->testcase->browseUnits = 'Unit Test'; $lang->testcase->suite = 'Test Suite'; +$lang->testcase->lib = 'Lib'; $lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case. diff --git a/module/testcase/lang/zh-cn.php b/module/testcase/lang/zh-cn.php index 74b485c9e9..c439aa93be 100644 --- a/module/testcase/lang/zh-cn.php +++ b/module/testcase/lang/zh-cn.php @@ -94,6 +94,7 @@ $lang->testcase->mailto = '抄送给'; $lang->testcase->deleted = '是否删除'; $lang->testcase->browseUnits = '单元测试'; $lang->testcase->suite = '套件'; +$lang->testcase->lib = '用例库'; $lang->case = $lang->testcase; // 用于DAO检查时使用。因为case是系统关键字,所以无法定义该模块为case,只能使用testcase,但表还是使用的case。 diff --git a/module/testcase/model.php b/module/testcase/model.php index 9e8e8a45b4..90c8d2e501 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -1670,8 +1670,9 @@ class testcaseModel extends model $caseIdList = explode(',' , $caseIdList); $libID = $this->post->lib; - $this->loadModel('action'); + if(empty($libID)) return dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->testcase->lib); + $this->loadModel('action'); $cases = $this->dao->select('*')->from(TABLE_CASE)->where('deleted')->eq(0)->andWhere('id')->in($caseIdList)->fetchAll('id'); $caseSteps = $this->dao->select('*')->from(TABLE_CASESTEP)->where('`case`')->in($caseIdList)->orderBy('id')->fetchGroup('case'); $caseFiles = $this->dao->select('*')->from(TABLE_FILE)->where('objectID')->in($caseIdList)->andWhere('objectType')->eq('testcase')->fetchGroup('objectID', 'id'); From 467b958ba00edf5c2fac4485e7fa9d855b8cecbc Mon Sep 17 00:00:00 2001 From: zhujinyong Date: Wed, 29 Jun 2022 16:35:39 +0800 Subject: [PATCH 011/100] * If run in container, no need check ok.txt. --- framework/base/router.class.php | 11 +++++++++++ www/upgrade.php.tmp | 13 +++++++++++++ 2 files changed, 24 insertions(+) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 03af29a265..d112ebe7f9 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -2831,6 +2831,17 @@ class baseRouter fwrite($fh, "\n"); fclose($fh); } + + /** + * Check app if it is run in a container. + * + * @access public + * @return bool + */ + public function isContainer() + { + return strtolower(getenv('IS_CONTAINER')) == 'true'; + } } /** diff --git a/www/upgrade.php.tmp b/www/upgrade.php.tmp index cb16f99203..a2f2165848 100644 --- a/www/upgrade.php.tmp +++ b/www/upgrade.php.tmp @@ -65,6 +65,19 @@ $app->setDebug(); $config->installedVersion = $common->loadModel('setting')->getVersion(); if(($config->version[0] == $config->installedVersion[0] or (is_numeric($config->version[0]) and is_numeric($config->installedVersion[0]))) and version_compare($config->version, $config->installedVersion) <= 0) die(header('location: index.php')); +/* If run in container, upgrade automatically. */ +if($app->isContainer()) +{ + $upgradeModel = $common->loadModel('upgrade'); + $alterSQL = $upgradeModel->checkConsistency(); + if(!empty($alterSQL)) $upgradeModel->dao->query("SET @@sql_mode= '';" . $alterSQL); + + $config->set('default.method', 'execute'); + $app->session->set('upgrading', true); + $app->session->set('step', ''); + $app->post->set('fromVersion', str_replace( '.', '_', strtolower($config->installedVersion))); +} + /* Run it. */ $app->parseRequest(); if($common->checkUpgradeStatus()) $app->loadModule(); From 6289859fb27ec433b47006ef13e002b649774a31 Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 29 Jun 2022 16:40:57 +0800 Subject: [PATCH 012/100] * Finish task #58767. --- module/story/control.php | 57 +++++++++++++++++++++++++++---- module/story/js/change.js | 31 +++++++++++++++++ module/story/js/create.js | 8 ++++- module/story/js/review.js | 46 +++++++++++++++++++++---- module/story/model.php | 13 +++++-- module/story/view/change.html.php | 8 ++++- module/story/view/review.html.php | 7 +++- 7 files changed, 152 insertions(+), 18 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index ef6da62ed6..87cfc0166f 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1284,10 +1284,11 @@ class story extends control $this->view->position[] = $this->lang->story->common; $this->view->position[] = $this->lang->story->review; - $this->view->product = $product; - $this->view->story = $story; - $this->view->actions = $this->action->getList('story', $storyID); - $this->view->users = $this->loadModel('user')->getPairs('nodeleted', "$story->lastEditedBy,$story->openedBy"); + $this->view->product = $product; + $this->view->story = $story; + $this->view->actions = $this->action->getList('story', $storyID); + $this->view->users = $this->loadModel('user')->getPairs('nodeleted|noletter', "$story->lastEditedBy,$story->openedBy"); + $this->view->reviewers = $reviewers; /* Get the affcected things. */ $this->story->getAffectedScope($this->view->story); @@ -2595,16 +2596,58 @@ class story extends control /** * Ajax get story assignee. * - * @param $type create|review|change + * @param string $type create|review|change + * @param int $storyID + * @param array $assignees * * @access public * @return void */ - public function ajaxGetAssignedTo($type = '', $assignees = '') + public function ajaxGetAssignedTo($type = '', $storyID = 0, $assignees = '') { $users = $this->loadModel('user')->getPairs('noletter|noclosed'); - if($type = 'create') + if($type == 'create') + { + $selectUser = is_array($assignees) ? current($assignees) : ''; + + return print(html::select('assignedTo', $users, $selectUser, "class='from-control picker-select'")); + } + + if($type == 'review') + { + $story = $this->story->getByID($storyID); + $reviewers = $this->story->getReviewerPairs($storyID, $story->version); + $isChanged = $story->changedBy ? true : false; + $isSuperReviewer = strpos(',' . trim(zget($this->config->story, 'superReviewers', ''), ',') . ',', ',' . $this->app->user->account . ','); + + if(count($reviewers) == 1) + { + $selectUser = $isChanged ? $story->changedBy : $story->openedBy; + } + else + { + unset($reviewers[$this->app->user->account]); + foreach($reviewers as $account => $result) + { + if(!$reviewers[$account]) + { + $selectUser = $account; + break; + } + else + { + $selectUser = $isChanged ? $story->changedBy : $story->openedBy; + } + } + } + + if($isSuperReviewer !== false) $selectUser = $isChanged ? $story->changedBy : $story->openedBy; + + return print(html::select('assignedTo', $users, $selectUser, "class='from-control picker-select'")); + } + + if($type == 'change') { $selectUser = is_array($assignees) ? current($assignees) : ''; diff --git a/module/story/js/change.js b/module/story/js/change.js index bdab28bdaa..4a33c6cb57 100644 --- a/module/story/js/change.js +++ b/module/story/js/change.js @@ -11,8 +11,39 @@ $(function() { $('.input-group-addon').addClass('required'); } + + loadAssignedTo(); }); $('#needNotReview').change(); if($('.tabs .tab-content .tab-pane.active').children().length == 0) $('.tabs .nav-tabs li.active').css('border-bottom', '1px solid #ccc'); }); + +/** + * Load assignedTo. + * + * @access public + * @return void + */ +function loadAssignedTo() +{ + var assignees = $('#reviewer').val(); + var link = createLink('story', 'ajaxGetAssignedTo', 'type=change&storyID=' + storyID + '&assignees=' + assignees); + $.post(link, function(data) + { + $('#assignedTo').replaceWith(data); + $('#assignedToBox .picker').remove(); + $('#assignedTo').picker(); + }); + + if($('#needNotReview').is(':checked')) + { + $('#assignedToBox').removeClass('hidden'); + $('#reviewerBox').attr('colspan', 1); + } + else + { + $('#assignedToBox').addClass('hidden'); + $('#reviewerBox').attr('colspan', 2); + } +} diff --git a/module/story/js/create.js b/module/story/js/create.js index 6ba0258b5f..f0ed466ae8 100644 --- a/module/story/js/create.js +++ b/module/story/js/create.js @@ -51,10 +51,16 @@ $(function() }); }); +/** + * Load assignedTo. + * + * @access public + * @return void + */ function loadAssignedTo() { var assignees = $('#reviewer').val(); - var link = createLink('story', 'ajaxGetAssignedTo', 'type=create&assignees=' + assignees); + var link = createLink('story', 'ajaxGetAssignedTo', 'type=create&storyID=0&assignees=' + assignees); $.post(link, function(data) { $('#assignedTo').replaceWith(data); diff --git a/module/story/js/review.js b/module/story/js/review.js index 0ffa50543d..b310cfa1d6 100644 --- a/module/story/js/review.js +++ b/module/story/js/review.js @@ -6,6 +6,8 @@ function switchShow(result) { $('#rejectedReasonBox').show(); $('#preVersionBox').hide(); + $('#assignedToBox').hide(); + if(isMultiple) loadAssignedTo(); } else if(result == 'revert') { @@ -13,19 +15,34 @@ function switchShow(result) $('#rejectedReasonBox').hide(); $('#duplicateStoryBox').hide(); $('#childStoriesBox').hide(); + $('#assignedToBox').show(); + loadAssignedTo(); } - else + else if(result == 'clarify') { - if(result == 'pass') - { - $('#priBox').show(); - $('#estimateBox').show(); - } $('#preVersionBox').hide(); $('#rejectedReasonBox').hide(); $('#duplicateStoryBox').hide(); $('#childStoriesBox').hide(); $('#rejectedReasonBox').hide(); + $('#assignedToBox').show(); + loadAssignedTo(); + } + else + { + $('#preVersionBox').hide(); + $('#rejectedReasonBox').hide(); + $('#duplicateStoryBox').hide(); + $('#childStoriesBox').hide(); + $('#rejectedReasonBox').hide(); + $('#assignedToBox').hide(); + if(result == 'pass') + { + $('#priBox').show(); + $('#estimateBox').show(); + $('#assignedToBox').show(); + loadAssignedTo(); + } } getStatus('review', "storyID=" + storyID + ",result=" + result); @@ -50,6 +67,23 @@ function setStory(reason) } } +/** + * Load assignedTo. + * + * @access public + * @return void + */ +function loadAssignedTo() +{ + var link = createLink('story', 'ajaxGetAssignedTo', 'type=review&storyID=' + storyID); + $.post(link, function(data) + { + $('#assignedTo').replaceWith(data); + $('#assignedToBox .picker').remove(); + $('#assignedTo').picker(); + }); +} + $(function() { if($('.tabs .tab-content .tab-pane.active').children().length == 0) $('.tabs .nav-tabs li.active').css('border-bottom', '1px solid #ccc'); diff --git a/module/story/model.php b/module/story/model.php index 73373cf96f..7cb7b82bb2 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -681,15 +681,21 @@ class storyModel extends model ->setIF($specChanged and $oldStory->status == 'active' and $this->post->needNotReview == false, 'status', 'changed') ->setIF($oldStory->status == 'draft' and $this->post->needNotReview, 'status', 'active') ->setIF($specChanged, 'reviewedBy', '') + ->setIF($specChanged, 'changedBy', $this->app->user->account) + ->setIF($specChanged, 'changedDate', $now) ->setIF($specChanged, 'closedBy', '') ->setIF($specChanged, 'closedReason', '') ->setIF($specChanged and $oldStory->reviewedBy, 'reviewedDate', '0000-00-00') ->setIF($specChanged and $oldStory->closedBy, 'closedDate', '0000-00-00') ->stripTags($this->config->story->editor->change['id'], $this->config->allowedTags) - ->remove('files,labels,reviewer,comment,needNotReview,uid') + ->remove('files,labels,reviewer,comment,needNotReview,uid,assignedTo') ->get(); if($specChanged and isset($story->status) && $story->status == 'active' and $this->checkForceReview()) $story->status = 'changed'; $story = $this->loadModel('file')->processImgURL($story, $this->config->story->editor->change['id'], $this->post->uid); + + /* Add story assignedTo. */ + if($this->post->assignedTo) $story->assignedTo = $this->post->assignedTo; + $this->dao->update(TABLE_STORY)->data($story, 'spec,verify') ->autoCheck() ->batchCheck($this->config->story->change->requiredFields, 'notempty') @@ -1337,7 +1343,7 @@ class storyModel extends model ->removeIF($this->post->result == 'reject' and $this->post->closedReason != 'subdivided', 'childStories') ->add('reviewedBy', $oldStory->reviewedBy . ',' . $this->app->user->account) ->add('id', $storyID) - ->remove('result,preVersion,comment') + ->remove('result,preVersion,comment,assignedTo') ->get(); $story = $this->loadModel('file')->processImgURL($story, $this->config->story->editor->review['id'], $this->post->uid); @@ -1356,6 +1362,9 @@ class storyModel extends model if(count($reviewers) > 1) $skipFields = 'closedReason'; } + /* Add story assignedTo. */ + if($this->post->assignedTo) $story->assignedTo = $this->post->assignedTo; + $this->dao->update(TABLE_STORY)->data($story, $skipFields) ->autoCheck() ->batchCheck($this->config->story->review->requiredFields, 'notempty') diff --git a/module/story/view/change.html.php b/module/story/view/change.html.php index 79333c1e1e..893a942896 100644 --- a/module/story/view/change.html.php +++ b/module/story/view/change.html.php @@ -24,7 +24,7 @@ - + diff --git a/module/story/view/review.html.php b/module/story/view/review.html.php index 1e1d20a6dc..ad053920d1 100644 --- a/module/story/view/review.html.php +++ b/module/story/view/review.html.php @@ -29,7 +29,11 @@ - + + + + + @@ -85,4 +89,5 @@ id);?> type);?> app->rawModule);?> + From 9802debcadf8513b15dae98b6ccb989e8926a542 Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 29 Jun 2022 16:51:06 +0800 Subject: [PATCH 013/100] * Optimize code. --- module/story/model.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 7cb7b82bb2..ff75d69136 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -677,6 +677,7 @@ class storyModel extends model ->setDefault('lastEditedBy', $this->app->user->account) ->add('id', $storyID) ->add('lastEditedDate', $now) + ->setIF(!$this->post->assignedTo, 'assignedTo', '') ->setIF($specChanged, 'version', $oldStory->version + 1) ->setIF($specChanged and $oldStory->status == 'active' and $this->post->needNotReview == false, 'status', 'changed') ->setIF($oldStory->status == 'draft' and $this->post->needNotReview, 'status', 'active') @@ -688,14 +689,11 @@ class storyModel extends model ->setIF($specChanged and $oldStory->reviewedBy, 'reviewedDate', '0000-00-00') ->setIF($specChanged and $oldStory->closedBy, 'closedDate', '0000-00-00') ->stripTags($this->config->story->editor->change['id'], $this->config->allowedTags) - ->remove('files,labels,reviewer,comment,needNotReview,uid,assignedTo') + ->remove('files,labels,reviewer,comment,needNotReview,uid') ->get(); if($specChanged and isset($story->status) && $story->status == 'active' and $this->checkForceReview()) $story->status = 'changed'; $story = $this->loadModel('file')->processImgURL($story, $this->config->story->editor->change['id'], $this->post->uid); - /* Add story assignedTo. */ - if($this->post->assignedTo) $story->assignedTo = $this->post->assignedTo; - $this->dao->update(TABLE_STORY)->data($story, 'spec,verify') ->autoCheck() ->batchCheck($this->config->story->change->requiredFields, 'notempty') @@ -1336,6 +1334,7 @@ class storyModel extends model ->setDefault('status', $oldStory->status) ->setDefault('reviewedDate', $date) ->stripTags($this->config->story->editor->review['id'], $this->config->allowedTags) + ->setIF(!$this->post->assignedTo, 'assignedTo', '') ->setIF($this->post->result == 'revert', 'version', $this->post->preVersion) ->setIF($this->post->result == 'clarify', 'assignedTo', $oldStory->lastEditedBy ? $oldStory->lastEditedBy : $oldStory->openedBy) ->removeIF($this->post->result != 'reject', 'closedReason, duplicateStory, childStories') @@ -1362,9 +1361,6 @@ class storyModel extends model if(count($reviewers) > 1) $skipFields = 'closedReason'; } - /* Add story assignedTo. */ - if($this->post->assignedTo) $story->assignedTo = $this->post->assignedTo; - $this->dao->update(TABLE_STORY)->data($story, $skipFields) ->autoCheck() ->batchCheck($this->config->story->review->requiredFields, 'notempty') From 02b6efaee0afd45e59a36c9fc1600015ab47ee60 Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 29 Jun 2022 16:53:05 +0800 Subject: [PATCH 014/100] * Optimize code. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index ff75d69136..a0b3ee5c18 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1342,7 +1342,7 @@ class storyModel extends model ->removeIF($this->post->result == 'reject' and $this->post->closedReason != 'subdivided', 'childStories') ->add('reviewedBy', $oldStory->reviewedBy . ',' . $this->app->user->account) ->add('id', $storyID) - ->remove('result,preVersion,comment,assignedTo') + ->remove('result,preVersion,comment') ->get(); $story = $this->loadModel('file')->processImgURL($story, $this->config->story->editor->review['id'], $this->post->uid); From 5feb83eef70f4d8a6ca6e1c5f5ced4f03a457247 Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 29 Jun 2022 16:54:27 +0800 Subject: [PATCH 015/100] * Optimize code. --- module/story/model.php | 1 - 1 file changed, 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index a0b3ee5c18..7dcf10a505 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -693,7 +693,6 @@ class storyModel extends model ->get(); if($specChanged and isset($story->status) && $story->status == 'active' and $this->checkForceReview()) $story->status = 'changed'; $story = $this->loadModel('file')->processImgURL($story, $this->config->story->editor->change['id'], $this->post->uid); - $this->dao->update(TABLE_STORY)->data($story, 'spec,verify') ->autoCheck() ->batchCheck($this->config->story->change->requiredFields, 'notempty') From fcda0450401b82a7a8dfdaa3f981b834074aea58 Mon Sep 17 00:00:00 2001 From: sunjun Date: Wed, 29 Jun 2022 08:55:08 +0000 Subject: [PATCH 016/100] fixbug_24544 --- module/testcase/control.php | 3 +-- module/testcase/view/importtolib.html.php | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index b865791e27..904a3661d3 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -2168,12 +2168,11 @@ class testcase extends control */ public function importToLib($caseID = 0) { - $caseIDList = $this->post->caseIDList; if(!empty($_POST)) { $this->testcase->importToLib($caseID); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); - if(!empty($caseID)) return $this->send(array('result' => 'success', 'message' => $this->lang->importSuccess, 'closeModal' => true,)); + if(!empty($caseID)) return $this->send(array('result' => 'success', 'message' => $this->lang->importSuccess, 'closeModal' => true)); return $this->send(array('result' => 'success', 'message' => $this->lang->importSuccess, 'locate' => 'reload')); } $this->view->libraries = $this->loadModel('caselib')->getLibraries(); diff --git a/module/testcase/view/importtolib.html.php b/module/testcase/view/importtolib.html.php index 1148be80f9..a5c6f1fccc 100644 --- a/module/testcase/view/importtolib.html.php +++ b/module/testcase/view/importtolib.html.php @@ -25,6 +25,7 @@ + From 461235a04834a76bd1acf90cc3856ed3e9d11654 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 29 Jun 2022 09:00:33 +0000 Subject: [PATCH 017/100] * Fix bug #24417. --- module/product/js/all.js | 21 ++++++++++++++++++--- module/program/lang/de.php | 5 +++-- module/program/lang/en.php | 5 +++-- module/program/lang/fr.php | 5 +++-- module/program/lang/zh-cn.php | 5 +++-- module/program/model.php | 11 +++++++---- module/project/lang/de.php | 2 +- module/project/lang/fr.php | 2 +- module/project/lang/zh-cn.php | 26 ++++++++++++++------------ module/project/model.php | 13 +++++++++++++ 10 files changed, 66 insertions(+), 29 deletions(-) diff --git a/module/product/js/all.js b/module/product/js/all.js index e3e8a72217..d468307e32 100644 --- a/module/product/js/all.js +++ b/module/product/js/all.js @@ -77,6 +77,21 @@ $(function() } } + function debounce(fn,delay) + { + var timer = null; + return function() + { + if(timer) clearTimeout(timer); + timer = setTimeout(fn,delay) + } + } + + function updateStatistic() + { + debounce(addStatistic(), 200) + } + $('#productTableList').on('click', '.row-program,.row-line', function(e) { if($(e.target).closest('.table-nest-toggle,a').length) return; @@ -96,7 +111,7 @@ $(function() { updatePrarentCheckbox($('#productTableList>tr[data-id="' + parentID + '"]')); } - addStatistic() + updateStatistic() }); $('#productListForm').on('checkChange', updateCheckboxes); @@ -104,7 +119,7 @@ $(function() $(":checkbox[name^='productIDList']").on('click', function() { - addStatistic() + updateStatistic() }); $(".check-all").on('click', function() @@ -117,6 +132,6 @@ $(function() { $(":checkbox[name^='productIDList']").prop('checked', true); } - addStatistic() + updateStatistic() }); }); diff --git a/module/program/lang/de.php b/module/program/lang/de.php index 86fcbcd233..fa898bb47a 100644 --- a/module/program/lang/de.php +++ b/module/program/lang/de.php @@ -47,6 +47,7 @@ $lang->program->realDuration = 'RealDuration'; $lang->program->openedVersion = 'OpenedVersion'; $lang->program->lastEditedBy = 'LastEditedBy'; $lang->program->lastEditedDate = 'LastEditedDate'; +$lang->program->childProgram = 'Child Program'; /* Actions. */ $lang->program->common = 'Program'; @@ -101,8 +102,8 @@ $lang->program->tips = 'If a parent program is selected, the produ $lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?"; $lang->program->beginLetterParent = 'The start date of the program "%s" should be ≥ the start date of the parent program "%s": %s.'; $lang->program->endGreaterParent = 'The finish date of the program "%s" should be ≤ the finish date of the parent program "%s": %s.'; -$lang->program->beginGreateChild = 'The start date of the parent program "%s" should be ≤the minimum start time of the subprogram "%s": %s.'; -$lang->program->endLetterChild = 'The finish time of the parent program "%s" should be ≥ the maximum finish time of the subprogram "%s": %s.'; +$lang->program->beginGreateChild = 'The start date of the parent program "%s" should be ≤the minimum start time of the %s "%s": %s.'; +$lang->program->endLetterChild = 'The finish time of the parent program "%s" should be ≥ the maximum finish time of the %s "%s": %s.'; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.'; $lang->program->hasProduct = 'It has products. You cannot delete it.'; diff --git a/module/program/lang/en.php b/module/program/lang/en.php index 44a8f7ac5d..ea3984b164 100644 --- a/module/program/lang/en.php +++ b/module/program/lang/en.php @@ -47,6 +47,7 @@ $lang->program->realDuration = 'RealDuration'; $lang->program->openedVersion = 'OpenedVersion'; $lang->program->lastEditedBy = 'LastEditedBy'; $lang->program->lastEditedDate = 'LastEditedDate'; +$lang->program->childProgram = 'Child Program'; /* Actions. */ $lang->program->common = 'Program'; @@ -101,8 +102,8 @@ $lang->program->tips = 'If a parent program is selected, the produ $lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?"; $lang->program->beginLetterParent = 'The start date of the program "%s" should be ≥ the start date of the parent program "%s": %s.'; $lang->program->endGreaterParent = 'The finish date of the program "%s" should be ≤ the finish date of the parent program "%s": %s.'; -$lang->program->beginGreateChild = 'The start date of the parent program "%s" should be ≤the minimum start time of the subprogram "%s": %s.'; -$lang->program->endLetterChild = 'The finish time of the parent program "%s" should be ≥ the maximum finish time of the subprogram "%s": %s.'; +$lang->program->beginGreateChild = 'The start date of the parent program "%s" should be ≤the minimum start time of the %s "%s": %s.'; +$lang->program->endLetterChild = 'The finish time of the parent program "%s" should be ≥ the maximum finish time of the %s "%s": %s.'; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->hasChildren = 'The program has a child program or the project exists and can not be deleted.'; $lang->program->hasProduct = 'The program has products exist and can not be deleted.'; diff --git a/module/program/lang/fr.php b/module/program/lang/fr.php index aac9e38cc5..8c0f082390 100644 --- a/module/program/lang/fr.php +++ b/module/program/lang/fr.php @@ -47,6 +47,7 @@ $lang->program->realDuration = 'RealDuration'; $lang->program->openedVersion = 'OpenedVersion'; $lang->program->lastEditedBy = 'LastEditedBy'; $lang->program->lastEditedDate = 'LastEditedDate'; +$lang->program->childProgram = 'sous-programme'; /* Actions. */ $lang->program->common = 'Program'; @@ -101,8 +102,8 @@ $lang->program->tips = 'If a parent program is selected, the produ $lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?"; $lang->program->beginLetterParent = 'La date de début du programme "%s" doit être ≥ à la date de début du programme parent "%s" : %s.'; $lang->program->endGreaterParent = 'La date de fin du programme "%s" doit être ≤ à la date de fin du programme parent "%s" : %s.'; -$lang->program->beginGreateChild = 'La date de début du programme parent "%s" doit être ≤ à la date de début minimum du sous-programme "%s" : %s.'; -$lang->program->endLetterChild = 'Le temps de fin du programme parent "%s" doit être ≥ au temps de fin maximum du sous-programme "%s" : %s.'; +$lang->program->beginGreateChild = 'La date de début du programme parent "%s" doit être ≤ à la date de début minimum du %s "%s" : %s.'; +$lang->program->endLetterChild = 'Le temps de fin du programme parent "%s" doit être ≥ au temps de fin maximum du %s "%s" : %s.'; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.'; $lang->program->hasProduct = 'It has products. You cannot delete it.'; diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index 91c20bc491..94152e486a 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -47,6 +47,7 @@ $lang->program->realDuration = '实际周期天数'; $lang->program->openedVersion = '创建版本'; $lang->program->lastEditedBy = '最后编辑人'; $lang->program->lastEditedDate = '最后编辑日期'; +$lang->program->childProgram = '子项目集'; /* Actions. */ $lang->program->common = '项目集'; @@ -101,8 +102,8 @@ $lang->program->tips = '选择了父项目集,则可关联该父 $lang->program->confirmBatchUnlink = "您确定要批量移除这些干系人吗?"; $lang->program->beginLetterParent = '项目集“%s”开始日期应大于等于父项目集“%s”的开始日期:%s。'; $lang->program->endGreaterParent = '项目集“%s”完成日期应小于等于父项目集“%s”的完成日期:%s。'; -$lang->program->beginGreateChild = '父项目集“%s”的开始日期应小于等于子项目集“%s”的最小开始时间:%s。'; -$lang->program->endLetterChild = '父项目集“%s”的完成时间应大于等于子项目集“%s”的最大完成时间:%s。'; +$lang->program->beginGreateChild = '父项目集“%s”的开始日期应小于等于%s“%s”的最小开始时间:%s。'; +$lang->program->endLetterChild = '父项目集“%s”的完成时间应大于等于%s“%s”的最大完成时间:%s。'; $lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态'; $lang->program->hasChildren = '该项目集有子项目集或项目存在,不能删除。'; $lang->program->hasProduct = '该项目集有产品存在,不能删除。'; diff --git a/module/program/model.php b/module/program/model.php index cb62e0f692..e4188b1f8d 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -772,6 +772,7 @@ class programModel extends model */ public function update($programID) { + $this->app->loadLang('project'); $programID = (int)$programID; $oldProgram = $this->dao->findById($programID)->from(TABLE_PROGRAM)->fetch(); @@ -799,11 +800,13 @@ class programModel extends model if($children > 0) { - $minChildBegin = $this->dao->select('name, min(begin) as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->fetch(); - $maxChildEnd = $this->dao->select('name, max(end) as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->fetch(); + $minChildBegin = $this->dao->select('name, type, begin as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->orderBy('begin_asc')->fetch(); + $maxChildEnd = $this->dao->select('name, type, end as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->orderBy('end_desc')->fetch(); - if($minChildBegin and $program->begin > $minChildBegin) dao::$errors['begin'] = sprintf($this->lang->program->beginGreateChild, $program->name, $minChildBegin->name, $minChildBegin->minBegin); - if($maxChildEnd and $program->end < $maxChildEnd and $this->post->delta != 999) dao::$errors['end'] = sprintf($this->lang->program->endLetterChild, $program->name, $maxChildEnd->name, $maxChildEnd->maxEnd); + $minChildType = ($minChildBegin->type == 'project') ? $this->lang->project->common : $this->lang->program->childProgram; + $maxChildType = ($maxChildEnd->type == 'project') ? $this->lang->project->common : $this->lang->program->childProgram; + if($minChildBegin and $program->begin > $minChildBegin->minBegin) dao::$errors['begin'] = sprintf($this->lang->program->beginGreateChild, $program->name, $minChildType, $minChildBegin->name, $minChildBegin->minBegin); + if($maxChildEnd and $program->end < $maxChildEnd->maxEnd and $this->post->delta != 999) dao::$errors['end'] = sprintf($this->lang->program->endLetterChild, $program->name, $maxChildType, $maxChildEnd->name, $maxChildEnd->maxEnd); if(dao::isError()) return false; } diff --git a/module/project/lang/de.php b/module/project/lang/de.php index f9a6cf60a2..f699a0c1d0 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -65,7 +65,7 @@ $lang->project->budgetGe0 = '『Budget』must be greater than or equal $lang->project->allProjects = 'All Projects'; /* Fields. */ -$lang->project->common = 'Program'; +$lang->project->common = 'Project'; $lang->project->id = 'ID'; $lang->project->project = 'Project'; $lang->project->stage = 'Stage'; diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index f3969c0654..7da0606307 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -65,7 +65,7 @@ $lang->project->budgetGe0 = '『Budget』must be greater than or equal $lang->project->allProjects = 'All Projects'; /* Fields. */ -$lang->project->common = 'Project'; +$lang->project->common = 'Projets'; $lang->project->id = 'ID'; $lang->project->project = 'Project'; $lang->project->stage = 'Stage'; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index 04edb713da..e16391f3e3 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -310,18 +310,20 @@ $lang->project->programTitle['end'] = '只显示最后一级项目集'; $lang->project->accessDenied = '您无权访问该项目!'; $lang->project->chooseProgramType = '选择项目管理方式'; $lang->project->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。'; -$lang->project->hasChildren = '该项目有子项目存在,不能删除。'; -$lang->project->confirmDelete = '您确定删除项目“%s”吗?'; -$lang->project->cannotChangeToCat = "该项目已经有实际的内容,无法修改为父项目"; -$lang->project->cannotCancelCat = "该项目下已经有子项目,无法取消父项目标记"; -$lang->project->parentBeginEnd = "父项目起止时间:%s ~ %s"; -$lang->project->parentBudget = "父项目预算:"; -$lang->project->beginLetterParent = "父项目的开始日期:%s,开始日期不能小于父项目的开始日期"; -$lang->project->endGreaterParent = "父项目的完成日期:%s,完成日期不能大于父项目的完成日期"; -$lang->project->beginGreateChild = '项目“%s”的开始日期应大于等于项目集“%s”的最小开始日期:%s'; -$lang->project->endLetterChild = '项目“%s”的完成日期应小于等于项目集“%s”的最大完成日期:%s'; -$lang->project->childLongTime = "子项目中有长期项目,父项目也应该是长期项目"; -$lang->project->confirmUnlinkMember = "您确定从该项目中移除该用户吗?"; +$lang->project->hasChildren = '该项目有子项目存在,不能删除。'; +$lang->project->confirmDelete = '您确定删除项目“%s”吗?'; +$lang->project->cannotChangeToCat = "该项目已经有实际的内容,无法修改为父项目"; +$lang->project->cannotCancelCat = "该项目下已经有子项目,无法取消父项目标记"; +$lang->project->parentBeginEnd = "父项目起止时间:%s ~ %s"; +$lang->project->parentBudget = "父项目预算:"; +$lang->project->beginLetterParent = "父项目的开始日期:%s,开始日期不能小于父项目的开始日期"; +$lang->project->endGreaterParent = "父项目的完成日期:%s,完成日期不能大于父项目的完成日期"; +$lang->project->beginGreateChild = '项目“%s”的开始日期应大于等于项目集“%s”的最小开始日期:%s'; +$lang->project->endLetterChild = '项目“%s”的完成日期应小于等于项目集“%s”的最大完成日期:%s'; +$lang->project->begigLetterExecution = '项目“%s”的开始日期应小于等于执行“%s”的最小开始日期:%s'; +$lang->project->endGreateExecution = '项目“%s”的完成日期应大于等于执行“%s”的最大完成日期:%s'; +$lang->project->childLongTime = "子项目中有长期项目,父项目也应该是长期项目"; +$lang->project->confirmUnlinkMember = "您确定从该项目中移除该用户吗?"; $lang->project->action = new stdclass(); $lang->project->action->managed = '$date, 由 $actor 维护。$extra' . "\n"; diff --git a/module/project/model.php b/module/project/model.php index 12e7b85acc..a4b8633608 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1375,6 +1375,19 @@ class projectModel extends model } } + $executions = $this->dao->select('*')->from(TABLE_PROJECT) + ->where('project')->eq($project->id) + ->andWhere('deleted')->eq('0') + ->fetch(); + if(!empty($executions)) + { + $minExecutionBegin = $this->dao->select('name, begin as minBegin')->from(TABLE_PROJECT)->where('project')->eq($project->id)->andWhere('deleted')->eq('0')->orderBy('begin_asc')->fetch(); + $maxExecutionEnd = $this->dao->select('name, end as maxEnd')->from(TABLE_PROJECT)->where('project')->eq($project->id)->andWhere('deleted')->eq('0')->orderBy('end_desc')->fetch(); + if($minExecutionBegin and $project->begin > $minExecutionBegin->minBegin) dao::$errors['begin'] = sprintf($this->lang->project->begigLetterExecution, $project->name, $minExecutionBegin->name, $minExecutionBegin->minBegin); + if($maxExecutionEnd and $project->end < $maxExecutionEnd->maxEnd) dao::$errors['end'] = sprintf($this->lang->project->endGreateExecution, $project->name, $maxExecutionEnd->name, $maxExecutionEnd->maxEnd); + if(dao::isError()) return false; + } + /* Judge products not empty. */ $linkedProductsCount = 0; foreach($_POST['products'] as $product) From 953d6c8f231c85375761305f6087da46f8730ead Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 29 Jun 2022 17:02:00 +0800 Subject: [PATCH 018/100] * Fix bug #24479. --- module/doc/js/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/js/edit.js b/module/doc/js/edit.js index 3e71c6be4c..c5c0f24b49 100644 --- a/module/doc/js/edit.js +++ b/module/doc/js/edit.js @@ -169,7 +169,7 @@ function loadWhitelist(libID) $('#aclcustom').parent('.radio-inline').removeClass('hidden'); $('#users').replaceWith(users); - $('#user').next('.picker').remove(); + $('#users').next('.picker').remove(); $('#users').picker(); } }); From 7db71208f093fdac8c6ca1603f28194be7c3ea1a Mon Sep 17 00:00:00 2001 From: mayue Date: Wed, 29 Jun 2022 17:09:07 +0800 Subject: [PATCH 019/100] * Optimize code. --- module/story/view/review.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/view/review.html.php b/module/story/view/review.html.php index ad053920d1..73cfdc29d5 100644 --- a/module/story/view/review.html.php +++ b/module/story/view/review.html.php @@ -29,7 +29,7 @@ - + From ff8bef7fe650b96adec9f4e07f02982eb9cda94a Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 29 Jun 2022 17:09:21 +0800 Subject: [PATCH 020/100] * Fix bug #24222. --- module/task/control.php | 1 + module/task/model.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/task/control.php b/module/task/control.php index f55ed55380..225a1bbf1f 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -831,6 +831,7 @@ class task extends control { if(isset($muletipleTasks[$taskID]) and $task->assignedTo != $this->app->user->account and $task->mode == 'linear') continue; if(isset($muletipleTasks[$taskID]) and !isset($muletipleTasks[$taskID][$this->post->assignedTo])) continue; + if($task->status == 'closed') continue; $changes = $this->task->assign($taskID); if(dao::isError()) return print(js::error(dao::getError())); diff --git a/module/task/model.php b/module/task/model.php index f60cd711f2..9f00f1450c 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -3582,7 +3582,7 @@ class taskModel extends model $btnClass = $task->assignedTo == 'closed' ? ' disabled' : ''; $btnClass = "iframe btn btn-icon-left btn-sm {$btnClass}"; - $assignToLink = helper::createLink('task', 'assignTo', "executionID=$task->execution&taskID=$task->id", '', true); + $assignToLink = $task->assignedTo == 'closed' ? '#' : helper::createLink('task', 'assignTo', "executionID=$task->execution&taskID=$task->id", '', true); $assignToHtml = html::a($assignToLink, " {$assignedToText}", '', "class='$btnClass'"); echo !common::hasPriv('task', 'assignTo', $task) ? "{$assignedToText}" : $assignToHtml; From dda32cc5ff306d37059b3a2f88c86371eee91e1c Mon Sep 17 00:00:00 2001 From: sunjun Date: Wed, 29 Jun 2022 09:16:29 +0000 Subject: [PATCH 021/100] fixbug_24544 --- module/testcase/control.php | 2 +- module/testcase/view/importtolib.html.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 904a3661d3..23a81eb782 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -2168,7 +2168,7 @@ class testcase extends control */ public function importToLib($caseID = 0) { - if(!empty($_POST)) + if($this->server->request_method == 'POST') { $this->testcase->importToLib($caseID); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); diff --git a/module/testcase/view/importtolib.html.php b/module/testcase/view/importtolib.html.php index a5c6f1fccc..1148be80f9 100644 --- a/module/testcase/view/importtolib.html.php +++ b/module/testcase/view/importtolib.html.php @@ -25,7 +25,6 @@ - From a4fc955da5a7b6d0f234a75dfabb5975cccb0953 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 29 Jun 2022 09:17:43 +0000 Subject: [PATCH 022/100] * Fix bug #24480. --- module/project/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/config.php b/module/project/config.php index 21224eac94..e8fa3c620a 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -73,7 +73,7 @@ $config->project->datatable->fieldList['status']['pri'] = '2'; $config->project->datatable->fieldList['begin']['title'] = 'begin'; $config->project->datatable->fieldList['begin']['fixed'] = 'no'; -$config->project->datatable->fieldList['begin']['width'] = '90'; +$config->project->datatable->fieldList['begin']['width'] = '115'; $config->project->datatable->fieldList['begin']['required'] = 'no'; $config->project->datatable->fieldList['begin']['pri'] = '9'; From fa7b1cf7436555d6614cac91cb0c87d17a16477f Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 30 Jun 2022 00:14:12 +0000 Subject: [PATCH 023/100] * Fix bug #24480. --- module/project/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/config.php b/module/project/config.php index e8fa3c620a..e86ae4721a 100644 --- a/module/project/config.php +++ b/module/project/config.php @@ -79,7 +79,7 @@ $config->project->datatable->fieldList['begin']['pri'] = '9'; $config->project->datatable->fieldList['end']['title'] = 'end'; $config->project->datatable->fieldList['end']['fixed'] = 'no'; -$config->project->datatable->fieldList['end']['width'] = '90'; +$config->project->datatable->fieldList['end']['width'] = '100'; $config->project->datatable->fieldList['end']['required'] = 'no'; $config->project->datatable->fieldList['end']['pri'] = '3'; From 3dff44e5067c80cd59bf6888a70602e28cebb448 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 30 Jun 2022 08:24:25 +0800 Subject: [PATCH 024/100] * Fix bug#24370. --- module/common/lang/menu.php | 2 +- module/personnel/view/whitelist.html.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 78d0cbc750..43252f5b86 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -146,7 +146,7 @@ $lang->program->menuOrder[20] = 'stakeholder'; $lang->program->menu->personnel['subMenu'] = new stdClass(); $lang->program->menu->personnel['subMenu']->invest = array('link' => "{$lang->personnel->invest}|personnel|invest|programID=%s"); $lang->program->menu->personnel['subMenu']->accessible = array('link' => "{$lang->personnel->accessible}|personnel|accessible|programID=%s"); -$lang->program->menu->personnel['subMenu']->whitelist = array('link' => "{$lang->whitelist}|personnel|whitelist|objectID=%s&module=program", 'alias' => 'addwhitelist'); +$lang->program->menu->personnel['subMenu']->whitelist = array('link' => "{$lang->whitelist}|personnel|whitelist|objectID=%s", 'alias' => 'addwhitelist'); /* Product menu. */ $lang->product->homeMenu = new stdclass(); diff --git a/module/personnel/view/whitelist.html.php b/module/personnel/view/whitelist.html.php index ad1d4346df..df156eaeac 100644 --- a/module/personnel/view/whitelist.html.php +++ b/module/personnel/view/whitelist.html.php @@ -58,6 +58,7 @@ From 4ba8f585b3ca527af256ab09e2604471fc18858e Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 30 Jun 2022 08:26:33 +0800 Subject: [PATCH 025/100] * Fix bug#24370. --- module/personnel/view/whitelist.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/personnel/view/whitelist.html.php b/module/personnel/view/whitelist.html.php index df156eaeac..65ec18427c 100644 --- a/module/personnel/view/whitelist.html.php +++ b/module/personnel/view/whitelist.html.php @@ -58,7 +58,7 @@ From 66ea6430cf445e424f651cbd033e110331e1161a Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 30 Jun 2022 08:50:31 +0800 Subject: [PATCH 026/100] * fix bug #24382 --- module/story/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index c2a92ef17e..14ff9d6f1c 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -307,7 +307,7 @@ - + From a9f92875b40cb6ecc5e25aa4475c9f15afe9c153 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 30 Jun 2022 08:55:20 +0800 Subject: [PATCH 027/100] * Fix the expiration message displayed on the login page of the new installation environment. --- module/user/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/user/control.php b/module/user/control.php index a9626a11f5..82c0715acb 100755 --- a/module/user/control.php +++ b/module/user/control.php @@ -969,7 +969,7 @@ class user extends control } else { - $loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == '/' or $this->referer == '/zentao/'); + $loginExpired = !(preg_match("/(m=|\/)(index)(&f=|-)(index)(&|-|\.)?/", strtolower($this->referer), $output) or $this->referer == '/' or $this->referer == '/zentao/' or empty($this->referer)); $this->loadModel('misc'); $this->loadModel('extension'); From 298493d3a103cfb898592b7a5af6a18904c41f4d Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 30 Jun 2022 00:57:18 +0000 Subject: [PATCH 028/100] * Fix bug #24417. --- module/program/lang/de.php | 8 ++++---- module/program/lang/en.php | 8 ++++---- module/program/lang/fr.php | 8 ++++---- module/program/lang/zh-cn.php | 8 ++++---- module/program/model.php | 20 ++++++++++---------- module/project/lang/de.php | 32 +++++++++++++++++--------------- module/project/lang/en.php | 6 ++++-- module/project/lang/fr.php | 32 +++++++++++++++++--------------- module/project/lang/zh-cn.php | 8 ++++---- module/project/model.php | 20 ++++++++++---------- 10 files changed, 78 insertions(+), 72 deletions(-) diff --git a/module/program/lang/de.php b/module/program/lang/de.php index fa898bb47a..ddc8622604 100644 --- a/module/program/lang/de.php +++ b/module/program/lang/de.php @@ -100,10 +100,10 @@ $lang->program->noProgram = 'No program.'; $lang->program->showClosed = 'Closed programs.'; $lang->program->tips = 'If a parent program is selected, the products under the parent program can be associated. If no program is selected for the project, a product with the same name as the project is created and associated with the project by default.'; $lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?"; -$lang->program->beginLetterParent = 'The start date of the program "%s" should be ≥ the start date of the parent program "%s": %s.'; -$lang->program->endGreaterParent = 'The finish date of the program "%s" should be ≤ the finish date of the parent program "%s": %s.'; -$lang->program->beginGreateChild = 'The start date of the parent program "%s" should be ≤the minimum start time of the %s "%s": %s.'; -$lang->program->endLetterChild = 'The finish time of the parent program "%s" should be ≥ the maximum finish time of the %s "%s": %s.'; +$lang->program->beginLetterParent = 'The start date of the program should be ≥ the start date of the parent program: %s.'; +$lang->program->endGreaterParent = 'The finish date of the program should be ≤ the finish date of the parent program: %s.'; +$lang->program->beginGreateChild = 'The start date of the parent program should be ≤the minimum start time of the %s: %s.'; +$lang->program->endLetterChild = 'The finish time of the parent program should be ≥ the maximum finish time of the %s: %s.'; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.'; $lang->program->hasProduct = 'It has products. You cannot delete it.'; diff --git a/module/program/lang/en.php b/module/program/lang/en.php index ea3984b164..c1bff24805 100644 --- a/module/program/lang/en.php +++ b/module/program/lang/en.php @@ -100,10 +100,10 @@ $lang->program->noProgram = 'No program.'; $lang->program->showClosed = 'Closed'; $lang->program->tips = 'If a parent program is selected, the products under the parent program can be associated. If no program is selected for the project, a product with the same name as the project is created and associated with the project by default.'; $lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?"; -$lang->program->beginLetterParent = 'The start date of the program "%s" should be ≥ the start date of the parent program "%s": %s.'; -$lang->program->endGreaterParent = 'The finish date of the program "%s" should be ≤ the finish date of the parent program "%s": %s.'; -$lang->program->beginGreateChild = 'The start date of the parent program "%s" should be ≤the minimum start time of the %s "%s": %s.'; -$lang->program->endLetterChild = 'The finish time of the parent program "%s" should be ≥ the maximum finish time of the %s "%s": %s.'; +$lang->program->beginLetterParent = 'The start date of the program should be ≥ the start date of the parent program: %s.'; +$lang->program->endGreaterParent = 'The finish date of the program should be ≤ the finish date of the parent program: %s.'; +$lang->program->beginGreateChild = 'The start date of the parent program should be ≤the minimum start time of the %s: %s.'; +$lang->program->endLetterChild = 'The finish time of the parent program should be ≥ the maximum finish time of the %s: %s.'; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->hasChildren = 'The program has a child program or the project exists and can not be deleted.'; $lang->program->hasProduct = 'The program has products exist and can not be deleted.'; diff --git a/module/program/lang/fr.php b/module/program/lang/fr.php index 8c0f082390..35a7c36065 100644 --- a/module/program/lang/fr.php +++ b/module/program/lang/fr.php @@ -100,10 +100,10 @@ $lang->program->noProgram = 'No program.'; $lang->program->showClosed = 'Closed programs.'; $lang->program->tips = 'If a parent program is selected, the products under the parent program can be associated. If no program is selected for the project, a product with the same name as the project is created and associated with the project by default.'; $lang->program->confirmBatchUnlink = "Do you want to batch unlink these stakeholders?"; -$lang->program->beginLetterParent = 'La date de début du programme "%s" doit être ≥ à la date de début du programme parent "%s" : %s.'; -$lang->program->endGreaterParent = 'La date de fin du programme "%s" doit être ≤ à la date de fin du programme parent "%s" : %s.'; -$lang->program->beginGreateChild = 'La date de début du programme parent "%s" doit être ≤ à la date de début minimum du %s "%s" : %s.'; -$lang->program->endLetterChild = 'Le temps de fin du programme parent "%s" doit être ≥ au temps de fin maximum du %s "%s" : %s.'; +$lang->program->beginLetterParent = 'La date de début du programme doit être ≥ à la date de début du programme parent: %s.'; +$lang->program->endGreaterParent = 'La date de fin du programme doit être ≤ à la date de fin du programme parent: %s.'; +$lang->program->beginGreateChild = 'La date de début du programme parent doit être ≤ à la date de début minimum du %s: %s.'; +$lang->program->endLetterChild = 'Le temps de fin du programme parent doit être ≥ au temps de fin maximum du %s: %s.'; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->hasChildren = 'It has child programs or projects. You cannot delete it.'; $lang->program->hasProduct = 'It has products. You cannot delete it.'; diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index 94152e486a..0ec1b2a72a 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -100,10 +100,10 @@ $lang->program->noProgram = '暂时没有项目集'; $lang->program->showClosed = '显示已关闭'; $lang->program->tips = '选择了父项目集,则可关联该父项目集下的产品。如果项目未选择任何项目集,则系统会默认创建一个和该项目同名的产品并关联该项目。'; $lang->program->confirmBatchUnlink = "您确定要批量移除这些干系人吗?"; -$lang->program->beginLetterParent = '项目集“%s”开始日期应大于等于父项目集“%s”的开始日期:%s。'; -$lang->program->endGreaterParent = '项目集“%s”完成日期应小于等于父项目集“%s”的完成日期:%s。'; -$lang->program->beginGreateChild = '父项目集“%s”的开始日期应小于等于%s“%s”的最小开始时间:%s。'; -$lang->program->endLetterChild = '父项目集“%s”的完成时间应大于等于%s“%s”的最大完成时间:%s。'; +$lang->program->beginLetterParent = '项目集开始日期应大于等于父项目集的开始日期:%s。'; +$lang->program->endGreaterParent = '项目集完成日期应小于等于父项目集的完成日期:%s。'; +$lang->program->beginGreateChild = '父项目集的开始日期应小于等于%s的最小开始时间:%s。'; +$lang->program->endLetterChild = '父项目集的完成时间应大于等于%s的最大完成时间:%s。'; $lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态'; $lang->program->hasChildren = '该项目集有子项目集或项目存在,不能删除。'; $lang->program->hasProduct = '该项目集有产品存在,不能删除。'; diff --git a/module/program/model.php b/module/program/model.php index e4188b1f8d..08a0f9fd69 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -709,13 +709,13 @@ class programModel extends model if($parentProgram) { /* Child program begin cannot less than parent. */ - if(!empty($program->name) and $program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $program->name, $parentProgram->name, $parentProgram->begin); + if(!empty($program->name) and $program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $parentProgram->begin); /* When parent set end then child program end cannot greater than parent. */ - if(!empty($program->name) and$parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end); + if(!empty($program->name) and$parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end); /* When parent set end then child program cannot set longTime. */ - if(!empty($program->name) and empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end); + if(!empty($program->name) and empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end); /* The budget of a child program cannot beyond the remaining budget of the parent program. */ $program->budgetUnit = $parentProgram->budgetUnit; @@ -800,13 +800,13 @@ class programModel extends model if($children > 0) { - $minChildBegin = $this->dao->select('name, type, begin as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->orderBy('begin_asc')->fetch(); - $maxChildEnd = $this->dao->select('name, type, end as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->orderBy('end_desc')->fetch(); + $minChildBegin = $this->dao->select('type, begin as minBegin')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->orderBy('begin_asc')->fetch(); + $maxChildEnd = $this->dao->select('type, end as maxEnd')->from(TABLE_PROGRAM)->where('id')->ne($programID)->andWhere('deleted')->eq(0)->andWhere('path')->like("%,{$programID},%")->andWhere('end')->ne('0000-00-00')->orderBy('end_desc')->fetch(); $minChildType = ($minChildBegin->type == 'project') ? $this->lang->project->common : $this->lang->program->childProgram; $maxChildType = ($maxChildEnd->type == 'project') ? $this->lang->project->common : $this->lang->program->childProgram; - if($minChildBegin and $program->begin > $minChildBegin->minBegin) dao::$errors['begin'] = sprintf($this->lang->program->beginGreateChild, $program->name, $minChildType, $minChildBegin->name, $minChildBegin->minBegin); - if($maxChildEnd and $program->end < $maxChildEnd->maxEnd and $this->post->delta != 999) dao::$errors['end'] = sprintf($this->lang->program->endLetterChild, $program->name, $maxChildType, $maxChildEnd->name, $maxChildEnd->maxEnd); + if($minChildBegin and $program->begin > $minChildBegin->minBegin) dao::$errors['begin'] = sprintf($this->lang->program->beginGreateChild, $minChildType, $minChildBegin->minBegin); + if($maxChildEnd and $program->end < $maxChildEnd->maxEnd and $this->post->delta != 999) dao::$errors['end'] = sprintf($this->lang->program->endLetterChild, $maxChildType, $maxChildEnd->maxEnd); if(dao::isError()) return false; } @@ -821,9 +821,9 @@ class programModel extends model $parentProgram = $this->dao->select('*')->from(TABLE_PROGRAM)->where('id')->eq($program->parent)->fetch(); if($parentProgram) { - if(!empty($program->name) and $program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $program->name, $parentProgram->name, $parentProgram->begin); - if(!empty($program->name) and $parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end); - if(!empty($program->name) and empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $program->name, $parentProgram->name, $parentProgram->end); + if(!empty($program->name) and $program->begin < $parentProgram->begin) dao::$errors['begin'] = sprintf($this->lang->program->beginLetterParent, $parentProgram->begin); + if(!empty($program->name) and $parentProgram->end != '0000-00-00' and $program->end > $parentProgram->end) dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end); + if(!empty($program->name) and empty($program->end) and $this->post->delta == 999 and $parentProgram->end != '0000-00-00') dao::$errors['end'] = sprintf($this->lang->program->endGreaterParent, $parentProgram->end); } /* The budget of a child program cannot beyond the remaining budget of the parent program. */ diff --git a/module/project/lang/de.php b/module/project/lang/de.php index f699a0c1d0..0297e0c2a6 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -307,21 +307,23 @@ $lang->project->programTitle['0'] = 'Hide'; $lang->project->programTitle['base'] = 'Base-level project only'; $lang->project->programTitle['end'] = 'End-level project only'; -$lang->project->accessDenied = 'Access denied!'; -$lang->project->chooseProgramType = 'Select the project management model'; -$lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.'; -$lang->project->hasChildren = 'This project has a child project, so it cannot be deleted.'; -$lang->project->confirmDelete = "Do you want to delete [%s]?"; -$lang->project->cannotChangeToCat = "It is not empty, so you cannot change it to a parent."; -$lang->project->cannotCancelCat = "It has child projects, so you cannot unmark the parent."; -$lang->project->parentBeginEnd = "Parent begin&end date: %s ~ %s"; -$lang->project->parentBudget = "The budget of the parent project: "; -$lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project."; -$lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project."; -$lang->project->beginGreateChild = 'The start date of the project "%s" should be ≥ the start date of program "%s": %s.'; -$lang->project->endLetterChild = 'The finish date of the project "%s" should be ≤ the finish date of program "%s": %s.'; -$lang->project->childLongTime = "If a child as long-term projects, the parent should be long-term too."; -$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?"; +$lang->project->accessDenied = 'Access denied!'; +$lang->project->chooseProgramType = 'Select the project management model'; +$lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.'; +$lang->project->hasChildren = 'This project has a child project, so it cannot be deleted.'; +$lang->project->confirmDelete = "Do you want to delete [%s]?"; +$lang->project->cannotChangeToCat = "It is not empty, so you cannot change it to a parent."; +$lang->project->cannotCancelCat = "It has child projects, so you cannot unmark the parent."; +$lang->project->parentBeginEnd = "Parent begin&end date: %s ~ %s"; +$lang->project->parentBudget = "The budget of the parent project: "; +$lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project."; +$lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project."; +$lang->project->beginGreateChild = 'The start date of the project should be ≥ the start date of program: %s.'; +$lang->project->endLetterChild = 'The finish date of the project should be ≤ the finish date of program: %s.'; +$lang->project->begigLetterExecution = 'The start date of project should be ≤ the minimum start date of the execution: %s.'; +$lang->project->endGreateExecution = 'The finish date of the project should be ≥ the maximum finish date of the execution: %s.'; +$lang->project->childLongTime = "If a child as long-term projects, the parent should be long-term too."; +$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?"; $lang->project->action = new stdclass(); $lang->project->action->managed = '$date, managed by $actor. $extra' . "\n"; diff --git a/module/project/lang/en.php b/module/project/lang/en.php index 3e07049109..87a656b975 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -318,8 +318,10 @@ $lang->project->parentBeginEnd = "The begin and end date of the parent proj $lang->project->parentBudget = "The budget of the parent project: "; $lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project."; $lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project."; -$lang->project->beginGreateChild = 'The start date of the project "%s" should be ≥ the start date of program "%s": %s.'; -$lang->project->endLetterChild = 'The finish date of the project "%s" should be ≤ the finish date of program "%s": %s.'; +$lang->project->beginGreateChild = 'The start date of the project should be ≥ the start date of program: %s.'; +$lang->project->endLetterChild = 'The finish date of the project should be ≤ the finish date of program: %s.'; +$lang->project->begigLetterExecution = 'The start date of project should be ≤ the minimum start date of the execution: %s.'; +$lang->project->endGreateExecution = 'The finish date of the project should be ≥ the maximum finish date of the execution: %s.'; $lang->project->childLongTime = "There are long-term projects in the child project, and the parent project should also be a long-term project."; $lang->project->confirmUnlinkMember = "Do you want to remove this user from project?"; diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index 7da0606307..b08f7cae8c 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -307,21 +307,23 @@ $lang->project->programTitle['0'] = 'Hide'; $lang->project->programTitle['base'] = 'Base-level project only'; $lang->project->programTitle['end'] = 'End-level project only'; -$lang->project->accessDenied = 'Access denied!'; -$lang->project->chooseProgramType = 'Select the project management model'; -$lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.'; -$lang->project->hasChildren = 'This project has a child project, so it cannot be deleted.'; -$lang->project->confirmDelete = "Do you want to delete [%s]?"; -$lang->project->cannotChangeToCat = "It is not empty, so you cannot change it to a parent."; -$lang->project->cannotCancelCat = "It has child projects, so you cannot unmark the parent."; -$lang->project->parentBeginEnd = "Parent begin&end date: %s ~ %s"; -$lang->project->parentBudget = "The budget of the parent project: "; -$lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project."; -$lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project."; -$lang->project->beginGreateChild = 'La date de début du projets "%s" doit être ≥ à la date de début du programme "%s" : %s.'; -$lang->project->endLetterChild = 'La date de fin du projets "%s" doit être ≤ à la date de fin du programme "%s" : %s.'; -$lang->project->childLongTime = "If a child as long-term projects, the parent should be long-term too."; -$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?"; +$lang->project->accessDenied = 'Access denied!'; +$lang->project->chooseProgramType = 'Select the project management model'; +$lang->project->cannotCreateChild = 'It is not empty, so you cannot add a child. You can add a parent for it, and then create a child.'; +$lang->project->hasChildren = 'This project has a child project, so it cannot be deleted.'; +$lang->project->confirmDelete = "Do you want to delete [%s]?"; +$lang->project->cannotChangeToCat = "It is not empty, so you cannot change it to a parent."; +$lang->project->cannotCancelCat = "It has child projects, so you cannot unmark the parent."; +$lang->project->parentBeginEnd = "Parent begin&end date: %s ~ %s"; +$lang->project->parentBudget = "The budget of the parent project: "; +$lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project."; +$lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project."; +$lang->project->beginGreateChild = 'La date de début du projets "%s" doit être ≥ à la date de début du programme "%s" : %s.'; +$lang->project->endLetterChild = 'La date de fin du projets doit être ≤ à la date de fin du programme: %s.'; +$lang->project->begigLetterExecution = 'La date de début du projet "%s" doit être ≤ à la date de début minimum d\'excution: %s'; +$lang->project->endGreateExecution = 'La date de fin du projet "%s" doit être ≥ à la date de fin maximale d\'exécution: %s.'; +$lang->project->childLongTime = "If a child as long-term projects, the parent should be long-term too."; +$lang->project->confirmUnlinkMember = "Do you want to remove this user from project?"; $lang->project->action = new stdclass(); $lang->project->action->managed = '$date, managed by $actor. $extra' . "\n"; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index e16391f3e3..eacc6c49c0 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -318,10 +318,10 @@ $lang->project->parentBeginEnd = "父项目起止时间:%s ~ %s"; $lang->project->parentBudget = "父项目预算:"; $lang->project->beginLetterParent = "父项目的开始日期:%s,开始日期不能小于父项目的开始日期"; $lang->project->endGreaterParent = "父项目的完成日期:%s,完成日期不能大于父项目的完成日期"; -$lang->project->beginGreateChild = '项目“%s”的开始日期应大于等于项目集“%s”的最小开始日期:%s'; -$lang->project->endLetterChild = '项目“%s”的完成日期应小于等于项目集“%s”的最大完成日期:%s'; -$lang->project->begigLetterExecution = '项目“%s”的开始日期应小于等于执行“%s”的最小开始日期:%s'; -$lang->project->endGreateExecution = '项目“%s”的完成日期应大于等于执行“%s”的最大完成日期:%s'; +$lang->project->beginGreateChild = '项目的开始日期应大于等于项目集的最小开始日期:%s'; +$lang->project->endLetterChild = '项目的完成日期应小于等于项目集的最大完成日期:%s'; +$lang->project->begigLetterExecution = '项目的开始日期应小于等于执行的最小开始日期:%s'; +$lang->project->endGreateExecution = '项目的完成日期应大于等于执行的最大完成日期:%s'; $lang->project->childLongTime = "子项目中有长期项目,父项目也应该是长期项目"; $lang->project->confirmUnlinkMember = "您确定从该项目中移除该用户吗?"; diff --git a/module/project/model.php b/module/project/model.php index a4b8633608..d76f2cf1b1 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1094,10 +1094,10 @@ class projectModel extends model if($program) { /* Child project begin cannot less than parent. */ - if(!empty($project->name) and $project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $project->name, $program->name, $program->begin); + if(!empty($project->name) and $project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $program->begin); /* When parent set end then child project end cannot greater than parent. */ - if(!empty($project->name) and $$program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $project->name, $program->name, $program->end); + if(!empty($project->name) and $$program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $program->end); if(dao::isError()) return false; } @@ -1358,10 +1358,10 @@ class projectModel extends model if($program) { /* Child project begin cannot less than parent. */ - if(!empty($project->name) and $project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $project->name, $program->name, $program->begin); + if(!empty($project->name) and $project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $program->begin); /* When parent set end then child project end cannot greater than parent. */ - if(!empty($project->name) and $program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $project->name, $program->name, $program->end); + if(!empty($project->name) and $program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $program->end); if(dao::isError()) return false; } @@ -1381,10 +1381,10 @@ class projectModel extends model ->fetch(); if(!empty($executions)) { - $minExecutionBegin = $this->dao->select('name, begin as minBegin')->from(TABLE_PROJECT)->where('project')->eq($project->id)->andWhere('deleted')->eq('0')->orderBy('begin_asc')->fetch(); - $maxExecutionEnd = $this->dao->select('name, end as maxEnd')->from(TABLE_PROJECT)->where('project')->eq($project->id)->andWhere('deleted')->eq('0')->orderBy('end_desc')->fetch(); - if($minExecutionBegin and $project->begin > $minExecutionBegin->minBegin) dao::$errors['begin'] = sprintf($this->lang->project->begigLetterExecution, $project->name, $minExecutionBegin->name, $minExecutionBegin->minBegin); - if($maxExecutionEnd and $project->end < $maxExecutionEnd->maxEnd) dao::$errors['end'] = sprintf($this->lang->project->endGreateExecution, $project->name, $maxExecutionEnd->name, $maxExecutionEnd->maxEnd); + $minExecutionBegin = $this->dao->select('begin as minBegin')->from(TABLE_PROJECT)->where('project')->eq($project->id)->andWhere('deleted')->eq('0')->orderBy('begin_asc')->fetch(); + $maxExecutionEnd = $this->dao->select('end as maxEnd')->from(TABLE_PROJECT)->where('project')->eq($project->id)->andWhere('deleted')->eq('0')->orderBy('end_desc')->fetch(); + if($minExecutionBegin and $project->begin > $minExecutionBegin->minBegin) dao::$errors['begin'] = sprintf($this->lang->project->begigLetterExecution, $minExecutionBegin->minBegin); + if($maxExecutionEnd and $project->end < $maxExecutionEnd->maxEnd) dao::$errors['end'] = sprintf($this->lang->project->endGreateExecution, $maxExecutionEnd->maxEnd); if(dao::isError()) return false; } @@ -1542,14 +1542,14 @@ class projectModel extends model /* Child project begin cannot less than parent. */ if(!empty($projects[$projectID]->name) and $projects[$projectID]->begin < $parentProject->begin) { - dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $projects[$projectID]->name, $parentProject->name, $parentProject->begin); + dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $parentProject->begin); return false; } /* When parent set end then child project end cannot greater than parent. */ if(!empty($projects[$projectID]->name) and $parentProject->end != '0000-00-00' and $projects[$projectID]->end > $parentProject->end) { - dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $projects[$projectID]->name, $parentProject->name, $parentProject->end); + dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $parentProject->end); return false; } } From 4a93c66679924243fb752b1a1f5eeb46336cacb1 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Thu, 30 Jun 2022 01:00:31 +0000 Subject: [PATCH 029/100] * fix bug #24480 --- module/index/css/index.en.css | 1 + 1 file changed, 1 insertion(+) diff --git a/module/index/css/index.en.css b/module/index/css/index.en.css index ac1227a07e..708361986f 100644 --- a/module/index/css/index.en.css +++ b/module/index/css/index.en.css @@ -1 +1,2 @@ +#apps {left: 106px} #menu { width: 106px;} From ff682ac683f37c65d2753c9ef7e1dba446d589bb Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 30 Jun 2022 09:04:15 +0800 Subject: [PATCH 030/100] * Fix bug#23977. --- module/my/view/testcase.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 2d87456686..6a3bb26041 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -108,8 +108,8 @@ $disabled = $case->status == 'wait' ? 'disabled' : ''; common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$caseID,version=$case->version,runID=$runID", $case, 'list', 'bug', '', 'iframe', 'true', "data-app='qa' data-toggle=''"); common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from={$app->rawMethod}¶m=$caseID", $case, 'list', 'copy', '', 'iframe', true, "data-width='95%'"); - common::printIcon('testtask', 'runCase', "runID=$runID&caseID=$caseID&version=$case->version", '', 'list', 'play', '', "iframe $disabled", true, "data-width='95%'", '', $case->project); - common::printIcon('testtask', 'results', "runID=$runID&caseID=$caseID", '', 'list', 'list-alt', '', 'iframe', true, "data-width='95%'", '', $case->project); + common::printIcon('testtask', 'runCase', "runID=0&caseID=$caseID&version=$case->version", '', 'list', 'play', '', "iframe $disabled", true, "data-width='95%'", '', $case->project); + common::printIcon('testtask', 'results', "runID=0&caseID=$caseID", '', 'list', 'list-alt', '', 'iframe', true, "data-width='95%'", '', $case->project); common::printIcon('testcase', 'edit', "caseID=$caseID", $case, 'list', 'edit', '', 'iframe', true, "data-width='95%'", '', $case->project); } ?> From ab1a43e1c6da29f88ba6621229986c9ac1d860a2 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 30 Jun 2022 09:10:00 +0800 Subject: [PATCH 031/100] * Change the xuan version. --- Makefile | 2 +- db/standard/zentao17.2.sql | 9 ++- db/update17.1.sql | 7 ++ db/zentao.sql | 6 +- module/upgrade/model.php | 155 +++++++++++++++++++++++++++++++++++++ tools/en2de.php | 23 ------ tools/en2other.php | 31 ++++++++ xuanxuan/XUANVERSION | 2 +- xuanxuan/XVERSION | 2 +- 9 files changed, 207 insertions(+), 30 deletions(-) delete mode 100755 tools/en2de.php create mode 100755 tools/en2other.php diff --git a/Makefile b/Makefile index 0c1f450754..00a9eb74ce 100644 --- a/Makefile +++ b/Makefile @@ -145,7 +145,7 @@ zentaoxx: sed -i "s/'..\/..\/common\/view\/footer.html.php'/\$$app->getModuleRoot() . 'common\/view\/footer.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.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/en2de.php zentaoxx/tools; cd zentaoxx/tools; php en2de.php ../ + cp tools/en2other.php zentaoxx/tools; cd zentaoxx/tools; php en2other.php ../ rm -rf zentaoxx/tools #zip -rqm -9 zentaoxx.$(VERSION).zip zentaoxx/* #rm -rf xuan.zip xuan zentaoxx diff --git a/db/standard/zentao17.2.sql b/db/standard/zentao17.2.sql index 1b2405df2f..e3e9196510 100644 --- a/db/standard/zentao17.2.sql +++ b/db/standard/zentao17.2.sql @@ -30,7 +30,7 @@ CREATE TABLE `zt_acl` ( PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE `zt_action` ( - `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `id` int(9) unsigned NOT NULL AUTO_INCREMENT, `objectType` varchar(30) NOT NULL DEFAULT '', `objectID` mediumint(8) unsigned NOT NULL DEFAULT '0', `product` text NOT NULL, @@ -1009,7 +1009,7 @@ CREATE TABLE `zt_grouppriv` ( UNIQUE KEY `group` (`group`,`module`,`method`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE `zt_history` ( - `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `id` int(9) unsigned NOT NULL AUTO_INCREMENT, `action` mediumint(8) unsigned NOT NULL DEFAULT '0', `field` varchar(30) NOT NULL DEFAULT '', `old` text NOT NULL, @@ -2560,6 +2560,8 @@ CREATE TABLE `zt_story` ( `approvedDate` date NOT NULL, `lastEditedBy` varchar(30) NOT NULL DEFAULT '', `lastEditedDate` datetime NOT NULL, + `changedBy` VARCHAR(30) NOT NULL, + `changedDate` DATETIME NOT NULL, `reviewedBy` varchar(255) NOT NULL, `reviewedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `closedBy` varchar(30) NOT NULL DEFAULT '', @@ -3180,6 +3182,7 @@ CREATE TABLE `zt_workflowaction` ( `show` enum('dropdownlist','direct') NOT NULL DEFAULT 'dropdownlist', `order` smallint(5) unsigned NOT NULL, `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', `virtual` tinyint(1) unsigned NOT NULL, `conditions` text NOT NULL, `verifications` text NOT NULL, @@ -3241,6 +3244,7 @@ CREATE TABLE `zt_workflowfield` ( `isValue` enum('0','1') NOT NULL DEFAULT '0', `readonly` enum('0','1') NOT NULL DEFAULT '0', `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', `desc` text NOT NULL, `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, @@ -3262,6 +3266,7 @@ CREATE TABLE `zt_workflowlabel` ( `orderBy` text NOT NULL, `order` tinyint(3) NOT NULL, `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', `createdBy` char(30) NOT NULL, `createdDate` datetime NOT NULL, `editedBy` char(30) NOT NULL, diff --git a/db/update17.1.sql b/db/update17.1.sql index 1d27344aab..cacf357ed6 100644 --- a/db/update17.1.sql +++ b/db/update17.1.sql @@ -18,6 +18,13 @@ ALTER TABLE `zt_kanban` ADD `showWIP` enum('0','1') NOT NULL DEFAULT '1' AFTER ` ALTER TABLE `zt_kanban` ADD `alignment` varchar(10) NOT NULL DEFAULT 'center' AFTER `object`; ALTER TABLE `zt_module` ADD `from` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `type`; + +ALTER TABLE `zt_story` ADD `changedBy` VARCHAR(30) NOT NULL AFTER `lastEditedDate`; +ALTER TABLE `zt_story` ADD `changedDate` DATETIME NOT NULL AFTER `changedBy`; + +ALTER TABLE `zt_action` CHANGE `id` `id` int(9) unsigned NOT NULL AUTO_INCREMENT FIRST; +ALTER TABLE `zt_history` CHANGE `id` `id` int(9) unsigned NOT NULL AUTO_INCREMENT FIRST; + ALTER TABLE `zt_workflow` ADD `approval` enum('enabled', 'disabled') NOT NULL DEFAULT 'disabled' AFTER `status`; ALTER TABLE `zt_workflowaction` ADD `role` varchar(10) NOT NULL DEFAULT 'custom' AFTER `buildin`; ALTER TABLE `zt_workflowfield` ADD `role` varchar(10) NOT NULL DEFAULT 'custom' AFTER `buildin`; diff --git a/db/zentao.sql b/db/zentao.sql index a735408e34..461a95aa9d 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `zt_acl` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_action`; CREATE TABLE IF NOT EXISTS `zt_action` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, + `id` int(9) unsigned NOT NULL auto_increment, `objectType` varchar(30) NOT NULL default '', `objectID` mediumint(8) unsigned NOT NULL default '0', `product` text NOT NULL, @@ -705,7 +705,7 @@ CREATE TABLE IF NOT EXISTS `zt_holiday` ( ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_history`; CREATE TABLE IF NOT EXISTS `zt_history` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, + `id` int(9) unsigned NOT NULL auto_increment, `action` mediumint(8) unsigned NOT NULL default '0', `field` varchar(30) NOT NULL default '', `old` text NOT NULL, @@ -1397,6 +1397,8 @@ CREATE TABLE IF NOT EXISTS `zt_story` ( `assignedDate` datetime NOT NULL, `lastEditedBy` varchar(30) NOT NULL default '', `lastEditedDate` datetime NOT NULL, + `changedBy` VARCHAR(30) NOT NULL, + `changedDate` DATETIME NOT NULL, `reviewedBy` varchar(255) NOT NULL, `reviewedDate` datetime NOT NULL default '0000-00-00 00:00:00', `closedBy` varchar(30) NOT NULL default '', diff --git a/module/upgrade/model.php b/module/upgrade/model.php index 17b6ce7a4d..4c5d031e38 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -516,6 +516,15 @@ class upgradeModel extends model $this->updateProjectData(); break; case '17_1': + if(!$executedXuanxuan) + { + $xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan5.6.sql'; + $this->execSQL($xuanxuanSql); + $this->xuanAddMessageIndexColumns(); + $this->xuanReindexMessages(); + $this->xuanUpdateLastReadMessageIndex(); + $this->xuanFixChatsWithoutLastRead(); + } $this->moveProjectAdmins(); $this->addStoryViewPriv(); break; @@ -6496,4 +6505,150 @@ class upgradeModel extends model return true; } + + /** + * Xuan: Add `index` column to all message partition tables. + * + * @access public + * @return bool + */ + public function xuanAddMessageIndexColumns() + { + $prefix = $this->config->db->prefix; + $tables = $this->dbh->query("SHOW TABLES LIKE '{$prefix}im_message\_%'")->fetchAll(); + $tables = array_filter(array_map(function($table) use ($prefix) + { + $tableName = current(array_values((array)$table)); + if(!preg_match("/{$prefix}im_message_[a-z]+/", $tableName)) return $tableName; + }, + $tables + )); + if(empty($tables)) return true; + + $query = ''; + foreach($tables as $table) $query .= "ALTER TABLE `$table` ADD `index` int(11) unsigned DEFAULT 0 AFTER `date`;"; + + $this->dbh->query($query); + return !dao::isError(); + } + + /** + * Xuan: Re-index messages. + * + * @access public + * @return bool + */ + public function xuanReindexMessages() + { + /** @var array[] $chatTablePairs Associations of chats and partition tables, without main table. */ + $chatTablePairs = array(); + + ini_set('memory_limit', '1024M'); + + /* Fetch chat and message partition table associations. */ + $chatTableData = $this->dao->select('gid,tableName')->from(TABLE_IM_CHAT_MESSAGE_INDEX)->orderBy('id_asc')->fetchAll(); + foreach($chatTableData as $chatTable) + { + if(isset($chatTablePairs[$chatTable->gid])) + { + $chatTablePairs[$chatTable->gid][] = $chatTable->tableName; + continue; + } + $chatTablePairs[$chatTable->gid] = array($chatTable->tableName); + } + + /* Append all non-partitioned chats. */ + $allChats = $this->dao->select('gid')->from(TABLE_IM_CHAT)->fetchPairs(); + $nonPartitionedChats = array_diff(array_values($allChats), array_keys($chatTablePairs)); + foreach($nonPartitionedChats as $chat) $chatTablePairs[$chat] = array(); + + /* Do index. */ + foreach($chatTablePairs as $chat => $tables) + { + $result = $this->xuanDoIndex($chat, $tables); + if(!$result) return false; + } + + return true; + } + + /** + * Xuan: Index messages of chat in partition tables and main table. + * + * @param string $chat + * @param array $tables + * @return bool + */ + public function xuanDoIndex($chat, $tables) + { + $messageIndex = 0; + $tables[] = str_replace('`', '', TABLE_IM_MESSAGE); + foreach($tables as $table) + { + $idIndices = array(); + + $ids = $this->dao->select('id')->from("`$table`")->where('cgid')->eq($chat)->fetchAll('id'); + $ids = array_keys($ids); + if(empty($ids)) continue; + + for($index = 1; $index <= count($ids); $index++) $idIndices[$ids[$index - 1]] = $index + $messageIndex; + + $queryData = array(); + foreach($idIndices as $id => $index) $queryData[] = "WHEN $id THEN $index"; + + $query = "UPDATE `$table` SET `index` = (CASE `id` " . join(' ', $queryData) . " END) WHERE `id` IN(" . join(',', $ids) . ");"; + $this->dao->query($query); + + $messageIndex = max(array_values($idIndices)); + } + $this->dao->update(TABLE_IM_CHAT)->set('lastMessageIndex')->eq($messageIndex)->where('gid')->eq($chat)->exec(); + return !dao::isError(); + } + + /** + * Xuan: Set lastReadMessageIndex into table im_chatuser. + * + * @access public + * @return bool + */ + public function xuanUpdateLastReadMessageIndex() + { + $lastReadMessages = $this->dao->select('lastReadMessage')->from(TABLE_IM_CHATUSER)->where('lastReadMessage')->ne(0)->fetchAll('lastReadMessage'); + $lastReadMessages = array_keys($lastReadMessages); + if(empty($lastReadMessages)) return true; + + ini_set('memory_limit', '1024M'); + + $messages = $this->loadModel('im')->messageGetList('', $lastReadMessages, null, '', '', false); + + foreach($messages as $message) $this->dao->update(TABLE_IM_CHATUSER)->set('lastReadMessageIndex')->eq($message->index)->where('lastReadMessage')->eq($message->id)->exec(); + return !dao::isError(); + } + + /** + * Xuan: Fix chats without lastReadMessage. + * + * @access public + * @return bool + */ + public function xuanFixChatsWithoutLastRead() + { + $zeroLastReadChats = $this->dao->select('cgid')->from(TABLE_IM_CHATUSER)->where('lastReadMessage')->eq(0)->fetchAll('cgid'); + $zeroLastReadChats = array_keys($zeroLastReadChats); + if(empty($zeroLastReadChats)) return true; + + ini_set('memory_limit', '1024M'); + + $lastMessages = $this->dao->select('MAX(`index`), cgid')->from(TABLE_IM_MESSAGE)->where('cgid')->in($zeroLastReadChats)->groupBy('cgid')->fetchAll('cgid'); + if(empty($lastMessages)) return true; + + $maxIndex = 'MAX(`index`)'; + $queryData = array(); + foreach($lastMessages as $cgid => $lastMessage) $queryData[] = "WHEN '{$cgid}' THEN {$lastMessage->$maxIndex}"; + + $query = "UPDATE " . TABLE_IM_CHATUSER . " SET `lastReadMessageIndex` = (CASE `cgid` " . join(' ', $queryData) . " END) WHERE `cgid` IN('" . join("','", array_keys($lastMessages)) . "');"; + $this->dao->query($query); + + return !dao::isError(); + } } diff --git a/tools/en2de.php b/tools/en2de.php deleted file mode 100755 index 69eafa3471..0000000000 --- a/tools/en2de.php +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env php - Date: Thu, 30 Jun 2022 01:21:54 +0000 Subject: [PATCH 032/100] * Fix bug #24417. --- module/product/js/all.js | 25 ++++++++++++++++++++++--- module/project/model.php | 6 +++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/module/product/js/all.js b/module/product/js/all.js index d468307e32..59c2438291 100644 --- a/module/product/js/all.js +++ b/module/product/js/all.js @@ -60,7 +60,12 @@ $(function() }); } - /* Add a statistics prompt statement after the Edit button */ + /** + * Add a statistics prompt statement after the Edit button. + * + * @access public + * @return void + */ function addStatistic() { var checkedLength = $(":checkbox[name^='productIDList']:checked").length; @@ -77,16 +82,30 @@ $(function() } } - function debounce(fn,delay) + /** + * Anti shake operation for jquery. + * + * @param fn $fn + * @param delay $delay + * @access public + * @return void + */ + function debounce(fn, delay) { var timer = null; return function() { if(timer) clearTimeout(timer); - timer = setTimeout(fn,delay) + timer = setTimeout(fn, delay) } } + /** + * Update statistics. + * + * @access public + * @return void + */ function updateStatistic() { debounce(addStatistic(), 200) diff --git a/module/project/model.php b/module/project/model.php index d76f2cf1b1..5c48d70d93 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1375,11 +1375,11 @@ class projectModel extends model } } - $executions = $this->dao->select('*')->from(TABLE_PROJECT) + $executionsCount = $this->dao->select('COUNT(*) as count')->from(TABLE_PROJECT) ->where('project')->eq($project->id) ->andWhere('deleted')->eq('0') - ->fetch(); - if(!empty($executions)) + ->fetchAll(); + if(!empty($executionsCount)) { $minExecutionBegin = $this->dao->select('begin as minBegin')->from(TABLE_PROJECT)->where('project')->eq($project->id)->andWhere('deleted')->eq('0')->orderBy('begin_asc')->fetch(); $maxExecutionEnd = $this->dao->select('end as maxEnd')->from(TABLE_PROJECT)->where('project')->eq($project->id)->andWhere('deleted')->eq('0')->orderBy('end_desc')->fetch(); From a99820b192847ee11cd0c7bad92b3b4441405f51 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Thu, 30 Jun 2022 01:29:28 +0000 Subject: [PATCH 033/100] * fix indentation problem in index.en.css --- module/index/css/index.en.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/index/css/index.en.css b/module/index/css/index.en.css index 708361986f..c008c4a5df 100644 --- a/module/index/css/index.en.css +++ b/module/index/css/index.en.css @@ -1,2 +1,2 @@ -#apps {left: 106px} +#apps { left: 106px;} #menu { width: 106px;} From 48e9a8fdada9cf48c06157a6ee4b87cad6906888 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 30 Jun 2022 09:31:58 +0800 Subject: [PATCH 034/100] * Fix bug#23990. --- module/build/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/build/model.php b/module/build/model.php index 1eb43db7ef..dab588ecb5 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -549,7 +549,7 @@ class buildModel extends model if(common::hasPriv('build', 'linkstory') and common::canBeChanged('build', $build)) $menu .= $this->buildMenu('build', 'view', "{$params}&type=story&link=true", $build, $type, 'link', '', '', '', "data-app={$tab}", $this->lang->build->linkStory); - $menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id", $build, $type, 'bullhorn', '', '', '', $testtaskApp); + $menu .= $this->buildMenu('testtask', 'create', "product=$build->product&execution={$executionID}&build=$build->id&projectID=$build->project", $build, $type, 'bullhorn', '', '', '', $testtaskApp); if($tab == 'execution' and !empty($execution->type) and $execution->type != 'kanban') $menu .= $this->buildMenu('execution', 'bug', "execution={$extraParams['executionID']}&productID={$extraParams['productID']}&orderBy=status&build=$build->id", $build, $type, '', '', '', '', $this->lang->execution->viewBug); if($tab == 'project' or empty($execution->type) or $execution->type == 'kanban') $menu .= $this->buildMenu('build', 'view', "{$params}&type=generatedBug", $build, $type, 'bug', '', '', '', "data-app='$tab'", $this->lang->project->bug); From 4298ec0f988d93ffbb016374ae53ece6f788c68b Mon Sep 17 00:00:00 2001 From: mayue Date: Thu, 30 Jun 2022 09:35:55 +0800 Subject: [PATCH 035/100] * Adjust some show issue. --- module/story/js/create.js | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/module/story/js/create.js b/module/story/js/create.js index f0ed466ae8..0dc61da541 100644 --- a/module/story/js/create.js +++ b/module/story/js/create.js @@ -11,17 +11,12 @@ $(function() { $('#reviewerBox').addClass('required'); } + loadAssignedTo(); getStatus('create', "product=" + $('#product').val() + ",execution=" + executionID + ",needNotReview=" + ($(this).prop('checked') ? 1 : 0)); }); $('#needNotReview').change(); - $('#reviewer').on('change', function() - { - loadAssignedTo(); - }); - $('#reviewer').change(); - // init pri selector $('#pri').on('change', function() { @@ -69,16 +64,16 @@ function loadAssignedTo() }); var colspan = $('#assignedToBox').attr('colspan'); - if(assignees && assignees.length == 1) - { - $('#assignedToBox').addClass('hidden'); - $('#reviewerBox').attr('colspan', colspan * 2); - } - else + if($('#needNotReview').is(':checked')) { $('#assignedToBox').removeClass('hidden'); $('#reviewerBox').attr('colspan', colspan); } + else + { + $('#assignedToBox').addClass('hidden'); + $('#reviewerBox').attr('colspan', colspan * 2); + } } function refreshPlan() From 4074e9fbae3f7bf5f27b741bbca53e15c056cacb Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 30 Jun 2022 09:37:25 +0800 Subject: [PATCH 036/100] * Fix bug #24570. --- extension/lite/group/ext/lang/resource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/lite/group/ext/lang/resource.php b/extension/lite/group/ext/lang/resource.php index de00c3c944..ec5c6714a9 100644 --- a/extension/lite/group/ext/lang/resource.php +++ b/extension/lite/group/ext/lang/resource.php @@ -551,8 +551,8 @@ $lang->resource->task->recordEstimate = 'recordEstimateAction'; $lang->resource->task->editEstimate = 'editEstimate'; $lang->resource->task->deleteEstimate = 'deleteEstimate'; $lang->resource->task->report = 'reportChart'; -$lang->resource->task->exportTemplet = 'exportTemplet'; -$lang->resource->task->import = 'import'; +if($config->edition != 'open') $lang->resource->task->exportTemplet = 'exportTemplet'; +if($config->edition != 'open') $lang->resource->task->import = 'import'; $lang->task->methodOrder[5] = 'create'; $lang->task->methodOrder[10] = 'batchCreate'; From db7d9edd07097e7fe597b6a64404e361d3abb9ba Mon Sep 17 00:00:00 2001 From: sunjun Date: Thu, 30 Jun 2022 01:41:25 +0000 Subject: [PATCH 037/100] fixbug_lang --- module/bug/css/browse.css | 1 + module/common/lang/de.php | 2 +- module/product/lang/en.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/module/bug/css/browse.css b/module/bug/css/browse.css index f28860922b..7a2518c139 100644 --- a/module/bug/css/browse.css +++ b/module/bug/css/browse.css @@ -34,3 +34,4 @@ body {margin-bottom: 25px;} .btn-group a.btn-primary {border-right: 1px solid rgba(255,255,255,0.3);} .btn-group button.dropdown-toggle.btn-primary {padding:6px;} #bugForm tbody tr td .label {max-width: 100px; text-overflow: unset;} +[lang^='de'] th.c-confirmed {width: 100px !important;} diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 14e01b3443..2baf6cd3cf 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -353,7 +353,7 @@ $lang->setLang = 'Language Setting'; /* Theme style. */ $lang->theme = 'Theme'; -$lang->themes['default'] = 'ZenTao Blau (Standard)'; +$lang->themes['default'] = 'Standard'; $lang->themes['blue'] = 'Young Blue'; $lang->themes['green'] = 'Grün'; $lang->themes['red'] = 'Rot'; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index 5c30a03101..51e72a2513 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -208,7 +208,6 @@ $lang->product->featureBar['browse']['allstory'] = $lang->product->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; -$lang->product->featureBar['browse']['reviewedbyme'] = $lang->product->reviewedByMe; $lang->product->featureBar['browse']['reviewbyme'] = $lang->product->reviewByMe; $lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory; $lang->product->featureBar['browse']['more'] = $lang->more; @@ -218,6 +217,7 @@ $lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed; $lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed']; $lang->product->moreSelects['assignedbyme'] = $lang->product->assignedByMe; +$lang->product->moreSelects['reviewedbyme'] = $lang->product->reviewedByMe; $lang->product->moreSelects['closedbyme'] = $lang->product->closedByMe; $lang->product->moreSelects['activestory'] = $lang->product->activeStory; $lang->product->moreSelects['changedstory'] = $lang->product->changedStory; From 793a4ec698d6d41e49a1da5e477d64cf8ffa4b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Thu, 30 Jun 2022 09:41:15 +0800 Subject: [PATCH 038/100] * Code for multi task assignedTo. --- module/task/model.php | 3 ++- module/task/view/finish.html.php | 2 +- module/task/view/view.html.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index f60cd711f2..5c4c9b61f3 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -3729,7 +3729,8 @@ class taskModel extends model $menu .= $this->buildMenu('task', 'batchCreate', "execution=$task->execution&storyID=$task->story&moduleID=$task->module&taskID=$task->id", $task, 'view', 'split', '', '', '', "title='{$this->lang->task->children}'", $this->lang->task->children); } - if(!(!empty($task->team) and $task->mode == 'multi')) $menu .= $this->buildMenu('task', 'assignTo', "executionID=$task->execution&taskID=$task->id", $task, 'button', '', '', 'iframe', true, '', empty($task->team) ? $this->lang->task->assignTo : $this->lang->task->transfer); + $assignToLang = (!empty($task->team) and $task->mode == 'linear') ? $this->lang->task->transfer : $this->lang->task->assignTo; + $menu .= $this->buildMenu('task', 'assignTo', "executionID=$task->execution&taskID=$task->id", $task, 'button', '', '', 'iframe', true, '', $assignToLang); $menu .= $this->buildMenu('task', 'start', $params, $task, 'view', '', '', 'iframe showinonlybody', true); $menu .= $this->buildMenu('task', 'restart', $params, $task, 'view', '', '', 'iframe showinonlybody', true); diff --git a/module/task/view/finish.html.php b/module/task/view/finish.html.php index 0e4085b0f5..6c855dff64 100644 --- a/module/task/view/finish.html.php +++ b/module/task/view/finish.html.php @@ -66,7 +66,7 @@ - + diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index c4a4d4f31b..a835a17552 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -267,7 +267,7 @@ From 8fbf4148c4d49350c0e1fb7b66610bfc11b74501 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 30 Jun 2022 10:55:05 +0800 Subject: [PATCH 051/100] * Fix bug #24573. --- module/task/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index c4a4d4f31b..e2f4091aa7 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -166,7 +166,7 @@
- + ' . $lang->goback, '', "class='btn btn-secondary'");?>
";?> executionList = $execution;?> task->buildOperateMenu($task, 'view');?> From 933694703e6b176e67c8128de1b402001efb088a Mon Sep 17 00:00:00 2001 From: mayue Date: Thu, 30 Jun 2022 11:00:28 +0800 Subject: [PATCH 052/100] * Fix bug #24580. --- module/doc/js/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/doc/js/common.js b/module/doc/js/common.js index 432a790f3e..be9b87367f 100644 --- a/module/doc/js/common.js +++ b/module/doc/js/common.js @@ -50,7 +50,7 @@ function toggleAcl(acl, type) var notice = typeof(noticeAcl[libType][acl]) != 'undefined' ? noticeAcl[libType][acl] : ''; $('#noticeAcl').html(notice); - if((libType == 'custom' || libType == 'api') && acl == 'private') $('#whiteListBox').addClass('hidden'); + if((libType == 'custom' || libType == 'api' || libType == 'book') && acl == 'private') $('#whiteListBox').addClass('hidden'); if(libType == 'project' && typeof(doclibID) != 'undefined') { From 8d43bd7bdcf488715514d8b29eb3249449def247 Mon Sep 17 00:00:00 2001 From: wangyuting2 <851424971@qq.com> Date: Thu, 30 Jun 2022 11:08:16 +0800 Subject: [PATCH 053/100] * Hide open approval for lite workflow. --- extension/lite/workflow/ext/view/create.flow.html.hook.php | 1 + 1 file changed, 1 insertion(+) diff --git a/extension/lite/workflow/ext/view/create.flow.html.hook.php b/extension/lite/workflow/ext/view/create.flow.html.hook.php index 79974026e4..a11083617b 100644 --- a/extension/lite/workflow/ext/view/create.flow.html.hook.php +++ b/extension/lite/workflow/ext/view/create.flow.html.hook.php @@ -1,3 +1,4 @@ From 3d92afa1ae1a7e00916df1271a66e8e6d9e8658f Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 30 Jun 2022 11:20:41 +0800 Subject: [PATCH 054/100] * Fix bug. --- module/project/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index ae90e96cb2..88f4eee237 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1097,7 +1097,7 @@ class projectModel extends model if(!empty($project->name) and $project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $program->begin); /* When parent set end then child project end cannot greater than parent. */ - if(!empty($project->name) and $$program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $program->end); + if(!empty($project->name) and $program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $program->end); if(dao::isError()) return false; } From fe4aa6c00f54b05efc1c6cf7c04b3fcca0d2b6b0 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 30 Jun 2022 11:21:38 +0800 Subject: [PATCH 055/100] * Fix bug #24288. --- module/testtask/js/edit.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/testtask/js/edit.js b/module/testtask/js/edit.js index c60cf07c54..7c93eff175 100755 --- a/module/testtask/js/edit.js +++ b/module/testtask/js/edit.js @@ -1,4 +1,8 @@ $(function() { adjustPriBoxWidth(); + if(config.onlybody) + { + $('#ownerAndPriBox .picker-selection').css('width', '123px'); + } }) From 39267472e23465140c2c304060009f5e54043911 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 30 Jun 2022 03:22:36 +0000 Subject: [PATCH 056/100] * Fix bug. --- module/project/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/model.php b/module/project/model.php index ae90e96cb2..88f4eee237 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -1097,7 +1097,7 @@ class projectModel extends model if(!empty($project->name) and $project->begin < $program->begin) dao::$errors['begin'] = sprintf($this->lang->project->beginGreateChild, $program->begin); /* When parent set end then child project end cannot greater than parent. */ - if(!empty($project->name) and $$program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $program->end); + if(!empty($project->name) and $program->end != '0000-00-00' and $project->end > $program->end) dao::$errors['end'] = sprintf($this->lang->project->endLetterChild, $program->end); if(dao::isError()) return false; } From c896e5ac6fe99d26ecba388601513ed86c84551b Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 30 Jun 2022 11:22:53 +0800 Subject: [PATCH 057/100] * Code for lite html hook. --- .../attend/ext/view/stat.oa.html.hook.php | 3 --- .../flow/ext/view/browse.flow.html.hook.php | 1 - .../flow/ext/view/create.flow.html.hook.php | 1 - .../ext/view/browsedb.flow.html.hook.php | 1 - .../ext/view/browseflow.flow.html.hook.php | 1 - .../workflow/ext/view/copy.flow.html.hook.php | 1 - .../workflow/ext/view/edit.flow.html.hook.php | 1 - .../ext/view/flowchart.flow.html.hook.php | 1 - .../ext/view/release.flow.html.hook.php | 1 - .../ext/view/setcss.flow.html.hook.php | 1 - .../ext/view/setjs.flow.html.hook.php | 1 - .../workflow/ext/view/ui.flow.html.hook.php | 1 - .../ext/view/browse.flow.html.hook.php | 1 - .../ext/view/create.flow.html.hook.php | 1 - .../ext/view/edit.flow.html.hook.php | 1 - .../ext/view/setnotice.flow.html.hook.php | 1 - .../ext/view/browse.flow.html.hook.php | 1 - .../ext/view/create.flow.html.hook.php | 1 - .../ext/view/edit.flow.html.hook.php | 1 - .../ext/view/browse.flow.html.hook.php | 1 - .../ext/view/edit.flow.html.hook.php | 1 - .../ext/view/create.flow.html.hook.php | 1 - .../ext/view/edit.flow.html.hook.php | 1 - .../ext/view/browse.flow.html.hook.php | 1 - .../ext/view/admin.flow.html.hook.php | 1 - .../ext/view/admin.flow.html.hook.php | 1 - .../ext/view/browse.flow.html.hook.php | 1 - .../ext/view/view.flow.html.hook.php | 1 - module/upgrade/config.php | 24 +++++++++++++++++++ 29 files changed, 24 insertions(+), 30 deletions(-) delete mode 100644 extension/lite/attend/ext/view/stat.oa.html.hook.php delete mode 100644 extension/lite/flow/ext/view/browse.flow.html.hook.php delete mode 100644 extension/lite/flow/ext/view/create.flow.html.hook.php delete mode 100644 extension/lite/workflow/ext/view/browsedb.flow.html.hook.php delete mode 100644 extension/lite/workflow/ext/view/browseflow.flow.html.hook.php delete mode 100644 extension/lite/workflow/ext/view/edit.flow.html.hook.php delete mode 100644 extension/lite/workflow/ext/view/flowchart.flow.html.hook.php delete mode 100644 extension/lite/workflow/ext/view/release.flow.html.hook.php delete mode 100644 extension/lite/workflow/ext/view/setcss.flow.html.hook.php delete mode 100644 extension/lite/workflow/ext/view/setjs.flow.html.hook.php delete mode 100644 extension/lite/workflow/ext/view/ui.flow.html.hook.php delete mode 100644 extension/lite/workflowaction/ext/view/browse.flow.html.hook.php delete mode 100644 extension/lite/workflowaction/ext/view/edit.flow.html.hook.php delete mode 100644 extension/lite/workflowaction/ext/view/setnotice.flow.html.hook.php delete mode 100644 extension/lite/workflowdatasource/ext/view/browse.flow.html.hook.php delete mode 100644 extension/lite/workflowdatasource/ext/view/edit.flow.html.hook.php delete mode 100644 extension/lite/workflowfield/ext/view/browse.flow.html.hook.php delete mode 100644 extension/lite/workflowhook/ext/view/create.flow.html.hook.php delete mode 100644 extension/lite/workflowhook/ext/view/edit.flow.html.hook.php delete mode 100644 extension/lite/workflowlabel/ext/view/browse.flow.html.hook.php delete mode 100644 extension/lite/workflowlayout/ext/view/admin.flow.html.hook.php delete mode 100644 extension/lite/workflowrelation/ext/view/admin.flow.html.hook.php delete mode 100644 extension/lite/workflowrule/ext/view/browse.flow.html.hook.php delete mode 100644 extension/lite/workflowrule/ext/view/view.flow.html.hook.php diff --git a/extension/lite/attend/ext/view/stat.oa.html.hook.php b/extension/lite/attend/ext/view/stat.oa.html.hook.php deleted file mode 100644 index c5c67c3735..0000000000 --- a/extension/lite/attend/ext/view/stat.oa.html.hook.php +++ /dev/null @@ -1,3 +0,0 @@ -getExtensionRoot() . '/biz/attend/ext/view/stat.oa.html.hook.php'; -?> \ No newline at end of file diff --git a/extension/lite/flow/ext/view/browse.flow.html.hook.php b/extension/lite/flow/ext/view/browse.flow.html.hook.php deleted file mode 100644 index c66dc67377..0000000000 --- a/extension/lite/flow/ext/view/browse.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/flow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/flow/ext/view/create.flow.html.hook.php b/extension/lite/flow/ext/view/create.flow.html.hook.php deleted file mode 100644 index c66dc67377..0000000000 --- a/extension/lite/flow/ext/view/create.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/flow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflow/ext/view/browsedb.flow.html.hook.php b/extension/lite/workflow/ext/view/browsedb.flow.html.hook.php deleted file mode 100644 index 2dbe26bf06..0000000000 --- a/extension/lite/workflow/ext/view/browsedb.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflow/ext/view/browseflow.flow.html.hook.php b/extension/lite/workflow/ext/view/browseflow.flow.html.hook.php deleted file mode 100644 index 2dbe26bf06..0000000000 --- a/extension/lite/workflow/ext/view/browseflow.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflow/ext/view/copy.flow.html.hook.php b/extension/lite/workflow/ext/view/copy.flow.html.hook.php index bb1ebdd750..79974026e4 100644 --- a/extension/lite/workflow/ext/view/copy.flow.html.hook.php +++ b/extension/lite/workflow/ext/view/copy.flow.html.hook.php @@ -1,4 +1,3 @@ -app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflow/ext/view/edit.flow.html.hook.php b/extension/lite/workflow/ext/view/edit.flow.html.hook.php deleted file mode 100644 index 2dbe26bf06..0000000000 --- a/extension/lite/workflow/ext/view/edit.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflow/ext/view/flowchart.flow.html.hook.php b/extension/lite/workflow/ext/view/flowchart.flow.html.hook.php deleted file mode 100644 index 2dbe26bf06..0000000000 --- a/extension/lite/workflow/ext/view/flowchart.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflow/ext/view/release.flow.html.hook.php b/extension/lite/workflow/ext/view/release.flow.html.hook.php deleted file mode 100644 index 2dbe26bf06..0000000000 --- a/extension/lite/workflow/ext/view/release.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflow/ext/view/setcss.flow.html.hook.php b/extension/lite/workflow/ext/view/setcss.flow.html.hook.php deleted file mode 100644 index 2dbe26bf06..0000000000 --- a/extension/lite/workflow/ext/view/setcss.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflow/ext/view/setjs.flow.html.hook.php b/extension/lite/workflow/ext/view/setjs.flow.html.hook.php deleted file mode 100644 index 2dbe26bf06..0000000000 --- a/extension/lite/workflow/ext/view/setjs.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflow/ext/view/ui.flow.html.hook.php b/extension/lite/workflow/ext/view/ui.flow.html.hook.php deleted file mode 100644 index 2dbe26bf06..0000000000 --- a/extension/lite/workflow/ext/view/ui.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflow/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowaction/ext/view/browse.flow.html.hook.php b/extension/lite/workflowaction/ext/view/browse.flow.html.hook.php deleted file mode 100644 index 9a25285d22..0000000000 --- a/extension/lite/workflowaction/ext/view/browse.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowaction/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowaction/ext/view/create.flow.html.hook.php b/extension/lite/workflowaction/ext/view/create.flow.html.hook.php index 6c51eeb21c..b0f336e568 100644 --- a/extension/lite/workflowaction/ext/view/create.flow.html.hook.php +++ b/extension/lite/workflowaction/ext/view/create.flow.html.hook.php @@ -1,4 +1,3 @@ -app->getExtensionRoot() . 'biz/workflowaction/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowaction/ext/view/edit.flow.html.hook.php b/extension/lite/workflowaction/ext/view/edit.flow.html.hook.php deleted file mode 100644 index 9a25285d22..0000000000 --- a/extension/lite/workflowaction/ext/view/edit.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowaction/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowaction/ext/view/setnotice.flow.html.hook.php b/extension/lite/workflowaction/ext/view/setnotice.flow.html.hook.php deleted file mode 100644 index 9a25285d22..0000000000 --- a/extension/lite/workflowaction/ext/view/setnotice.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowaction/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowdatasource/ext/view/browse.flow.html.hook.php b/extension/lite/workflowdatasource/ext/view/browse.flow.html.hook.php deleted file mode 100644 index e029265b5e..0000000000 --- a/extension/lite/workflowdatasource/ext/view/browse.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowdatasource/ext/view/create.flow.html.hook.php b/extension/lite/workflowdatasource/ext/view/create.flow.html.hook.php index 55d057a936..fefcab51f4 100644 --- a/extension/lite/workflowdatasource/ext/view/create.flow.html.hook.php +++ b/extension/lite/workflowdatasource/ext/view/create.flow.html.hook.php @@ -3,4 +3,3 @@ $('#submit').after(' -app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowdatasource/ext/view/edit.flow.html.hook.php b/extension/lite/workflowdatasource/ext/view/edit.flow.html.hook.php deleted file mode 100644 index e029265b5e..0000000000 --- a/extension/lite/workflowdatasource/ext/view/edit.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowdatasource/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowfield/ext/view/browse.flow.html.hook.php b/extension/lite/workflowfield/ext/view/browse.flow.html.hook.php deleted file mode 100644 index 11369cc5af..0000000000 --- a/extension/lite/workflowfield/ext/view/browse.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowfield/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowfield/ext/view/edit.flow.html.hook.php b/extension/lite/workflowfield/ext/view/edit.flow.html.hook.php index 122e39595d..50342ecd4b 100644 --- a/extension/lite/workflowfield/ext/view/edit.flow.html.hook.php +++ b/extension/lite/workflowfield/ext/view/edit.flow.html.hook.php @@ -1,4 +1,3 @@ -app->getExtensionRoot() . 'biz/workflowfield/ext/view/' . basename(__FILE__);?> visions == ',lite,'):?> dao->select('id')->from(TABLE_WORKFLOWDATASOURCE)->where('code')->like('litefeedback%')->andWhere('vision')->eq('lite')->fetchPairs('id', 'id');?> diff --git a/extension/lite/workflowhook/ext/view/create.flow.html.hook.php b/extension/lite/workflowhook/ext/view/create.flow.html.hook.php deleted file mode 100644 index abebb6d16b..0000000000 --- a/extension/lite/workflowhook/ext/view/create.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowhook/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowhook/ext/view/edit.flow.html.hook.php b/extension/lite/workflowhook/ext/view/edit.flow.html.hook.php deleted file mode 100644 index abebb6d16b..0000000000 --- a/extension/lite/workflowhook/ext/view/edit.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowhook/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowlabel/ext/view/browse.flow.html.hook.php b/extension/lite/workflowlabel/ext/view/browse.flow.html.hook.php deleted file mode 100644 index d32409775c..0000000000 --- a/extension/lite/workflowlabel/ext/view/browse.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowlabel/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowlayout/ext/view/admin.flow.html.hook.php b/extension/lite/workflowlayout/ext/view/admin.flow.html.hook.php deleted file mode 100644 index 038a427205..0000000000 --- a/extension/lite/workflowlayout/ext/view/admin.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowlayout/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowrelation/ext/view/admin.flow.html.hook.php b/extension/lite/workflowrelation/ext/view/admin.flow.html.hook.php deleted file mode 100644 index 09020f0aad..0000000000 --- a/extension/lite/workflowrelation/ext/view/admin.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowrelation/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowrule/ext/view/browse.flow.html.hook.php b/extension/lite/workflowrule/ext/view/browse.flow.html.hook.php deleted file mode 100644 index 06a563562d..0000000000 --- a/extension/lite/workflowrule/ext/view/browse.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowrule/ext/view/' . basename(__FILE__);?> diff --git a/extension/lite/workflowrule/ext/view/view.flow.html.hook.php b/extension/lite/workflowrule/ext/view/view.flow.html.hook.php deleted file mode 100644 index 06a563562d..0000000000 --- a/extension/lite/workflowrule/ext/view/view.flow.html.hook.php +++ /dev/null @@ -1 +0,0 @@ -app->getExtensionRoot() . 'biz/workflowrule/ext/view/' . basename(__FILE__);?> diff --git a/module/upgrade/config.php b/module/upgrade/config.php index 8d1cab9948..c33947fe1a 100644 --- a/module/upgrade/config.php +++ b/module/upgrade/config.php @@ -338,6 +338,30 @@ $config->delete['17_0_beta1'][] = 'extension/max/sso/ext/model/bizext.php'; $config->delete['17_2'][] = 'extension/biz/my/ext/view/todo.calendar.html.hook.php'; $config->delete['17_2'][] = 'extension/max/my/ext/view/todo.calendar.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/attend/ext/view/stat.oa.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/flow/ext/view/browse.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/flow/ext/view/create.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflow/ext/view/browsedb.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflow/ext/view/browseflow.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflow/ext/view/edit.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflow/ext/view/flowchart.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflow/ext/view/release.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflow/ext/view/setcss.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflow/ext/view/setjs.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflow/ext/view/ui.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowaction/ext/view/browse.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowaction/ext/view/edit.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowaction/ext/view/setnotice.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowdatasource/ext/view/browse.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowdatasource/ext/view/edit.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowfield/ext/view/browse.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowhook/ext/view/create.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowhook/ext/view/edit.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowlabel/ext/view/browse.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowlayout/ext/view/admin.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/workflowrelation/ext/view/admin.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/extension/lite/workflowrule/ext/view/browse.flow.html.hook.php'; +$config->delete['17_2'][] = 'extension/lite/extension/lite/workflowrule/ext/view/view.flow.html.hook.php'; $config->upgrade->openModules = array('action', 'admin', 'api', 'automation', 'backup', 'block', 'branch', 'budget', 'bug', 'build', 'caselib', 'ci', 'client', 'common', 'company', 'compile', 'convert', 'cron', 'custom', 'datatable', 'dept', 'design', 'dev', 'doc', 'durationestimation', 'entry', 'execution', 'extension', 'file', 'git', 'gitlab', 'group', 'holiday', 'im', 'index', 'index.html', 'install', 'issue', 'jenkins', 'job', 'kanban', 'license', 'mail', 'message', 'misc', 'mr', 'my', 'personnel', 'pipeline', 'product', 'productplan', 'productset', 'program', 'programplan', 'project', 'projectbuild', 'projectrelease', 'projectstory', 'qa', 'release', 'repo', 'report', 'risk', 'score', 'search', 'setting', 'sonarqube', 'sso', 'stage', 'stakeholder', 'story', 'subject', 'svn', 'task', 'testcase', 'testreport', 'testsuite', 'testtask', 'todo', 'tree', 'tutorial', 'upgrade', 'user', 'webhook', 'weekly', 'workestimation'); From 03b07a3b3a54a00e4088513462821b801f3947f0 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 30 Jun 2022 11:23:46 +0800 Subject: [PATCH 058/100] * Fix bug #24288. --- module/testtask/js/edit.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/module/testtask/js/edit.js b/module/testtask/js/edit.js index 7c93eff175..2e8300669a 100755 --- a/module/testtask/js/edit.js +++ b/module/testtask/js/edit.js @@ -1,8 +1,5 @@ $(function() { adjustPriBoxWidth(); - if(config.onlybody) - { - $('#ownerAndPriBox .picker-selection').css('width', '123px'); - } + if(config.onlybody) $('#ownerAndPriBox .picker-selection').css('width', '123px'); }) From b953f00253c2ff7b547d36b5f1f0072bf7bdef9b Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 30 Jun 2022 11:27:04 +0800 Subject: [PATCH 059/100] * fix bug #23954 --- extension/lite/feedback/ext/view/view.lite.html.hook.php | 3 +++ extension/lite/todo/ext/view/view.lite.html.hook.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 extension/lite/feedback/ext/view/view.lite.html.hook.php diff --git a/extension/lite/feedback/ext/view/view.lite.html.hook.php b/extension/lite/feedback/ext/view/view.lite.html.hook.php new file mode 100644 index 0000000000..8ad5595c4d --- /dev/null +++ b/extension/lite/feedback/ext/view/view.lite.html.hook.php @@ -0,0 +1,3 @@ + diff --git a/extension/lite/todo/ext/view/view.lite.html.hook.php b/extension/lite/todo/ext/view/view.lite.html.hook.php index fad3ee2b75..56bdae52d4 100644 --- a/extension/lite/todo/ext/view/view.lite.html.hook.php +++ b/extension/lite/todo/ext/view/view.lite.html.hook.php @@ -37,7 +37,7 @@ $('#toStoryLink').click(function() $('#toStoryButtonByProject').click(function() { var onlybody = config.onlybody == 'yes'; - var projectID = $('#projectToStory').val(); + var projectID = $('#projectToStory').val(); var link = createLink('story', 'create', 'productID=0&branch=0&moduleID=0&storyID=0&projectID=' + projectID + '&bugID=0&planID=0&todoID=' + todoID, config.defaultView, onlybody); if(!onlybody) window.parent.$.apps.open(link, 'project'); @@ -75,4 +75,4 @@ function createProject() config.onlybody = onlybody; parent.location.href = link; } - \ No newline at end of file + From d8d3af205cea25b38162ad37fc34d1aa7c38ced6 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 30 Jun 2022 03:29:53 +0000 Subject: [PATCH 060/100] * Fix bug #24472 #24581. --- module/task/js/batchcreate.js | 1 + module/task/view/batchcreate.html.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index b98330264c..70291eb881 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -136,6 +136,7 @@ function setPreview(num) storyLink = storyLink + concat + 'onlybody=yes'; } $('#preview' + num).removeAttr('disabled'); + $('#preview' + num).modalTrigger({type:'iframe'}); $('#preview' + num).attr('href', storyLink); } else diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 02d295aad4..8cf425cace 100755 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -122,7 +122,7 @@
- + From 51660084497c38f167062706aa2a07c03aee9ec8 Mon Sep 17 00:00:00 2001 From: sunjun Date: Thu, 30 Jun 2022 03:42:34 +0000 Subject: [PATCH 061/100] fixbug_api --- module/api/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/api/model.php b/module/api/model.php index 539132b98a..4b121cc395 100644 --- a/module/api/model.php +++ b/module/api/model.php @@ -910,7 +910,7 @@ class apiModel extends model $this->config->api->search['module'] = 'api'; $this->config->api->search['queryID'] = $queryID; $this->config->api->search['actionURL'] = $actionURL; - $this->config->api->search['params']['lib']['values'] = array($lib->id => $lib->name) + array('all' => $this->lang->api->allLibs); + $this->config->api->search['params']['lib']['values'] = (!empty($lib)) ? array($lib->id => $lib->name) + array('all' => $this->lang->api->allLibs) : array('all' => $this->lang->api->allLibs); $this->loadModel('search')->setSearchParams($this->config->api->search); } From 050750055646f83e180d3346f69258c4224776e2 Mon Sep 17 00:00:00 2001 From: Hao Sun Date: Thu, 30 Jun 2022 03:46:27 +0000 Subject: [PATCH 062/100] * optimize apps loading state. --- module/index/css/index.css | 2 +- module/index/js/index.js | 2 +- www/js/zui/min.js | 6 +++--- www/theme/zui/css/min.css | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/index/css/index.css b/module/index/css/index.css index 185b6fb9cc..39a1f80603 100644 --- a/module/index/css/index.css +++ b/module/index/css/index.css @@ -49,7 +49,7 @@ body.menu-hide {padding-left: 0;} .app-container {position: absolute; left: 0; bottom: 40px; right: 0; top: 0; background-color: #efefef;} .menu-hide #apps {left: 40px;} .app-container.loading:before {background-color: rgba(0,0,0,.1);} -.app-container.loading:before, .app-container.loading::after {transition-delay: 1s;} +.app-container.loading:before, .app-container.loading::after {transition-delay: 3s;} #appsBar {position: fixed; left: 96px; bottom: 0; right: 0; height: 40px; z-index: 1012; background: #fff; border-top: 1px solid #eff1f7;} .menu-hide #appsBar {left: 40px;} diff --git a/module/index/js/index.js b/module/index/js/index.js index 3ae31f534a..d924d87bf8 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -463,7 +463,7 @@ { app.$app.removeClass('loading'); app._loadTimer = null; - }, 10000); + }, 15000); } /** diff --git a/www/js/zui/min.js b/www/js/zui/min.js index da51cfd482..337836f63e 100644 --- a/www/js/zui/min.js +++ b/www/js/zui/min.js @@ -1,5 +1,5 @@ /*! - * ZUI: ZUI for Zentao - v1.10.0 - 2022-06-28 + * ZUI: ZUI for Zentao - v1.10.0 - 2022-06-30 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2022 cnezsoft.com; Licensed MIT @@ -74,7 +74,7 @@ function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"= * Original idea by: * Binny V A, http://www.openjs.com/scripts/events/keyboard_shortcuts/ */ -function(t){function e(e){if("string"==typeof e.data){var i=e.handler,n=e.data.toLowerCase().split(" ");e.handler=function(e){if(this===e.target||!/textarea|select/i.test(e.target.nodeName)&&"text"!==e.target.type){var o="keypress"!==e.type&&t.hotkeys.specialKeys[e.which],a=String.fromCharCode(e.which).toLowerCase(),s="",r={};e.altKey&&"alt"!==o&&(s+="alt+"),e.ctrlKey&&"ctrl"!==o&&(s+="ctrl+"),e.metaKey&&!e.ctrlKey&&"meta"!==o&&(s+="meta+"),e.shiftKey&&"shift"!==o&&(s+="shift+"),o?r[s+o]=!0:(r[s+a]=!0,r[s+t.hotkeys.shiftNums[a]]=!0,"shift+"===s&&(r[t.hotkeys.shiftNums[a]]=!0));for(var l=0,c=n.length;l","/":"?","\\":"|"}},t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})}(jQuery),function(t,e,i){"use strict";var n="zui.picker",o={},a={lang:null,remote:null,remoteConverter:null,remoteOnly:!1,onRemoteError:null,disableEmptySearch:!1,textKey:"text",valueKey:"value",keysKey:"keys",multi:"auto",formItem:"auto",list:null,allowSingleDeselect:null,autoSelectFirst:!1,maxSelectedCount:0,maxListCount:100,hideEmptyTextOption:!0,searchValueKey:!0,emptyResultHint:null,hideOnScroll:!0,inheritFormItemClasses:!1,emptySearchResultHint:null,accurateSearchHint:null,remoteErrorHint:null,deleteByBackspace:!0,disableScrollOnShow:!0,maxDropHeight:250,dropDirection:"auto",dropWidth:"100%",maxAutoDropWidth:450,minAutoDropWidth:100,multiValueSplitter:",",multiSelectActions:5,searchDelay:200,autoClearDrop:6e4,fixLabelFor:!0,hotkey:!0,onSelect:null,onDeselect:null,onBeforeChange:null,onChange:null,onReady:null,onNoResults:null,onShowingDrop:null,onHidingDrop:null,onShowedDrop:null,onHiddenDrop:null,valueMustInList:!0},s={zh_cn:{emptyResultHint:"没有可选项",emptySearchResultHint:"没有找到 “{0}”",accurateSearchHint:"请提供更多关键词缩小匹配范围",remoteErrorHint:"无法从服务器获取结果 - {0}",selectAll:"全选",deselectAll:"取消选择"},zh_tw:{emptyResultHint:"沒有可選項",emptySearchResultHint:"沒有找到 “{0}”",accurateSearchHint:"請提供更多關鍵詞縮小匹配範圍",remoteErrorHint:"無法從服務器獲取結果 - {0}",selectAll:"全選",deselectAll:"取消選擇"},en:{emptyResultHint:"No options",emptySearchResultHint:'Cannot found "{0}"',accurateSearchHint:"Suggest to provide more keywords",remoteErrorHint:"Unable to get result from server: {0}",selectAll:"Select all",deselectAll:"Deselect all"}},r=function(o,a){var l=this;l.name=n,l.$=t(o),l.id="pk_"+(l.$.attr("id")||t.zui.uuid()),a=l.options=t.extend({},r.DEFAULTS,this.$.data(),a),void 0!==a.hideOnWindowScroll&&(a.hideOnScroll=a.hideOnWindowScroll);var c=t.zui.clientLang?t.zui.clientLang():"en",h=a.lang||c;l.lang=t.zui.getLangData?t.zui.getLangData(n,h,s):s[h]||s[c];var d,u,p=a.formItem,f='.form-item,input[type="hidden"],select,input[type="text"]';if(d="self"===p?l.$:"auto"!==p&&p?l.$.find(p):l.$.is(f)?l.$:l.$.find(f).first(),!d.length)return console.error&&console.error("Cannot found form item for picker.");if(d.is('input[type="hidden"]'))u="hidden";else if(d.is("select"))u="select";else{if(!d.is('input[type="text"]'))return console.error&&console.error("Unknown form type for picker.");u="text"}a.inheritFormItemClasses&&v.addClass(d.attr("class")),l.formType=u,l.$formItem=d.removeClass("picker").hide(),l.selfFormItem=d.is(l.$);var g=a.multi;g&&"auto"!==g||(g="select"===u&&"multiple"===d.attr("multiple")),g=!!g,l.multi=g,g||(l.options.checkable=!1);var m=a.list;m?l.setList("function"==typeof m?m({search:l.search,limit:a.maxListCount}):m,!0):"select"===u?l.updateFromSelect():l.setList([],!0);var v;v=!l.selfFormItem&&l.$.hasClass("picker")?l.$:t('
').insertAfter(l.$),v.addClass("picker").toggleClass("picker-multi",g).toggleClass("picker-single",!g);var y=v.children(".picker-selections");y.length?y.empty():y=t('
');var b=l.id+"-search",w=t('').appendTo(y);if(!g){var x=t('
');a.allowSingleDeselect&&x.append(''),x.appendTo(y),l.$singleSelection=x}v.toggleClass("picker-input-empty",!w.val().length).append(y),l.$container=v,l.$selections=y,l.$search=w,l.search="";var C=a.placeholder;if(void 0===C&&(C=d.attr("placeholder")),"string"==typeof C&&C.length&&y.append(t('
').text(C)),a.placeholder=C,a.fixLabelFor){var _=d.attr("id");_&&t('label[for="'+_+'"]').attr("for",b)}var k=void 0!==a.defaultValue?a.defaultValue:d.val();if(null===k&&(k=""),l.setValue(k,!0),l.setDisabled(),w.on("focus",function(){l.disabled||(l._blurTimer&&(clearTimeout(l._blurTimer),l._blurTimer=0),v.addClass("picker-focus"),l.showDropList())}).on("blur",function(){l.disabled||(l._blurTimer&&clearTimeout(l._blurTimer),l._blurTimer=setTimeout(function(){l._blurTimer=0,w.is(":focus")||v.removeClass("picker-focus")},100))}).on("input change",function(){if(!l.disabled){var t=w.val();g&&w.width(14*t.length),v.toggleClass("picker-input-empty",!t.length),l.tryUpdateList(t)}}),a.hotkey&&w.on("keydown",function(t){if(!l.disabled){var e=t.key||t.which;if(l.dropListShowed){var i=l.activeValue,n="string"==typeof i;if("Enter"===e||13===e)n&&(l.select(i,g),g?(l.$search.val(""),l.tryUpdateList("")):w.blur(),t.preventDefault(),t.stopPropagation());else if("ArrowDown"===e||40===e){var o,s=l.$activeOption;if(s&&(o=s.next(".picker-option"),g))for(;o.length&&o.hasClass("picker-option-selected");)o=o.next(".picker-option");o&&o.length||(o=l.$optionsList.children(g?".picker-option:not(.picker-option-selected)":".picker-option").first()),o.length&&l.activeOption(o),t.preventDefault(),t.stopPropagation()}else if("ArrowUp"===e||30===e){var r,s=l.$activeOption;if(s&&(r=s.prev(".picker-option"),g))for(;r.length&&r.hasClass("picker-option-selected");)r=r.prev(".picker-option");r&&r.length||(r=l.$optionsList.children(g?".picker-option:not(.picker-option-selected)":".picker-option").last()),r.length&&l.activeOption(r),t.preventDefault(),t.stopPropagation()}else"Escape"===e||27===e?l.hideDropList(!0):a.deleteByBackspace&&g&&("Backspace"===e||8===e)&&l.value&&l.value.length&&!w.val().length&&l.deselect(l.value[l.value.length-1])}}}),g){y.on("mousedown",function(t){if(!l.disabled)return l.dropListShowed&&!a.checkable?(t.preventDefault(),void t.stopPropagation()):void 0}).on("mouseup",function(e){l.disabled||y.hasClass("sortable-sorting")||t(e.target).closest(".picker-selection-remove").length||l.dropListShowed&&!a.checkable||l.focus()});var T=a.sortValuesByDnd;if(T&&t.fn.sortable){v.addClass("picker-sortable");var S={selector:".picker-selection",stopPropagation:!0,start:function(){l.hideDropList(!0)},finish:function(e){var i=[];t.each(e.list,function(t,e){i.push(e.item.data("value"))}),l.setValue(i.slice(),!1,!0)}};"object"==typeof T&&t.extend(S,T),y.sortable(S)}}if(y.on("click",".picker-selection-remove",function(e){if(!l.disabled){if(l.multi){var i=t(this).closest(".picker-selection");l.deselect(i.data("value"))}else l.deselect();e.stopPropagation()}}),d.on("chosen:updated",function(){l.updateFromSelect(!1),l.setValue(d.val(),!0),l.setDisabled(),l.updateList()}).on("chosen:activate",l.focus).on("chosen:open",l.showDropList).on("chosen:close",l.hideDropList),v.addClass("picker-ready"),t.zui.asap(function(){l.triggerEvent("ready",{picker:l},"","chosen:ready")}),!a.disableScrollOnShow){var D=a.hideOnScroll;D&&![e,i,!0].includes(D)&&t(D).on("scroll",this.handleParentScroll.bind(this))}};r.prototype.destroy=function(){var e=this,i=e.options;e.hideDropList(!0);var o=e.$search;o.off("focus blur input change"),i.hotkey&&o.off("keydown"),o.remove();var a=e.$selections;a.off("click"),e.multi&&a.off("mousedown mouseup"),a.remove();var s=e.$formItem;e.selectOptionsBackup&&(s.empty(),t.each(e.selectOptionsBackup,function(e,n){var o={value:n[i.valueKey]},a=n[i.keysKey];void 0!==a&&(o["data-"+i.keysKey]=a),s.append(t("
story->reviewedBy;?> +
story->checkForceReview() ? ' required' : ''));?> story->checkForceReview()):?> @@ -34,6 +34,12 @@
+
+
story->assignedTo;?>
+ +
+
story->status;?>
story->reviewResult;?>story->resultList, '', 'class=form-control onchange="switchShow(this.value)"');?>story->resultList, '', 'class="form-control chosen" onchange="switchShow(this.value)"');?>
story->assignedTo;?>
story->rejectedReason;?>
testcase->import);?>
story->reviewResult;?>story->resultList, '', 'class="form-control chosen" onchange="switchShow(this.value)"');?>story->resultList, '', 'class="form-control chosen" onchange="switchShow(this.value)"');?>
story->assignedTo;?>
testcase->import);?>
email;?> app->tab == 'program' ? 'program' : $module; if(common::hasPriv($module, 'unbindWhitelist')) echo html::a($this->createLink($module, 'unbindWhitelist', "id=$user->id&confirm=no"), '', 'hiddenwin', "title='{$lang->personnel->delete}' class='btn' $tab"); ?> email;?> app->tab == 'program' ? 'program' : $module; + if($this->app->tab == 'program') $module = 'program'; if(common::hasPriv($module, 'unbindWhitelist')) echo html::a($this->createLink($module, 'unbindWhitelist', "id=$user->id&confirm=no"), '', 'hiddenwin', "title='{$lang->personnel->delete}' class='btn' $tab"); ?>
story->category;?>story->categoryList[$story->category];?>story->categoryList, $story->category, $story->category)?>
story->pri;?>
team) ? $lang->task->assign : $lang->task->transferTo;?>team) and $task->mode == 'linear') ? $lang->task->transferTo : $lang->task->assign;?> nextBy, "class='form-control chosen'");?>
task->assignedTo;?> team) and $task->mode == 'multi') + if(!empty($task->team) and $task->mode == 'multi' and in_array($task->assignedTo, array_keys($task->team))) { foreach($task->team as $member) echo ' ' . zget($users, $member->account); } From d641d9664187ba347daa6281a4fe499f5c7fa2f2 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 30 Jun 2022 09:44:43 +0800 Subject: [PATCH 039/100] * Fix bug#24275. --- module/story/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/story/model.php b/module/story/model.php index d531c354e5..088bd7bb1c 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -4020,7 +4020,7 @@ class storyModel extends model if($canBeChanged and common::hasPriv('execution', 'storyEstimate', $execution)) { - $menu .= common::printIcon('execution', 'storyEstimate', "executionID=$executionID&storyID=$story->id", '', 'list', 'estimate', '', 'iframe', true, "data-width='450px'"); + $menu .= common::printIcon('execution', 'storyEstimate', "executionID=$executionID&storyID=$story->id", '', 'list', 'estimate', '', 'iframe', true, "data-width='470px'"); } if($canBeChanged and common::hasPriv('execution', 'unlinkStory', $execution)) From 7a80448220620f595f25bcd5787dd777ab0f344e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Thu, 30 Jun 2022 09:51:35 +0800 Subject: [PATCH 040/100] * Code for multi task. --- module/task/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index a835a17552..c4a4d4f31b 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -267,7 +267,7 @@ task->assignedTo;?> team) and $task->mode == 'multi' and in_array($task->assignedTo, array_keys($task->team))) + if(!empty($task->team) and $task->mode == 'multi') { foreach($task->team as $member) echo ' ' . zget($users, $member->account); } From c0a04777e5ceb3c8ce7f90a13570697fb8354983 Mon Sep 17 00:00:00 2001 From: sunjun Date: Thu, 30 Jun 2022 01:55:33 +0000 Subject: [PATCH 041/100] fixbug_lang --- module/product/lang/en.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/product/lang/en.php b/module/product/lang/en.php index 51e72a2513..ec8f1e6c14 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -207,7 +207,6 @@ $lang->product->noMatched = '"%s" cannot be found.' . $lang->productCommon; $lang->product->featureBar['browse']['allstory'] = $lang->product->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; $lang->product->featureBar['browse']['reviewbyme'] = $lang->product->reviewByMe; $lang->product->featureBar['browse']['draftstory'] = $lang->product->draftStory; $lang->product->featureBar['browse']['more'] = $lang->more; @@ -216,6 +215,7 @@ $lang->product->featureBar['all']['all'] = $lang->product->allProduct; $lang->product->featureBar['all']['noclosed'] = $lang->product->unclosed; $lang->product->featureBar['all']['closed'] = $lang->product->statusList['closed']; +$lang->product->moreSelects['openedbyme'] = $lang->product->openedByMe; $lang->product->moreSelects['assignedbyme'] = $lang->product->assignedByMe; $lang->product->moreSelects['reviewedbyme'] = $lang->product->reviewedByMe; $lang->product->moreSelects['closedbyme'] = $lang->product->closedByMe; From cf7386001349520abfb22a014d2d0f9079a16a7e Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 30 Jun 2022 10:09:19 +0800 Subject: [PATCH 042/100] * Fix bug #24545. --- module/api/control.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/api/control.php b/module/api/control.php index d0d3eff2fa..88c28a5362 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -455,7 +455,7 @@ class api extends control $this->getTypeOptions($api->lib); $this->view->title = $api->title . $this->lang->api->edit; - $this->view->gobackLink = $this->createLink('api', 'index', "libID={$api->lib}&moduleID={$api->module}"); + $this->view->gobackLink = $this->createLink('api', 'index', "libID={$api->lib}&moduleID={$api->module}&apiID=$apiID"); $this->view->user = $this->app->user->account; $this->view->allUsers = $this->loadModel('user')->getPairs('devfirst|noclosed');; $this->view->moduleOptionMenu = $this->loadModel('tree')->getOptionMenu($api->lib, 'api', $startModuleID = 0); From afa1631a35b76bda5ad985295a6a1a82a92a33f4 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 30 Jun 2022 10:09:32 +0800 Subject: [PATCH 043/100] * Code for task#58578. Delete name. --- module/execution/lang/de.php | 4 ++-- module/execution/lang/en.php | 4 ++-- module/execution/lang/fr.php | 4 ++-- module/execution/lang/vi.php | 2 ++ module/execution/lang/zh-cn.php | 4 ++-- module/execution/model.php | 13 ++++++------- 6 files changed, 16 insertions(+), 15 deletions(-) diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index c39f1544ad..0441cf1ed8 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -380,8 +380,8 @@ $lang->execution->errorBegin = "The start time of {$lang->execu $lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; $lang->execution->errorLetterProject = "The start time of stage cannot be less than the start time of the project %s."; $lang->execution->errorGreaterProject = "The end time of stage cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' "%s" should be ≥ the start date of project %s: %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' "%s" should be ≤ the deadline of project %s: %s.'; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; $lang->execution->accessDenied = "Zugriff zu {$lang->executionCommon} verweigert!"; $lang->execution->tips = 'Hinweis'; $lang->execution->afterInfo = "{$lang->executionCommon} wurde erstellt. Als nächstes können Sie "; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 242f35f23b..3d1edaddc3 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -380,8 +380,8 @@ $lang->execution->errorBegin = "The start time of {$lang->execu $lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; $lang->execution->errorLetterProject = "The start time of stage cannot be less than the start time of the project %s."; $lang->execution->errorGreaterProject = "The end time of stage cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' "%s" should be ≥ the start date of project "%s": %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' "%s" should be ≤ the deadline of project "%s": %s.'; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; $lang->execution->accessDenied = "Your access to {$lang->executionCommon} is denied!"; $lang->execution->tips = 'Note'; $lang->execution->afterInfo = "{$lang->executionCommon} is created. Next you can "; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index 2c882fcda4..57eaa38f6f 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -380,8 +380,8 @@ $lang->execution->errorBegin = "The start time of {$lang->execu $lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; $lang->execution->errorLetterProject = "The start time of stage cannot be less than the start time of the project %s."; $lang->execution->errorGreaterProject = "The end time of stage cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' "%s" should be ≥ the start date of project %s: %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' "%s" should be ≤ the deadline of project %s: %s.'; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; $lang->execution->accessDenied = "Votre accès au {$lang->executionCommon} est refusé ! Désolé."; $lang->execution->tips = 'Note'; $lang->execution->afterInfo = "Le {$lang->executionCommon} a été créé avec succès ! Ensuite vous pouvez "; diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php index 766a66f77f..c1f02f6280 100644 --- a/module/execution/lang/vi.php +++ b/module/execution/lang/vi.php @@ -337,6 +337,8 @@ $lang->execution->unfinishedExecution = "This {$lang->executionCommon} h $lang->execution->unfinishedTask = "[%s] unfinished tasks. "; $lang->execution->unresolvedBug = "[%s] unresolved bugs. "; $lang->execution->projectNotEmpty = 'Project cannot be empty.'; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; /* Statistics. */ $lang->execution->charts = new stdclass(); diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index b29446e64e..eb4a3b6bd7 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -380,8 +380,8 @@ $lang->execution->errorBegin = "{$lang->executionCommon}的开 $lang->execution->errorEnd = "{$lang->executionCommon}的截止时间不能大于所属项目的结束时间%s。"; $lang->execution->errorLetterProject = "阶段的计划开始时间不能小于所属项目的计划开始时间%s。"; $lang->execution->errorGreaterProject = "阶段的计划完成时间不能大于所属项目的计划完成时间%s。"; -$lang->execution->errorCommonBegin = $lang->executionCommon . '“%s”开始日期应大于等于项目“%s”的开始日期:%s。'; -$lang->execution->errorCommonEnd = $lang->executionCommon . '“%s”截止日期应小于等于项目“%s”的截止日期:%s。'; +$lang->execution->errorCommonBegin = $lang->executionCommon . '开始日期应大于等于项目的开始日期:%s。'; +$lang->execution->errorCommonEnd = $lang->executionCommon . '截止日期应小于等于项目的截止日期:%s。'; $lang->execution->accessDenied = "您无权访问该{$lang->executionCommon}!"; $lang->execution->tips = '提示'; $lang->execution->afterInfo = "{$lang->executionCommon}添加成功,您现在可以进行以下操作:"; diff --git a/module/execution/model.php b/module/execution/model.php index 4226b06b88..124dd02c13 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -305,7 +305,7 @@ class executionModel extends model return false; } - if($this->config->systemMode == 'new' and !empty($_POST['name'])) $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end'], $_POST['name']); + if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($_POST['project'], $_POST['begin'], $_POST['end']); if(dao::isError()) return false; /* Determine whether to add a sprint or a stage according to the model of the execution. */ @@ -500,7 +500,7 @@ class executionModel extends model if(in_array($execution->status, array('closed', 'suspended'))) $this->computeBurn($executionID); - if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project) and !empty($execution->name)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $execution->name); + if($this->config->systemMode == 'new' and (empty($execution->project) or $execution->project == $oldExecution->project)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end); if(dao::isError()) return false; /* Child stage inherits parent stage permissions. */ @@ -869,7 +869,7 @@ class executionModel extends model ->remove('comment') ->get(); - if($this->config->systemMode == 'new' and !empty($oldExecution->name)) $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end, $oldExecution->name); + if($this->config->systemMode == 'new') $this->checkBeginAndEndDate($oldExecution->project, $execution->begin, $execution->end); if(dao::isError()) return false; $execution = $this->loadModel('file')->processImgURL($execution, $this->config->execution->editor->putoff['id'], $this->post->uid); @@ -1117,16 +1117,15 @@ class executionModel extends model * @param int $projectID * @param string $begin * @param string $end - * @param string $executionName * @access public * @return void */ - public function checkBeginAndEndDate($projectID, $begin, $end, $executionName) + public function checkBeginAndEndDate($projectID, $begin, $end) { $project = $this->loadModel('project')->getByID($projectID); - if($begin < $project->begin) dao::$errors['begin'] = sprintf($this->lang->execution->errorCommonBegin, $executionName, $project->name, $project->begin); - if($end > $project->end) dao::$errors['end'] = sprintf($this->lang->execution->errorCommonEnd, $executionName, $project->name, $project->end); + if($begin < $project->begin) dao::$errors['begin'] = sprintf($this->lang->execution->errorCommonBegin, $project->begin); + if($end > $project->end) dao::$errors['end'] = sprintf($this->lang->execution->errorCommonEnd, $project->end); } /* From 384cd2d15a0f7ff5c79314f0a967db9dc6f1ffb5 Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 30 Jun 2022 10:12:56 +0800 Subject: [PATCH 044/100] * Fix bug #24542. --- extension/lite/custom/ext/lang/de/lite.php | 8 ++++++++ extension/lite/custom/ext/lang/en/lite.php | 8 ++++++++ extension/lite/custom/ext/lang/fr/lite.php | 8 ++++++++ 3 files changed, 24 insertions(+) diff --git a/extension/lite/custom/ext/lang/de/lite.php b/extension/lite/custom/ext/lang/de/lite.php index adc8835faf..7b4a6e67f3 100644 --- a/extension/lite/custom/ext/lang/de/lite.php +++ b/extension/lite/custom/ext/lang/de/lite.php @@ -13,6 +13,14 @@ $lang->custom->object['todo'] = 'Todo'; $lang->custom->object['user'] = 'User'; $lang->custom->object['block'] = 'Block'; +$lang->custom->menuOrder = array(); +$lang->custom->menuOrder[10] = 'execution'; +$lang->custom->menuOrder[15] = 'story'; +$lang->custom->menuOrder[20] = 'task'; +$lang->custom->menuOrder[25] = 'todo'; +$lang->custom->menuOrder[30] = 'user'; +$lang->custom->menuOrder[35] = 'block'; + $lang->custom->task = new stdClass(); $lang->custom->task->fields['priList'] = 'Priority'; $lang->custom->task->fields['typeList'] = 'Type'; diff --git a/extension/lite/custom/ext/lang/en/lite.php b/extension/lite/custom/ext/lang/en/lite.php index adc8835faf..7b4a6e67f3 100644 --- a/extension/lite/custom/ext/lang/en/lite.php +++ b/extension/lite/custom/ext/lang/en/lite.php @@ -13,6 +13,14 @@ $lang->custom->object['todo'] = 'Todo'; $lang->custom->object['user'] = 'User'; $lang->custom->object['block'] = 'Block'; +$lang->custom->menuOrder = array(); +$lang->custom->menuOrder[10] = 'execution'; +$lang->custom->menuOrder[15] = 'story'; +$lang->custom->menuOrder[20] = 'task'; +$lang->custom->menuOrder[25] = 'todo'; +$lang->custom->menuOrder[30] = 'user'; +$lang->custom->menuOrder[35] = 'block'; + $lang->custom->task = new stdClass(); $lang->custom->task->fields['priList'] = 'Priority'; $lang->custom->task->fields['typeList'] = 'Type'; diff --git a/extension/lite/custom/ext/lang/fr/lite.php b/extension/lite/custom/ext/lang/fr/lite.php index adc8835faf..7b4a6e67f3 100644 --- a/extension/lite/custom/ext/lang/fr/lite.php +++ b/extension/lite/custom/ext/lang/fr/lite.php @@ -13,6 +13,14 @@ $lang->custom->object['todo'] = 'Todo'; $lang->custom->object['user'] = 'User'; $lang->custom->object['block'] = 'Block'; +$lang->custom->menuOrder = array(); +$lang->custom->menuOrder[10] = 'execution'; +$lang->custom->menuOrder[15] = 'story'; +$lang->custom->menuOrder[20] = 'task'; +$lang->custom->menuOrder[25] = 'todo'; +$lang->custom->menuOrder[30] = 'user'; +$lang->custom->menuOrder[35] = 'block'; + $lang->custom->task = new stdClass(); $lang->custom->task->fields['priList'] = 'Priority'; $lang->custom->task->fields['typeList'] = 'Type'; From c265149f88dc29bae1aa889b83a4157c1fee3f4b Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 30 Jun 2022 10:19:52 +0800 Subject: [PATCH 045/100] * Fix bug #24586. --- module/task/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/model.php b/module/task/model.php index 5c4c9b61f3..a2bf1a74d9 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -831,7 +831,7 @@ class taskModel extends model $currentTask->consumed += (float)$member->consumed; $currentTask->left += (float)$member->left; } - if(empty($oldTask->team)) $currentTask->consumed += (float)$oldTask->consumed; + if(empty($oldTask->team) and isset($oldTask->consumed)) $currentTask->consumed += (float)$oldTask->consumed; if(!empty($task)) { From 6dd69c055aa0788d64957848e5ea91cbc1b9ca12 Mon Sep 17 00:00:00 2001 From: liyuchun <563917701@qq.com> Date: Thu, 30 Jun 2022 02:21:03 +0000 Subject: [PATCH 046/100] * Fix bug #23945. --- lib/scm/gitrepo.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/scm/gitrepo.class.php b/lib/scm/gitrepo.class.php index 93261cdcac..2b691eef17 100644 --- a/lib/scm/gitrepo.class.php +++ b/lib/scm/gitrepo.class.php @@ -107,6 +107,12 @@ class GitRepo $cmd = escapeCmd("$this->client tag --sort=taggerdate"); $list = execCmd($cmd . ' 2>&1', 'array', $result); if($result) return array(); + + foreach($list as $key => $tag) + { + if(!$tag) unset($list[$key]); + } + return $list; } @@ -139,7 +145,7 @@ class GitRepo } asort($branches); - $branches = array($defaultBranch => $defaultBranch) + $branches; + if($defaultBranch) $branches = array($defaultBranch => $defaultBranch) + $branches; return $branches; } From 38ba859322f78ebd98efc3c8bb67ff7a44cc8bfd Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 30 Jun 2022 10:28:38 +0800 Subject: [PATCH 047/100] * Code for task#58578. --- module/programplan/control.php | 5 +++++ module/programplan/model.php | 3 +++ 2 files changed, 8 insertions(+) diff --git a/module/programplan/control.php b/module/programplan/control.php index fc503a4e7c..f55a7890cf 100644 --- a/module/programplan/control.php +++ b/module/programplan/control.php @@ -186,6 +186,11 @@ class programplan extends control $this->app->loadLang('project'); $this->app->loadLang('execution'); $plan = $this->programplan->getByID($planID); + + global $lang; + $lang->executionCommon = $lang->execution->stage; + include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php'; + if($_POST) { $changes = $this->programplan->update($planID, $projectID); diff --git a/module/programplan/model.php b/module/programplan/model.php index b0a2e30ed7..a8a0cc8345 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -736,6 +736,9 @@ class programplanModel extends model if($plan->begin == '0000-00-00') dao::$errors['begin'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->begin); if($plan->end == '0000-00-00') dao::$errors['end'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->end); + if($projectID) $this->loadModel('execution')->checkBeginAndEndDate($projectID, $plan->begin, $plan->end); + if(dao::isError()) return false; + $planChanged = ($oldPlan->name != $plan->name || $oldPlan->milestone != $plan->milestone || $oldPlan->begin != $plan->begin || $oldPlan->end != $plan->end); if($plan->parent > 0) From 678d8ae3d3ba71dc38b7289176c05ce826e58bb7 Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Thu, 30 Jun 2022 10:33:20 +0800 Subject: [PATCH 048/100] * Code for task#58578. --- module/programplan/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/programplan/model.php b/module/programplan/model.php index a8a0cc8345..efb5b8c6ea 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -735,6 +735,7 @@ class programplanModel extends model /* Judgment of required items. */ if($plan->begin == '0000-00-00') dao::$errors['begin'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->begin); if($plan->end == '0000-00-00') dao::$errors['end'][] = sprintf($this->lang->error->notempty, $this->lang->programplan->end); + if(dao::isError()) return false; if($projectID) $this->loadModel('execution')->checkBeginAndEndDate($projectID, $plan->begin, $plan->end); if(dao::isError()) return false; From bc16e41c7362d56c2bd2304e90bdfbe49a842e0f Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 30 Jun 2022 02:44:29 +0000 Subject: [PATCH 049/100] * Fix bug #24472. --- module/product/js/all.js | 2 ++ module/product/view/all.html.php | 1 + module/program/js/browse.js | 2 ++ module/program/view/browse.html.php | 1 + 4 files changed, 6 insertions(+) diff --git a/module/product/js/all.js b/module/product/js/all.js index 59c2438291..9d18908c92 100644 --- a/module/product/js/all.js +++ b/module/product/js/all.js @@ -70,7 +70,9 @@ $(function() { var checkedLength = $(":checkbox[name^='productIDList']:checked").length; var summary = checkedProducts.replace('%s', checkedLength); + if(cilentLang == "en" && checkedLength < 2) summary = summary.replace('products', 'product'); var statistic = "
" + summary + "
"; + if(checkedLength > 0) { $('#productsSummary').remove(); diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 55ff1f0cf0..0ac5a3c677 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -256,6 +256,7 @@ product->checkedProducts);?> +app->getClientLang());?> From f13b0db32e6f335549268e7e48dc0ae04e543b3c Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 30 Jun 2022 10:44:46 +0800 Subject: [PATCH 050/100] * Fix bug #24585. --- module/api/view/createlib.html.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/api/view/createlib.html.php b/module/api/view/createlib.html.php index 1699aadaa2..4f29e96290 100644 --- a/module/api/view/createlib.html.php +++ b/module/api/view/createlib.html.php @@ -33,7 +33,8 @@
api->control;?> - api->aclList, 'open', "onchange='toggleAcl(this.value, \"lib\")'")?> + + api->aclList, 'open', "onchange='toggleAcl(this.value, \"lib\")' $isDisabled")?> api->noticeAcl['open'];?>
').addClass(i.attr("class")).append(n.clone())).insertAfter(i)),h){var d=c[0].getBoundingClientRect();l.css({left:d.left,width:c.width(),overflow:"hidden"}),l.find(".fixed-header-copy").css({left:o.left-d.left,position:"relative",minWidth:i.width()}),a||c.data("fixHeaderScroll")||(c.data("fixHeaderScroll",1),i.width()>c.width()&&c.on("scroll",function(){e.fixHeader()}))}else l.css({left:o.left,width:o.width});var u=l.find("th");n.find("th").each(function(e){u.eq(e).css("width",t(this).outerWidth())})}else l.remove()},r.prototype.fixFooter=function(){var e,i=this,n=i.getTable(),o=i.$.find(".table-footer");if(i.isDataTable)e=n[0].getBoundingClientRect();else{var a=n.find("tbody");if(!a.length)return;e=a[0].getBoundingClientRect()}var s=i.options.fixFooter;o.toggleClass("fixed-footer",!!r);var r="function"==typeof s?s(e,o):e.bottom>window.innerHeight-50-("number"==typeof s?s:i.pageFooterHeight||5);o.toggleClass("fixed-footer",!!r),n.toggleClass("with-footer-fixed",!!r),n.trigger("fixFooter",r);var l=t("body"),c=l.hasClass("body-modal");if(r){var h=n.parent(),d=h.is(".table-responsive");o.css({bottom:i.pageFooterHeight||0,left:d?h[0].getBoundingClientRect().left:e.left,width:d?h.width():e.width}),c&&l.css("padding-bottom",40)}else o.css({width:"",left:0,bottom:0}),c&&l.css("padding-bottom",0)},r.prototype.checkAll=function(e){var i=this,n=i.$.find(i.isDataTable?".fixed-left tbody>tr":"tbody>tr");n.each(function(){i.checkRow(t(this),e,!0)}),i.updateCheckUI()},r.prototype.checkRow=function(i,n,o){var a=this,s=a.getTable();a.isDataTable&&!i.is(".datatable-row-left")&&(i=s.find('.datatable-row-left[data-index="'+i.data("index")+'"]'));var r=i.find('input[type="checkbox"]');if(r.length&&!r.is(":disabled")){n===e&&(n=!r.is(":checked")),a.isDataTable?s.find('.datatable-row[data-index="'+i.data("index")+'"]').toggleClass("checked",n):i.toggleClass("checked",n);var l=i.data("id");this.checkItems[l]=n,r.prop("checked",n).trigger("change"),o||(i.hasClass("table-parent")&&s.find((a.isDataTable?".fixed-left ":"")+"tbody>tr.parent-"+l).each(function(){a.checkRow(t(this),n,!0)}),a.updateCheckUI())}},r.prototype.updateCheckUI=function(){var e=this,i=e.getTable(),n=i.find(e.isDataTable?".fixed-left tbody>tr":"tbody>tr").not(".group-summary"),o=!1,a=null,s=0,r=!1,l=n.length;n.each(function(n){var c=t(this),h=c.find('input[type="checkbox"]');if(!h.length)return void l--;r=h.is(":checked");var d=e.isDataTable?i.find('.datatable-row[data-index="'+c.data("index")+'"]'):c;d.toggleClass("checked",r),d.toggleClass("row-check-begin",r&&!o),a&&a.toggleClass("row-check-end",!r&&o),r&&(s+=1),a=d,o=r,l===n+1&&d.toggleClass("row-check-end",r)}),e.$.toggleClass("has-row-checked",s>0).find(".check-all").toggleClass("checked",!(!l||s!==l)),e.updateStatistic(),e.options.onCheckChange&&e.options.onCheckChange(),i.trigger("checkChange")},r.DEFAULTS={checkable:!0,checkOnClickRow:!0,ajaxForm:!1,selectable:!0,fixHeader:!a,fixFooter:!a,iframeWidth:900,replaceId:"self",nestLevelIndent:18,nested:!1,preserveNested:!0,hot:!1,iframeModalTrigger:".iframe:not(.disabled,[disabled])"},t.fn.table=function(e){return this.each(function(){var n=t(this),o=n.data(i),a="object"==typeof e&&e;o||n.data(i,o=new r(this,a)),"string"==typeof e&&o[e]()})},r.NAME=i,t.fn.table.Constructor=r,t(function(){t('[data-ride="table"]').table()}); }(jQuery,void 0),function(t,e,i){t.fn._ajaxForm=t.fn.ajaxForm;var n={timeout:e.config?e.config.timeout:0,dataType:"json",method:"post"},o="";t.fn.enableForm=function(e,n,o){return e===i&&(e=!0),this.each(function(){var i=t(this);n||i.find('[type="submit"]').attr("disabled",e?null:"disabled"),!o&&i.hasClass("load-indicator")&&i.toggleClass("loading",!e),i.toggleClass("form-disabled",!e)})},t.enableForm=function(e,i,n,o){"string"==typeof e||e instanceof t?e=t(e):(o=n,n=i,i=e,e=t("form")),e.enableForm(i!==!1,n,o)},t.disableForm=function(e,i,n){t.enableForm(e,!1,i,n)};var a=function(e,i,n){"string"==typeof i&&(n=i,i=null),n=n||"show",t.zui.messager?t.zui.messager[n](e,i):alert(e)};t.ajaxForm=function(s,r){var l=t(s);if(l.length>1)return l.each(function(){t.ajaxForm(this,r)});"function"==typeof r&&(r={complete:r}),r=t.extend({},n,l.data(),r);var c=r.beforeSubmit,h=r.error,d=r.success,u=r.finish;delete r.finish,delete r.success,delete r.onError,delete r.beforeSubmit,r=t.extend({beforeSubmit:function(n,a,s){if((c&&c(n,a,s))===!1)return!1;l.removeClass("form-watched").enableForm(!1);var r={},h=a.find('[type="file"]');r.fileapi=h.length&&h[0].files!==i,r.formdata=e.FormData!==i;var d=r.fileapi&&a.find('input[type="file"]:enabled').filter(function(){return""!==t(this).val()}),u=d.length,p="multipart/form-data",f=a.attr("enctype")==p||a.attr("encoding")==p,g=r.fileapi&&r.formdata,m=u&&!g||f&&!r.formdata;m&&(""==o&&(o=s.url),s.url!=o&&(s.url=o),s.url=s.url.indexOf("&")>=0?s.url+"&HTTP_X_REQUESTED_WITH=XMLHttpRequest":s.url+"?HTTP_X_REQUESTED_WITH=XMLHttpRequest")},success:function(i,n,o){if((d&&d(i,n,o,l))!==!1){try{"string"==typeof i&&(i=JSON.parse(i))}catch(s){}if(null===i||"object"!=typeof i)return i?alert(i):a("No response.","danger");var c=r.responser?t(r.responser):l.find(".form-responser");c.length||(c=t("#responser"));var h=i.message,p=function(){var n=i.callback;if(n)if("object"==typeof n){var o=n.target?e[n.target]:e,a=o[n.name];a.apply(l,Array.isArray(n.params)?n.params:[n.params])}else{var s=n.indexOf("("),r=(s>0?n.substr(0,s):n).split("."),c=e,h=r[0];r.length>1&&(h=r[1],"top"===r[0]?c=e.top:"parent"===r[0]&&(c=e.parent));var a=c[h];if("function"==typeof a){var d=[];return s>0&&")"==n[n.length-1]&&(d=t.parseJSON("["+n.substring(s+1,n.length-1)+"]")),d.push(i),a.apply(l,d)}}};if("success"===i.result){var f=r.locate||i.locate,g=r.closeModal||i.closeModal,m=r.ajaxReload||i.ajaxReload;if(l.enableForm(!0,!!(f||g||m)),h){var v=l.find('[type="submit"]').first(),y=!1;v.length&&(v.popover({container:"body",trigger:"manual",content:h,tipClass:"popover-in-modal popover-success popover-form-result",placement:i.placement||v.data("placement")||r.popoverPlacement||"right"}).popover("show"),setTimeout(function(){v.popover("destroy")},r.popoverTime||2e3),y=!0),c.length&&(c.html(''+h+"").show().delay(3e3).fadeOut(100),y=!0),y||a(h,"success")}if(u)return u(i,!0,l);if(g&&setTimeout(t.zui.closeModal,"number"==typeof g?g:r.closeModalTime||2e3),p()===!1)return;if(f)if("loadInModal"==f){var b=t(".modal");setTimeout(function(){b.load(b.attr("ref"),function(){t(this).find(".modal-dialog").css("width",t(this).data("width")),t.zui.ajustModalPosition()})},1e3)}else"parent"===f||"top"===f?e[f]&&setTimeout(function(){e[f].location.reload()},1200):"reload"===f?setTimeout(function(){e.location.href=e.location.href},1200):setTimeout(function(){t.apps?t.apps.open(f):e.location.href=f},1200);if(m){var w=t(m);w.length&&w.load(e.location.href+" "+m,function(){w.find('[data-toggle="modal"]').modalTrigger()})}}else{if(l.enableForm(),"string"==typeof h)c.length?c.html(''+h+"").show().delay(3e3).fadeOut(100):a(h,"danger");else if("object"==typeof h){var x=!1,C=[];t.each(h,function(e,i){var n=t.isArray(i)?i.join(""):i,o=t("#"+e);if(!o.length)return void C.push(n);var a=e+"Label",s=t("#"+a);if(!s.length){var r=o.closest(".input-group").length,l=o.closest("td").length;s=t('
').appendTo(l?o.closest("td"):r?o.closest(".input-group").parent():o.parent())}s.empty().append(n),o.addClass("has-error");var c=function(){var e=t("#"+a);if(e.length)return e.remove(),o.removeClass("has-error"),!0};o.on("change input mousedown",c);var h=t("#"+e+"_chosen");if(h.length&&h.find(".chosen-single,.chosen-choices").addClass("has-error").on("mousedown",function(){c()===!0&&t(this).removeClass("has-error")}),!x){var d=o[0];if(o.hasClass("chosen"))o.trigger("chosen:activate").trigger("chosen:open"),d=o.parent().find(".chosen-container")[0];else if(o.is("textarea")&&o.data("keditor")){var u=o.data("keditor");u.focus(),u.edit.doc.body.focus(),d=o.parent().find(".ke-container")[0]}else o.focus();d.scrollIntoView&&d.scrollIntoView(),x=!0}}),C.length&&a(C.join(";"),"danger")}if(u)return u(i,!1,l);if(p()===!1)return}}},error:function(t,i,n){if((h&&h(t,i,n,l))!==!1){l.enableForm();var o="timeout"==i||"error"==i?e.lang?e.lang.timeout:i:t.responseText+i+n;a(o,"danger")}}},r),l._ajaxForm(r).data("zui.ajaxform",!0),l.on("click","[data-form-action]",function(){l.attr("action",t(this).data("formAction")).submit()})},t.setAjaxForm=function(e,i,n){t.ajaxForm(e,t.isPlainObject(i)?i:{finish:i,beforeSubmit:n})},t.fn.ajaxForm=function(e){return this.each(function(){t.ajaxForm(this,e)})},t.fn.setInputRequired=function(){return this.each(function(){var e=t(this),i=e.parent();i.is(".input-control,td")?i.addClass("required"):e.is(".chosen")?e.attr("required",null).next(".chosen-container").addClass("required"):i.addClass("required"),e.attr("required",null);var n=i.closest(".input-group");n.length&&1===n.find(".required,input[required],select[required]").length&&n.addClass("required")})},t(function(){t('.form-ajax,form[data-type="ajax"]').ajaxForm(),setTimeout(function(){var i=e.config.requiredFields,n=t("form");i&&(i=i.split(",")),i&&i.length&&t.each(i,function(t,e){n.find("#"+e).attr("required","required")}),n.find("input[required],select[required],textarea[required]").setInputRequired()},400),t('form[target="hiddenwin"]').on("submit",function(){var e=t(this);e.data("zui.ajaxform")||e.enableForm(!1).data("disabledTime",(new Date).getTime())}).on("click",function(){var e=t(this),i=e.data("disabledTime");i&&(new Date).getTime()-i>1e4&&e.enableForm(!0).data("disabledTime",null)})})}(jQuery,window,void 0),function(t){"use strict";var e="zui.searchList",i=function(t,e){if(t&&t.length)for(var i=0;i
').append(s)),i.$menu.append(s),i.$menu.removeClass("loading"),i.isLoaded=!0,e&&e(!0)},error:function(){i.$menu.removeClass("loading").append('
'+(n.errorText||window.lang&&window.lang.timeout)+"
"),e&&e(!1)}},n.ajax))},n.prototype.scrollTo=function(t){t.length&&t[0].scrollIntoViewIfNeeded&&t[0].scrollIntoViewIfNeeded({behavior:"smooth"})},n.prototype.getItems=function(){return this.$.find(this.options.selector).addClass("search-list-item")},n.prototype.getActiveItem=function(){return this.getItems().filter(".active:first")},n.prototype.search=function(e){var n=this,o=void 0===e||null===e||""===e;n.$.toggleClass("has-search-text",!o);var a=n.getItems().removeClass("active");if(o)a.removeClass("hidden");else{var s=e.trim().split(" ");a.each(function(){var e=t(this),n=(e.text()+" "+(e.data("key")||e.data("filter")||"")).trim();e.toggleClass("hidden",!i(s,n))})}n.scrollTo(a.not(".hidden").first().addClass("active")),n.$.trigger("onSearchComplete",e)},n.DEFAULTS={selector:".list-group a:not(.not-list-item)",searchBox:".search-box",onSelectItem:null},t.fn.searchList=function(i){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof i&&i;a||o.data(e,a=new n(this,s)),"string"==typeof i&&a[i]()})},n.NAME=e,t.fn.searchList.Constructor=n,t(function(){t('[data-ride="searchList"]').searchList()})}(jQuery),function(t){"use strict";var e="zui.labelSelector",i=function(n,o){var a=this;a.name=e,a.$=t(n),o=a.options=t.extend({},i.DEFAULTS,this.$.data(),o),a.$.hide(),a.update()};i.prototype.select=function(t){t+="",this.$wrapper.find(".label.active").removeClass("active"),this.$wrapper.find('.label[data-value="'+t+'"]').addClass("active"),this.$.val(t).trigger("change")},i.prototype.update=function(){var e=this,i=e.options,n=e.$wrapper;if(!n){if(i.wrapper)n=t(i.wrapper);else{var o=e.$.next();n=o.hasClass(".label-selector")?o:t('
')}n.parent().length||e.$.after(n),e.$wrapper=n,n.on("click",".label",function(i){var n=e.$.val(),o=t(this).data("value");e.hasEmptyValue!==!1&&o==n&&(o=e.hasEmptyValue),e.select(o),i.preventDefault()})}n.empty();var a=e.$.val();e.hasEmptyValue=!1,e.$.children("option").each(function(){var e=t(this),o={label:e.text(),value:e.val()},s=(""===o.value||"0"===o.value)&&!o.label,r=t(i.labelTemplate||'');i.labelClass&&!s&&r.addClass(i.labelClass),i.labelCreator?r=i.labelCreator(r):(r.data("option",o).attr("data-value",o.value),s?r.addClass("empty").append(''):r.text(o.label).toggleClass("active",a===o.value)),n.append(r)})},i.DEFAULTS={},t.fn.labelSelector=function(n){return this.each(function(){var o=t(this),a=o.data(e),s="object"==typeof n&&n;a||o.data(e,a=new i(this,s)),"string"==typeof n&&a[n]()})},i.NAME=e,t.fn.labelSelector.Constructor=i,t(function(){t('[data-provide="labelSelector"]').labelSelector()})}(jQuery),function(t){"use strict";var e="zui.fileInput",i=t.BYTE_UNITS={B:1,KB:1024,MB:1048576,GB:1073741824,TB:1099511627776},n=t.formatBytes=function(t,e,n){return void 0===e&&(e=2),n||(n=ts.fileMaxSize&&(c.val(""),(window.bootbox||window).alert(s.fileSizeError.format(n(s.fileMaxSize)))),r.update()}),r.update()};a.prototype.getFile=function(){var t=this.$input.prop("files");return t&&t[0]},a.prototype.update=function(){var t=this,e=t.$,i=t.getFile(),o=!i;e.toggleClass("normal",!o).toggleClass("empty",o),i?(t.oldName=i.name,e.find(".file-title").text(i.name).attr("title",i.name),e.find(".file-size").text(n(i.size)),e.find(".file-editbox").val(i.name).attr("size",i.name.length),t.options.onSelect&&t.options.onSelect(i,t)):e.find(".file-editbox").val("")},a.DEFAULTS={fileMaxSize:0,fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInput=function(i){return this.each(function(){var n=t(this),o=n.data(e),s="object"==typeof i&&i;o||n.data(e,o=new a(this,s)),"string"==typeof i&&o[i]()})},a.NAME=e,t.fn.fileInput.Constructor=a,t(function(){t('[data-provide="fileInput"]').fileInput()});var s="zui.fileInputList",r=function(e,i){var n=this;n.name=s;var o=n.$=t(e);i=n.options=t.extend({},r.DEFAULTS,this.$.data(),i),n.$template=o.find(".file-input").detach(),n.add()};r.prototype.add=function(){var t=this,e=t.options,i=t.$template.clone();"before"===e.appendWay?t.$.prepend(i):t.$.append(i),i.fileInput({fileMaxSize:e.eachFileMaxSize,fileSizeError:e.fileSizeError,onDelete:function(e){e.$.remove(),t.options.onDelete&&t.options.onDelete(e,t)},onSelect:function(e,i){t.add(),t.options.onSelect&&t.options.onSelect(e,i,t)}})},r.DEFAULTS={fileMaxSize:0,eachFileMaxSize:0,appendWay:"after",fileSizeError:"无法上传大于 {0} 的文件。"},t.fn.fileInputList=function(e){return this.each(function(){var i=t(this),n=i.data(s),o="object"==typeof e&&e;n||i.data(s,n=new r(this,o)),"string"==typeof e&&n[e]()})},r.NAME=s,t.fn.fileInputList.Constructor=r,t(function(){t('[data-provide="fileInputList"]').fileInputList()})}(jQuery),function(t){window.config||(window.config={}),t.createLink=window.createLink=function(e,n,o,a,s,r,l){if("object"==typeof e)return t.createLink(e.moduleName,e.methodName,e.vars,e.viewType,e.isOnlyBody,e.hash,e.tid);if(t.tabSession&&!l&&(l=t.tabSession.getTid()),a||(a=config.defaultView),s||(s=!1),o)for("string"==typeof o&&(o=o.split("&")),i=0;i'+d+"")}}t.val()||(time=e(a.format("hh:mm")),time=time-time%10+10,t.val(n(time)))};t.fn.timeSpanControl=function(i){return this.each(function(){var s=t(this),r=t.extend({},i,s.data()),l=s.find('[name="begin"],.control-time-begin'),c=s.find('[name="end"],.control-time-end'),h=function(){var t=l.val();if(s.find(".hide-empty-begin").toggleClass("hide",!t),t){var i=n(e(t)+30);c.find('option[value="'+i+'"]').length&&c.val(i),r.onChange&&r.onChange(c,i)}};if(s.data("timeSpanControlInit")){if(r.begin){var d=o(r.begin).format("hh:mm");l.find('option[value="'+d+'"]').length&&l.val(d),r.onChange&&r.onChange(l,d)}if(r.end){var u=o(r.end).format("hh:mm");c.find('option[value="'+u+'"]').length&&c.val(u),r.onChange&&r.onChange(c,u)}}else l.on("change",h),a(l,r.begin),a(c,r.end),s.data("timeSpanControlInit",!0);r.end||h()})},t.timeSpanControl={convertTimeToNum:e,convertNumToTime:n,initTimeSelect:a,createTime:o};var s=t.setSearchType=function(e,i){var n=t("#searchType");e||(e=n.val()),e=e||"bug",n.val(e);var o=t("#searchTypeMenu");o.find("li.selected").removeClass("selected");var a=o.find('a[data-value="'+e+'"]'),s=a.text();a.parent().addClass("selected"),t("#searchTypeName").text(s),i||t("#searchInput").focus()};t.gotoObject=function(e,i){if(e||(e=t("#searchType").val()),i||(i=t("#searchInput").val()),i&&e)if(i=i.replace(/[^\d]/g,"")){var n=e.split("-");e=n[0];var o=n.length>1?n[1]:"testsuite"===e?"library":"view",a=t.createLink(e,o,"id="+i);t.apps?t.apps.open(a):window.location.href=a}else{var s={zh_cn:"请输入数字ID进行搜索",zh_tw:"請輸入數值ID行搜索"};alert(lang.searchTip||s[t.zui.clientLang()]||"Please enter a numberic id to search")}t("#searchInput").val(i).focus()},t(function(){s(null,!0),t(document).on("keydown",function(e){e.ctrlKey&&71===e.keyCode&&(t("#searchInput").val("").focus(),e.stopPropagation(),e.preventDefault())})}),t.removeAnchor=window.removeAnchor=function(t){var e=t.lastIndexOf("#");return e>-1?t.substr(0,e):t},t.refreshPage=function(t){t?window.top.location.reload():window.location.reload()},t.selectLang=window.selectLang=function(e){t.cookie("lang",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectLang"),t.refreshPage(1)},t.selectTheme=window.selectTheme=function(e){t.cookie("theme",e,{expires:config.cookieLife,path:config.webRoot}),t.ajaxSendScore("selectTheme"),t.refreshPage(1)},t.zui.Picker&&(t.extend(t.zui.Picker.DEFAULTS,{optionRender:function(e,i,n){if("user"===n.options.type){var o=n.options.users;if(!o)return;var a=o[i.value];if(!a)return;if(e.find(".picker-option-text").text(a.realname||a.account),e.hasClass("picker-user-option"))return;return e.prepend(t('
').avatar({user:a})),a.deptName&&e.append(t('').text(a.deptName)),a.roleName&&e.append(t('').text(a.roleName)),e.addClass("picker-user-option")}},checkable:!0,maxListCount:500,disableScrollOnShow:!1}),t.zui.setUserPickerInfos=function(e){t.zui.Picker.DEFAULTS.users=t.extend({},t.zui.Picker.DEFAULTS.users,e)},t(function(){t(".picker-select[data-pickertype!='remote']").picker({chosenMode:!0}),t("[data-pickertype='remote']").each(function(){var e=t(this).attr("data-pickerremote");t(this).picker({chosenMode:!0,remote:e})}),window.pickerUsers&&t.zui.setUserPickerInfos(window.pickerUsers),t(".user-picker").picker({type:"user"})})),t.chosenDefaultOptions={middle_highlight:!0,disable_search_threshold:1,compact_search:!0,allow_single_deselect:!0,placeholder_text_single:" ",placeholder_text_multiple:" ",search_contains:!0,max_drop_width:500,max_drop_height:245,no_wrap:!0,drop_direction:function(){var e=t(this.container).closest(".table-responsive:not(.scroll-none)");if(e.length){if(this.drop_directionFixed)return this.drop_directionFixed;e.css("position","relative");var i="down",n=this.container.find(".chosen-drop"),o=this.container.position(),a=n.outerHeight();return o.top>=a&&o.top+31+a>e.outerHeight()&&(i="up"),this.drop_directionFixed=i,i}return"auto"}},t.chosenSimpleOptions=t.extend({},t.chosenDefaultOptions,{disable_search_threshold:6}),t.fn._chosen=t.fn.chosen,t.fn.chosen=function(e){return"string"==typeof e?this._chosen(e):this.each(function(){var i=t(this).addClass("chosen-controled");return i._chosen(t.extend({},i.hasClass("chosen-simple")?t.chosenSimpleOptions:t.chosenDefaultOptions,i.data(),e))})},t.fn.chosen.Constructor=t.fn._chosen.Constructor,t(function(){t(".chosen,.chosen-simple").each(function(){var e=t(this);e.closest(".template").length||e.chosen()})}),t.extend(t.fn.pager.Constructor.DEFAULTS,{maxNavCount:8,prevIcon:"icon-angle-left",nextIcon:"icon-angle-right",firstIcon:"icon-first-page",lastIcon:"icon-last-page",navEllipsisItem:"…",menuDirection:"dropup",pageSizeOptions:[5,10,15,20,25,30,35,40,45,50,100,200,500,1e3,2e3],elements:["total_text","size_menu","first_icon","prev_icon",'
{page}/{totalPage}
',"next_icon","last_icon"],onPageChange:function(e,i){e.recPerPage!==i.recPerPage&&t.cookie(this.options.pageCookie,e.recPerPage,{expires:config.cookieLife,path:config.webRoot}),e.recPerPage!==i.recPerPage&&(window.location.href=this.createLink())}}),t.extend(!0,t.zui.Messager.DEFAULTS,{cssClass:"messagger-zt",icons:{success:"check-circle",info:"chat-line",warning:"exclamation-sign",danger:"exclamation-sign"}}),t.fn.reverseOrder=function(){return this.each(function(){var e=t(this);e.prependTo(e.parent())})};var r=function(e,i){var n=t(e);if(!n.data("historiesInited")){n.data("historiesInited",1),i=t.extend({},n.data(),i);var o=n.find(".histories-list"),a=!0,s=!1;n.on("click",".btn-reverse",function(){o.children("li").reverseOrder(),a=!a,t(this).find(".icon").toggleClass("icon-arrow-up",a).toggleClass("icon-arrow-down",!a);var e="#lastComment",i=t(e);i.length&&window.KindEditor&&(window.KindEditor.remove(e),i.kindeditor())}).on("click",".btn-expand-all",function(){var e=t(this).find(".icon");s=!s,e.toggleClass("icon-plus",!s).toggleClass("icon-minus",s),o.children("li").toggleClass("show-changes",s)}).on("click",".btn-expand",function(){t(this).closest("li").toggleClass("show-changes")}).on("click",".btn-strip",function(){var e=t(this),n=e.find(".icon"),o=n.hasClass("icon-code");n.toggleClass("icon-code",!o).toggleClass("icon-text",o),e.attr("title",o?i.original:i.textdiff),e.closest("li").toggleClass("show-original",o)}),o.find(".btn-strip").attr("title",i.original);var r=n.find(".modal-comment").modal({show:!1}).on("shown.zui.modal",function(){var t=r.find("#comment");t.length&&(t.focus(),window.editor&&window.editor.comment&&window.editor.comment.focus())}).on("show.zui.modal",function(){var e=r.find("#comment");e.length&&!e.data("keditor")&&t.fn.kindeditor&&e.kindeditor()});n.on("click",".btn-comment",function(t){r.modal("toggle"),t.preventDefault()}).on("click",".btn-edit-comment,.btn-hide-form",function(){t(this).closest("li").toggleClass("show-form")});var l=n.find(".comment-edit-form");l.ajaxForm({success:function(t,e,i,n){setTimeout(function(){l.closest("li").removeClass("show-form")},2e3)}})}};t.fn.histories=function(t){return this.each(function(){r(this,t)})},t(function(){t(".histories").histories()});var l=0,c=0;t.toggleSidebar=function(e){var i=t("#sidebar");if(i.length){var n=t("main");if(void 0===e)e=n.hasClass("hide-sidebar");else if(e&&!n.hasClass("hide-sidebar"))return;n.toggleClass("hide-sidebar",!e),clearTimeout(l),t.zui.store.set(c,e);var o=i.children(".cell"),a={overflow:"visible",maxHeight:"initial"};e?(i.addClass("showing"),l=setTimeout(function(){i.removeClass("showing"),i.trigger("sidebar.toggle",e)},210)):(i.trigger("sidebar.toggle",e),t(window).width()<1900&&(a={overflow:"hidden",maxHeight:t(window).height()-45})),o.css(a)}};var h=t.initSidebar=function(){var e=t("#sidebar");if(e.length){if(e.data("init"))return!0;c="sidebar:"+(e.data("id")||config.currentModule+"/"+config.currentMethod);var i=t("main");if(i.length){i.on("click",".sidebar-toggle",function(){t.toggleSidebar(i.hasClass("hide-sidebar"))});var n=t.zui.store.get(c,e.data("hide")!==!1);n===!1&&e.addClass("no-animate"),t.toggleSidebar(n),n===!1&&setTimeout(function(){e.removeClass("no-animate")},500);var o=e.find(".sidebar-toggle");if(o.length){var a=function(){var e=o[0].getBoundingClientRect(),i=t(window).height(),n=Math.max(0,Math.floor(Math.min(i-40,e.top+e.height)-Math.max(e.top,0))/2)+(e.top<0?0-e.top:0);o.removeClass("fade").find(".icon").css("top",n+(t.zui.browser.isIE()?(i-80)/2:0))};a(),e.data("init",1).on("sidebar.toggle",a);var s=t.zui.browser.isIE()?1500:0,r=0,l=null,h=function(){var t=Date.now();return l&&(clearTimeout(l),l=null),t-rtr input[type="checkbox"]:checked');i.each(function(){var i=parseInt(t(this).val(),10);NaN!==i&&e.push(i)}),t.cookie("checkedItem",e.join(","),{expires:config.cookieLife,path:config.webRoot})},t.extend(t.fn.modal.bs.Constructor.DEFAULTS,{scrollInside:!0,backdrop:"static",headerHeight:100}),t.extend(t.zui.ModalTrigger.DEFAULTS,{scrollInside:!0,backdrop:"static"}),t.fn.initIframeModal=function(){return this.each(function(){var e=t(this);if(!e.parents('[data-ride="table"],.skip-iframe-modal').length){var i={type:"iframe"};e.hasClass("export")&&t.extend(i,{width:800,shown:setCheckedCookie},e.data()),e.modalTrigger(i)}})},t(function(){t("a.iframe,.export").initIframeModal()}),t.fixedTableHead=window.fixedTableHead=function(e,i){var n=t(e);if(n.is("table")||(n=n.find("table")),n.length){var o=t(i||window),a=null,s=function(){var e=n.children("thead"),i=e[0].getBoundingClientRect(),o=n.next(".fixed-head-table");if(i.top<0){var s=e.width();if(o.length){if(a!==s){a=s;var r=o.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())})}}else{var o=t("
").addClass(n.attr("class")),l=e.clone(),r=l.find("th");e.find("th").each(function(e){r.eq(e).width(t(this).width())}),o.append(l).insertAfter(n)}o.css({left:i.left,width:i.width}).show()}else o.hide()};o.on("scroll",s).on("resize",s),s()}},t(document).on("click","tr[data-url]",function(){var e=t(this),i=e.data("href")||e.data("url");i&&(window.location.href=i)}),"yes"===config.onlybody&&self===parent&&(window.location.href=window.location.href.replace("?onlybody=yes","").replace("&onlybody=yes","")),t(function(){t("body").addClass("m-{currentModule}-{currentMethod}".format(config))});var d,u,p,f,g,m=function(){d||(d=t("#subNavbar"),u=t("#pageNav"),p=t("#pageActions"),f=d.children(".nav"),g=f.outerWidth());var e=d.outerWidth(),i=u.outerWidth()||0,n=p.outerWidth()||0;if(i=i?i+15:0,n=n?n+15:0,!i&&!n)return void f.css({maxWidth:null,left:null,position:"static"});var o=Math.max(300,e-i-n),a=Math.min(o,g),s=(e-a)/2,r=i&&s.btn-toolbar");if(e.length){var i,n,o=e.children(),a=o.length,s=!1,r=null;if(a)for(o.each(function(e){i=t(this),n=i.is(".divider"),n&&!r&&i.hide(),s||n||(s=!0),r=n?null:i,!n||e!==a-1&&0!==e||i.hide()});i.length&&i.is(".divider");)i=i.hide().prev();s||e.hide()}};t(function(){t(".input-group,.btn-group").fixInputGroup(),x()}),window.holders&&t.each(window.holders,function(e){var i=t("#"+e);i.length&&i.is("input")&&i.attr("placeholder",window.holders[e])}),t(function(){var e=t(".table-responsive"),i=t.fixTableResponsive=function(){e.each(function(){this.scrollHeight-3<=this.clientHeight&&this.scrollWidth-3<=this.clientWidth?t(this).addClass("scroll-none").css("overflow","visible"):t(this).removeClass("scroll-none").css("overflow","auto")})};e.length&&(t(window).on("resize",i),setTimeout(i,100))});var C=function(){var e=this,i=t(e),n=i.closest("tr").find("textarea");if(n.length){var o=32;n.each(function(){var e=t(this).closest("td"),i=e.css("height");e.css("height",this.style.height),this.style.height="auto"; -var n=this.value?this.scrollHeight+2:32;o=Math.max(o,n),e.css("height",i)}),n.css("height",o)}else{e.style.height="auto";var a=e.value?e.scrollHeight+2:32;e.style.height=a+"px"}};t.autoResizeTextarea=function(e){t(e).each(C)},t(function(){t("textarea.autosize").each(C),t(document).on("input paste change","textarea.autosize",C)}),t(function(){var e=t("#dropMenu,.drop-menu");e.length&&e.on("click",".toggle-right-col",function(e){t(this).closest("#dropMenu,.drop-menu").toggleClass("show-right-col"),e.stopPropagation(),e.preventDefault()})});var _="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=_,t("html").toggleClass("is-firefox",_).toggleClass("not-firefox",!_),t(function(){var e=t("#mainContent>.main-col"),i=e.children(".main-actions");if(i.length){var n=i.prev();if(i.length&&n.length){t('
').css("height",i.outerHeight()).insertAfter(i);var o=0,a=function(){var e=n[0].getBoundingClientRect(),s=e.top+e.height+120>t(window).height();if(t("body").toggleClass("main-actions-fixed",s),s){var r=n.width();r?i.width(r):o<10&&setTimeout(a,1e3)}o++};t.resetToolbarPosition=a,a(),t(window).on("resize scroll",a)}}}),t(document).on("show.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&t(e.target).is(".modal")&&window.parent.$("body").addClass("hide-modal-close")}).on("hidden.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")}).on("loaded.zui.modal",function(e){t("body").removeClass("hide-modal-close")}),t(function(){var e=t(".dropdown-menu.with-search");e.length&&(e.find(".menu-search").on("click",function(t){return t.stopPropagation(),!1}),e.on("keyup change paste","input",function(){var e=t(this),i=e.closest(".dropdown-menu.with-search"),n=e.val().toLowerCase(),o=i.find(".option");""==n?o.removeClass("hide"):o.each(function(){var e=t(this);e.toggleClass("hide",e.text().toString().toLowerCase().indexOf(n)<0&&e.data("key").toString().toLowerCase().indexOf(n)<0)})}),e.parents(".dropdown-submenu").one("mouseenter",function(){var e=t(this).find(".dropdown-list")[0];e&&e.getBoundingClientRect&&setTimeout(function(){var i=270,n=e.getBoundingClientRect();n.top<0&&(i=Math.min(270,n.height)+n.top),e.style.maxHeight=Math.min(270,i,t(window).height()-28)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),function(t){function e(){if(!config.skipRedirect&&!window.skipRedirect){var e=window.parent,i=config.currentModule,n=config.currentMethod,o="index"===i&&"index"===n,a="#_single"===location.hash||/(\?|\&)_single/.test(location.search)||o||!t("#mainHeader,#editorNav").length||"tutorial"===i||"install"===i||"upgrade"===i||"user"===i&&("login"===n||"deny"===n)||"my"===i&&"changepassword"===n||t("body").hasClass("allow-self-open"),s=location.href;if(e===window&&!a){var r=location.pathname+location.search+location.hash;return void(location.href=t.createLink("index","index","")+"#app="+encodeURIComponent(r))}if(e!==window&&e.$.apps){o&&e.location.reload();var l=window.name;if(0===l.indexOf("app-")){t.apps=window.apps=e.$.apps;var c=l.substring(4);t.appCode=c,t(document).on("click",function(t){var i=e.document.getElementById(window.name);if(i){var n=e.document.getElementById(i.name)||i;if(n){var o;"function"==typeof Event?o=new Event(t.type,{bubbles:!0}):(o=document.createEvent("Event"),o.initEvent(t.type,!0,!0)),n.dispatchEvent(o)}}}).on("click","a,.open-in-app,.show-in-app",function(e){var i=t(this);if(!i.is("[data-modal],[data-toggle],[data-ride],[data-tab],.iframe,.not-in-app,[target]")&&!i.data("zui.modaltrigger")){var n=i.hasClass("show-in-app")?"":i.attr("href")||(i.is("a")?"":i.data("url")),o=i.data("app")||i.data("group");if(n){if(0===n.indexOf("javascript:")||"#"===n[0])return;var a=t.parseLink(n);if(a.external)return;if("index"===a.moduleName&&"index"===a.methodName)return window.location.reload(),void e.preventDefault()}else if(!o)return;o||(o=t.apps.getAppCode(n)),o&&("help"===o&&(t.apps.appsMap.help.text=i.text(),t.apps.appsMap.help.url||(t.apps.appsMap.help.url=n)),t.apps.open(n,o)&&e.preventDefault())}}),t.apps.updateUrl(c,s,document.title)}}}}function i(){var e=t("#navbar>.nav");if(e.length){var i=t("#heading"),n=+i.css("left").replace("px",""),o=i.outerWidth(),a=e.width(),s=t("#mainHeader>.container").width()-2*n,r=Math.floor((s-a)/2);e.css("marginLeft",r>>0;if(0===o)return!1;for(var a=0|e,s=Math.max(a>=0?a:o-Math.abs(a),0);s1&&("?"===e[0]&&(e=e.substr(1)),e.split("&").forEach(function(t){var e=t.split("=",2);if(e.length>1)try{i[e[0]]=decodeURIComponent(e[1])}catch(n){i[e[0]]=""}else i[e[0]]=""})),t?i[t]:i},t.parseLink=function(e){if(!e)return{};var i=0===e.indexOf("http:")||0===e.indexOf("https:");if(i){var n=window.location.origin;if(e.indexOf(n)<0)return{external:!0,url:e};e=e.substr((n+config.webRoot).length)}var o=e.split("#"),a=o[0].split("?"),s=a[1],r=s?t.getSearchParam("",s):{},l=a[0],c={url:e,isOnlyBody:"yes"===r.onlybody,vars:[],hash:o[1]||"",params:r,tid:r.tid||""};if("GET"===config.requestType){c.moduleName=r[config.moduleVar]||"index",c.methodName=r[config.methodVar]||"index",c.viewType=r[config.viewVar]||config.defaultView;for(var h in r)h!==config.moduleVar&&h!==config.methodVar&&h!==config.viewVar&&"onlybody"!==h&&"tid"!==h&&c.vars.push([h,r[h]])}else{var d=l.lastIndexOf("/");d===l.length-1&&(l=l.substr(0,d),d=l.lastIndexOf("/")),d>=0&&(l=l.substr(d+1));var u=l.lastIndexOf(".");u>=0?(c.viewType=l.substr(u+1),l=l.substr(0,u)):c.viewType=config.defaultView;var p=l.split(config.requestFix);if(c.moduleName=p[0]||"index",c.methodName=p[1]||"index",p.length>2)for(var f=2;f.nav>li").length>10&&(i(),t(window).on("resize",i)),setTimeout(n,1e3)})}(jQuery),function(t){"use strict";function e(e,i){"object"!=typeof i&&(i={user:i});var n=t(e);i=t.extend({},n.data(),i);var o=i.user;"string"==typeof o&&(o={account:o});var a={},s=i.size;s&&(a.width=s,a.height=s,a.lineHeight=s,Number.isNaN(+s)||n.addClass("size-"+s));var r=!!o.avatar;if(n.toggleClass("has-image",r).toggleClass("has-text",!r),n.empty(),r)n.append(t("").attr("src",o.avatar));else{var l=t.zui.strCode(o.account)*(i.hueDistance||43)%360;a.background="hsl("+l+","+(i.saturation||"40%")+","+(i.lightness||"60%")+")",Number.isNaN(+s)||(a.fontSize=Math.round(s/2)+"px");var c=o.name||o.realname||o.account;c=/^[\u4e00-\u9fa5\s]+$/.test(c)?c.length<=2?c:c.substring(c.length-2):/^[A-Za-z\d\s]+$/.test(c)?c[0].toUpperCase():c.length<=2?c:c.substring(0,2),n.append(t('').text(c))}return n.css(a)}t.fn.avatar=function(t){return this.each(function(){e(this,t)})}}(jQuery),$.zui.lang("de",{"zui.pager":{pageOfText:"Seite {0}",prev:"Zurück",next:"Nächste Seite",first:"Erste Seite",last:"Letzte Seite","goto":"Goto",pageOf:"Seite {page}",totalPage:"{totalPage} Seiten",totalCount:"Total: {recTotal} Artikel",pageSize:"{recPerPage} Artikel pro Seite",itemsRange:"Seiten {start} bis {end}",pageOfTotal:"Seite {page}/{totalPage}"},"zui.boards":{append2end:"Gehen Sie zum Ende"},"zui.browser":{tip:"Online. Sorgenfrei. Aktualisiere deinen Browser noch heute!"},"zui.calendar":{weekNames:["Son","Mon","Die","Mit","Don","Fri","Sam"],monthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",year:"{0}Jahr",month:"{0}Monat",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Kein Icon]",commonIcons:"Gemeinsame Symbole",webIcons:"Web-Symbol",editorIcons:"Editor-Symbol",directionalIcons:"Pfeil Zusammenfluss",otherIcons:"Andere Symbole"},"zui.colorPicker":{errorTip:"Kein gültiger Farbwert"},"zui.datagrid":{errorCannotGetDataFromRemote:"Daten vom Remote-Server ({0}) können nicht abgerufen werden.",errorCannotHandleRemoteData:"Die vom Remote-Server zurückgegebenen Daten können nicht verarbeitet werden."},"zui.guideViewer":{prevStep:"Vorheriger Schritt",nextStep:"Nächster Schritt"},"zui.tabs":{reload:"Neu laden",close:"Schliessen",closeOthers:"Schließen Sie andere Registerkarten",closeRight:"Schließen Sie die rechte Registerkarte",reopenLast:"Letzten geschlossenen Tab wiederherstellen",errorCannotFetchFromRemote:"Inhalt kann nicht vom Remote-Server abgerufen werden ({0})."},"zui.uploader":{},datetimepicker:{days:["Sonntag","Montag","Diensteg","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fri","Sam"],daysMin:["Son","Mon","Die","Mit","Don","Fri","Sam"],months:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",suffix:[],meridiem:[]},chosen:{no_results_text:"Nicht gefunden"},bootbox:{OK:"OK",CANCEL:"Stornieren",CONFIRM:"Bestätigen"}}),$.zui.lang("fr",{"zui.pager":{pageOfText:"Page {0}",prev:"Prev",next:"Suivant",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"De {start} à {end}",pageOfTotal:"Page {page} de {totalPage}"},"zui.boards":{append2end:"Aller jusqu'au bout"},"zui.browser":{tip:"Naviguez sans crainte sur Internet. Mettez votre navigateur à jour dès aujourd'hui!"},"zui.calendar":{weekNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],monthNames:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",year:"{0} Année",month:"{0} Mois",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Aucune icône]",commonIcons:"Icônes communes",webIcons:"Icône Web",editorIcons:"Icône de l'éditeur",directionalIcons:"Flèche confluence",otherIcons:"Autres icônes"},"zui.colorPicker":{errorTip:"Pas une valeur de couleur valide"},"zui.datagrid":{errorCannotGetDataFromRemote:"Impossible d'obtenir les données du serveur distant ({0}).",errorCannotHandleRemoteData:"Impossible de traiter les données renvoyées par le serveur distant."},"zui.guideViewer":{prevStep:"Étape précédente",nextStep:"Prochaine étape"},"zui.tabs":{reload:"Recharger",close:"Fermer",closeOthers:"Fermez les autres onglets",closeRight:"Fermer l'onglet de droite",reopenLast:"Restaurer le dernier onglet fermé",errorCannotFetchFromRemote:"Impossible d'obtenir le contenu du serveur distant ({0})."},"zui.uploader":{},datetimepicker:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",suffix:[],meridiem:[]},chosen:{no_results_text:"Pas trouvé"},bootbox:{OK:"D'accord",CANCEL:"Annuler",CONFIRM:"Confirmer"}}); \ No newline at end of file +var n=this.value?this.scrollHeight+2:32;o=Math.max(o,n),e.css("height",i)}),n.css("height",o)}else{e.style.height="auto";var a=e.value?e.scrollHeight+2:32;e.style.height=a+"px"}};t.autoResizeTextarea=function(e){t(e).each(C)},t(function(){t("textarea.autosize").each(C),t(document).on("input paste change","textarea.autosize",C)}),t(function(){var e=t("#dropMenu,.drop-menu");e.length&&e.on("click",".toggle-right-col",function(e){t(this).closest("#dropMenu,.drop-menu").toggleClass("show-right-col"),e.stopPropagation(),e.preventDefault()})});var _="undefined"!=typeof InstallTrigger;t.zui.browser.firefox=_,t("html").toggleClass("is-firefox",_).toggleClass("not-firefox",!_),t(function(){var e=t("#mainContent>.main-col"),i=e.children(".main-actions");if(i.length){var n=i.prev();if(i.length&&n.length){t('
').css("height",i.outerHeight()).insertAfter(i);var o=0,a=function(){var e=n[0].getBoundingClientRect(),s=e.top+e.height+120>t(window).height();if(t("body").toggleClass("main-actions-fixed",s),s){var r=n.width();r?i.width(r):o<10&&setTimeout(a,1e3)}o++};t.resetToolbarPosition=a,a(),t(window).on("resize scroll",a)}}}),t(document).on("show.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&t(e.target).is(".modal")&&window.parent.$("body").addClass("hide-modal-close")}).on("hidden.zui.modal",function(e){t("body.body-modal").length&&window.parent&&window.parent!==window&&window.parent.$("body").removeClass("hide-modal-close")}).on("loaded.zui.modal",function(e){t("body").removeClass("hide-modal-close")}),t(function(){var e=t(".dropdown-menu.with-search");e.length&&(e.find(".menu-search").on("click",function(t){return t.stopPropagation(),!1}),e.on("keyup change paste","input",function(){var e=t(this),i=e.closest(".dropdown-menu.with-search"),n=e.val().toLowerCase(),o=i.find(".option");""==n?o.removeClass("hide"):o.each(function(){var e=t(this);e.toggleClass("hide",e.text().toString().toLowerCase().indexOf(n)<0&&e.data("key").toString().toLowerCase().indexOf(n)<0)})}),e.parents(".dropdown-submenu").one("mouseenter",function(){var e=t(this).find(".dropdown-list")[0];e&&e.getBoundingClientRect&&setTimeout(function(){var i=270,n=e.getBoundingClientRect();n.top<0&&(i=Math.min(270,n.height)+n.top),e.style.maxHeight=Math.min(270,i,t(window).height()-28)+"px"},50)})),t(".dropdown-menu.with-search .menu-search").on("click",function(t){return t.stopPropagation(),!1})})}(jQuery),function(t){function e(){if(!config.skipRedirect&&!window.skipRedirect){var e=window.parent,i=config.currentModule,n=config.currentMethod;if("file"!==i||"download"!==n){var o="index"===i&&"index"===n,a="#_single"===location.hash||/(\?|\&)_single/.test(location.search)||o||!t("#mainHeader,#editorNav").length||"tutorial"===i||"install"===i||"upgrade"===i||"user"===i&&("login"===n||"deny"===n)||"my"===i&&"changepassword"===n||t("body").hasClass("allow-self-open"),s=location.href;if(e===window&&!a){var r=location.pathname+location.search+location.hash;return void(location.href=t.createLink("index","index","")+"#app="+encodeURIComponent(r))}if(e!==window&&e.$.apps){o&&e.location.reload();var l=window.name;if(0===l.indexOf("app-")){t.apps=window.apps=e.$.apps;var c=l.substring(4);t.appCode=c,t(document).on("click",function(t){var i=e.document.getElementById(window.name);if(i){var n=e.document.getElementById(i.name)||i;if(n){var o;"function"==typeof Event?o=new Event(t.type,{bubbles:!0}):(o=document.createEvent("Event"),o.initEvent(t.type,!0,!0)),n.dispatchEvent(o)}}}).on("click","a,.open-in-app,.show-in-app",function(e){var i=t(this);if(!i.is("[data-modal],[data-toggle],[data-ride],[data-tab],.iframe,.not-in-app,[target]")&&!i.data("zui.modaltrigger")){var n=i.hasClass("show-in-app")?"":i.attr("href")||(i.is("a")?"":i.data("url")),o=i.data("app")||i.data("group");if(n){if(0===n.indexOf("javascript:")||"#"===n[0])return;var a=t.parseLink(n);if(a.external||"file"===a.moduleName&&"download"===a.methodName)return;if("index"===a.moduleName&&"index"===a.methodName)return window.location.reload(),void e.preventDefault()}else if(!o)return;o||(o=t.apps.getAppCode(n)),o&&("help"===o&&(t.apps.appsMap.help.text=i.text(),t.apps.appsMap.help.url||(t.apps.appsMap.help.url=n)),t.apps.open(n,o)&&e.preventDefault())}}),t.apps.updateUrl(c,s,document.title)}}}}}function i(){var e=t("#navbar>.nav");if(e.length){var i=t("#heading"),n=+i.css("left").replace("px",""),o=i.outerWidth(),a=e.width(),s=t("#mainHeader>.container").width()-2*n,r=Math.floor((s-a)/2);e.css("marginLeft",r>>0;if(0===o)return!1;for(var a=0|e,s=Math.max(a>=0?a:o-Math.abs(a),0);s1&&("?"===e[0]&&(e=e.substr(1)),e.split("&").forEach(function(t){var e=t.split("=",2);if(e.length>1)try{i[e[0]]=decodeURIComponent(e[1])}catch(n){i[e[0]]=""}else i[e[0]]=""})),t?i[t]:i},t.parseLink=function(e){if(!e)return{};var i=0===e.indexOf("http:")||0===e.indexOf("https:");if(i){var n=window.location.origin;if(e.indexOf(n)<0)return{external:!0,url:e};e=e.substr((n+config.webRoot).length)}var o=e.split("#"),a=o[0].split("?"),s=a[1],r=s?t.getSearchParam("",s):{},l=a[0],c={url:e,isOnlyBody:"yes"===r.onlybody,vars:[],hash:o[1]||"",params:r,tid:r.tid||""};if("GET"===config.requestType){c.moduleName=r[config.moduleVar]||"index",c.methodName=r[config.methodVar]||"index",c.viewType=r[config.viewVar]||config.defaultView;for(var h in r)h!==config.moduleVar&&h!==config.methodVar&&h!==config.viewVar&&"onlybody"!==h&&"tid"!==h&&c.vars.push([h,r[h]])}else{var d=l.lastIndexOf("/");d===l.length-1&&(l=l.substr(0,d),d=l.lastIndexOf("/")),d>=0&&(l=l.substr(d+1));var u=l.lastIndexOf(".");u>=0?(c.viewType=l.substr(u+1),l=l.substr(0,u)):c.viewType=config.defaultView;var p=l.split(config.requestFix);if(c.moduleName=p[0]||"index",c.methodName=p[1]||"index",p.length>2)for(var f=2;f.nav>li").length>10&&(i(),t(window).on("resize",i)),setTimeout(n,1e3)})}(jQuery),function(t){"use strict";function e(e,i){"object"!=typeof i&&(i={user:i});var n=t(e);i=t.extend({},n.data(),i);var o=i.user;"string"==typeof o&&(o={account:o});var a={},s=i.size;s&&(a.width=s,a.height=s,a.lineHeight=s,Number.isNaN(+s)||n.addClass("size-"+s));var r=!!o.avatar;if(n.toggleClass("has-image",r).toggleClass("has-text",!r),n.empty(),r)n.append(t("").attr("src",o.avatar));else{var l=t.zui.strCode(o.account)*(i.hueDistance||43)%360;a.background="hsl("+l+","+(i.saturation||"40%")+","+(i.lightness||"60%")+")",Number.isNaN(+s)||(a.fontSize=Math.round(s/2)+"px");var c=o.name||o.realname||o.account;c=/^[\u4e00-\u9fa5\s]+$/.test(c)?c.length<=2?c:c.substring(c.length-2):/^[A-Za-z\d\s]+$/.test(c)?c[0].toUpperCase():c.length<=2?c:c.substring(0,2),n.append(t('').text(c))}return n.css(a)}t.fn.avatar=function(t){return this.each(function(){e(this,t)})}}(jQuery),$.zui.lang("de",{"zui.pager":{pageOfText:"Seite {0}",prev:"Zurück",next:"Nächste Seite",first:"Erste Seite",last:"Letzte Seite","goto":"Goto",pageOf:"Seite {page}",totalPage:"{totalPage} Seiten",totalCount:"Total: {recTotal} Artikel",pageSize:"{recPerPage} Artikel pro Seite",itemsRange:"Seiten {start} bis {end}",pageOfTotal:"Seite {page}/{totalPage}"},"zui.boards":{append2end:"Gehen Sie zum Ende"},"zui.browser":{tip:"Online. Sorgenfrei. Aktualisiere deinen Browser noch heute!"},"zui.calendar":{weekNames:["Son","Mon","Die","Mit","Don","Fri","Sam"],monthNames:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",year:"{0}Jahr",month:"{0}Monat",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Kein Icon]",commonIcons:"Gemeinsame Symbole",webIcons:"Web-Symbol",editorIcons:"Editor-Symbol",directionalIcons:"Pfeil Zusammenfluss",otherIcons:"Andere Symbole"},"zui.colorPicker":{errorTip:"Kein gültiger Farbwert"},"zui.datagrid":{errorCannotGetDataFromRemote:"Daten vom Remote-Server ({0}) können nicht abgerufen werden.",errorCannotHandleRemoteData:"Die vom Remote-Server zurückgegebenen Daten können nicht verarbeitet werden."},"zui.guideViewer":{prevStep:"Vorheriger Schritt",nextStep:"Nächster Schritt"},"zui.tabs":{reload:"Neu laden",close:"Schliessen",closeOthers:"Schließen Sie andere Registerkarten",closeRight:"Schließen Sie die rechte Registerkarte",reopenLast:"Letzten geschlossenen Tab wiederherstellen",errorCannotFetchFromRemote:"Inhalt kann nicht vom Remote-Server abgerufen werden ({0})."},"zui.uploader":{},datetimepicker:{days:["Sonntag","Montag","Diensteg","Mittwoch","Donnerstag","Freitag","Samstag"],daysShort:["Son","Mon","Die","Mit","Don","Fri","Sam"],daysMin:["Son","Mon","Die","Mit","Don","Fri","Sam"],months:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute",suffix:[],meridiem:[]},chosen:{no_results_text:"Nicht gefunden"},bootbox:{OK:"OK",CANCEL:"Stornieren",CONFIRM:"Bestätigen"}}),$.zui.lang("fr",{"zui.pager":{pageOfText:"Page {0}",prev:"Prev",next:"Suivant",first:"First",last:"Last","goto":"Goto",pageOf:"Page {page}",totalPage:"{totalPage} pages",totalCount:"Total: {recTotal} items",pageSize:"{recPerPage} per page",itemsRange:"De {start} à {end}",pageOfTotal:"Page {page} de {totalPage}"},"zui.boards":{append2end:"Aller jusqu'au bout"},"zui.browser":{tip:"Naviguez sans crainte sur Internet. Mettez votre navigateur à jour dès aujourd'hui!"},"zui.calendar":{weekNames:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],monthNames:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",year:"{0} Année",month:"{0} Mois",yearMonth:"{0}-{1}"},"zui.chosenIcons":{emptyIcon:"[Aucune icône]",commonIcons:"Icônes communes",webIcons:"Icône Web",editorIcons:"Icône de l'éditeur",directionalIcons:"Flèche confluence",otherIcons:"Autres icônes"},"zui.colorPicker":{errorTip:"Pas une valeur de couleur valide"},"zui.datagrid":{errorCannotGetDataFromRemote:"Impossible d'obtenir les données du serveur distant ({0}).",errorCannotHandleRemoteData:"Impossible de traiter les données renvoyées par le serveur distant."},"zui.guideViewer":{prevStep:"Étape précédente",nextStep:"Prochaine étape"},"zui.tabs":{reload:"Recharger",close:"Fermer",closeOthers:"Fermez les autres onglets",closeRight:"Fermer l'onglet de droite",reopenLast:"Restaurer le dernier onglet fermé",errorCannotFetchFromRemote:"Impossible d'obtenir le contenu du serveur distant ({0})."},"zui.uploader":{},datetimepicker:{days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],daysMin:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],months:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],monthsShort:["Jan","Fév","Mar","Avr","Mai","Juin","Juil","Août","Sep","Oct","Nov","Déc"],today:"Aujourd'hui",suffix:[],meridiem:[]},chosen:{no_results_text:"Pas trouvé"},bootbox:{OK:"D'accord",CANCEL:"Annuler",CONFIRM:"Confirmer"}}); \ No newline at end of file diff --git a/www/theme/zui/css/min.css b/www/theme/zui/css/min.css index cdb728f284..d669612738 100644 --- a/www/theme/zui/css/min.css +++ b/www/theme/zui/css/min.css @@ -1,5 +1,5 @@ /*! - * ZUI: ZUI for Zentao - v1.10.0 - 2022-06-28 + * ZUI: ZUI for Zentao - v1.10.0 - 2022-06-30 * http://openzui.com * GitHub: https://github.com/easysoft/zui.git * Copyright (c) 2022 cnezsoft.com; Licensed MIT From afa237c3acce104a3421486c3bc958f1f6a7f97a Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 30 Jun 2022 13:03:04 +0800 Subject: [PATCH 063/100] * Fix bug #23250. --- module/search/view/buildform.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/search/view/buildform.html.php b/module/search/view/buildform.html.php index 0a1776aa68..9a1ecc4516 100644 --- a/module/search/view/buildform.html.php +++ b/module/search/view/buildform.html.php @@ -292,7 +292,7 @@ $(function() var $this = $(this); var $chosen = $this.next('.chosen-container').removeClass('chosen-up'); var $drop = $chosen.find('.chosen-drop'); - $chosen.toggleClass('chosen-up', $drop.height() + $drop.offset().top - $(document).scrollTop() > $(window).height()); + if($this.data('drop_direction') === 'auto') $chosen.toggleClass('chosen-up', $drop.height() + $drop.offset().top - $(document).scrollTop() > $(window).height()); }); $searchForm.find('.picker-select').each(function() From 6e107a47831a82a23f657fdf93f860f5776202d1 Mon Sep 17 00:00:00 2001 From: liumengyi Date: Thu, 30 Jun 2022 13:15:03 +0800 Subject: [PATCH 064/100] * Fix bug #24288. --- module/testtask/js/common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/testtask/js/common.js b/module/testtask/js/common.js index 98acc21e3f..26df905e98 100644 --- a/module/testtask/js/common.js +++ b/module/testtask/js/common.js @@ -36,7 +36,8 @@ function adjustPriBoxWidth() var boxWidth = $('#ownerAndPriBox').width(); var beginWidth = $("input[name='begin']").outerWidth(); var addonWidth = $('#ownerAndPriBox .input-group-addon').outerWidth(); - $('#pri,#pri_chosen .chosen-single').css('width', boxWidth - beginWidth -addonWidth); + var width = boxWidth - beginWidth - addonWidth; + $('#pri,#pri_chosen .chosen-single').css('width', width > 0 ? width : '160px'); } /** From 7528cdfdcf4b1e472658427a5dd0277fb3088c15 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 30 Jun 2022 13:16:31 +0800 Subject: [PATCH 065/100] * Fix bug #24554. --- lib/base/front/front.class.php | 2 -- module/product/control.php | 12 ++++++------ module/story/model.php | 3 ++- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index 4c18838dfb..9afe2605e6 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -501,8 +501,6 @@ class baseHTML $gobackList = isset($_COOKIE['goback']) ? json_decode($_COOKIE['goback'], true) : array(); $gobackLink = isset($gobackList[$tab]) ? $gobackList[$tab] : ''; - if(strpos($misc, 'data-app') === false) $misc .= " data-app='" . $tab . "'"; - /* If the link of the referer is not the link of the current page or the link of the index, the cookie and gobackLink will be updated. */ if(!preg_match("/(m=|\/)(index|search|$currentModule)(&f=|-)(index|buildquery|$currentMethod)(&|-|\.)?/", strtolower($refererLink))) { diff --git a/module/product/control.php b/module/product/control.php index 4f724735e9..1108ea3e27 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -148,18 +148,18 @@ class product extends control } /* Set menu. */ - if($this->app->tab == 'product') + if($this->app->tab == 'project') + { + $this->session->set('storyList', $this->app->getURI(true), 'project'); + $this->loadModel('project')->setMenu($projectID); + } + else { $this->session->set('storyList', $this->app->getURI(true), 'product'); $this->session->set('productList', $this->app->getURI(true), 'product'); $this->product->setMenu($productID, $branch, 0, '', "storyType=$storyType"); } - if($this->app->tab == 'project') - { - $this->session->set('storyList', $this->app->getURI(true), 'project'); - $this->loadModel('project')->setMenu($projectID); - } /* Lower browse type. */ $browseType = strtolower($browseType); diff --git a/module/story/model.php b/module/story/model.php index d531c354e5..7ffad37ed8 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3892,7 +3892,8 @@ class storyModel extends model $menu .= $this->buildMenu('story', 'close', $params, $story, $type, '', '', 'iframe', true); $menu .= $this->buildMenu('story', 'edit', $params . "&from=$story->from", $story, $type); - if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$params", $story, $type, 'sitemap', '', '', false, "data-app='qa'"); + $tab = $this->app->tab == 'project' ? 'project' : 'qa'; + if($story->type != 'requirement' and $this->config->vision != 'lite') $menu .= $this->buildMenu('story', 'createCase', "productID=$story->product&branch=$story->branch&module=0&from=¶m=0&$params", $story, $type, 'sitemap', '', '', false, "data-app='$tab'"); if($this->app->rawModule != 'projectstory' OR $this->config->vision == 'lite') { From e4637e9ab35858fb72dab982e0064daf9fd150df Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 30 Jun 2022 05:25:31 +0000 Subject: [PATCH 066/100] * Fix bug #24472. --- module/task/js/batchcreate.js | 1 - module/task/view/batchcreate.html.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/module/task/js/batchcreate.js b/module/task/js/batchcreate.js index 70291eb881..b98330264c 100755 --- a/module/task/js/batchcreate.js +++ b/module/task/js/batchcreate.js @@ -136,7 +136,6 @@ function setPreview(num) storyLink = storyLink + concat + 'onlybody=yes'; } $('#preview' + num).removeAttr('disabled'); - $('#preview' + num).modalTrigger({type:'iframe'}); $('#preview' + num).attr('href', storyLink); } else diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index 8cf425cace..deac7a7e18 100755 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -122,7 +122,7 @@
- + From 2fe046f186eed579c1d6e95a37300ed3235f87ea Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Thu, 30 Jun 2022 13:25:33 +0800 Subject: [PATCH 067/100] * Fix bug #23942. --- module/api/control.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/api/control.php b/module/api/control.php index 88c28a5362..2601e6e871 100755 --- a/module/api/control.php +++ b/module/api/control.php @@ -251,9 +251,10 @@ class api extends control $id = $this->api->createStruct($data); + if(dao::isError()) return $this->sendError(dao::getError()); + $this->action->create('apistruct', $id, 'Created'); - if(dao::isError()) return $this->sendError(dao::getError()); return $this->sendSuccess(array('locate' => helper::createLink('api', 'struct', "libID=$libID"))); } From 0f18bca723a08137e09e35945c233c13f7ce5b8b Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Thu, 30 Jun 2022 05:27:00 +0000 Subject: [PATCH 068/100] * Fix bug #24472. --- module/task/view/batchcreate.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/view/batchcreate.html.php b/module/task/view/batchcreate.html.php index deac7a7e18..02d295aad4 100755 --- a/module/task/view/batchcreate.html.php +++ b/module/task/view/batchcreate.html.php @@ -122,7 +122,7 @@
- + From 5a7778acbe1fb6fcf8c4d813f2a9d17f901dbdc9 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Thu, 30 Jun 2022 13:37:34 +0800 Subject: [PATCH 069/100] * Fixed TAB return error. --- module/common/model.php | 4 ++-- module/testtask/view/linkcase.html.php | 2 +- module/testtask/view/report.html.php | 2 +- module/testtask/view/view.html.php | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/common/model.php b/module/common/model.php index 880ebdf6e6..a80b4b904a 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1800,14 +1800,14 @@ EOD; * @access public * @return void */ - static public function printBack($backLink, $class = '') + static public function printBack($backLink, $class = '', $misc = '') { global $lang, $app; if(isonlybody()) return false; if(empty($class)) $class = 'btn'; $title = $lang->goback . $lang->backShortcutKey; - echo html::a($backLink, ' ' . $lang->goback, '', "id='back' class='{$class}' title={$title} data-app='{$app->tab}'"); + echo html::a($backLink, ' ' . $lang->goback, '', "id='back' class='{$class}' title={$title} $misc"); } /** diff --git a/module/testtask/view/linkcase.html.php b/module/testtask/view/linkcase.html.php index 07ad73eac5..821c398f65 100644 --- a/module/testtask/view/linkcase.html.php +++ b/module/testtask/view/linkcase.html.php @@ -14,7 +14,7 @@