From 600ac72829ca93eabfbcacb1997857045cc86394 Mon Sep 17 00:00:00 2001 From: chaideqing Date: Wed, 29 Jun 2022 14:10:00 +0800 Subject: [PATCH 01/67] * modify notify style, task #58690 --- .../xuan/im/ext/model/class/xuanxuan.class.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php b/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php index f134a049b4..de1634d86f 100644 --- a/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php +++ b/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php @@ -225,25 +225,24 @@ class xuanxuanIm extends imModel $notificationContent = json_decode($notification->content); $notificationInnerContent = json_decode($notificationContent->content); - /* Inner content: array($parentID => array($content1, $content2)) */ - $objectGroups = array($notificationInnerContent->parent => array($notificationInnerContent)); + /* Inner content: array($id => array($content1, $content2)) */ + $objectGroups = array($notificationInnerContent->id => array($notificationInnerContent)); foreach($messages as $message) { $messageContent = json_decode($message->content); $messageInnerContent = json_decode($messageContent->content); - $objectGroups[$messageInnerContent->parent][] = $messageInnerContent; + $objectGroups[$messageInnerContent->id][] = $messageInnerContent; } - $objectTotal = 0; - foreach($objectGroups as $parent => $objectGroup) + foreach($objectGroups as $id => $objectGroup) { $object = current($objectGroup); $object->count = count($objectGroup); $object->url = $object->parentURL; unset($object->title); - $objectGroups[$parent] = $object; - $objectTotal += $object->count; + $objectGroups[$id] = $object; } + $objectTotal = count($objectGroups); $notificationContent->content = json_encode(array_values($objectGroups)); /* Hack alert: title count replacement currently assumes that default count is 1. */ $notification->title = substr_replace($notification->title, "$objectTotal", strrpos($notification->title, '1'), 1); From d01dd34431bc88fd5e3d2bc132503a35427c022e Mon Sep 17 00:00:00 2001 From: dingyongliang Date: Thu, 30 Jun 2022 01:47:45 +0000 Subject: [PATCH 02/67] * electron/zentao: fix confirm. --- lib/base/front/front.class.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/base/front/front.class.php b/lib/base/front/front.class.php index 4c18838dfb..dd21318281 100644 --- a/lib/base/front/front.class.php +++ b/lib/base/front/front.class.php @@ -968,8 +968,9 @@ class baseJS { $cancleAction = "$cancleTarget.location = '$cancleURL';"; } - - $js .= << Date: Fri, 1 Jul 2022 16:27:40 +0800 Subject: [PATCH 03/67] * adjust xuanxuan notification center logic, task #58691 --- module/action/model.php | 2 +- module/message/model.php | 4 +++- .../im/ext/model/class/xuanxuan.class.php | 14 ++++++++++--- .../xuan/message/ext/lang/de/xuanxuan.php | 5 ++++- .../xuan/message/ext/lang/en/xuanxuan.php | 5 ++++- .../xuan/message/ext/lang/fr/xuanxuan.php | 5 ++++- .../xuan/message/ext/lang/zh-cn/xuanxuan.php | 5 ++++- .../ext/model/class/xuanxuan.class.php | 21 +++++++++++++++++-- .../message/ext/model/hook/send.xuanxuan.php | 2 +- 9 files changed, 51 insertions(+), 12 deletions(-) diff --git a/module/action/model.php b/module/action/model.php index 3df166a917..89016a1ca3 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -73,7 +73,7 @@ class actionModel extends model if($this->post->uid) $this->file->updateObjectID($this->post->uid, $objectID, $objectType); /* Call the message notification function. */ - $this->loadModel('message')->send(strtolower($objectType), $objectID, $actionType, $actionID, $actor); + $this->loadModel('message')->send(strtolower($objectType), $objectID, $actionType, $actionID, $actor, $extra); /* Add index for global search. */ $this->saveIndex($objectType, $objectID, $actionType); diff --git a/module/message/model.php b/module/message/model.php index a5f2cccd7f..b640916bc4 100755 --- a/module/message/model.php +++ b/module/message/model.php @@ -59,10 +59,12 @@ class messageModel extends model * @param int $objectID * @param string $actionType * @param int $actionID + * @param string $actor + * @param string $extra * @access public * @return void */ - public function send($objectType, $objectID, $actionType, $actionID, $actor = '') + public function send($objectType, $objectID, $actionType, $actionID, $actor = '', $extra = '') { $objectType = strtolower($objectType); $messageSetting = $this->config->message->setting; diff --git a/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php b/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php index de1634d86f..8391277656 100644 --- a/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php +++ b/xuanxuan/extension/xuan/im/ext/model/class/xuanxuan.class.php @@ -207,14 +207,22 @@ class xuanxuanIm extends imModel foreach($userMessages as $message) { /* Group by $message->content->content->objectType, ...->parentType, ...->action, ...->actor */ - $contentData = json_decode($message->content); - $contentData = json_decode($contentData->content); + $contentDataOuter = json_decode($message->content); + $contentData = json_decode($contentDataOuter->content); if(isset($contentData->contentType) && $contentData->contentType == 'text') { $messageGroups[$contentData->contentType][] = $message; continue; } - $messageGroups["$contentData->objectType-$contentData->parentType-$contentData->action-$contentData->actor"][] = $message; + if ($contentData->objectType == 'story' && $contentData->action == 'reviewed') + { + $extra = explode(',', $contentDataOuter->extra)[0]; + $messageGroups["$contentData->objectType-$contentData->parentType-$contentData->action-$contentData->actor-$extra"][] = $message; + } + else + { + $messageGroups["$contentData->objectType-$contentData->parentType-$contentData->action-$contentData->actor"][] = $message; + } } foreach($messageGroups as $groupKey => $messages) { diff --git a/xuanxuan/extension/xuan/message/ext/lang/de/xuanxuan.php b/xuanxuan/extension/xuan/message/ext/lang/de/xuanxuan.php index 7fbcf17e93..dd942b06ce 100644 --- a/xuanxuan/extension/xuan/message/ext/lang/de/xuanxuan.php +++ b/xuanxuan/extension/xuan/message/ext/lang/de/xuanxuan.php @@ -3,7 +3,10 @@ $lang->message->typeList['xuanxuan'] = 'Chat'; $lang->message->sender = 'ZenTao'; -$lang->message->notifyTitle = '%s %s%d %s'; +$lang->message->notifyTitle = '%s %s%d %s'; +$lang->message->notifyPassTitle = '%s passed %d stories'; +$lang->message->notifyClarifyTitle = '%s clarify %d stories'; +$lang->message->notifyRejectTitle = '%s reject %d stories'; $lang->message->mr = new stdClass(); $lang->message->mr->logTitle = 'Build log'; diff --git a/xuanxuan/extension/xuan/message/ext/lang/en/xuanxuan.php b/xuanxuan/extension/xuan/message/ext/lang/en/xuanxuan.php index 7fbcf17e93..dd942b06ce 100644 --- a/xuanxuan/extension/xuan/message/ext/lang/en/xuanxuan.php +++ b/xuanxuan/extension/xuan/message/ext/lang/en/xuanxuan.php @@ -3,7 +3,10 @@ $lang->message->typeList['xuanxuan'] = 'Chat'; $lang->message->sender = 'ZenTao'; -$lang->message->notifyTitle = '%s %s%d %s'; +$lang->message->notifyTitle = '%s %s%d %s'; +$lang->message->notifyPassTitle = '%s passed %d stories'; +$lang->message->notifyClarifyTitle = '%s clarify %d stories'; +$lang->message->notifyRejectTitle = '%s reject %d stories'; $lang->message->mr = new stdClass(); $lang->message->mr->logTitle = 'Build log'; diff --git a/xuanxuan/extension/xuan/message/ext/lang/fr/xuanxuan.php b/xuanxuan/extension/xuan/message/ext/lang/fr/xuanxuan.php index 7fbcf17e93..dd942b06ce 100644 --- a/xuanxuan/extension/xuan/message/ext/lang/fr/xuanxuan.php +++ b/xuanxuan/extension/xuan/message/ext/lang/fr/xuanxuan.php @@ -3,7 +3,10 @@ $lang->message->typeList['xuanxuan'] = 'Chat'; $lang->message->sender = 'ZenTao'; -$lang->message->notifyTitle = '%s %s%d %s'; +$lang->message->notifyTitle = '%s %s%d %s'; +$lang->message->notifyPassTitle = '%s passed %d stories'; +$lang->message->notifyClarifyTitle = '%s clarify %d stories'; +$lang->message->notifyRejectTitle = '%s reject %d stories'; $lang->message->mr = new stdClass(); $lang->message->mr->logTitle = 'Build log'; diff --git a/xuanxuan/extension/xuan/message/ext/lang/zh-cn/xuanxuan.php b/xuanxuan/extension/xuan/message/ext/lang/zh-cn/xuanxuan.php index 32599f2ce7..1fca470949 100644 --- a/xuanxuan/extension/xuan/message/ext/lang/zh-cn/xuanxuan.php +++ b/xuanxuan/extension/xuan/message/ext/lang/zh-cn/xuanxuan.php @@ -3,7 +3,10 @@ $lang->message->typeList['xuanxuan'] = '聊天'; $lang->message->sender = '禅道项目管理'; -$lang->message->notifyTitle = '%s %s%d个%s'; +$lang->message->notifyTitle = '%s %s%d个%s'; +$lang->message->notifyPassTitle = '%s 通过了%d个研发需求'; +$lang->message->notifyClarifyTitle = '%s 驳回了%d个研发需求'; +$lang->message->notifyRejectTitle = '%s 拒绝了%d个研发需求'; $lang->message->mr = new stdClass(); $lang->message->mr->logTitle = '构建日志'; diff --git a/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php b/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php index ad3d677375..2c34039c6a 100644 --- a/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php +++ b/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php @@ -1,7 +1,7 @@ config->message->setting; if(is_string($messageSetting)) $messageSetting = json_decode($messageSetting, true); @@ -44,6 +44,22 @@ class xuanxuanMessage extends messageModel ->fetch(); $field = $this->config->action->objectNameFields[$objectType]; $title = $objectType == 'mr' ? '' : sprintf($this->lang->message->notifyTitle, $this->app->user->realname, $this->lang->action->label->$actionType, 1, $this->lang->action->objectTypes[$objectType]); + if ($objectType == 'story' && $actionType == 'reviewed' && !empty($extra)) + { + $notifyType = strtolower(explode(',', $extra)[0]); + if ($notifyType == 'pass') + { + $title = $objectType == 'mr' ? '' : sprintf($this->lang->message->notifyPassTitle, $this->app->user->realname, 1); + } + if ($notifyType == 'clarify') + { + $title = $objectType == 'mr' ? '' : sprintf($this->lang->message->notifyClarifyTitle, $this->app->user->realname, 1); + } + if ($notifyType == 'reject') + { + $title = $objectType == 'mr' ? '' : sprintf($this->lang->message->notifyRejectTitle, $this->app->user->realname, 1); + } + } $server = $this->loadModel('im')->getServer('zentao'); $onlybody = isset($_GET['onlybody']) ? $_GET['onlybody'] : ''; @@ -52,7 +68,7 @@ class xuanxuanMessage extends messageModel $url = $server . helper::createLink($objectType == 'kanbancard' ? 'kanban' : $objectType, 'view', "id=$dataID", 'html'); $target = ''; - if(!empty($object->assignedTo)) $target .= $object->assignedTo; + if(!empty($object->assignedTo)) $target .= $object->assignedTo == 'closed' ? $object->openedBy : $object->assignedTo; if(!empty($object->mailto)) $target .= ",{$object->mailto}"; if(($objectType == 'mr' or $objectType == 'kanbancard') and !empty($object->createdBy)) $target .= ",{$object->createdBy}"; $target = trim($target, ','); @@ -130,6 +146,7 @@ class xuanxuanMessage extends messageModel $contentData->actions = array(); $contentData->url = "xxc:openInApp/zentao-integrated/" . urlencode($url); } + $contentData->extra = $extra; $content = json_encode($contentData); $avatarUrl = $server . $this->app->getWebRoot() . 'favicon.ico'; diff --git a/xuanxuan/extension/xuan/message/ext/model/hook/send.xuanxuan.php b/xuanxuan/extension/xuan/message/ext/model/hook/send.xuanxuan.php index 23d82e1381..ef1529ceaa 100644 --- a/xuanxuan/extension/xuan/message/ext/model/hook/send.xuanxuan.php +++ b/xuanxuan/extension/xuan/message/ext/model/hook/send.xuanxuan.php @@ -1,2 +1,2 @@ loadExtension('xuanxuan')->send($objectType, $objectID, $actionType, $actionID, $actor); +$this->loadExtension('xuanxuan')->send($objectType, $objectID, $actionType, $actionID, $actor, $extra); From 613c00bed9207d4ecd7b73d590f9e128c6769c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Wed, 6 Jul 2022 13:31:14 +0800 Subject: [PATCH 04/67] * Code for stage/task. --- module/execution/control.php | 12 ----- module/product/control.php | 2 +- module/project/control.php | 34 +++++++++++-- module/project/model.php | 27 ++++++++++- module/project/view/execution.html.php | 66 ++++++++++++++++++++++++++ 5 files changed, 124 insertions(+), 17 deletions(-) create mode 100644 module/project/view/execution.html.php diff --git a/module/execution/control.php b/module/execution/control.php index 1cc1c84b54..9c40288774 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -3547,18 +3547,6 @@ class execution extends control $from = $this->app->tab; if($from == 'execution') $this->session->set('executionList', $this->app->getURI(true), 'execution'); - if($from == 'project') - { - $projects = $this->project->getPairsByProgram(); - $projectID = $this->project->saveState($projectID, $projects); - $project = $this->loadModel('project')->getByID($projectID); - $this->view->project = $project; - $this->project->setMenu($projectID); - - if(!$projectID) return print(js::locate($this->createLink('project', 'browse'))); - if(!empty($project->model) and $project->model == 'kanban' and !(defined('RUN_MODE') and RUN_MODE == 'api')) return print(js::locate($this->createLink('project', 'index', "projectID=$projectID"))); - } - if($this->app->viewType == 'mhtml') { if($this->app->rawModule == 'project' and $this->app->rawMethod == 'execution') diff --git a/module/product/control.php b/module/product/control.php index 1108ea3e27..0dd085d32e 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -1100,7 +1100,7 @@ class product extends control /* Get product reviewers. */ $product = $this->product->getByID($productID); $productReviewers = $product->reviewer; - if(!$productReviewers and $product->acl != 'open') $productReviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', ''); + if(!$productReviewers and $product->acl != 'open') $productReviewers = $this->loadModel('user')->getProductViewListUsers($product, '', '', '', ''); $storyReviewers = ''; if($storyID) diff --git a/module/project/control.php b/module/project/control.php index 82695213fa..f7d2363376 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -956,10 +956,38 @@ class project extends control */ public function execution($status = 'all', $projectID = 0, $orderBy = 'order_asc', $productID = 0, $recTotal = 0, $recPerPage = 100, $pageID = 1) { - $uri = $this->app->getURI(true); - $this->app->session->set('executionList', $uri, 'project'); + $this->loadModel('execution'); + $this->loadModel('programplan'); - echo $this->fetch('execution', 'all', "status=$status&projectID=$projectID&orderBy=$orderBy&productID=$productID&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"); + $projects = $this->project->getPairsByProgram(); + $projectID = $this->project->saveState($projectID, $projects); + $project = $this->project->getByID($projectID); + $this->project->setMenu($projectID); + + if(!$projectID) return print(js::locate($this->createLink('project', 'browse'))); + if(!empty($project->model) and $project->model == 'kanban' and !(defined('RUN_MODE') and RUN_MODE == 'api')) return print(js::locate($this->createLink('project', 'index', "projectID=$projectID"))); + + /* Load pager and get tasks. */ + $this->app->loadClass('pager', $static = true); + $pager = new pager($recTotal, $recPerPage, $pageID); + + $this->view->title = $this->lang->execution->allExecutions; + $this->view->position[] = $this->lang->execution->allExecutions; + + + $this->view->executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager, true); + $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID); + $this->view->productID = $productID; + $this->view->projectID = $projectID; + $this->view->project = $project; + $this->view->projects = array('') + $this->project->getPairsByProgram(); + $this->view->pager = $pager; + $this->view->orderBy = $orderBy; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->status = $status; + $this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false; + + $this->display(); } /** diff --git a/module/project/model.php b/module/project/model.php index 03147d7e1a..d6e748509d 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2308,7 +2308,7 @@ class projectModel extends model * @access public * @return array */ - public function getStats($projectID = 0, $status = 'undone', $productID = 0, $branch = 0, $itemCounts = 30, $orderBy = 'id_asc', $pager = null) + public function getStats($projectID = 0, $status = 'undone', $productID = 0, $branch = 0, $itemCounts = 30, $orderBy = 'id_asc', $pager = null, $withTasks = false) { if(empty($productID)) { @@ -2384,6 +2384,30 @@ class projectModel extends model $burns[$executionID] = $executionBurns; } + if($withTasks) + { + $executionTasks = $this->dao->select('*')->from(TABLE_TASK) + ->where('deleted')->eq(0) + ->andWhere('status')->ne('closed') + ->andWhere('execution')->in(array_keys($executions)) + ->fetchGroup('execution', 'id'); + + foreach($executionTasks as $executionID => $tasks) + { + foreach($tasks as $task) + { + if($task->parent > 0) + { + if(isset($executionTasks[$executionID][$task->parent])) + { + $executionTasks[$executionID][$task->parent]->children[$task->id] = $task; + unset($executionTasks[$executionID][$task->id]); + } + } + } + } + } + /* Process executions. */ $parents = array(); $children = array(); @@ -2409,6 +2433,7 @@ class projectModel extends model $execution->children = array(); $execution->grade == 1 ? $parents[$execution->id] = $execution : $children[$execution->parent][] = $execution; + if(isset($executionTasks) and isset($executionTasks[$execution->id])) $execution->tasks = $executionTasks[$execution->id]; } /* In the case of the waterfall model, calculate the sub-stage. */ diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php new file mode 100644 index 0000000000..c44b1aa377 --- /dev/null +++ b/module/project/view/execution.html.php @@ -0,0 +1,66 @@ + + + + +
+ +
+

+ execution->noExecution;?> + + + createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), " " . $lang->programplan->create, '', "class='btn btn-info'");?> + + + createLink('execution', 'create', "projectID=$projectID"), " " . $lang->execution->create, '', "class='btn btn-info' data-app='execution'");?> + + + +

+
+ + +
' data-ride='table'> +
+ +
+
+ +
+ + + From 4270492af2fc5ffa91fa2c12ed6e8c5e59de1e7d Mon Sep 17 00:00:00 2001 From: guofeilong Date: Thu, 7 Jul 2022 02:34:24 +0000 Subject: [PATCH 05/67] * add table expand --- module/project/view/execution.html.php | 98 ++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index c44b1aa377..479e5c7ba0 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -54,6 +54,104 @@
' data-ride='table'>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + children)):?> + + + + + + + + + + + + + + + + + tasks)):?> + tasks as $task):?> + + + + + + + + + + + + + + + + + + + + + tasks)):?> + tasks as $task):?> + + + + + + + + + + + + + + + + + + + +
+ + idAB;?> + programplan->name;?>execution->owner;?>programplan->status;?>project->progress;?>programplan->begin;?>programplan->end;?>task->estimateAB;?>task->consumedAB;?>task->leftAB;?> execution->burn;?> actions;?>
id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>name;?>name;?>
id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>name;?>name;?>
id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>name;?>name;?>
id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>name;?>name;?>
From 28c8b303da43ccba163e05700a58605986241cc7 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Thu, 7 Jul 2022 05:24:57 +0000 Subject: [PATCH 06/67] * add executionTable stage1 --- module/programplan/lang/zh-cn.php | 1 + module/project/view/execution.html.php | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/module/programplan/lang/zh-cn.php b/module/programplan/lang/zh-cn.php index e1352b4db9..d5eaad065b 100644 --- a/module/programplan/lang/zh-cn.php +++ b/module/programplan/lang/zh-cn.php @@ -23,6 +23,7 @@ $lang->programplan->createSubPlan = '创建二级阶段'; $lang->programplan->parent = '父阶段'; $lang->programplan->emptyParent = '无'; $lang->programplan->name = '阶段名称'; +$lang->programplan->status = '阶段进度'; $lang->programplan->PM = '阶段负责人'; $lang->programplan->acl = '访问控制'; $lang->programplan->subStageName = '子阶段名称'; diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 479e5c7ba0..aa255821d1 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -77,8 +77,21 @@ - id;?> - name;?> + + id;?> + + + name;?> + hasChild || $stage->hasTask*/ true ) + { + $icon = ' icon-program'; + $class = ' table-nest-toggle'; + } + ?> + + id;?> name;?> id;?> From 9ea7b2fc4a7c63e2ab36b95b8a563b9f9f028377 Mon Sep 17 00:00:00 2001 From: wangzemei Date: Thu, 7 Jul 2022 07:47:25 +0000 Subject: [PATCH 07/67] * use zentao-table --- module/project/view/execution.html.php | 60 +++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index aa255821d1..a918c41535 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -52,13 +52,14 @@ -
' data-ride='table'> + ' data-ride='table' data-nested='true' data-expand-nest-child='false' data-checkable='false' data-enable-empty-nested-row='true' data-replace-id='executionTableList' data-preserve-nested='true'>
- + + @@ -76,8 +77,9 @@ - - + id;?> > @@ -167,32 +166,60 @@ $(function() var $trSelected = $(`tr[row-id = ${$(that).attr('id')}]`); if ($trSelected.hasClass("table-nest-child-hide")) { - var param = + var that = this; + var executionID = $(this).attr('parent-id'); + var currentPage = 1; + var pageSize = 50; + + var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); + $.get(link, function(data) { - 'id': $(that).attr('id'), - 'currentPage': 1, - 'pageSize': 50, - }; - $('#executionForm').table('initNestedList') + var newTasks = JSON.parse(data); + executionStats.forEach(item => + { + if(item.id === executionID) + { + Object.assign(item.tasks, newTasks); + } + + $('#executionForm').table('initNestedList'); + return; + }) + }) + + $('#executionForm').table('initNestedList'); $trSelected.removeClass("table-nest-child-hide"); $(`tr[parent-id = ${$(that).attr('id')} ]`).show(); - - } else + } + else { $trSelected.addClass("table-nest-child-hide"); $(`tr[parent-id = ${$(that).attr('id')} ]`).hide(); } }) - $('.load-btn').on('click', function () + $('.load-btn').on('click', function () { var that = this; - var param = + var executionID = $(this).attr('parent-id'); + var currentPage = $(this).attr('current-page') + 1; + var pageSize = 50; + + var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); + $.get(link, function(data) { - 'id' : $(that).attr('parent-id'), - 'currentPage' : $(that).attr('current-page'), - 'pageSize':50, - } + var newTasks = JSON.parse(data); + executionStats.forEach(item => + { + if(item.id === executionID) + { + Object.assign(item.tasks, newTasks); + } + + $('#executionForm').table('initNestedList'); + return; + }) + }) }) }); diff --git a/module/task/control.php b/module/task/control.php index 104163f453..2145782c01 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1758,6 +1758,31 @@ class task extends control echo html::select('task', empty($tasks) ? array('' => '') : $tasks, $taskID, "class='form-control'"); } + public function ajaxGetTasksByExecution($executionID, $pageID, $recPerPage, $maxTaskID = 0) + { + $tasks = $this->dao->select('*')->from(TABLE_TASK) + ->where('deleted')->eq(0) + ->andWhere('status')->ne('closed') + ->andWhere('execution')->eq($executionID) + //->andWhere('id')->gt('') + ->limit($recPerPage) + ->fetchAll('id'); + + foreach($tasks as $task) + { + if($task->parent > 0) + { + if(isset($tasks[$task->parent])) + { + $tasks[$task->parent]->children[$task->id] = $task; + unset($tasks[$task->id]); + } + } + } + + die(json_encode($tasks)); + } + /** * AJAX: get the actions of a task. for web app. * From b018809f538f267c98e9de5ea24c182510640fe5 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Fri, 8 Jul 2022 09:17:35 +0000 Subject: [PATCH 10/67] * add click func to this two button --- module/project/view/execution.html.php | 85 ++++++++++---------------- 1 file changed, 32 insertions(+), 53 deletions(-) diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index b83a9fcde2..2449955c8d 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -159,68 +159,47 @@ $("#Tab").addClass('btn-active-text'); $(function() { - $('.table-nest-icon').on('click', function() - { - var that = this; - /* 调接口成功了 去改变行样式 */ + $("#executionList").on('click','.table-nest-icon',function(e) + { /* add event when click expand button */ + var that = e.target; var $trSelected = $(`tr[row-id = ${$(that).attr('id')}]`); if ($trSelected.hasClass("table-nest-child-hide")) - { - var that = this; - var executionID = $(this).attr('parent-id'); - var currentPage = 1; - var pageSize = 50; - - var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); - $.get(link, function(data) - { - var newTasks = JSON.parse(data); - executionStats.forEach(item => - { - if(item.id === executionID) - { - Object.assign(item.tasks, newTasks); - } - - $('#executionForm').table('initNestedList'); - return; - }) - }) - - $('#executionForm').table('initNestedList'); - $trSelected.removeClass("table-nest-child-hide"); - $(`tr[parent-id = ${$(that).attr('id')} ]`).show(); + { /* table expand */ + var executionID = $(this).attr('id'); + var currentPage = 1; + var pageSize = 50; + var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); + $.get(link, function(data) + { + var newTasks = JSON.parse(data); + $trSelected.after(""); + /* if (total > 50) + * 在第五十条后加一个tr 包裹一个td 中间含有一个 + * 点击事件如下 + * { + * + * } + * */ + $trSelected.removeClass("table-nest-child-hide"); + $(`tr[parent-id = ${$(that).attr('id')} ]`).show(); + $('#executionForm').table('initNestedList'); + }) } else - { - $trSelected.addClass("table-nest-child-hide"); - $(`tr[parent-id = ${$(that).attr('id')} ]`).hide(); + { /* table close */ + $trSelected.addClass("table-nest-child-hide"); + $(`tr[parent-id = ${$(that).attr('id')} ]`).hide(); } }) - $('.load-btn').on('click', function () - { - var that = this; - var executionID = $(this).attr('parent-id'); - var currentPage = $(this).attr('current-page') + 1; - var pageSize = 50; - - var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); - $.get(link, function(data) + $("#executionList").on('click','.load-btn', fucntion (e) { - var newTasks = JSON.parse(data); - executionStats.forEach(item => - { - if(item.id === executionID) - { - Object.assign(item.tasks, newTasks); - } - - $('#executionForm').table('initNestedList'); - return; - }) + var that = e.target; + var executionID = $(this).attr('parent-id'); + var currentPage = $(this).attr('current-page') + 1; + var pageSize = 50; + var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); }) - }) }); From 819323633f219cb4cd607bd27782100beff1d382 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Fri, 8 Jul 2022 09:21:23 +0000 Subject: [PATCH 11/67] * Fix write mistake --- module/project/view/execution.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 2449955c8d..714f644711 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -192,7 +192,7 @@ $(function() } }) - $("#executionList").on('click','.load-btn', fucntion (e) + $("#executionList").on('click','.load-btn', function(e) { var that = e.target; var executionID = $(this).attr('parent-id'); From 7c8366682c4ba488b3c6fe3885fef64214341b66 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Fri, 8 Jul 2022 09:38:23 +0000 Subject: [PATCH 12/67] * Add function addTR atempt to enclosure ajaxFunc --- module/project/view/execution.html.php | 53 +++++++++++++++----------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 714f644711..c047919f64 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -165,41 +165,48 @@ $(function() var $trSelected = $(`tr[row-id = ${$(that).attr('id')}]`); if ($trSelected.hasClass("table-nest-child-hide")) { /* table expand */ - var executionID = $(this).attr('id'); - var currentPage = 1; - var pageSize = 50; - var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); - $.get(link, function(data) - { - var newTasks = JSON.parse(data); - $trSelected.after(""); - /* if (total > 50) + var executionID = $(this).attr('id'); + var currentPage = 1; + var pageSize = 50; + var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); + $.get(link, function(data) + { + var newTasks = JSON.parse(data); + $trSelected.after(""); + /* if (total > 50) * 在第五十条后加一个tr 包裹一个td 中间含有一个 * 点击事件如下 * { * * } - * */ - $trSelected.removeClass("table-nest-child-hide"); - $(`tr[parent-id = ${$(that).attr('id')} ]`).show(); - $('#executionForm').table('initNestedList'); - }) + * */ + $trSelected.removeClass("table-nest-child-hide"); + $(`tr[parent-id = ${$(that).attr('id')} ]`).show(); + $('#executionForm').table('initNestedList'); + }) } else { /* table close */ - $trSelected.addClass("table-nest-child-hide"); - $(`tr[parent-id = ${$(that).attr('id')} ]`).hide(); + $trSelected.addClass("table-nest-child-hide"); + $(`tr[parent-id = ${$(that).attr('id')} ]`).hide(); } }) $("#executionList").on('click','.load-btn', function(e) - { - var that = e.target; - var executionID = $(this).attr('parent-id'); - var currentPage = $(this).attr('current-page') + 1; - var pageSize = 50; - var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); - }) + { + var that = e.target; + var executionID = $(this).attr('parent-id'); + var currentPage = $(this).attr('current-page') + 1; + var pageSize = 50; + var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); + }) + /* var addTableRow = function(param) + { + + console.log('addRow'); + }*/ }); + + From 1404449da1608fa89f66b2c251e6126f4f4a9d95 Mon Sep 17 00:00:00 2001 From: sunjun Date: Mon, 11 Jul 2022 09:09:29 +0000 Subject: [PATCH 13/67] sprint/211_sunjun_60474 --- module/action/lang/de.php | 3 +- module/action/lang/en.php | 3 +- module/action/lang/fr.php | 1 + module/action/lang/zh-cn.php | 1 + module/block/view/dynamic.html.php | 1 + module/company/view/dynamic.html.php | 1 + module/task/control.php | 14 +++++++-- module/task/lang/de.php | 42 +++++++++++++-------------- module/task/lang/en.php | 43 ++++++++++++++-------------- module/task/lang/fr.php | 43 ++++++++++++++-------------- module/task/lang/zh-cn.php | 43 ++++++++++++++-------------- module/task/model.php | 15 ++++++++-- 12 files changed, 120 insertions(+), 90 deletions(-) diff --git a/module/action/lang/de.php b/module/action/lang/de.php index 988570d7ce..d3f0dbfedd 100644 --- a/module/action/lang/de.php +++ b/module/action/lang/de.php @@ -209,6 +209,7 @@ $lang->action->desc->importedbuild = '$date, imported to $extraaction->desc->fromsonarqube = '$date, created by $actor from SonarQube Issue.' . "\n"; $lang->action->desc->tolib = '$date, imported by $actor .' . "\n"; $lang->action->desc->updatetolib = '$date, updated to ' . $lang->testcase->common . ' by $actor.' . "\n"; +$lang->action->desc->adjusttasktowait = '$date, System Reminder: The task status will be set to Not Started as the consumed work hour is adjusted to 0. ' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; @@ -305,7 +306,7 @@ $lang->action->label->suspended = 'suspended '; $lang->action->label->login = 'Login'; $lang->action->label->logout = "Logout"; $lang->action->label->notified = "Notified"; -$lang->action->label->deleteestimate = "deleted "; +$lang->action->label->deleteestimate = "deleted hours"; $lang->action->label->linked2build = "linked "; $lang->action->label->linked2bug = "linked "; $lang->action->label->linked2testtask = "linked"; diff --git a/module/action/lang/en.php b/module/action/lang/en.php index e195c73ad7..0ab354241a 100755 --- a/module/action/lang/en.php +++ b/module/action/lang/en.php @@ -209,6 +209,7 @@ $lang->action->desc->importedbuild = '$date, imported to $extraaction->desc->fromsonarqube = '$date, created by $actor from SonarQube Issue.' . "\n"; $lang->action->desc->tolib = '$date, imported by $actor .' . "\n"; $lang->action->desc->updatetolib = '$date, updated to ' . $lang->testcase->common . ' by $actor.' . "\n"; +$lang->action->desc->adjusttasktowait = '$date, System Reminder: The task status will be set to Not Started as the consumed work hour is adjusted to 0. ' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor created a child task $extra。' . "\n"; @@ -305,7 +306,7 @@ $lang->action->label->suspended = 'suspended '; $lang->action->label->login = 'login'; $lang->action->label->logout = "logout"; $lang->action->label->notified = "Notified"; -$lang->action->label->deleteestimate = "deleted "; +$lang->action->label->deleteestimate = "deleted hours"; $lang->action->label->linked2build = "linked "; $lang->action->label->linked2bug = "linked "; $lang->action->label->linked2testtask = "linked"; diff --git a/module/action/lang/fr.php b/module/action/lang/fr.php index fb1c45ebc5..01c2a52222 100644 --- a/module/action/lang/fr.php +++ b/module/action/lang/fr.php @@ -209,6 +209,7 @@ $lang->action->desc->importedbuild = '$date, imported to $extraaction->desc->fromsonarqube = '$date, created by $actor from SonarQube Issue.' . "\n"; $lang->action->desc->tolib = '$date, Importé par $actor .' . "\n"; $lang->action->desc->updatetolib = '$date, MàJ de ' . $lang->testcase->common . ' par $actor.' . "\n"; +$lang->action->desc->adjusttasktowait = '$date, System Reminder: The task status will be set to Not Started as the consumed work hour is adjusted to 0. ' . "\n"; /* Used to describe the history of operations related to parent-child tasks. */ $lang->action->desc->createchildren = '$date, $actor a créé un sous-tâche $extra。' . "\n"; diff --git a/module/action/lang/zh-cn.php b/module/action/lang/zh-cn.php index 4b332524af..a9011287c3 100755 --- a/module/action/lang/zh-cn.php +++ b/module/action/lang/zh-cn.php @@ -209,6 +209,7 @@ $lang->action->desc->importedbuild = '$date, 由 $actor $lang->action->desc->fromsonarqube = '$date, 由 $actorSonarQube问题转化而来。' . "\n"; $lang->action->desc->tolib = '$date, 由 $actor 导入。' . "\n"; $lang->action->desc->updatetolib = '$date, 由 $actor 从' . $lang->testcase->common . '更新。' . "\n"; +$lang->action->desc->adjusttasktowait = '$date, 系统判断由于消耗工时调整为0,将任务状态置为未开始。' . "\n"; /* 用来描述和父子任务相关的操作历史记录。*/ $lang->action->desc->createchildren = '$date, 由 $actor 创建子任务 $extra。' . "\n"; diff --git a/module/block/view/dynamic.html.php b/module/block/view/dynamic.html.php index 2aa17ecc16..e2e44aac2d 100644 --- a/module/block/view/dynamic.html.php +++ b/module/block/view/dynamic.html.php @@ -18,6 +18,7 @@ $i = 0; foreach($actions as $action) { + if($action->action == 'adjusttasktowait') continue; $user = zget($users, $action->actor); if($action->action == 'login' or $action->action == 'logout') $action->objectName = $action->objectLabel = ''; if($action->objectType == 'sonarqubeproject') $action->objectName = $action->extra; diff --git a/module/company/view/dynamic.html.php b/module/company/view/dynamic.html.php index d8f5338795..0b4a7e45ad 100644 --- a/module/company/view/dynamic.html.php +++ b/module/company/view/dynamic.html.php @@ -64,6 +64,7 @@
    $action):?> + action == 'adjusttasktowait') continue;?>
  • major) echo "class='active'";?>>
    diff --git a/module/task/control.php b/module/task/control.php index bd749846b8..f402a61a62 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1204,18 +1204,28 @@ class task extends control */ public function deleteEstimate($estimateID, $confirm = 'no') { - if($confirm == 'no') + $estimate = $this->task->getEstimateById($estimateID); + $task = $this->task->getById($estimate->task); + if($confirm == 'no' and $task->consumed - $estimate->consumed != 0) { return print(js::confirm($this->lang->task->confirmDeleteEstimate, $this->createLink('task', 'deleteEstimate', "estimateID=$estimateID&confirm=yes"))); } + elseif($confirm == 'no' and $task->consumed - $estimate->consumed == 0) + { + return print(js::confirm($this->lang->task->confirmDeleteLastEstimate, $this->createLink('task', 'deleteEstimate', "estimateID=$estimateID&confirm=yes"))); + } else { - $estimate = $this->task->getEstimateById($estimateID); $changes = $this->task->deleteEstimate($estimateID); if(dao::isError()) return print(js::error(dao::getError())); $actionID = $this->loadModel('action')->create('task', $estimate->task, 'DeleteEstimate'); $this->action->logHistory($actionID, $changes); + if($task->consumed - $estimate->consumed == 0) + { + $actionID = $this->loadModel('action')->create('task', $estimate->task, 'Adjusttasktowait'); + $this->action->logHistory($actionID, $changes); + } return print(js::reload('parent')); } } diff --git a/module/task/lang/de.php b/module/task/lang/de.php index 137364c86d..6bd4ae30b7 100644 --- a/module/task/lang/de.php +++ b/module/task/lang/de.php @@ -214,27 +214,27 @@ $lang->task->legendDesc = 'Aufgabenbeschreibung'; $lang->task->legendDetail = 'Task Detail'; $lang->task->legendMisc = 'Misc.'; -$lang->task->confirmDelete = "Möchten Sie diese Aufgabe löschen?"; -$lang->task->confirmDeleteEstimate = "Möchten Sie das löschen?"; -$lang->task->copyStoryTitle = "Story kopieren"; -$lang->task->afterSubmit = "Nach der Erstellung,"; -$lang->task->successSaved = "Erstellt!"; -$lang->task->delayWarning = " Verzögerung %s Tage "; -$lang->task->remindBug = "Diese Aufgabe wurde aus einem Bus erzeugt. Möchten Sie den Bug aktualisieren:%s?"; -$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; -$lang->task->confirmChangeExecution = "Wenn Sie {$lang->executionCommon} ändern, das verwendete Modul, Story and Assignor will be changed. Do you want to do it?"; -$lang->task->confirmFinish = '"Reststunden " sind 0. Möchten Sue den Status auf Erledigt setzen?'; -$lang->task->confirmRecord = '"Reststunden " sind 0. Möchten Sie den Task auf Erledigt setzen?'; -$lang->task->confirmTransfer = '"Reststunden " sind 0. Möchten Sie den Task transferieren?'; -$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; -$lang->task->noticeLinkStory = "Es wurde keine Story verknüpft. Sie können %s für dieses Projekt, anschließend %s."; -$lang->task->noticeSaveRecord = 'Ihre Stunden wurden nicht gespeichrt. Bitte erst speichern.'; -$lang->task->commentActions = '%s. %s, kommentiert von %s.'; -$lang->task->deniedNotice = 'Nur %s kann die Aufgabe %s.'; -$lang->task->noTask = 'Keine Aufagben. '; -$lang->task->createDenied = 'Aufgben erstellen it in diesem Projekt gesperrt'; -$lang->task->cannotDeleteParent = 'Cannot delete parent task'; -$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.'; +$lang->task->confirmDelete = "Möchten Sie diese Aufgabe löschen?"; +$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started."; +$lang->task->copyStoryTitle = "Story kopieren"; +$lang->task->afterSubmit = "Nach der Erstellung,"; +$lang->task->successSaved = "Erstellt!"; +$lang->task->delayWarning = " Verzögerung %s Tage "; +$lang->task->remindBug = "Diese Aufgabe wurde aus einem Bus erzeugt. Möchten Sie den Bug aktualisieren:%s?"; +$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; +$lang->task->confirmChangeExecution = "Wenn Sie {$lang->executionCommon} ändern, das verwendete Modul, Story and Assignor will be changed. Do you want to do it?"; +$lang->task->confirmFinish = '"Reststunden " sind 0. Möchten Sue den Status auf Erledigt setzen?'; +$lang->task->confirmRecord = '"Reststunden " sind 0. Möchten Sie den Task auf Erledigt setzen?'; +$lang->task->confirmTransfer = '"Reststunden " sind 0. Möchten Sie den Task transferieren?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; +$lang->task->noticeLinkStory = "Es wurde keine Story verknüpft. Sie können %s für dieses Projekt, anschließend %s."; +$lang->task->noticeSaveRecord = 'Ihre Stunden wurden nicht gespeichrt. Bitte erst speichern.'; +$lang->task->commentActions = '%s. %s, kommentiert von %s.'; +$lang->task->deniedNotice = 'Nur %s kann die Aufgabe %s.'; +$lang->task->noTask = 'Keine Aufagben. '; +$lang->task->createDenied = 'Aufgben erstellen it in diesem Projekt gesperrt'; +$lang->task->cannotDeleteParent = 'Cannot delete parent task'; +$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.'; $lang->task->error = new stdclass(); $lang->task->error->totalNumber = '"Total Cost" must be numbers.'; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index ab272e262c..3561bfae37 100755 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -214,27 +214,28 @@ $lang->task->legendDesc = 'Task Description'; $lang->task->legendDetail = 'Task Detail'; $lang->task->legendMisc = 'Misc.'; -$lang->task->confirmDelete = "Do you want to delete this task?"; -$lang->task->confirmDeleteEstimate = "Do you want to delete it?"; -$lang->task->copyStoryTitle = "Copy Story"; -$lang->task->afterSubmit = "Next "; -$lang->task->successSaved = "Created!"; -$lang->task->delayWarning = " Delay %s days "; -$lang->task->remindBug = "This task is converted from a bug. Do you want to update the Bug:%s?"; -$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; -$lang->task->confirmChangeExecution = "If you change {$lang->executionCommon}, Module, Story and AssignedTo will also be changed. Do you want to change it?"; -$lang->task->confirmFinish = '"Left Hour" is 0. Do you want to change the status to "Finished"?'; -$lang->task->confirmRecord = '"Left Hour" is 0. Do you want to set the task as "Finished"?'; -$lang->task->confirmTransfer = '"Left Hour" is 0,Do you want to transfer task?'; -$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; -$lang->task->noticeLinkStory = "No story has been linked. You can %s for this project, then %s."; -$lang->task->noticeSaveRecord = 'Your Hour is not saved. Please save it first.'; -$lang->task->commentActions = '%s. %s, commented by %s.'; -$lang->task->deniedNotice = 'Only the %s can %s the task.'; -$lang->task->noTask = 'No tasks yet. '; -$lang->task->createDenied = 'Create Task is denied in this project'; -$lang->task->cannotDeleteParent = 'Cannot delete parent task'; -$lang->task->addChildTask = 'Because the task has cost hours, ZenTao will create a child task with the same name to record the cost housrs to ensure data consistency.'; +$lang->task->confirmDelete = "Do you want to delete this task?"; +$lang->task->confirmDeleteEstimate = "Do you want to delete it?"; +$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started."; +$lang->task->copyStoryTitle = "Copy Story"; +$lang->task->afterSubmit = "Next "; +$lang->task->successSaved = "Created!"; +$lang->task->delayWarning = " Delay %s days "; +$lang->task->remindBug = "This task is converted from a bug. Do you want to update the Bug:%s?"; +$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; +$lang->task->confirmChangeExecution = "If you change {$lang->executionCommon}, Module, Story and AssignedTo will also be changed. Do you want to change it?"; +$lang->task->confirmFinish = '"Left Hour" is 0. Do you want to change the status to "Finished"?'; +$lang->task->confirmRecord = '"Left Hour" is 0. Do you want to set the task as "Finished"?'; +$lang->task->confirmTransfer = '"Left Hour" is 0,Do you want to transfer task?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; +$lang->task->noticeLinkStory = "No story has been linked. You can %s for this project, then %s."; +$lang->task->noticeSaveRecord = 'Your Hour is not saved. Please save it first.'; +$lang->task->commentActions = '%s. %s, commented by %s.'; +$lang->task->deniedNotice = 'Only the %s can %s the task.'; +$lang->task->noTask = 'No tasks yet. '; +$lang->task->createDenied = 'Create Task is denied in this project'; +$lang->task->cannotDeleteParent = 'Cannot delete parent task'; +$lang->task->addChildTask = 'Because the task has cost hours, ZenTao will create a child task with the same name to record the cost housrs to ensure data consistency.'; $lang->task->error = new stdclass(); $lang->task->error->totalNumber = '"Total Cost" must be numbers.'; diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php index 555df916b6..eb892c7518 100644 --- a/module/task/lang/fr.php +++ b/module/task/lang/fr.php @@ -214,27 +214,28 @@ $lang->task->legendDesc = 'Description Tâche'; $lang->task->legendDetail = 'Task Detail'; $lang->task->legendMisc = 'Misc.'; -$lang->task->confirmDelete = "Voulez-vous réellement supprimer cette tâche ?"; -$lang->task->confirmDeleteEstimate = "Voulez-vous la supprimer ?"; -$lang->task->copyStoryTitle = 'StoryModel'; -$lang->task->afterSubmit = "Suiv. "; -$lang->task->successSaved = "Créée !"; -$lang->task->delayWarning = " Retard %s jours "; -$lang->task->remindBug = "Cette tâche a été convertie depuis un bug. Voulez-vous mettre à jour le Bug : %s ?"; -$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; -$lang->task->confirmChangeExecution = "Si vous changez {$lang->executionCommon}, Module, Story et AssignedTo seront également changés. Voulez-vous le faire ?"; -$lang->task->confirmFinish = '"Heures Restantes" à 0. Voulez-vous passer le statut à "Terminée" ?'; -$lang->task->confirmRecord = '"Heures Restantes" à 0. Voulez-vous passer le statut de la tâche à "Finie" ?'; -$lang->task->confirmTransfer = '"Heures Restantes" à 0. Voulez-vous transférer la tâche ?'; -$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; -$lang->task->noticeLinkStory = "Aucune Story n'est associée. Vous pouvez %s pour ce projet, alors %s."; -$lang->task->noticeSaveRecord = "Votre temps n'a pas été sauvé. Enregistrez-le d'abord."; -$lang->task->commentActions = '%s. %s, commenté par %s.'; -$lang->task->deniedNotice = 'Seulement le %s peut %s la tâche.'; -$lang->task->noTask = "Pas de tâche pour l'instant. "; -$lang->task->createDenied = 'La création de tâches est interdite dans ce projet'; -$lang->task->cannotDeleteParent = 'Impossible de supprimer la tâche parente'; -$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.'; +$lang->task->confirmDelete = "Voulez-vous réellement supprimer cette tâche ?"; +$lang->task->confirmDeleteEstimate = "Voulez-vous la supprimer ?"; +$lang->task->confirmDeleteLastEstimate = "Do you want to delete the log? After deleting the last work log, the task status will be adjusted to Not Started."; +$lang->task->copyStoryTitle = 'StoryModel'; +$lang->task->afterSubmit = "Suiv. "; +$lang->task->successSaved = "Créée !"; +$lang->task->delayWarning = " Retard %s jours "; +$lang->task->remindBug = "Cette tâche a été convertie depuis un bug. Voulez-vous mettre à jour le Bug : %s ?"; +$lang->task->remindIssue = "This task is converted from a issue. Do you want to update the Issue:%s?"; +$lang->task->confirmChangeExecution = "Si vous changez {$lang->executionCommon}, Module, Story et AssignedTo seront également changés. Voulez-vous le faire ?"; +$lang->task->confirmFinish = '"Heures Restantes" à 0. Voulez-vous passer le statut à "Terminée" ?'; +$lang->task->confirmRecord = '"Heures Restantes" à 0. Voulez-vous passer le statut de la tâche à "Finie" ?'; +$lang->task->confirmTransfer = '"Heures Restantes" à 0. Voulez-vous transférer la tâche ?'; +$lang->task->noticeTaskStart = '"Cost Hour" and "Left Hour" cannot be 0 at the same time.'; +$lang->task->noticeLinkStory = "Aucune Story n'est associée. Vous pouvez %s pour ce projet, alors %s."; +$lang->task->noticeSaveRecord = "Votre temps n'a pas été sauvé. Enregistrez-le d'abord."; +$lang->task->commentActions = '%s. %s, commenté par %s.'; +$lang->task->deniedNotice = 'Seulement le %s peut %s la tâche.'; +$lang->task->noTask = "Pas de tâche pour l'instant. "; +$lang->task->createDenied = 'La création de tâches est interdite dans ce projet'; +$lang->task->cannotDeleteParent = 'Impossible de supprimer la tâche parente'; +$lang->task->addChildTask = 'Because the task has already consumed consumption, to ensure data consistency, we will help you create a subtask with the same name to record the consumption.'; $lang->task->error = new stdclass(); $lang->task->error->totalNumber = '"Coût Total" doit être numérique.'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index c7a13670fa..fb3a7b85ca 100755 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -214,27 +214,28 @@ $lang->task->legendDesc = '任务描述'; $lang->task->legendDetail = '任务详情'; $lang->task->legendMisc = '其他相关'; -$lang->task->confirmDelete = "您确定要删除这个任务吗?"; -$lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?"; -$lang->task->copyStoryTitle = "同{$lang->SRCommon}"; -$lang->task->afterSubmit = "添加之后"; -$lang->task->successSaved = "成功添加,"; -$lang->task->delayWarning = " 延期%s天 "; -$lang->task->remindBug = "该任务为Bug转化得到,是否更新Bug:%s ?"; -$lang->task->remindIssue = "该任务为问题转化得到,是否更新问题:%s ?"; -$lang->task->confirmChangeExecution = "修改{$lang->executionCommon}会导致相应的所属模块、相关{$lang->SRCommon}和指派人发生变化,确定吗?"; -$lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?'; -$lang->task->confirmRecord = '"剩余"为0,任务将标记为"已完成",您确定吗?'; -$lang->task->confirmTransfer = '"当前剩余"为0,任务将被转交,您确定吗?'; -$lang->task->noticeTaskStart = '"总计消耗"和"预计剩余"不能同时为0'; -$lang->task->noticeLinkStory = "没有可关联的相关{$lang->SRCommon},您可以为当前项目%s,然后%s"; -$lang->task->noticeSaveRecord = '您有尚未保存的工时记录,请先将其保存。'; -$lang->task->commentActions = '%s. %s, 由 %s 添加备注。'; -$lang->task->deniedNotice = '当前任务只有%s才可以%s。'; -$lang->task->noTask = '暂时没有任务。'; -$lang->task->createDenied = '你不能在该项目添加任务'; -$lang->task->cannotDeleteParent = '不能删除父任务。'; -$lang->task->addChildTask = '因该任务已经产生消耗,为保证数据一致性,我们会帮您创建一条同名子任务记录该消耗。'; +$lang->task->confirmDelete = "您确定要删除这个任务吗?"; +$lang->task->confirmDeleteEstimate = "您确定要删除这个记录吗?"; +$lang->task->confirmDeleteLastEstimate = "您确定要删除该条日志吗?删除最后一条工时日志后,该任务状态将调整为未开始。"; +$lang->task->copyStoryTitle = "同{$lang->SRCommon}"; +$lang->task->afterSubmit = "添加之后"; +$lang->task->successSaved = "成功添加,"; +$lang->task->delayWarning = " 延期%s天 "; +$lang->task->remindBug = "该任务为Bug转化得到,是否更新Bug:%s ?"; +$lang->task->remindIssue = "该任务为问题转化得到,是否更新问题:%s ?"; +$lang->task->confirmChangeExecution = "修改{$lang->executionCommon}会导致相应的所属模块、相关{$lang->SRCommon}和指派人发生变化,确定吗?"; +$lang->task->confirmFinish = '"预计剩余"为0,确认将任务状态改为"已完成"吗?'; +$lang->task->confirmRecord = '"剩余"为0,任务将标记为"已完成",您确定吗?'; +$lang->task->confirmTransfer = '"当前剩余"为0,任务将被转交,您确定吗?'; +$lang->task->noticeTaskStart = '"总计消耗"和"预计剩余"不能同时为0'; +$lang->task->noticeLinkStory = "没有可关联的相关{$lang->SRCommon},您可以为当前项目%s,然后%s"; +$lang->task->noticeSaveRecord = '您有尚未保存的工时记录,请先将其保存。'; +$lang->task->commentActions = '%s. %s, 由 %s 添加备注。'; +$lang->task->deniedNotice = '当前任务只有%s才可以%s。'; +$lang->task->noTask = '暂时没有任务。'; +$lang->task->createDenied = '你不能在该项目添加任务'; +$lang->task->cannotDeleteParent = '不能删除父任务。'; +$lang->task->addChildTask = '因该任务已经产生消耗,为保证数据一致性,我们会帮您创建一条同名子任务记录该消耗。'; $lang->task->error = new stdclass(); $lang->task->error->totalNumber = '"总计消耗"必须为数字'; diff --git a/module/task/model.php b/module/task/model.php index b2bd96a984..80bf7a71ce 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -719,7 +719,6 @@ class taskModel extends model $task->assignedTo = $childTask->assignedTo; $task->assignedDate = $now; } - $task->finishedBy = ''; $task->finishedDate = ''; $task->closedBy = ''; @@ -749,6 +748,7 @@ class taskModel extends model if($status == 'doing' and $parentTask->status == 'wait') $action = 'Started'; if($status == 'doing' and $parentTask->status == 'pause') $action = 'Restarted'; if($status == 'doing' and $parentTask->status != 'wait' and $parentTask->status != 'pause') $action = 'Activated'; + if($status == 'wait' and $parentTask->status != 'wait') $action = 'Adjusttasktowait'; if($action) { $actionID = $this->loadModel('action')->create('task', $parentID, $action, '', '', '', false); @@ -2834,7 +2834,18 @@ class taskModel extends model $data->consumed = $consumed; $data->left = $left; $data->status = ($left == 0 && $consumed != 0) ? 'done' : $task->status; - + if($left == 0 and $consumed != 0) + { + $data->status = 'done'; + } + elseif($consumed == 0) + { + $data->status = 'wait'; + } + else + { + $data->status = $task->status; + } if(!empty($task->team)) { $oldConsumed = $task->team[$estimate->account]->consumed; From c5ee9f589c175074ea31818a51ae388f18ccacb8 Mon Sep 17 00:00:00 2001 From: chaideqing Date: Mon, 11 Jul 2022 17:16:17 +0800 Subject: [PATCH 14/67] * refactor code --- xuanxuan/extension/xuan/message/ext/lang/fr/xuanxuan.php | 8 ++++---- .../xuan/message/ext/model/class/xuanxuan.class.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/xuanxuan/extension/xuan/message/ext/lang/fr/xuanxuan.php b/xuanxuan/extension/xuan/message/ext/lang/fr/xuanxuan.php index dd942b06ce..8fbd39f334 100644 --- a/xuanxuan/extension/xuan/message/ext/lang/fr/xuanxuan.php +++ b/xuanxuan/extension/xuan/message/ext/lang/fr/xuanxuan.php @@ -3,10 +3,10 @@ $lang->message->typeList['xuanxuan'] = 'Chat'; $lang->message->sender = 'ZenTao'; -$lang->message->notifyTitle = '%s %s%d %s'; -$lang->message->notifyPassTitle = '%s passed %d stories'; -$lang->message->notifyClarifyTitle = '%s clarify %d stories'; -$lang->message->notifyRejectTitle = '%s reject %d stories'; +$lang->message->notifyTitle = '%s %s%d %s'; +$lang->message->notifyPassTitle = '%s passed %d stories'; +$lang->message->notifyClarifyTitle = '%s clarify %d stories'; +$lang->message->notifyRejectTitle = '%s reject %d stories'; $lang->message->mr = new stdClass(); $lang->message->mr->logTitle = 'Build log'; diff --git a/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php b/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php index 2c34039c6a..5ec9449fb8 100644 --- a/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php +++ b/xuanxuan/extension/xuan/message/ext/model/class/xuanxuan.class.php @@ -51,11 +51,11 @@ class xuanxuanMessage extends messageModel { $title = $objectType == 'mr' ? '' : sprintf($this->lang->message->notifyPassTitle, $this->app->user->realname, 1); } - if ($notifyType == 'clarify') + else if($notifyType == 'clarify') { $title = $objectType == 'mr' ? '' : sprintf($this->lang->message->notifyClarifyTitle, $this->app->user->realname, 1); } - if ($notifyType == 'reject') + else if($notifyType == 'reject') { $title = $objectType == 'mr' ? '' : sprintf($this->lang->message->notifyRejectTitle, $this->app->user->realname, 1); } From f507af4cd0ed2c93e104084e9dc9635db344f679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Mon, 11 Jul 2022 18:19:27 +0800 Subject: [PATCH 15/67] * Code for stage list. --- module/project/css/execution.css | 3 + module/project/view/execution.html.php | 133 +++++++++++-------------- module/task/control.php | 44 +++++++- 3 files changed, 104 insertions(+), 76 deletions(-) create mode 100644 module/project/css/execution.css diff --git a/module/project/css/execution.css b/module/project/css/execution.css new file mode 100644 index 0000000000..8afe63e31e --- /dev/null +++ b/module/project/css/execution.css @@ -0,0 +1,3 @@ +.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;} +.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;} +.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;} diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index c047919f64..5006f14b4a 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -1,5 +1,4 @@ -
- + idAB;?> programplan->name;?>
+
+ id;?> @@ -171,7 +173,55 @@ + + From b3508460ef36009f4da9f69c48d08c9ec2f98613 Mon Sep 17 00:00:00 2001 From: guofeilong Date: Fri, 8 Jul 2022 03:31:43 +0000 Subject: [PATCH 08/67] * add table expand stage2 --- module/project/view/execution.html.php | 150 ++++++++++--------------- 1 file changed, 61 insertions(+), 89 deletions(-) diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index a918c41535..7431f84361 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -52,14 +52,13 @@ - ' data-ride='table' data-nested='true' data-expand-nest-child='false' data-checkable='false' data-enable-empty-nested-row='true' data-replace-id='executionTableList' data-preserve-nested='true'> + ' data-ride='table' data-nested='true' data-expand-nest-child='false' data-checkable='false' data-enable-empty-nested-row='true' data-replace-id='executionTableList' data-preserve-nested='true'>
- - + + @@ -77,22 +76,27 @@ - - id;?> class="row-program table-nest-child-hide" > + @@ -105,49 +109,9 @@ - - children)):?> - - - - - - - - - - - - - - - - - tasks)):?> - tasks as $task):?> - - - - - - - - - - - - - - - - - - - - tasks)):?> tasks as $task):?> - + id;?> > @@ -162,8 +126,24 @@ + id;?> > + + + + + + + + + + + + + -
- idAB;?> programplan->name;?>
- + id' data-order='$stage->order' data-parent='$stage->parent'"; + $trAttrs .= " data-nested='true'"; + $trClass .= $stage->parent == '0' ? ' is-top-level table-nest-child-hide' : ' table-nest-hide'; + ?> +
id;?> - name;?> hasChild || $stage->hasTask*/ true ) { - $icon = ' icon-program'; + $icon = ''; $class = ' table-nest-toggle'; } ?> - + id;?> class="table-nest-icon icon "> + name;?> id;?> name;?>name;?> name;?>
id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>name;?>name;?>
id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>name;?>name;?>
id;?> name;?> id;?>name;?>
+ id;?> class = "load-btn" current-page = 1 >加载更多... + +
@@ -180,48 +160,40 @@ $("#Tab").addClass('btn-active-text'); $(function() { - var ordersList = []; - for(var i = 0; i < executionStats.length; ++i) ordersList.push(parseInt(executionStats[i])); - ordersList.sort(function(x, y){return x - y;}); - - var $list = $('#executionTableList'); - $list.addClass('sortable').sortable( + $('.table-nest-icon').on('click', function() { - reverse: orderBy === 'order_desc', - selector: 'tr', - dragCssClass: 'drag-row', - trigger: $list.find('.sort-handler').length ? '.sort-handler' : null, - before: function(e) + var that = this; + /* 调接口成功了 去改变行样式 */ + var $trSelected = $(`tr[row-id = ${$(that).attr('id')}]`); + if ($trSelected.hasClass("table-nest-child-hide")) { - if($(e.event.target).closest('a,.btn').length) return false; - }, - canMoveHere: function($ele, $target) - { - return $ele.data('parent') === $target.data('parent'); - }, - start: function(e) - { - e.targets.filter('[data-parent!="' + e.element.attr('data-parent') + '"]').addClass('drop-not-allowed'); - }, - finish: function(e) - { - var projects = ''; - e.list.each(function() + var param = { - projects += $(this.item).data('id') + ',' ; - }); - $.post(createLink('project', 'updateOrder'), {'projects' : projects, 'orderBy' : orderBy}); + 'id': $(that).attr('id'), + 'currentPage': 1, + 'pageSize': 50, + }; + $('#executionForm').table('initNestedList') + $trSelected.removeClass("table-nest-child-hide"); + $(`tr[parent-id = ${$(that).attr('id')} ]`).show(); + + } else + { + $trSelected.addClass("table-nest-child-hide"); + $(`tr[parent-id = ${$(that).attr('id')} ]`).hide(); - - $('#executionsForm').table('initNestedList') } - }); - $('#executionTableList').on('click', '.row-program', function(e) + }) + $('.load-btn').on('click', function () { - console.log(e) - if($(e.target).closest('.table-nest-toggle,a').length) return; - - }); - }); + var that = this; + var param = + { + 'id' : $(that).attr('parent-id'), + 'currentPage' : $(that).attr('current-page'), + 'pageSize':50, + } + }) +}); From 1afa07c08316783386daa1f386f2d90e6b1bc8d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Fri, 8 Jul 2022 13:37:28 +0800 Subject: [PATCH 09/67] * Code for task list. --- module/project/model.php | 2 +- module/project/view/execution.html.php | 59 +++++++++++++++++++------- module/task/control.php | 25 +++++++++++ 3 files changed, 69 insertions(+), 17 deletions(-) diff --git a/module/project/model.php b/module/project/model.php index d6e748509d..d48bf6ed32 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2433,7 +2433,7 @@ class projectModel extends model $execution->children = array(); $execution->grade == 1 ? $parents[$execution->id] = $execution : $children[$execution->parent][] = $execution; - if(isset($executionTasks) and isset($executionTasks[$execution->id])) $execution->tasks = $executionTasks[$execution->id]; + if(isset($executionTasks) and isset($executionTasks[$execution->id])) $execution->tasks = array(); } /* In the case of the waterfall model, calculate the sub-stage. */ diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 7431f84361..b83a9fcde2 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -129,8 +129,7 @@
- id;?> class = "load-btn" current-page = 1 >加载更多... - + id;?> class = "load-btn" current-page = 1 >加载更多...
- - - - - - - - - - + + + + + + + + + - + id' data-order='$stage->order' data-parent='$stage->parent'"; - $trAttrs .= " data-nested='true'"; - $trClass .= $stage->parent == '0' ? ' is-top-level table-nest-child-hide' : ' table-nest-hide'; - ?> - id;?> class="row-program table-nest-child-hide" > - + $trAttrs = "data-id='$execution->id' data-order='$execution->order' data-nested='true'"; + $trClass .= !empty($execution->children) ? ' is-top-level table-nest-child-hide' : ''; + ?> + class="row-program "> - - - - - - - - - - + + + + + + + + + + - tasks)):?> - tasks as $task):?> - id;?> > - - - - - - - - - - - - + + children)):?> + children as $child):?> + id} data-parent={$child->parent}"; + $trClass .= " is-nest-child"; + if(empty($child->path)) $child->path = $execution->path . "$child->id,"; + $trAttrs .= " data-nest-parent='$child->parent' data-order='$child->order' data-nest-path='$child->path'"; + ?> + class=''> + + + + + + + + + + + - id;?> > - - - - - - - - - - - - - +
- idAB;?> - programplan->name;?>execution->owner;?>programplan->status;?>project->progress;?>programplan->begin;?>programplan->end;?>task->estimateAB;?>task->consumedAB;?>task->leftAB;?> programplan->name;?>execution->owner;?>project->status;?>project->progress;?>programplan->begin;?>programplan->end;?>task->estimateAB;?>task->consumedAB;?>task->leftAB;?> execution->burn;?> actions;?>
- id;?> -
hasChild || $stage->hasTask*/ true ) + if( /* $execution->hasChild || $execution->hasTask*/ true ) { $icon = ''; $class = ' table-nest-toggle'; } ?> - id;?> class="table-nest-icon icon "> - name;?> + id;?> class="table-nest-icon icon "> + name;?> id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>name;?>name;?>PM);?>project->statusList, $execution->status);?>hours->progress); ?>begin;?>end;?>lang->execution->workHour;?>'>hours->totalEstimate . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalConsumed . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalLeft . $this->lang->execution->workHourUnit;?>burns);?>'>
id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>id;?>name;?>name;?>name;?>
+ name;?> + PM);?>project->statusList, $child->status);?>hours->progress); ?>begin;?>end;?>lang->execution->workHour;?>'>hours->totalEstimate . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalConsumed . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalLeft . $this->lang->execution->workHourUnit;?>burns);?>'>
- id;?> class = "load-btn" current-page = 1 >加载更多... -
-
@@ -159,10 +144,10 @@ $("#Tab").addClass('btn-active-text'); $(function() { - $("#executionList").on('click','.table-nest-icon',function(e) - { /* add event when click expand button */ + $("#executionList").on('click','.showmore',function(e) + { /* add event when click expand button */ var that = e.target; - var $trSelected = $(`tr[row-id = ${$(that).attr('id')}]`); + var $trSelected = $(`tr[data-id = ${$(that).attr('id')}]`); if ($trSelected.hasClass("table-nest-child-hide")) { /* table expand */ var executionID = $(this).attr('id'); @@ -172,7 +157,7 @@ $(function() $.get(link, function(data) { var newTasks = JSON.parse(data); - $trSelected.after(""); + $trSelected.after("111"); /* if (total > 50) * 在第五十条后加一个tr 包裹一个td 中间含有一个 * 点击事件如下 @@ -192,7 +177,7 @@ $(function() } }) - $("#executionList").on('click','.load-btn', function(e) + $("#executionList").on('click', '.showmore', function(e) { var that = e.target; var executionID = $(this).attr('parent-id'); @@ -206,7 +191,5 @@ $(function() console.log('addRow'); }*/ }); - - diff --git a/module/task/control.php b/module/task/control.php index 2145782c01..a50ccf70c6 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1760,6 +1760,7 @@ class task extends control public function ajaxGetTasksByExecution($executionID, $pageID, $recPerPage, $maxTaskID = 0) { + //总数、更多、最后一条ID, $tasks = $this->dao->select('*')->from(TABLE_TASK) ->where('deleted')->eq(0) ->andWhere('status')->ne('closed') @@ -1768,6 +1769,8 @@ class task extends control ->limit($recPerPage) ->fetchAll('id'); + $users = $this->loadModel('user')->getPairs('noclosed|nodeleted'); + $html = ''; foreach($tasks as $task) { if($task->parent > 0) @@ -1778,9 +1781,48 @@ class task extends control unset($tasks[$task->id]); } } + + $parentClass = $task->parent == '-1' ? 'table-nest-child-hide' : ''; + $parentID = $task->parent > 0 ? $task->parent : $executionID; + + $html .= "id parent-id=$parentID class='row-program $parentClass'>"; + $html .= ''; + $html .= $task->id; + $html .= ''; + $html .= ''; + $html .= $task->name; + $html .= ''; + $html .= ''; + $html .= zget($users, $task->assignedTo, ''); + $html .= ''; + $html .= ''; + $html .= zget($this->lang->task->statusList, $task->task, ''); + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= $task->begin; + $html .= ''; + $html .= ''; + $html .= $task->end; + $html .= ''; + $html .= ''; + $html .= $task->consumed; + $html .= ''; + $html .= ''; + $html .= $task->left; + $html .= ''; + $html .= ''; + $html .= '燃尽图'; + $html .= ''; + $html .= ''; + $html .= '操作'; + $html .= ''; + $html .= ''; + } - die(json_encode($tasks)); + die(json_encode($html)); } /** From daf3ef4c99e3f5166dfe61f67e983cefe1f83d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Tue, 12 Jul 2022 00:43:56 +0800 Subject: [PATCH 16/67] * Code for execution list. --- module/project/control.php | 2 +- module/project/css/execution.css | 5 +- module/project/model.php | 7 +- module/project/view/execution.html.php | 254 +++++++++++++------------ module/task/control.php | 34 ++-- 5 files changed, 158 insertions(+), 144 deletions(-) diff --git a/module/project/control.php b/module/project/control.php index f7d2363376..357cbf8a28 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -957,6 +957,7 @@ class project extends control public function execution($status = 'all', $projectID = 0, $orderBy = 'order_asc', $productID = 0, $recTotal = 0, $recPerPage = 100, $pageID = 1) { $this->loadModel('execution'); + $this->loadModel('task'); $this->loadModel('programplan'); $projects = $this->project->getPairsByProgram(); @@ -974,7 +975,6 @@ class project extends control $this->view->title = $this->lang->execution->allExecutions; $this->view->position[] = $this->lang->execution->allExecutions; - $this->view->executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager, true); $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID); $this->view->productID = $productID; diff --git a/module/project/css/execution.css b/module/project/css/execution.css index 8afe63e31e..2ffca49c7f 100644 --- a/module/project/css/execution.css +++ b/module/project/css/execution.css @@ -1,3 +1,2 @@ -.table-children {border-left: 2px solid #cbd0db; border-right: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-top {border-top: 2px solid #cbd0db;} -.table tbody > tr.table-children.table-child-bottom {border-bottom: 2px solid #cbd0db;} +#executionList > thead > tr > th .table-nest-toggle-global {top: 6px} +#executionList > thead > tr > th .table-nest-toggle-global:before {color: #a6aab8;} diff --git a/module/project/model.php b/module/project/model.php index d48bf6ed32..188e37f824 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2390,6 +2390,7 @@ class projectModel extends model ->where('deleted')->eq(0) ->andWhere('status')->ne('closed') ->andWhere('execution')->in(array_keys($executions)) + ->orderBy('id_asc') ->fetchGroup('execution', 'id'); foreach($executionTasks as $executionID => $tasks) @@ -2433,7 +2434,11 @@ class projectModel extends model $execution->children = array(); $execution->grade == 1 ? $parents[$execution->id] = $execution : $children[$execution->parent][] = $execution; - if(isset($executionTasks) and isset($executionTasks[$execution->id])) $execution->tasks = array(); + if(isset($executionTasks) and isset($executionTasks[$execution->id])) + { + $tasks = array_chunk($executionTasks[$execution->id], 50, true); + $execution->tasks = $tasks[0]; + } } /* In the case of the waterfall model, calculate the sub-stage. */ diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 5006f14b4a..4af3461356 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -51,88 +51,119 @@ -
' data-ride='table' data-nested='true' data-expand-nest-child='false' data-checkable='false' data-enable-empty-nested-row='true' data-replace-id='executionTableList' data-preserve-nested='false'> -
- - - - - - - - - - - - - - - - - - - - id' data-order='$execution->order' data-nested='true'"; - $trClass .= !empty($execution->children) ? ' is-top-level table-nest-child-hide' : ''; - ?> - class="row-program "> - - - - - - - - - - - - + +
programplan->name;?>execution->owner;?>project->status;?>project->progress;?>programplan->begin;?>programplan->end;?>task->estimateAB;?>task->consumedAB;?>task->leftAB;?> execution->burn;?> actions;?>
- hasChild || $execution->hasTask*/ true ) - { - $icon = ''; - $class = ' table-nest-toggle'; - } - ?> - id;?> class="table-nest-icon icon "> - name;?> - PM);?>project->statusList, $execution->status);?>hours->progress); ?>begin;?>end;?>lang->execution->workHour;?>'>hours->totalEstimate . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalConsumed . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalLeft . $this->lang->execution->workHourUnit;?>burns);?>'>
+ + + + + + + + + + + + + + + + + + + id' data-order='$execution->order' data-nested='true'"; + $trClass .= ' is-top-level table-nest-child-hide'; + ?> + class=""> + + + + + + + + + + + + - children)):?> - children as $child):?> - id} data-parent={$child->parent}"; - $trClass .= " is-nest-child"; - if(empty($child->path)) $child->path = $execution->path . "$child->id,"; - $trAttrs .= " data-nest-parent='$child->parent' data-order='$child->order' data-nest-path='$child->path'"; - ?> - class=''> - - - - - - - - - - - - - + tasks)):?> + tasks as $task):?> + id} data-parent={$task->execution}"; + $trClass .= " is-nest-child no-nest"; + if(empty($task->path)) $task->path = $execution->id . ",$task->id,"; + $trAttrs .= " data-nest-parent='$task->execution' data-nest-path='$task->path'"; + ?> + class=''> + + + + + + + + + + + + + + tasks) == 50):?> + id;?> class='is-nest-child showmore' data-id='id;?>' data-nest-parent="id;?>"> + + + + - - - -
+ + nameAB;?> + execution->owner;?>project->status;?>project->progress;?>programplan->begin;?>programplan->end;?>task->estimateAB;?>task->consumedAB;?>task->leftAB;?> execution->burn;?> actions;?>
+ hasChild || $execution->hasTask*/ true ) + { + $icon = ''; + $class = ' table-nest-toggle'; + } + ?> + id;?> class="table-nest-icon icon "> + name;?> + PM);?>project->statusList, $execution->status);?>hours->progress); ?>begin;?>end;?>lang->execution->workHour;?>'>hours->totalEstimate . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalConsumed . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalLeft . $this->lang->execution->workHourUnit;?>burns);?>'>
- name;?> - PM);?>project->statusList, $child->status);?>hours->progress); ?>begin;?>end;?>lang->execution->workHour;?>'>hours->totalEstimate . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalConsumed . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>hours->totalLeft . $this->lang->execution->workHourUnit;?>burns);?>'>
createLink('task', 'view', "id=$task->id"), $task->name);?>assignedTo);?>task->statusList, $task->status);?>estStarted;?>deadline;?>lang->execution->workHour;?>'>estimate . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>consumed . $this->lang->execution->workHourUnit;?>lang->execution->workHour;?>'>left . $this->lang->execution->workHourUnit;?>
加载更多...
-
+ children)):?> + children as $child):?> + id} data-parent={$child->parent}"; + $trClass .= " is-nest-child"; + if(empty($child->path)) $child->path = $execution->path . "$child->id,"; + $trAttrs .= " data-nest-parent='$child->parent' data-order='$child->order' data-nest-path='$child->path'"; + ?> + class=''> + + name;?> + + PM);?> + project->statusList, $child->status);?> + hours->progress); ?> + begin;?> + end;?> + lang->execution->workHour;?>'>hours->totalEstimate . $this->lang->execution->workHourUnit;?> + lang->execution->workHour;?>'>hours->totalConsumed . $this->lang->execution->workHourUnit;?> + lang->execution->workHour;?>'>hours->totalLeft . $this->lang->execution->workHourUnit;?> + burns);?>'> + + + + + + + +
@@ -144,52 +175,29 @@ $("#Tab").addClass('btn-active-text'); $(function() { - $("#executionList").on('click','.showmore',function(e) - { /* add event when click expand button */ - var that = e.target; - var $trSelected = $(`tr[data-id = ${$(that).attr('id')}]`); - if ($trSelected.hasClass("table-nest-child-hide")) - { /* table expand */ - var executionID = $(this).attr('id'); - var currentPage = 1; - var pageSize = 50; - var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); - $.get(link, function(data) - { - var newTasks = JSON.parse(data); - $trSelected.after("111"); - /* if (total > 50) - * 在第五十条后加一个tr 包裹一个td 中间含有一个 - * 点击事件如下 - * { - * - * } - * */ - $trSelected.removeClass("table-nest-child-hide"); - $(`tr[parent-id = ${$(that).attr('id')} ]`).show(); - $('#executionForm').table('initNestedList'); - }) - } - else - { /* table close */ - $trSelected.addClass("table-nest-child-hide"); - $(`tr[parent-id = ${$(that).attr('id')} ]`).hide(); - - } - }) + $('.showmore td span').remove(); $("#executionList").on('click', '.showmore', function(e) { - var that = e.target; - var executionID = $(this).attr('parent-id'); - var currentPage = $(this).attr('current-page') + 1; - var pageSize = 50; - var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '¤tPage=' + currentPage + '&pageSize=' + pageSize); - }) - /* var addTableRow = function(param) - { + var showmoreTr = this; + var executionID = $(this).attr('data-parent'); + var maxTaskID = $(this).attr('data-id'); + var link = createLink('task', 'ajaxGetTasksByExecution', 'executionID=' + executionID + '&maxTaskID=' + maxTaskID); + $.get(link, function(data) + { + data = JSON.parse(data); + $(showmoreTr).before(data.body); + if(data.count < 50) + { + $(showmoreTr).remove(); + } + else + { + $(showmoreTr).attr('data-id', data.maxTaskID); + } - console.log('addRow'); - }*/ + $('#executionForm').table('initNestedList'); + }) + }) }); diff --git a/module/task/control.php b/module/task/control.php index a50ccf70c6..6359ec1bf2 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1758,18 +1758,21 @@ class task extends control echo html::select('task', empty($tasks) ? array('' => '') : $tasks, $taskID, "class='form-control'"); } - public function ajaxGetTasksByExecution($executionID, $pageID, $recPerPage, $maxTaskID = 0) + public function ajaxGetTasksByExecution($executionID, $maxTaskID = 0) { + $this->loadModel('task'); + //总数、更多、最后一条ID, $tasks = $this->dao->select('*')->from(TABLE_TASK) ->where('deleted')->eq(0) ->andWhere('status')->ne('closed') ->andWhere('execution')->eq($executionID) - //->andWhere('id')->gt('') - ->limit($recPerPage) + ->andWhere('id')->gt($maxTaskID) + ->orderBy('id_asc') + ->limit(50) ->fetchAll('id'); - $users = $this->loadModel('user')->getPairs('noclosed|nodeleted'); + $users = $this->loadModel('user')->getPairs('noletter|nodeleted'); $html = ''; foreach($tasks as $task) { @@ -1782,29 +1785,29 @@ class task extends control } } - $parentClass = $task->parent == '-1' ? 'table-nest-child-hide' : ''; - $parentID = $task->parent > 0 ? $task->parent : $executionID; + //$parentClass = $task->parent == '-1' ? 'table-nest-child-hide' : ''; + //$parentID = $task->parent > 0 ? $task->parent : $executionID; - $html .= "id parent-id=$parentID class='row-program $parentClass'>"; + $html .= "id data-nest-path='$executionID,$task->id' data-nest-parent=$executionID class='is-nest-child'>"; $html .= ''; - $html .= $task->id; - $html .= ''; - $html .= ''; - $html .= $task->name; + $html .= html::a($this->createLink('task', 'view', "id=$task->id"), $task->name); $html .= ''; $html .= ''; $html .= zget($users, $task->assignedTo, ''); $html .= ''; $html .= ''; - $html .= zget($this->lang->task->statusList, $task->task, ''); + $html .= zget($this->lang->task->statusList, $task->status, ''); $html .= ''; $html .= ''; $html .= ''; $html .= ''; - $html .= $task->begin; + $html .= $task->estStarted; $html .= ''; $html .= ''; - $html .= $task->end; + $html .= $task->deadline; + $html .= ''; + $html .= ''; + $html .= $task->estimate; $html .= ''; $html .= ''; $html .= $task->consumed; @@ -1819,10 +1822,9 @@ class task extends control $html .= '操作'; $html .= ''; $html .= ''; - } - die(json_encode($html)); + die(json_encode(array('body' => $html, 'count' => count($tasks), 'maxTaskID' => $task->id))); } /** From d1d49fe40445096c2716042a1a674b416e987f7d Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 12 Jul 2022 02:03:53 +0000 Subject: [PATCH 17/67] sprint/211_sunjun_60474 --- module/task/model.php | 1 + 1 file changed, 1 insertion(+) diff --git a/module/task/model.php b/module/task/model.php index 80bf7a71ce..937b5c4506 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -2841,6 +2841,7 @@ class taskModel extends model elseif($consumed == 0) { $data->status = 'wait'; + $data->left = $task->left + $estimate->consumed; } else { From 4caa38c31e5dad578e92116416da90a7f6d883ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Tue, 12 Jul 2022 14:00:25 +0800 Subject: [PATCH 18/67] * Code for execution list. --- module/project/js/execution.js | 76 ++++++++++ module/project/model.php | 2 +- module/project/view/execution.html.php | 193 +++++++++++++++++++------ module/story/model.php | 2 +- module/task/control.php | 103 +++++++------ 5 files changed, 284 insertions(+), 92 deletions(-) create mode 100644 module/project/js/execution.js diff --git a/module/project/js/execution.js b/module/project/js/execution.js new file mode 100644 index 0000000000..88b9ac0803 --- /dev/null +++ b/module/project/js/execution.js @@ -0,0 +1,76 @@ +window.addEventListener('scroll', this.handleScroll) +function handleScroll(e) +{ + var relative = 500; // 相对距离 + if(getScrollTop() + getWindowHeight() >= getScrollHeight() - relative) + { + throttle(loadData(), 250) + } +} + +function loadData() +{ + $('tr.showmore').each(function() + { + var offsetTop = $(this)[0].offsetTop; + if(offsetTop == 0) return true; + $(this).removeClass('showmore'); + + var showmoreTr = this; + var executionID = $(this).attr('data-parent'); + var maxTaskID = $(this).attr('data-id'); + var link = createLink('task', 'ajaxGetTasks', 'executionID=' + executionID + '&maxTaskID=' + maxTaskID); + $.get(link, function(data) + { + $(showmoreTr).before(data); + $(".iframe").modalTrigger({type:'iframe'}); + + $('#executionForm').table('initNestedList'); + }) + }) +} + +function throttle(fn, threshhold) +{ + var last; + var timer; + threshhold || (threshhold = 250); + + return function() + { + var context = this; + var args = arguments; + + var now = +new Date() + + if (last && now < last + threshhold) + { + clearTimeout(timer); + timer = setTimeout(function () + { + last = now + fn.apply(context, args) + }, threshhold) + } + else + { + last = now + fn.apply(context, args) + } + } +} + +function getScrollTop() +{ + return scrollTop = document.body.scrollTop + document.documentElement.scrollTop +} + +function getScrollHeight() +{ + return scrollHeight = document.documentElement.scrollHeight +} + +function getWindowHeight() +{ + return document.compatMode == "CSS1Compat" ? windowHeight = document.documentElement.clientHeight : windowHeight = document.body.clientHeight +} diff --git a/module/project/model.php b/module/project/model.php index 188e37f824..1e02b1f3ac 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -2434,7 +2434,7 @@ class projectModel extends model $execution->children = array(); $execution->grade == 1 ? $parents[$execution->id] = $execution : $children[$execution->parent][] = $execution; - if(isset($executionTasks) and isset($executionTasks[$execution->id])) + if(isset($executionTasks) and isset($executionTasks[$execution->id])) { $tasks = array_chunk($executionTasks[$execution->id], 50, true); $execution->tasks = $tasks[0]; diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 4af3461356..9b56548bf4 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -81,15 +81,7 @@ ?> class=""> - hasChild || $execution->hasTask*/ true ) - { - $icon = ''; - $class = ' table-nest-toggle'; - } - ?> - id;?> class="table-nest-icon icon "> + id;?> class="table-nest-icon icon table-nest-toggle"> name;?> PM);?> @@ -101,7 +93,40 @@ lang->execution->workHour;?>'>hours->totalConsumed . $this->lang->execution->workHourUnit;?> lang->execution->workHour;?>'>hours->totalLeft . $this->lang->execution->workHourUnit;?> burns);?>'> - + + id}", $execution, 'list', '', '', 'iframe', true); + $class = !empty($execution->children) ? 'disabled' : ''; + common::printIcon('task', 'create', "executionID={$execution->id}", $execution, 'list', '', '', $class, false, "data-app='execution'"); + + if($execution->grade == 1 && $this->loadModel('programplan')->isCreateTask($execution->id)) + { + common::printIcon('programplan', 'create', "program={$execution->parent}&productID=$productID&planID=$execution->id", $execution, 'list', 'split', '', '', '', '', $this->lang->programplan->createSubPlan); + } + else + { + $disabled = ($execution->grade == 2) ? ' disabled' : ''; + echo common::hasPriv('programplan', 'create') ? html::a('javascript:alert("' . $this->lang->programplan->error->createdTask . '");', '', '', 'class="btn ' . $disabled . '"') : ''; + } + + common::printIcon('programplan', 'edit', "stageID=$execution->id&projectID=$execution->project", $execution, 'list', '', '', 'iframe', true); + + $disabled = !empty($execution->children) ? ' disabled' : ''; + if($execution->status != 'closed' and common::hasPriv('execution', 'close', $execution)) + { + common::printIcon('execution', 'close', "stageID=$execution->id", $execution, 'list', 'off', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->close); + } + elseif($execution->status == 'closed' and common::hasPriv('execution', 'activate', $execution)) + { + common::printIcon('execution', 'activate', "stageID=$execution->id", $execution, 'list', 'magic', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->activate); + } + + if(common::hasPriv('execution', 'delete', $execution)) + { + common::printIcon('execution', 'delete', "stageID=$execution->id&confirm=no", $execution, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); + } + ?> + tasks)):?> @@ -110,8 +135,8 @@ $trClass = ''; $trAttrs = "data-id={$task->id} data-parent={$task->execution}"; $trClass .= " is-nest-child no-nest"; - if(empty($task->path)) $task->path = $execution->id . ",$task->id,"; - $trAttrs .= " data-nest-parent='$task->execution' data-nest-path='$task->path'"; + $trAttrs .= " data-nest-parent='$task->execution' data-nest-path=',$execution->id,$task->id,'"; + if($task == end($child->tasks) and count($execution->tasks) == 50) $trClass .= ' showmore'; ?> class=''> createLink('task', 'view', "id=$task->id"), $task->name);?> @@ -124,14 +149,34 @@ lang->execution->workHour;?>'>consumed . $this->lang->execution->workHourUnit;?> lang->execution->workHour;?>'>left . $this->lang->execution->workHourUnit;?> + task->buildOperateMenu($task, 'browse');?> + + + children)):?> + children as $childTask):?> + id} data-parent={$child->parent}"; + $trClass .= " is-nest-child no-nest"; + $trAttrs .= " data-nest-parent='$childTask->parent' data-nest-path=',$execution->id,$childTask->parent,$childTask->id,'"; + ?> + class=''> + createLink('task', 'view', "id=$childTask->id"), $childTask->name);?> + assignedTo);?> + task->statusList, $childTask->status);?> + estStarted;?> + deadline;?> + lang->execution->workHour;?>'>estimate . $this->lang->execution->workHourUnit;?> + lang->execution->workHour;?>'>consumed . $this->lang->execution->workHourUnit;?> + lang->execution->workHour;?>'>left . $this->lang->execution->workHourUnit;?> + + task->buildOperateMenu($childTask, 'browse');?> - tasks) == 50):?> - id;?> class='is-nest-child showmore' data-id='id;?>' data-nest-parent="id;?>"> - 加载更多... - + + children)):?> @@ -140,8 +185,7 @@ $trClass = ''; $trAttrs = "data-id={$child->id} data-parent={$child->parent}"; $trClass .= " is-nest-child"; - if(empty($child->path)) $child->path = $execution->path . "$child->id,"; - $trAttrs .= " data-nest-parent='$child->parent' data-order='$child->order' data-nest-path='$child->path'"; + $trAttrs .= " data-nest-parent='$child->parent' data-order='$child->order' data-nest-path=',$execution->id,$child->id,'"; ?> class=''> @@ -156,8 +200,91 @@ lang->execution->workHour;?>'>hours->totalConsumed . $this->lang->execution->workHourUnit;?> lang->execution->workHour;?>'>hours->totalLeft . $this->lang->execution->workHourUnit;?> burns);?>'> - + + id}", $child, 'list', '', '', 'iframe', true); + $class = !empty($child->children) ? 'disabled' : ''; + common::printIcon('task', 'create', "executionID={$child->id}", $child, 'list', '', '', $class, false, "data-app='execution'"); + + if($child->grade == 1 && $this->loadModel('programplan')->isCreateTask($child->id)) + { + common::printIcon('programplan', 'create', "program={$child->parent}&productID=$productID&planID=$child->id", $child, 'list', 'split', '', '', '', '', $this->lang->programplan->createSubPlan); + } + else + { + $disabled = ($child->grade == 2) ? ' disabled' : ''; + echo common::hasPriv('programplan', 'create') ? html::a('javascript:alert("' . $this->lang->programplan->error->createdTask . '");', '', '', 'class="btn ' . $disabled . '"') : ''; + } + + common::printIcon('programplan', 'edit', "stageID=$child->id&projectID=$child->project", $child, 'list', '', '', 'iframe', true); + + $disabled = !empty($child->children) ? ' disabled' : ''; + if($child->status != 'closed' and common::hasPriv('execution', 'close', $child)) + { + common::printIcon('execution', 'close', "stageID=$child->id", $child, 'list', 'off', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->close); + } + elseif($child->status == 'closed' and common::hasPriv('execution', 'activate', $child)) + { + common::printIcon('execution', 'activate', "stageID=$child->id", $child, 'list', 'magic', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->activate); + } + + if(common::hasPriv('execution', 'delete', $child)) + { + common::printIcon('execution', 'delete', "stageID=$child->id&confirm=no", $child, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete); + } + ?> + + + tasks)):?> + tasks as $task):?> + id} data-parent={$task->execution}"; + $trClass .= " is-nest-child no-nest"; + $trAttrs .= " data-nest-parent='$task->execution' data-nest-path=',$execution->id,$child->id,$task->id,'"; + if($task == end($child->tasks) and count($child->tasks) == 50) $trClass .= ' showmore'; + ?> + class=''> + createLink('task', 'view', "id=$task->id"), $task->name);?> + assignedTo);?> + task->statusList, $task->status);?> + + estStarted;?> + deadline;?> + lang->execution->workHour;?>'>estimate . $this->lang->execution->workHourUnit;?> + lang->execution->workHour;?>'>consumed . $this->lang->execution->workHourUnit;?> + lang->execution->workHour;?>'>left . $this->lang->execution->workHourUnit;?> + + task->buildOperateMenu($task, 'browse');?> + + + children)):?> + children as $childTask):?> + id} data-parent={$child->parent}"; + $trClass .= " is-nest-child no-nest"; + $trAttrs .= " data-nest-parent='$childTask->parent' data-nest-path=',$execution->id,$child->id,$childTask->parent,$childTask->id,'"; + ?> + class=''> + createLink('task', 'view', "id=$childTask->id"), $childTask->name);?> + assignedTo);?> + task->statusList, $childTask->status);?> + + estStarted;?> + deadline;?> + lang->execution->workHour;?>'>estimate . $this->lang->execution->workHourUnit;?> + lang->execution->workHour;?>'>consumed . $this->lang->execution->workHourUnit;?> + lang->execution->workHour;?>'>left . $this->lang->execution->workHourUnit;?> + + task->buildOperateMenu($childTask, 'browse');?> + + + + + + @@ -169,35 +296,7 @@ - diff --git a/module/story/model.php b/module/story/model.php index e514fcb1da..854cde440e 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -3927,7 +3927,7 @@ class storyModel extends model if($story->stage == 'projected') $title = $this->lang->story->subDivideTip['projected']; } } - $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params&executionID={$this->session->project}", $story, $type, 'split', '', 'showinonlybody', '', '', $title); + $menu .= $this->buildMenu('story', 'batchCreate', "productID=$story->product&branch=$story->branch&module=$story->module&$params", $story, $type, 'split', '', 'showinonlybody', '', '', $title); } if($this->app->rawModule == 'projectstory' and $this->config->vision != 'lite') $menu .= $this->buildMenu('projectstory', 'unlinkStory', "projectID={$this->session->project}&$params", $story, $type, 'unlink', 'hiddenwin', 'showinonlybody'); diff --git a/module/task/control.php b/module/task/control.php index 6359ec1bf2..b611d67ee0 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1758,22 +1758,29 @@ class task extends control echo html::select('task', empty($tasks) ? array('' => '') : $tasks, $taskID, "class='form-control'"); } - public function ajaxGetTasksByExecution($executionID, $maxTaskID = 0) + /** + * Ajax get tasks for execution list. + * + * @param int $executionID + * @param int $maxTaskID + * @access public + * @return void + */ + public function ajaxGetTasks($executionID, $maxTaskID = 0) { $this->loadModel('task'); + $this->loadModel('execution'); + $execution = $this->dao->findById($executionID)->from(TABLE_EXECUTION)->fetch(); - //总数、更多、最后一条ID, $tasks = $this->dao->select('*')->from(TABLE_TASK) ->where('deleted')->eq(0) ->andWhere('status')->ne('closed') ->andWhere('execution')->eq($executionID) ->andWhere('id')->gt($maxTaskID) ->orderBy('id_asc') - ->limit(50) ->fetchAll('id'); $users = $this->loadModel('user')->getPairs('noletter|nodeleted'); - $html = ''; foreach($tasks as $task) { if($task->parent > 0) @@ -1784,47 +1791,57 @@ class task extends control unset($tasks[$task->id]); } } - - //$parentClass = $task->parent == '-1' ? 'table-nest-child-hide' : ''; - //$parentID = $task->parent > 0 ? $task->parent : $executionID; - - $html .= "id data-nest-path='$executionID,$task->id' data-nest-parent=$executionID class='is-nest-child'>"; - $html .= ''; - $html .= html::a($this->createLink('task', 'view', "id=$task->id"), $task->name); - $html .= ''; - $html .= ''; - $html .= zget($users, $task->assignedTo, ''); - $html .= ''; - $html .= ''; - $html .= zget($this->lang->task->statusList, $task->status, ''); - $html .= ''; - $html .= ''; - $html .= ''; - $html .= ''; - $html .= $task->estStarted; - $html .= ''; - $html .= ''; - $html .= $task->deadline; - $html .= ''; - $html .= ''; - $html .= $task->estimate; - $html .= ''; - $html .= ''; - $html .= $task->consumed; - $html .= ''; - $html .= ''; - $html .= $task->left; - $html .= ''; - $html .= ''; - $html .= '燃尽图'; - $html .= ''; - $html .= ''; - $html .= '操作'; - $html .= ''; - $html .= ''; } - die(json_encode(array('body' => $html, 'count' => count($tasks), 'maxTaskID' => $task->id))); + $body = ''; + $tasks = array_chunk($tasks, 50, true); + $tasks = $tasks[0]; + $count = count($tasks); + foreach($tasks as $task) + { + $path = $execution->grade == 2 ? "$execution->parent,$execution->id,$task->id," : ",$execution->id,$task->id,"; + $showmore = ($count == 50 and $task == end($tasks)) ? 'showmore' : ''; + + $body .= "id data-nest-path='$path' data-nest-parent=$executionID class='is-nest-child $showmore'>"; + $body .= '' . html::a($this->createLink('task', 'view', "id=$task->id"), $task->name) . ''; + $body .= '' . zget($users, $task->assignedTo, '') . ''; + $body .= '' . zget($this->lang->task->statusList, $task->status, '') . ''; + $body .= ''; + $body .= '' . $task->estStarted . ''; + $body .= '' . $task->deadline . ''; + $body .= '' . $task->estimate . $this->lang->execution->workHourUnit . ''; + $body .= '' . $task->consumed . $this->lang->execution->workHourUnit . ''; + $body .= '' . $task->left . $this->lang->execution->workHourUnit . ''; + $body .= ''; + $body .= ''; + $body .= $this->task->buildOperateMenu($task, 'browse'); + $body .= ''; + + if(!empty($task->children)) + { + foreach($task->children as $childTask) + { + $path = $execution->grade == 2 ? "$execution->parent,$execution->id,$childTask->parent,$childTask->id," : ",$execution->id,$childTask->parent,$childTask->id,"; + + $body .= "id data-nest-path='$path' data-nest-parent=$executionID class='is-nest-child $showmore'>"; + $body .= '' . html::a($this->createLink('task', 'view', "id=$childTask->id"), $childTask->name) . ''; + $body .= '' . zget($users, $childTask->assignedTo, '') . ''; + $body .= '' . zget($this->lang->task->statusList, $childTask->status, '') . ''; + $body .= ''; + $body .= '' . $childTask->estStarted . ''; + $body .= '' . $childTask->deadline . ''; + $body .= '' . $childTask->estimate . $this->lang->execution->workHourUnit . ''; + $body .= '' . $childTask->consumed . $this->lang->execution->workHourUnit . ''; + $body .= '' . $childTask->left . $this->lang->execution->workHourUnit . ''; + $body .= ''; + $body .= ''; + $body .= $this->task->buildOperateMenu($childTask, 'browse'); + $body .= ''; + } + } + } + + die($body); } /** From c56ec2cbe46c3d69c013674909185d151fcaa422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Tue, 12 Jul 2022 14:08:35 +0800 Subject: [PATCH 19/67] * Add stage name. --- module/project/view/execution.html.php | 4 ++-- module/task/control.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 9b56548bf4..0b00b71ec5 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -82,7 +82,7 @@ class=""> id;?> class="table-nest-icon icon table-nest-toggle"> - name;?> + createLink('execution', 'view', "executionID=$execution->id"), $execution->name);?> PM);?> project->statusList, $execution->status);?> @@ -189,7 +189,7 @@ ?> class=''> - name;?> + createLink('execution', 'view', "executionID=$child->id"), $child->name);?> PM);?> project->statusList, $child->status);?> diff --git a/module/task/control.php b/module/task/control.php index b611d67ee0..1eb54da1b0 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1823,7 +1823,7 @@ class task extends control { $path = $execution->grade == 2 ? "$execution->parent,$execution->id,$childTask->parent,$childTask->id," : ",$execution->id,$childTask->parent,$childTask->id,"; - $body .= "id data-nest-path='$path' data-nest-parent=$executionID class='is-nest-child $showmore'>"; + $body .= "id data-nest-path='$path' data-nest-parent=$executionID class='is-nest-child no-nest'>"; $body .= '' . html::a($this->createLink('task', 'view', "id=$childTask->id"), $childTask->name) . ''; $body .= '' . zget($users, $childTask->assignedTo, '') . ''; $body .= '' . zget($this->lang->task->statusList, $childTask->status, '') . ''; From f44d5659df1a63b96b0558c0794d814ef4afbd1e Mon Sep 17 00:00:00 2001 From: mayue Date: Tue, 12 Jul 2022 15:00:11 +0800 Subject: [PATCH 20/67] * Fix bug #24404. --- module/task/js/create.js | 2 +- module/task/view/create.html.php | 3 ++- module/tree/control.php | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module/task/js/create.js b/module/task/js/create.js index d5a95fd922..c7bc577535 100644 --- a/module/task/js/create.js +++ b/module/task/js/create.js @@ -274,7 +274,7 @@ function setLane(regionID) } /* Get select of stories.*/ -function setStories(moduleID, executionID) +function setStories(moduleID) { link = createLink('story', 'ajaxGetExecutionStories', 'executionID=' + executionID + '&productID=0&branch=all&moduleID=' + moduleID + '&storyID=0&number=&type=full&status=unclosed'); $.get(link, function(stories) diff --git a/module/task/view/create.html.php b/module/task/view/create.html.php index e048a3b4c1..97adb5801a 100644 --- a/module/task/view/create.html.php +++ b/module/task/view/create.html.php @@ -13,6 +13,7 @@ +id);?> id));?> task->error->teamMember);?> @@ -56,7 +57,7 @@ foreach(explode(',', $config->task->create->requiredFields) as $field) task->module;?> - module, "class='form-control chosen' onchange='setStories(this.value, $execution->id)'");?> + module, "class='form-control chosen' onchange='setStories(this.value)'");?>
> diff --git a/module/tree/control.php b/module/tree/control.php index bad64ebd6e..148073abad 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -517,6 +517,7 @@ class tree extends control { $changeFunc = ''; if($viewType == 'bug' or $viewType == 'case') $changeFunc = "onchange='loadModuleRelated()'"; + if($viewType == 'task') $changeFunc = "onchange='setStories(this.value)'"; $field = $fieldID ? "modules[$fieldID]" : 'module'; $currentModule = $this->tree->getById($currentModuleID); From 8dc58ed292e733ba1906721fcfb9a3155e525600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B9=BF=E6=98=8E?= Date: Tue, 12 Jul 2022 15:47:29 +0800 Subject: [PATCH 21/67] * Code for project-task url. --- config/filter.php | 1 + module/common/lang/menu.php | 2 +- module/project/control.php | 2 +- module/project/css/execution.css | 1 + module/project/js/execution.js | 10 ++++++++++ module/project/view/execution.html.php | 11 +++++++++-- module/task/control.php | 9 +++++++-- 7 files changed, 30 insertions(+), 6 deletions(-) diff --git a/config/filter.php b/config/filter.php index c368da4405..95c366a47d 100755 --- a/config/filter.php +++ b/config/filter.php @@ -271,6 +271,7 @@ $filter->project->task->cookie['projectTaskOrder'] = 'reg::orderBy'; $filter->project->task->cookie['windowWidth'] = 'int'; $filter->project->export->cookie['checkedItem'] = 'reg::checked'; $filter->project->execution->cookie['pagerExecutionAll'] = 'int'; +$filter->project->execution->cookie['showTask'] = 'code'; $filter->projectstory->story->cookie['storyModuleParam'] = 'int'; $filter->projectstory->story->cookie['pagerProductBrowse'] = 'int'; diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index 5c98da0697..be1a23d37f 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -245,7 +245,7 @@ $lang->scrum->menu->settings['subMenu']->group = array('link' => "{$lang-> /* Waterfall menu. */ $lang->waterfall->menu = new stdclass(); $lang->waterfall->menu->index = array('link' => "$lang->dashboard|project|index|project=%s"); -$lang->waterfall->menu->execution = array('link' => "{$lang->stage->common}|project|execution|status=all&projectID=%s", 'subModule' => 'programplan'); +$lang->waterfall->menu->execution = array('link' => "{$lang->stage->common}|project|execution|status=all&projectID=%s", 'subModule' => 'programplan,task'); $lang->waterfall->menu->story = array('link' => "$lang->SRCommon|projectstory|story|project=%s", 'subModule' => 'projectstory,tree', 'exclude' => 'projectstory-track'); $lang->waterfall->menu->design = array('link' => "{$lang->design->common}|design|browse|project=%s"); $lang->waterfall->menu->qa = array('link' => "{$lang->qa->common}|project|bug|projectID=%s", 'subModule' => 'testcase,testtask,bug,testreport', 'alias' => 'bug,testtask,testcase,testreport'); diff --git a/module/project/control.php b/module/project/control.php index 357cbf8a28..7dce65d6f1 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -975,7 +975,7 @@ class project extends control $this->view->title = $this->lang->execution->allExecutions; $this->view->position[] = $this->lang->execution->allExecutions; - $this->view->executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager, true); + $this->view->executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager, $this->cookie->showTask); $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID); $this->view->productID = $productID; $this->view->projectID = $projectID; diff --git a/module/project/css/execution.css b/module/project/css/execution.css index 2ffca49c7f..0853109e06 100644 --- a/module/project/css/execution.css +++ b/module/project/css/execution.css @@ -1,2 +1,3 @@ #executionList > thead > tr > th .table-nest-toggle-global {top: 6px} #executionList > thead > tr > th .table-nest-toggle-global:before {color: #a6aab8;} +#mainMenu .pull-left .checkbox-primary {margin-top: 5px;} diff --git a/module/project/js/execution.js b/module/project/js/execution.js index 88b9ac0803..1a6ea3f77d 100644 --- a/module/project/js/execution.js +++ b/module/project/js/execution.js @@ -1,3 +1,13 @@ +$(function() +{ + $('input[name^="showTask"]').click(function() + { + var show = $(this).is(':checked') ? 1 : 0; + $.cookie('showTask', show, {expires:config.cookieLife, path:config.webRoot}); + window.location.reload(); + }); +}) + window.addEventListener('scroll', this.handleScroll) function handleScroll(e) { diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 0b00b71ec5..bb10afc189 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -23,6 +23,7 @@ {$pager->recTotal}";?> createLink('project', 'execution', "status=$key&projectID=$projectID&orderBy=$orderBy&productID=$productID"), $label, '', "class='btn btn-link' id='{$key}Tab'");?> + $lang->programplan->stageCustom->task), '', $this->cookie->showTask ? 'checked=checked' : '');?>
" . $lang->export, '', "class='btn btn-link export'")?> @@ -82,6 +83,9 @@ class=""> id;?> class="table-nest-icon icon table-nest-toggle"> + systemMode == 'new'):?> + '>execution->typeList[$execution->type]?> + createLink('execution', 'view', "executionID=$execution->id"), $execution->name);?> PM);?> @@ -139,7 +143,7 @@ if($task == end($child->tasks) and count($execution->tasks) == 50) $trClass .= ' showmore'; ?> class=''> - createLink('task', 'view', "id=$task->id"), $task->name);?> + createLink('task', 'view', "id=$task->id"), $task->name, '', "data-app={$this->app->tab}");?> assignedTo);?> task->statusList, $task->status);?> @@ -189,6 +193,9 @@ ?> class=''> + systemMode == 'new'):?> + '>execution->typeList[$child->type]?> + createLink('execution', 'view', "executionID=$child->id"), $child->name);?> PM);?> @@ -246,7 +253,7 @@ if($task == end($child->tasks) and count($child->tasks) == 50) $trClass .= ' showmore'; ?> class=''> - createLink('task', 'view', "id=$task->id"), $task->name);?> + createLink('task', 'view', "id=$task->id"), $task->name, '', "data-app={$this->app->tab}");?> assignedTo);?> task->statusList, $task->status);?> diff --git a/module/task/control.php b/module/task/control.php index 1eb54da1b0..c80ed09fc9 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -48,6 +48,7 @@ class task extends control $executions = $this->execution->getPairs(0, 'all', !common::canModify('execution', $execution) ? 'noclosed' : ''); $executionID = $this->execution->saveState($executionID, $executions); $this->execution->setMenu($executionID); + if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project); $this->execution->getLimitedExecution(); $limitedExecutions = !empty($_SESSION['limitedExecutions']) ? $_SESSION['limitedExecutions'] : ''; @@ -332,6 +333,7 @@ class task extends control /* Set menu. */ $this->execution->setMenu($execution->id); + if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project); /* When common task are child tasks, query whether common task are consumed. */ $taskConsumed = 0; @@ -540,6 +542,8 @@ class task extends control } } + if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project); + $tasks = $this->task->getParentTaskPairs($this->view->execution->id, $this->view->task->parent); if(isset($tasks[$taskID])) unset($tasks[$taskID]); @@ -855,6 +859,7 @@ class task extends control $this->session->set('executionList', $this->app->getURI(true), 'execution'); $this->commonAction($taskID); + if($this->app->tab == 'project') $this->loadModel('project')->setMenu($this->session->project); $taskID = (int)$taskID; $task = $this->task->getById($taskID, true); @@ -1803,7 +1808,7 @@ class task extends control $showmore = ($count == 50 and $task == end($tasks)) ? 'showmore' : ''; $body .= "id data-nest-path='$path' data-nest-parent=$executionID class='is-nest-child $showmore'>"; - $body .= '' . html::a($this->createLink('task', 'view', "id=$task->id"), $task->name) . ''; + $body .= '' . html::a($this->createLink('task', 'view', "id=$task->id"), $task->name, '', "data-app='project'") . ''; $body .= '' . zget($users, $task->assignedTo, '') . ''; $body .= '' . zget($this->lang->task->statusList, $task->status, '') . ''; $body .= ''; @@ -1824,7 +1829,7 @@ class task extends control $path = $execution->grade == 2 ? "$execution->parent,$execution->id,$childTask->parent,$childTask->id," : ",$execution->id,$childTask->parent,$childTask->id,"; $body .= "id data-nest-path='$path' data-nest-parent=$executionID class='is-nest-child no-nest'>"; - $body .= '' . html::a($this->createLink('task', 'view', "id=$childTask->id"), $childTask->name) . ''; + $body .= '' . html::a($this->createLink('task', 'view', "id=$childTask->id"), $childTask->name, '', "data-app='project'") . ''; $body .= '' . zget($users, $childTask->assignedTo, '') . ''; $body .= '' . zget($this->lang->task->statusList, $childTask->status, '') . ''; $body .= ''; From e8dc136b0ece007ec9ce4d5465d83f4dc886144c Mon Sep 17 00:00:00 2001 From: sunjun Date: Tue, 12 Jul 2022 08:14:48 +0000 Subject: [PATCH 22/67] sprint_60477 --- module/bug/control.php | 1 + module/projectrelease/view/view.html.php | 20 ++++++++++++++++---- module/release/view/view.html.php | 20 ++++++++++++++++---- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/module/bug/control.php b/module/bug/control.php index 594872a371..9dc2fb97dc 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -2027,6 +2027,7 @@ class bug extends control */ public function batchClose() { + if($this->post->unlinkBugs) $this->post->bugIDList = $this->post->unlinkBugs; if($this->post->bugIDList) { $bugIDList = $this->post->bugIDList; diff --git a/module/projectrelease/view/view.html.php b/module/projectrelease/view/view.html.php index e7fd0c2722..e478f68b13 100644 --- a/module/projectrelease/view/view.html.php +++ b/module/projectrelease/view/view.html.php @@ -150,9 +150,10 @@
id}, \"bug\")", ' ' . $lang->release->linkBug, '', "class='btn btn-primary'");?>
-
id");?>" id='linkedBugsForm' data-ride="table"> + + id}&type=bug&link=$link¶m=$param&orderBy=%s";?> @@ -178,7 +179,7 @@ createLink('bug', 'view', "bugID=$bug->id", '', true);?>
- +
@@ -208,10 +209,21 @@