diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cda7c32473..f191cd48c0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,10 @@ +stages: + - sonar + - unit_test + - cleanup_packages + - package sonarqube: + stage: sonar variables: SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task @@ -11,12 +17,21 @@ sonarqube: allow_failure: true only: - master # or the name of your main branch -packages: +package: + stage: package script: - make cizip allow_failure: true only: - master +unit_test: + stage: unit_test + script: + - "/home/gitlab-runner/bin/zentao-unittest.sh ${CI_PROJECT_DIR}" + allow_failure: true + only: + - master + - merge_requests #notify: # script: # - 'curl --location --request POST ''http://api.lf.oop.cc/api/v1/xuan/chatMessage'' --header ''Content-Type: application/json'' --data-raw ''{"gid": "84be4c6e-02e3-4fdc-b081-318c0c1eca02", "title": "开源包下载地址", "content": "点击查看详情链接", "url": "http://10.0.7.242:8080/allpacks/"}''' @@ -24,6 +39,7 @@ packages: # only: # - master cleanup_packages: + stage: cleanup_packages script: - make clean when: on_failure diff --git a/VERSION b/VERSION index 5f9cbaa8b2..c9333734bd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -17.4 +17.6 diff --git a/api/v1/entries/execution.php b/api/v1/entries/execution.php index cc9add74e9..3d66f624a0 100644 --- a/api/v1/entries/execution.php +++ b/api/v1/entries/execution.php @@ -20,9 +20,8 @@ class executionEntry extends Entry */ public function get($executionID) { - $fields = $this->param('fields'); - $productID = $this->param('productID'); - $status = $this->param('status', 'all'); + $fields = $this->param('fields'); + $status = $this->param('status', 'all'); $control = $this->loadController('execution', 'view'); $control->view($executionID); @@ -47,8 +46,8 @@ class executionEntry extends Entry foreach($executionProduct->plans as $planID) { $plan = new stdclass(); - $plan->id = $planID; - $plan->name = $data->data->planGroups->{$productID}->{$planID}; + $plan->id = trim($planID, ','); + $plan->name = $data->data->planGroups->{$productID}->{$plan->id}; $product->plans[] = $plan; } $execution->products[] = $product; diff --git a/api/v1/entries/executionbugs.php b/api/v1/entries/executionbugs.php index 5b7cf62535..0dfe4d13e6 100644 --- a/api/v1/entries/executionbugs.php +++ b/api/v1/entries/executionbugs.php @@ -24,7 +24,7 @@ class executionBugsEntry extends entry if(empty($executionID)) return $this->sendError(400, 'Need execution id.'); $control = $this->loadController('execution', 'bug'); - $control->bug($executionID, $this->param('product', 0), $this->param('order', 'status,id_desc'), $this->param('build', 0), $this->param('status', 'all'), 0, 0, $this->param('limit', 20), $this->param('page', 1)); + $control->bug($executionID, $this->param('product', 0), $this->param('branch', 0), $this->param('order', 'status,id_desc'), $this->param('build', 0), $this->param('status', 'all'), 0, 0, $this->param('limit', 20), $this->param('page', 1)); $data = $this->getData(); diff --git a/api/v1/entries/executioncases.php b/api/v1/entries/executioncases.php index 3b63e30e3a..ed4b1a3bab 100644 --- a/api/v1/entries/executioncases.php +++ b/api/v1/entries/executioncases.php @@ -24,7 +24,7 @@ class executionCasesEntry extends entry if(empty($executionID)) return $this->sendError(400, 'Need execution id.'); $control = $this->loadController('execution', 'testcase'); - $control->testcase($executionID, $this->param('status', 'all'), $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1)); + $control->testcase($executionID, $this->param('product', 0), $this->param('branch', 0), $this->param('status', 'all'), $this->param('module', 0), $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1)); $data = $this->getData(); diff --git a/api/v1/entries/executions.php b/api/v1/entries/executions.php index 9a00ae719b..a3275395c7 100644 --- a/api/v1/entries/executions.php +++ b/api/v1/entries/executions.php @@ -41,7 +41,7 @@ class executionsEntry extends entry else { $control = $this->loadController('execution', 'all'); - $control->all($this->param('status', 'all'), $this->param('project', $projectID), $this->param('order', 'id_desc'), 0, 0, $this->param('limit', 20), $this->param('page', 1)); + $control->all($this->param('status', 'all'), $this->param('order', 'id_desc'), 0, '', 0, $this->param('limit', 20), $this->param('page', 1)); $data = $this->getData(); if(!$data or !isset($data->status)) return $this->sendError(400, 'error'); diff --git a/api/v1/entries/product.php b/api/v1/entries/product.php index 518936c737..0dedc42047 100644 --- a/api/v1/entries/product.php +++ b/api/v1/entries/product.php @@ -120,7 +120,7 @@ class productEntry extends Entry if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message); $product = $this->product->getByID($productID); - $this->send(200, $this->format($product, 'createdDate:time')); + $this->send(200, $this->format($product, 'createdDate:time,whitelist:userList,createdBy:user,PO:user,RD:user,QD:user')); } /** diff --git a/api/v1/entries/program.php b/api/v1/entries/program.php index 22a9469687..e7394f9d45 100644 --- a/api/v1/entries/program.php +++ b/api/v1/entries/program.php @@ -60,7 +60,7 @@ class programEntry extends Entry public function delete($programID) { $control = $this->loadController('program', 'delete'); - $control->delete(0, $programID, 'true'); + $control->delete($programID, 'true'); $data = $this->getData(); if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message); diff --git a/api/v1/entries/projectbugs.php b/api/v1/entries/projectbugs.php index b5c6660c5c..4e03d77890 100644 --- a/api/v1/entries/projectbugs.php +++ b/api/v1/entries/projectbugs.php @@ -24,7 +24,7 @@ class projectBugsEntry extends entry if(empty($projectID)) return $this->sendError(400, 'Need project id.'); $control = $this->loadController('project', 'bug'); - $control->bug($projectID, $this->param('product', 0), $this->param('order', 'status,id_desc'), $this->param('build', 0), $this->param('status', 'all'), 0, 0, $this->param('limit', 20), $this->param('page', 1)); + $control->bug($projectID, $this->param('product', 0), $this->param('branch', 0), $this->param('order', 'status,id_desc'), $this->param('build', 0), $this->param('status', 'all'), 0, 0, $this->param('limit', 20), $this->param('page', 1)); $data = $this->getData(); diff --git a/api/v1/entries/tabs.php b/api/v1/entries/tabs.php index 9078299d8c..af0c938f46 100644 --- a/api/v1/entries/tabs.php +++ b/api/v1/entries/tabs.php @@ -29,7 +29,7 @@ class tabsEntry extends baseEntry foreach($tabs as $menuKey) { if(!isset($this->lang->my->$menuKey)) continue; - if(!common::hasPriv('my', $menuKey)) continue; + if(!common::hasPriv('my', 'work')) continue; $label = $this->lang->my->$menuKey; if($menuKey == 'calendar') $label = $this->lang->my->calendarAction; diff --git a/api/v1/entries/user.php b/api/v1/entries/user.php index 5be0be2c25..8940d9ee05 100644 --- a/api/v1/entries/user.php +++ b/api/v1/entries/user.php @@ -140,7 +140,8 @@ class userEntry extends Entry break; case 'execution': $info->execution = array('total' => 0, 'executions' => array()); - if(!common::hasPriv('my', 'execution')) break; + if(!common::hasPriv('my', 'work')) break; + $this->config->openMethods[] = 'my.execution'; $control = $this->loadController('my', 'execution'); $control->execution($this->param('type', 'undone'), $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 5), $this->param('page', 1)); @@ -193,6 +194,7 @@ class userEntry extends Entry case 'task': $info->task = array('total' => 0, 'tasks' => array()); if(!common::hasPriv('my', 'work')) break; + $this->config->openMethods[] = 'my.task'; $control = $this->loadController('my', 'task'); $control->task($this->param('type', 'assignedTo'), 0, $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 5), $this->param('page', 1)); @@ -208,6 +210,7 @@ class userEntry extends Entry case 'bug': $info->bug = array('total' => 0, 'bugs' => array()); if(!common::hasPriv('my', 'work')) break; + $this->config->openMethods[] = 'my.bug'; $control = $this->loadController('my', 'bug'); $control->bug($this->param('type', 'assignedTo'), 0, $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 5), $this->param('page', 1)); @@ -251,7 +254,7 @@ class userEntry extends Entry if(!common::hasPriv('my', 'todo')) break; $control = $this->loadController('my', 'todo'); - $control->todo($this->param('date', 'all'), '', 'all', 'date_desc', 0, 0, $this->param('limit', 5), 1); + $control->todo($this->param('date', 'before'), '', 'all', 'date_desc', 0, $this->param('limit', 5), 1); $data = $this->getData(); if($data->status == 'success') @@ -264,6 +267,7 @@ class userEntry extends Entry case 'story': $info->story = array('total' => 0, 'stories' => array()); if(!common::hasPriv('my', 'work')) break; + $this->config->openMethods[] = 'my.story'; $control = $this->loadController('my', 'story'); $control->story($this->param('type', 'assignedTo'), 0, $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 5), $this->param('page', 1)); @@ -289,6 +293,7 @@ class userEntry extends Entry if($this->config->edition == 'max') { + $this->config->openMethods[] = 'my.issue'; $control = $this->loadController('my', 'issue'); $control->issue('createdBy', 0, 'id_desc', 0, $this->param('limit', 5), 1); $data = $this->getData(); @@ -306,8 +311,9 @@ class userEntry extends Entry if($this->config->edition == 'max') { + $this->config->openMethods[] = 'my.risk'; $control = $this->loadController('my', 'risk'); - $control->risk('createdBy', 0, 'id_desc', 0, $this->param('limit', 5), 1); + $control->risk('assignedTo', 0, 'id_desc', 0, $this->param('limit', 5), 1); $data = $this->getData(); if($data->status == 'success') @@ -323,8 +329,9 @@ class userEntry extends Entry if($this->config->edition == 'max') { + $this->config->openMethods[] = 'my.myMeeting'; $control = $this->loadController('my', 'myMeeting'); - $control->myMeeting('all', '', 'id_desc', 0, $this->param('limit', 5), 1); + $control->myMeeting('futureMeeting', '', 'id_desc', 0, $this->param('limit', 5), 1); $data = $this->getData(); if($data->status == 'success') @@ -375,14 +382,21 @@ class userEntry extends Entry $oldUser = $this->loadModel('user')->getByID($userID, 'id'); /* Set $_POST variables. */ - $fields = 'dept,realname,email,commiter,gender,role,mobile,phone,visions,groups'; + $fields = 'dept,realname,role,join,type,visions,mobile,phone,qq,dingding,weixin,skype,whatsapp,slack,address,address,email,commiter,gender,groups,passwordStrength,locked,fails,birthday'; $this->batchSetPost($fields, $oldUser); $this->setPost('account', $oldUser->account); - if($this->request('gender') and !in_array($this->request('gender'), array('f', 'm'))) return $this->sendError(400, "The value of gendar must be 'f' or 'm'"); + $userGroups = $this->dao->select('`group`')->from(TABLE_USERGROUP)->where('account')->eq($oldUser->account)->fetchPairs('group', 'group'); + $this->setPost('groups', $this->request('groups', zget($_POST, 'groups', array_values($userGroups)))); - $this->setPost('password1', $this->request('password', '')); - $this->setPost('password2', $this->request('password', '')); + $gender = $this->request('gender', zget($_POST, 'gender', 'f')); + if(!in_array($gender, array('f', 'm'))) return $this->sendError(400, "The value of gender must be 'f' or 'm'"); + if($this->request('gender') and !in_array($this->request('gender'), array('f', 'm'))) return $this->sendError(400, "The value of gendar must be 'f' or 'm'"); + $this->setPost('gender', $gender); + + $password = $this->request('password', zget($_POST, 'password', '')); + $this->setPost('password1', md5($password)); + $this->setPost('password2', md5($password)); $this->setPost('verifyPassword', md5($this->app->user->password . $this->app->session->rand)); $control = $this->loadController('user', 'edit'); diff --git a/api/v1/entries/users.php b/api/v1/entries/users.php index 9696cb0211..b344dcba48 100644 --- a/api/v1/entries/users.php +++ b/api/v1/entries/users.php @@ -55,21 +55,23 @@ class usersEntry extends entry */ public function post() { - $fields = 'account,dept,realname,email,commiter,gender'; + $fields = 'type,dept,account,password,visions,realname,join,role,email,commiter,gender,group,passwordStrength'; $this->batchSetPost($fields); - if(!in_array($this->request('gendar', 'f'), array('f', 'm'))) return $this->sendError(400, "The value of gendar must be 'f' or 'm'"); + if(!in_array($this->request('gendar', zget($_POST, 'gendar', 'f')), array('f', 'm'))) return $this->sendError(400, "The value of gendar must be 'f' or 'm'"); - $password = $this->request('password', '') ? md5($this->request('password')) : ''; + $password = $this->request('password', zget($_POST, 'password', '')) ? md5($this->request('password', zget($_POST, 'password', ''))) : ''; $visions = $this->request('visions', array('rnd')); if(!is_array($visions)) $visions = explode(',', $visions); + if($this->request('group')) $this->setPost('group', explode(',', $this->request('group'))); $this->setPost('password1', $password); $this->setPost('password2', $password); $this->setPost('passwordStrength', 3); $this->setPost('visions', $visions); $this->setPost('verifyPassword', md5($this->app->user->password . $this->app->session->rand)); + unset($_POST['password']); $control = $this->loadController('user', 'create'); $this->requireFields('account,password1,realname'); diff --git a/bin/ztcli b/bin/ztcli index 38252d263b..b6352cf9e9 100755 --- a/bin/ztcli +++ b/bin/ztcli @@ -50,7 +50,7 @@ if($config->requestType == 'PATH_INFO') { $_SERVER['PATH_INFO'] = $path['basename']; } - else + else { /* url like http://pms.zentao.net/zentao/my/, PATH_INFO is 'my'. */ if(is_dir('./module/' . $path['basename'])) diff --git a/composer.json b/composer.json deleted file mode 100644 index 797156678b..0000000000 --- a/composer.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "easysoft/zentaopms", - "description": "Zentao is an agile(scrum) project management system/tool, Free Upgrade Forever!​", - "type": "project", - "license": "ZPL", - "require": { - "php": "~5.2||~7.0", - "ext-json" : "*", - "ext-mbstring" : "*", - "ext-curl" : "*" - } -} diff --git a/config/config.php b/config/config.php index ae288b21ab..e8d0dbd010 100644 --- a/config/config.php +++ b/config/config.php @@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}} if(!function_exists('getWebRoot')){function getWebRoot(){}} /* 基本设置。Basic settings. */ -$config->version = '17.4'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. +$config->version = '17.6'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. $config->liteVersion = '1.2'; // 迅捷版版本。 The version of Lite. $config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP. $config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time. diff --git a/config/filter.php b/config/filter.php index 95c366a47d..16374266ab 100755 --- a/config/filter.php +++ b/config/filter.php @@ -29,6 +29,7 @@ $filter->default->cookie['fingerprint'] = 'reg::word'; $filter->default->cookie['hideMenu'] = 'equal::true'; $filter->default->cookie['tab'] = 'reg::word'; $filter->default->cookie['goback'] = 'reg::any'; +$filter->default->cookie['maxImport'] = 'reg::any'; $filter->index = new stdclass(); $filter->my = new stdclass(); diff --git a/config/zentaopms.php b/config/zentaopms.php index df143621ce..a10d6a941c 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -222,6 +222,8 @@ $config->openMethods[] = 'kanban.deleteobjectcard'; $config->openMethods[] = 'admin.ignore'; $config->openMethods[] = 'personnel.unbindwhitelist'; $config->openMethods[] = 'tree.viewhistory'; +$config->openMethods[] = 'doc.createbasicinfo'; +$config->openMethods[] = 'project.createguide'; /* Define the tables. */ define('TABLE_COMPANY', '`' . $config->db->prefix . 'company`'); @@ -331,6 +333,10 @@ if(!defined('TABLE_PROJECTSPEC')) define('TABLE_PROJECTSPEC', '`' . $config->db- if(!defined('TABLE_SEARCHINDEX')) define('TABLE_SEARCHINDEX', $config->db->prefix . 'searchindex'); if(!defined('TABLE_SEARCHDICT')) define('TABLE_SEARCHDICT', $config->db->prefix . 'searchdict'); +define('TABLE_CHART', '`' . $config->db->prefix . 'chart`'); +define('TABLE_DASHBOARD', '`' . $config->db->prefix . 'dashboard`'); +define('TABLE_DATASET', '`' . $config->db->prefix . 'dataset`'); + $config->objectTables['product'] = TABLE_PRODUCT; $config->objectTables['productplan'] = TABLE_PRODUCTPLAN; $config->objectTables['story'] = TABLE_STORY; @@ -392,3 +398,6 @@ $config->programPriv->waterfall = array_merge($config->programPriv->scrum, array $config->waterfallModules = array('workestimation', 'durationestimation', 'budget', 'programplan', 'review', 'reviewissue', 'weekly', 'cm', 'milestone', 'design', 'opportunity', 'auditplan', 'trainplan', 'gapanalysis', 'pssp', 'researchplan', 'researchreport'); $config->showMainMenu = true; +$config->maxPriValue = '256'; + +$config->importWhiteList = array('user', 'task', 'story', 'bug', 'testcase', 'feedback'); \ No newline at end of file diff --git a/db/demo.sql b/db/demo.sql index d2d0550d63..2277a6a1d4 100644 --- a/db/demo.sql +++ b/db/demo.sql @@ -15,7 +15,7 @@ INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, ` (11, 'story', 1, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:09:49', '', '', '0'), (12, 'story', 2, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:16:37', '', '', '0'), (13, 'story', 3, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:18:10', '', '', '0'), -(14, 'story', 3, ',1,', 0, 0, 'productManager', 'changed', '2012-06-05 10:19:06', '', '', '0'), +(14, 'story', 3, ',1,', 0, 0, 'productManager', 'changing', '2012-06-05 10:19:06', '', '', '0'), (15, 'story', 4, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:20:16', '', '', '0'), (16, 'story', 5, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:21:39', '', '', '0'), (17, 'story', 6, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:23:11', '', '', '0'), @@ -589,9 +589,9 @@ INSERT INTO `zt_story` (`id`, `parent`, `product`, `branch`, `module`, `plan`, ` (2, 0, 1, 0, 2, '1', 'po', '', 0, '新闻中心的设计和开发。', '', 'story', 1, 1, 'active', '', '', 'projected', '', '', 'productManager', '2012-06-05 10:16:37', 'productManager', '2012-06-05 10:16:37', 'productManager', '2012-06-05 10:25:33', 'productManager, ', '2012-06-05 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), (3, 0, 1, 0, 3, '1', 'po', '', 0, '成果展示的设计和开发', '', 'story', 1, 0, 'active', '', '', 'developing', '', '', 'productManager', '2012-06-05 10:18:10', 'productManager', '2012-06-05 10:18:10', 'productManager', '2012-06-05 10:25:38', 'productManager, ', '2012-06-05 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 2, '0', '0'), (4, 0, 1, 0, 4, '1', 'po', '', 0, '售后服务的设计和开发', '', 'story', 1, 1, 'active', '', '', 'developed', '', '', 'productManager', '2012-06-05 10:20:16', 'productManager', '2012-06-05 10:20:16', 'productManager', '2012-06-05 10:25:42', 'productManager, ', '2012-06-05 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), -(5, 0, 1, 0, 5, '1', 'po', '', 0, '诚聘英才的设计和开发', '', 'story', 1, 1, 'draft', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:21:39', 'productManager', '2012-06-05 10:21:39', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), -(6, 0, 1, 0, 6, '1', 'po', '', 0, '合作洽谈的设计和开发', '', 'story', 1, 1, 'draft', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:23:11', 'productManager', '2012-06-05 10:23:11', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), -(7, 0, 1, 0, 7, '1', 'po', '', 0, '关于我们的设计和开发', '', 'story', 1, 1, 'draft', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:24:19', 'productManager', '2012-06-05 10:24:19', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'); +(5, 0, 1, 0, 5, '1', 'po', '', 0, '诚聘英才的设计和开发', '', 'story', 1, 1, 'reviewing', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:21:39', 'productManager', '2012-06-05 10:21:39', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), +(6, 0, 1, 0, 6, '1', 'po', '', 0, '合作洽谈的设计和开发', '', 'story', 1, 1, 'reviewing', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:23:11', 'productManager', '2012-06-05 10:23:11', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), +(7, 0, 1, 0, 7, '1', 'po', '', 0, '关于我们的设计和开发', '', 'story', 1, 1, 'reviewing', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:24:19', 'productManager', '2012-06-05 10:24:19', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'); INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES (1, 1, '首页设计和开发', '作为一名本公司的用户,我希望可以在首页看到该公司网站的基本内容,例如最新动态、部分成果展示、联系信息、工商信息等。
', '开发并通过验收
'), (2, 1, '新闻中心的设计和开发。', '作为一名本公司的用户,我希望可以在新闻中心看到该公司网站的企业新闻,这样可以通过新闻了解企业的最新动态。
', ''), diff --git a/db/endemo.sql b/db/endemo.sql index d2d0550d63..2277a6a1d4 100644 --- a/db/endemo.sql +++ b/db/endemo.sql @@ -15,7 +15,7 @@ INSERT INTO `zt_action` (`id`, `objectType`, `objectID`, `product`, `project`, ` (11, 'story', 1, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:09:49', '', '', '0'), (12, 'story', 2, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:16:37', '', '', '0'), (13, 'story', 3, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:18:10', '', '', '0'), -(14, 'story', 3, ',1,', 0, 0, 'productManager', 'changed', '2012-06-05 10:19:06', '', '', '0'), +(14, 'story', 3, ',1,', 0, 0, 'productManager', 'changing', '2012-06-05 10:19:06', '', '', '0'), (15, 'story', 4, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:20:16', '', '', '0'), (16, 'story', 5, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:21:39', '', '', '0'), (17, 'story', 6, ',1,', 0, 0, 'productManager', 'opened', '2012-06-05 10:23:11', '', '', '0'), @@ -589,9 +589,9 @@ INSERT INTO `zt_story` (`id`, `parent`, `product`, `branch`, `module`, `plan`, ` (2, 0, 1, 0, 2, '1', 'po', '', 0, '新闻中心的设计和开发。', '', 'story', 1, 1, 'active', '', '', 'projected', '', '', 'productManager', '2012-06-05 10:16:37', 'productManager', '2012-06-05 10:16:37', 'productManager', '2012-06-05 10:25:33', 'productManager, ', '2012-06-05 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), (3, 0, 1, 0, 3, '1', 'po', '', 0, '成果展示的设计和开发', '', 'story', 1, 0, 'active', '', '', 'developing', '', '', 'productManager', '2012-06-05 10:18:10', 'productManager', '2012-06-05 10:18:10', 'productManager', '2012-06-05 10:25:38', 'productManager, ', '2012-06-05 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 2, '0', '0'), (4, 0, 1, 0, 4, '1', 'po', '', 0, '售后服务的设计和开发', '', 'story', 1, 1, 'active', '', '', 'developed', '', '', 'productManager', '2012-06-05 10:20:16', 'productManager', '2012-06-05 10:20:16', 'productManager', '2012-06-05 10:25:42', 'productManager, ', '2012-06-05 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), -(5, 0, 1, 0, 5, '1', 'po', '', 0, '诚聘英才的设计和开发', '', 'story', 1, 1, 'draft', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:21:39', 'productManager', '2012-06-05 10:21:39', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), -(6, 0, 1, 0, 6, '1', 'po', '', 0, '合作洽谈的设计和开发', '', 'story', 1, 1, 'draft', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:23:11', 'productManager', '2012-06-05 10:23:11', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), -(7, 0, 1, 0, 7, '1', 'po', '', 0, '关于我们的设计和开发', '', 'story', 1, 1, 'draft', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:24:19', 'productManager', '2012-06-05 10:24:19', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'); +(5, 0, 1, 0, 5, '1', 'po', '', 0, '诚聘英才的设计和开发', '', 'story', 1, 1, 'reviewing', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:21:39', 'productManager', '2012-06-05 10:21:39', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), +(6, 0, 1, 0, 6, '1', 'po', '', 0, '合作洽谈的设计和开发', '', 'story', 1, 1, 'reviewing', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:23:11', 'productManager', '2012-06-05 10:23:11', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'), +(7, 0, 1, 0, 7, '1', 'po', '', 0, '关于我们的设计和开发', '', 'story', 1, 1, 'reviewing', '', '', 'planned', '', '', 'productManager', '2012-06-05 10:24:19', 'productManager', '2012-06-05 10:24:19', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', '0000-00-00 00:00:00', '', 0, '', '', 0, 1, '0', '0'); INSERT INTO `zt_storyspec` (`story`, `version`, `title`, `spec`, `verify`) VALUES (1, 1, '首页设计和开发', '作为一名本公司的用户,我希望可以在首页看到该公司网站的基本内容,例如最新动态、部分成果展示、联系信息、工商信息等。
', '开发并通过验收
'), (2, 1, '新闻中心的设计和开发。', '作为一名本公司的用户,我希望可以在新闻中心看到该公司网站的企业新闻,这样可以通过新闻了解企业的最新动态。
', ''), diff --git a/db/standard/zentao17.5.sql b/db/standard/zentao17.5.sql new file mode 100644 index 0000000000..0b25e0fd50 --- /dev/null +++ b/db/standard/zentao17.5.sql @@ -0,0 +1,3982 @@ +CREATE TABLE `zt_account` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `provider` varchar(255) NOT NULL, + `adminURI` varchar(255) NOT NULL, + `account` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(255) NOT NULL, + `mobile` varchar(255) NOT NULL, + `extra` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `status` varchar(30) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `name` (`name`), + KEY `provider` (`provider`), + KEY `status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_acl` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(9) NOT NULL DEFAULT '0', + `type` char(40) NOT NULL DEFAULT 'whitelist', + `source` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_action` ( + `id` int(9) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(30) NOT NULL DEFAULT '', + `objectID` mediumint(8) unsigned NOT NULL DEFAULT '0', + `product` text NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `actor` varchar(100) NOT NULL DEFAULT '', + `action` varchar(80) NOT NULL DEFAULT '', + `date` datetime NOT NULL, + `comment` text NOT NULL, + `extra` text, + `read` enum('0','1') NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `efforted` tinyint(1) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `date` (`date`), + KEY `actor` (`actor`), + KEY `project` (`project`), + KEY `action` (`action`), + KEY `objectID` (`objectID`) +) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_activity` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `process` mediumint(9) NOT NULL, + `name` varchar(255) NOT NULL, + `optional` varchar(255) NOT NULL, + `tailorNorm` varchar(255) NOT NULL, + `content` mediumtext NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `order` mediumint(8) DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_api` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `product` varchar(255) NOT NULL DEFAULT '', + `lib` int(10) unsigned NOT NULL DEFAULT '0', + `module` int(10) unsigned NOT NULL DEFAULT '0', + `title` varchar(100) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `protocol` varchar(10) NOT NULL DEFAULT '', + `method` varchar(10) NOT NULL DEFAULT '', + `requestType` varchar(100) NOT NULL DEFAULT '', + `responseType` varchar(100) NOT NULL DEFAULT '', + `status` varchar(20) NOT NULL DEFAULT '', + `owner` varchar(30) NOT NULL DEFAULT '0', + `desc` mediumtext NULL, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `params` text, + `paramsExample` text, + `responseExample` text, + `response` text, + `commonParams` text, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL DEFAULT '0', + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_api_lib_release` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lib` int(10) unsigned NOT NULL DEFAULT '0', + `desc` varchar(255) NOT NULL DEFAULT '', + `version` varchar(255) NOT NULL DEFAULT '', + `snap` mediumtext NOT NULL, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_apispec` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `doc` int(10) unsigned NOT NULL DEFAULT '0', + `module` int(10) unsigned NOT NULL DEFAULT '0', + `title` varchar(100) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `protocol` varchar(10) NOT NULL DEFAULT '', + `method` varchar(10) NOT NULL DEFAULT '', + `requestType` varchar(100) NOT NULL DEFAULT '', + `responseType` varchar(100) NOT NULL DEFAULT '', + `status` varchar(20) NOT NULL DEFAULT '', + `owner` varchar(255) NOT NULL DEFAULT '0', + `desc` mediumtext NULL, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `params` text, + `paramsExample` text, + `responseExample` text, + `response` text, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=176 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_apistruct` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `lib` int(10) unsigned NOT NULL DEFAULT '0', + `name` varchar(30) NOT NULL DEFAULT '', + `type` varchar(50) NOT NULL DEFAULT '', + `desc` mediumtext NOT NULL DEFAULT '', + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `attribute` text, + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL DEFAULT '0', + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_apistruct_spec` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `type` varchar(50) NOT NULL DEFAULT '', + `desc` varchar(255) NOT NULL DEFAULT '', + `attribute` text, + `version` smallint(5) unsigned NOT NULL DEFAULT '0', + `addedBy` varchar(30) NOT NULL DEFAULT '0', + `addedDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approval` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `flow` mediumint(8) NOT NULL, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `nodes` mediumtext NOT NULL, + `version` mediumint(9) NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'doing', + `result` varchar(20) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalflow` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `code` varchar(100) NOT NULL, + `desc` mediumtext NOT NULL, + `version` mediumint(8) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `type` varchar(30) NOT NULL, + `deleted` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalflowobject` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `root` int(8) NOT NULL, + `flow` int(8) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `extra` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalflowspec` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `flow` mediumint(8) NOT NULL, + `version` mediumint(8) NOT NULL, + `nodes` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalnode` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `approval` mediumint(8) NOT NULL, + `type` enum('review','cc') NOT NULL, + `title` varchar(255) NOT NULL, + `account` char(30) NOT NULL, + `node` varchar(100) NOT NULL, + `reviewType` varchar(100) NOT NULL DEFAULT 'manual', + `multipleType` enum('and','or') NOT NULL DEFAULT 'and', + `prev` mediumtext NOT NULL, + `next` mediumtext NOT NULL, + `status` varchar(20) NOT NULL DEFAULT 'wait', + `result` varchar(10) NOT NULL, + `date` date NOT NULL, + `opinion` mediumtext NOT NULL, + `extra` mediumtext NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `idx_reviewed_date` (`reviewedDate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalobject` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `approval` int(8) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` mediumint(8) NOT NULL, + `extra` varchar(255) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_approvalrole` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `code` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` text NOT NULL, + `users` longtext NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_asset` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL, + `type` varchar(30) NOT NULL, + `group` varchar(128) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_assetlib` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_attend` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `date` date NOT NULL, + `signIn` time NOT NULL, + `signOut` time NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `ip` varchar(15) NOT NULL, + `device` varchar(30) NOT NULL, + `client` varchar(20) NOT NULL, + `manualIn` time NOT NULL, + `manualOut` time NOT NULL, + `reason` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `reviewStatus` varchar(30) NOT NULL DEFAULT '', + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `attend` (`date`,`account`), + KEY `account` (`account`), + KEY `date` (`date`), + KEY `status` (`status`), + KEY `reason` (`reason`), + KEY `reviewStatus` (`reviewStatus`), + KEY `reviewedBy` (`reviewedBy`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_attendstat` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `month` char(10) NOT NULL DEFAULT '', + `normal` decimal(12,2) NOT NULL DEFAULT '0.00', + `late` decimal(12,2) NOT NULL DEFAULT '0.00', + `early` decimal(12,2) NOT NULL DEFAULT '0.00', + `absent` decimal(12,2) NOT NULL DEFAULT '0.00', + `trip` decimal(12,2) NOT NULL DEFAULT '0.00', + `egress` decimal(12,2) NOT NULL DEFAULT '0.00', + `lieu` decimal(12,2) NOT NULL DEFAULT '0.00', + `paidLeave` decimal(12,2) NOT NULL DEFAULT '0.00', + `unpaidLeave` decimal(12,2) NOT NULL DEFAULT '0.00', + `timeOvertime` decimal(12,2) NOT NULL DEFAULT '0.00', + `restOvertime` decimal(12,2) NOT NULL DEFAULT '0.00', + `holidayOvertime` decimal(12,2) NOT NULL DEFAULT '0.00', + `deserve` decimal(12,2) NOT NULL DEFAULT '0.00', + `actual` decimal(12,2) NOT NULL DEFAULT '0.00', + `status` char(30) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `attend` (`month`,`account`), + KEY `account` (`account`), + KEY `month` (`month`), + KEY `status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_auditcl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `model` char(30) NOT NULL DEFAULT 'waterfall', + `practiceArea` char(30) NOT NULL, + `type` char(30) NOT NULL, + `title` varchar(255) NOT NULL, + `objectType` char(30) NOT NULL, + `objectID` int(10) DEFAULT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_auditplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `dateType` char(30) DEFAULT NULL, + `config` text, + `objectID` mediumint(9) NOT NULL, + `objectType` char(30) NOT NULL, + `process` mediumint(9) NOT NULL, + `processType` char(30) NOT NULL, + `checkDate` date NOT NULL, + `checkedBy` varchar(30) NOT NULL, + `realCheckDate` date NOT NULL, + `result` char(30) NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `checkBy` varchar(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_auditresult` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `auditplan` mediumint(8) NOT NULL, + `listID` mediumint(8) NOT NULL, + `result` char(30) NOT NULL, + `checkedBy` varchar(30) NOT NULL, + `checkedDate` date NOT NULL, + `comment` text NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_baseimage` ( + `id` smallint(7) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `path` varchar(255) NOT NULL DEFAULT '', + `osType` varchar(50) NOT NULL DEFAULT '', + `os` varchar(50) NOT NULL DEFAULT '', + `osCategory` varchar(50) NOT NULL DEFAULT '', + `osArch` varchar(50) NOT NULL DEFAULT '', + `osLang` varchar(50) NOT NULL DEFAULT '', + `suggestCore` tinyint(1) unsigned NOT NULL DEFAULT '0', + `suggestMemory` mediumint(6) unsigned NOT NULL DEFAULT '0', + `suggestVolume` mediumint(6) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_baseimagebrowser` ( + `vmBackingID` int(10) NOT NULL, + `browserID` int(10) NOT NULL, + PRIMARY KEY (`vmBackingID`,`browserID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_basicmeas` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `purpose` varchar(50) NOT NULL, + `scope` char(30) NOT NULL, + `object` char(30) NOT NULL, + `name` varchar(90) NOT NULL, + `code` char(30) NOT NULL, + `unit` varchar(10) NOT NULL, + `configure` text, + `params` text, + `definition` text, + `source` varchar(255) DEFAULT NULL, + `collectType` varchar(30) NOT NULL, + `collectConf` text NOT NULL, + `execTime` varchar(30) NOT NULL, + `collectedBy` varchar(10) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `order` mediumint(8) unsigned NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_block` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `module` varchar(20) NOT NULL, + `type` char(30) NOT NULL, + `title` varchar(100) NOT NULL, + `source` varchar(20) NOT NULL, + `block` varchar(20) NOT NULL, + `params` text NOT NULL, + `order` tinyint(3) unsigned NOT NULL DEFAULT '0', + `grid` tinyint(3) unsigned NOT NULL DEFAULT '0', + `height` smallint(5) unsigned NOT NULL DEFAULT '0', + `hidden` tinyint(1) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_vision_module_type_order` (`account`,`vision`,`module`,`type`,`order`), + KEY `account` (`account`) +) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_branch` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `default` enum('0','1') NOT NULL DEFAULT '0', + `status` enum('active','closed') NOT NULL DEFAULT 'active', + `desc` varchar(255) NOT NULL, + `createdDate` date NOT NULL, + `closedDate` date NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_browser` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `type` varchar(255) NOT NULL DEFAULT '', + `version` varchar(255) NOT NULL DEFAULT '', + `lang` varchar(255) NOT NULL DEFAULT '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_budget` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `stage` char(30) NOT NULL, + `subject` mediumint(8) NOT NULL, + `amount` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_bug` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `injection` mediumint(8) unsigned NOT NULL, + `identify` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `plan` mediumint(8) unsigned NOT NULL DEFAULT '0', + `story` mediumint(8) unsigned NOT NULL DEFAULT '0', + `storyVersion` smallint(6) NOT NULL DEFAULT '1', + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `toTask` mediumint(8) unsigned NOT NULL DEFAULT '0', + `toStory` mediumint(8) NOT NULL DEFAULT '0', + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `severity` tinyint(4) NOT NULL DEFAULT '0', + `pri` tinyint(3) unsigned NOT NULL, + `type` varchar(30) NOT NULL DEFAULT '', + `os` varchar(30) NOT NULL DEFAULT '', + `browser` varchar(30) NOT NULL DEFAULT '', + `hardware` varchar(30) NOT NULL, + `found` varchar(30) NOT NULL DEFAULT '', + `steps` mediumtext NOT NULL, + `status` enum('active','resolved','closed') NOT NULL DEFAULT 'active', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `confirmed` tinyint(1) NOT NULL DEFAULT '0', + `activatedCount` smallint(6) NOT NULL, + `activatedDate` datetime NOT NULL, + `feedbackBy` varchar(100) NOT NULL, + `notifyEmail` varchar(100) NOT NULL, + `mailto` text, + `openedBy` varchar(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `openedBuild` varchar(255) NOT NULL, + `assignedTo` varchar(30) NOT NULL DEFAULT '', + `assignedDate` datetime NOT NULL, + `deadline` date NOT NULL, + `resolvedBy` varchar(30) NOT NULL DEFAULT '', + `resolution` varchar(30) NOT NULL DEFAULT '', + `resolvedBuild` varchar(30) NOT NULL DEFAULT '', + `resolvedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `duplicateBug` mediumint(8) unsigned NOT NULL, + `linkBug` varchar(255) NOT NULL, + `case` mediumint(8) unsigned NOT NULL, + `caseVersion` smallint(6) NOT NULL DEFAULT '1', + `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0', + `result` mediumint(8) unsigned NOT NULL, + `repo` mediumint(8) unsigned NOT NULL, + `mr` mediumint(8) unsigned NOT NULL, + `entry` text NOT NULL, + `lines` varchar(10) NOT NULL, + `v1` varchar(40) NOT NULL, + `v2` varchar(40) NOT NULL, + `repoType` varchar(30) NOT NULL DEFAULT '', + `issueKey` varchar(50) NOT NULL DEFAULT '', + `testtask` mediumint(8) unsigned NOT NULL, + `lastEditedBy` varchar(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`), + KEY `status` (`status`), + KEY `plan` (`plan`), + KEY `story` (`story`), + KEY `case` (`case`), + KEY `toStory` (`toStory`), + KEY `result` (`result`), + KEY `assignedTo` (`assignedTo`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_build` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` char(150) NOT NULL, + `scmPath` char(255) NOT NULL, + `filePath` char(255) NOT NULL, + `date` date NOT NULL, + `stories` text NOT NULL, + `bugs` text NOT NULL, + `builder` char(30) NOT NULL DEFAULT '', + `desc` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_burn` ( + `execution` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `date` date NOT NULL, + `estimate` float NOT NULL, + `left` float NOT NULL, + `consumed` float NOT NULL, + `storyPoint` float NOT NULL, + PRIMARY KEY (`execution`,`date`,`task`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_case` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `execution` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` mediumint(8) unsigned NOT NULL DEFAULT '0', + `story` mediumint(30) unsigned NOT NULL DEFAULT '0', + `storyVersion` smallint(6) NOT NULL DEFAULT '1', + `title` varchar(255) NOT NULL, + `precondition` text NOT NULL, + `keywords` varchar(255) NOT NULL, + `pri` tinyint(3) unsigned NOT NULL DEFAULT '3', + `type` char(30) NOT NULL DEFAULT '1', + `auto` varchar(10) NOT NULL DEFAULT 'no', + `frame` varchar(10) NOT NULL, + `stage` varchar(255) NOT NULL, + `howRun` varchar(30) NOT NULL, + `scriptedBy` varchar(30) NOT NULL, + `scriptedDate` date NOT NULL, + `scriptStatus` varchar(30) NOT NULL, + `scriptLocation` varchar(255) NOT NULL, + `status` char(30) NOT NULL DEFAULT '1', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `frequency` enum('1','2','3') NOT NULL DEFAULT '1', + `order` tinyint(30) unsigned NOT NULL DEFAULT '0', + `openedBy` char(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `reviewedDate` date NOT NULL, + `lastEditedBy` char(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `version` tinyint(3) unsigned NOT NULL DEFAULT '0', + `linkCase` varchar(255) NOT NULL, + `fromBug` mediumint(8) unsigned NOT NULL, + `fromCaseID` mediumint(8) unsigned NOT NULL, + `fromCaseVersion` mediumint(8) unsigned NOT NULL DEFAULT '1', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `lastRunner` varchar(30) NOT NULL, + `lastRunDate` datetime NOT NULL, + `lastRunResult` char(30) NOT NULL, + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `story` (`story`), + KEY `fromBug` (`fromBug`), + KEY `module` (`module`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_casestep` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `case` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(3) unsigned NOT NULL DEFAULT '0', + `type` varchar(10) NOT NULL DEFAULT 'step', + `desc` text NOT NULL, + `expect` text NOT NULL, + PRIMARY KEY (`id`), + KEY `case` (`case`), + KEY `version` (`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_cfd` ( + `id` int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, + `execution` int(8) NOT NULL, + `type` char(30) NOT NULL, + `name` char(30) NOT NULL, + `count` smallint NOT NULL, + `date` date NOT NULL, + UNIQUE KEY `execution_type_name_date` (`execution`,`type`,`name`,`date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_cmcl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `title` int(11) NOT NULL, + `contents` text NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `order` int(11) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_company` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` char(120) DEFAULT NULL, + `phone` char(20) DEFAULT NULL, + `fax` char(20) DEFAULT NULL, + `address` char(120) DEFAULT NULL, + `zipcode` char(10) DEFAULT NULL, + `website` char(120) DEFAULT NULL, + `backyard` char(120) DEFAULT NULL, + `guest` enum('1','0') NOT NULL DEFAULT '0', + `admins` char(255) DEFAULT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_compile` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `job` mediumint(8) unsigned NOT NULL, + `queue` mediumint(8) NOT NULL, + `status` varchar(255) NOT NULL, + `logs` text, + `atTime` varchar(10) NOT NULL, + `testtask` mediumint(8) unsigned NOT NULL, + `tag` varchar(255) NOT NULL, + `times` tinyint(3) unsigned NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `updateDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_config` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `owner` char(30) NOT NULL DEFAULT '', + `module` varchar(30) NOT NULL, + `section` char(30) NOT NULL DEFAULT '', + `key` char(30) NOT NULL DEFAULT '', + `value` longtext NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`vision`,`owner`,`module`,`section`,`key`) +) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_cron` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `m` varchar(20) NOT NULL, + `h` varchar(20) NOT NULL, + `dom` varchar(20) NOT NULL, + `mon` varchar(20) NOT NULL, + `dow` varchar(20) NOT NULL, + `command` text NOT NULL, + `remark` varchar(255) NOT NULL, + `type` varchar(20) NOT NULL, + `buildin` tinyint(1) NOT NULL DEFAULT '0', + `status` varchar(20) NOT NULL, + `lastTime` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `lastTime` (`lastTime`) +) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deploy` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `name` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `status` varchar(20) NOT NULL, + `owner` char(30) NOT NULL, + `members` text NOT NULL, + `notify` text NOT NULL, + `cases` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `result` varchar(20) NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_chart` ( + `id` mediumint NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `dataset` varchar(30) NOT NULL, + `desc` mediumtext NOT NULL, + `settings` mediumtext NOT NULL, + `filters` mediumtext NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dashboard` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `module` mediumint NOT NULL, + `desc` mediumtext NOT NULL, + `layout` mediumtext NOT NULL, + `filters` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dataset` ( + `id` mediumint unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(155) NOT NULL, + `sql` text NOT NULL, + `fields` mediumtext NOT NULL, + `objects` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deployproduct` ( + `deploy` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `release` mediumint(8) unsigned NOT NULL, + `package` varchar(255) NOT NULL, + UNIQUE KEY `deploy_product_release` (`deploy`,`product`,`release`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deployscope` ( + `deploy` mediumint(8) unsigned NOT NULL, + `service` mediumint(8) unsigned NOT NULL, + `hosts` text NOT NULL, + `remove` text NOT NULL, + `add` text NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_deploystep` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `deploy` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `stage` varchar(30) NOT NULL, + `content` text NOT NULL, + `status` varchar(30) NOT NULL, + `assignedTo` char(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `finishedBy` char(30) NOT NULL, + `finishedDate` datetime NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dept` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` char(60) NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) unsigned NOT NULL DEFAULT '0', + `order` smallint(4) unsigned NOT NULL DEFAULT '0', + `position` char(30) NOT NULL DEFAULT '', + `function` char(255) NOT NULL DEFAULT '', + `manager` char(30) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `parent` (`parent`), + KEY `path` (`path`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_design` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` varchar(255) NOT NULL, + `product` varchar(255) NOT NULL, + `commit` text NOT NULL, + `commitedBy` varchar(30) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `story` char(30) NOT NULL, + `desc` mediumtext NOT NULL, + `version` smallint(6) NOT NULL, + `type` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_designspec` ( + `design` mediumint(8) NOT NULL, + `version` smallint(6) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `files` varchar(255) NOT NULL, + UNIQUE KEY `design` (`design`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_doc` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `lib` varchar(30) NOT NULL, + `template` varchar(30) NOT NULL, + `templateType` varchar(30) NOT NULL, + `chapterType` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL, + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `parent` smallint(5) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) unsigned NOT NULL DEFAULT '0', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `views` smallint(5) unsigned NOT NULL, + `assetLib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `assetLibType` varchar(30) NOT NULL DEFAULT '', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromVersion` smallint(6) NOT NULL DEFAULT '1', + `draft` longtext NOT NULL, + `collector` text NOT NULL, + `addedBy` varchar(30) NOT NULL, + `addedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `approvedDate` date NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `mailto` text, + `acl` varchar(10) NOT NULL DEFAULT 'open', + `groups` varchar(255) NOT NULL, + `users` text NOT NULL, + `version` smallint(5) unsigned NOT NULL DEFAULT '1', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`), + KEY `lib` (`lib`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_doccontent` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `doc` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `digest` varchar(255) NOT NULL, + `content` longtext NOT NULL, + `files` text NOT NULL, + `type` varchar(10) NOT NULL, + `version` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `doc_version` (`doc`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_doclib` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(30) NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `product` mediumint(8) unsigned NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(60) NOT NULL, + `baseUrl` varchar(255) NOT NULL DEFAULT '', + `acl` varchar(10) NOT NULL DEFAULT 'open', + `groups` varchar(255) NOT NULL, + `users` text NOT NULL, + `main` enum('0','1') NOT NULL DEFAULT '0', + `collector` text NOT NULL, + `desc` mediumtext NOT NULL, + `order` tinyint(5) unsigned NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_domain` ( + `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, + `domain` varchar(255) NOT NULL, + `adminURI` varchar(255) NOT NULL, + `resolverURI` varchar(255) NOT NULL, + `register` varchar(255) NOT NULL, + `expiredDate` datetime NOT NULL, + `renew` varchar(255) NOT NULL, + `account` varchar(255) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `domain` (`domain`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_durationestimation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `stage` mediumint(9) NOT NULL, + `workload` varchar(255) NOT NULL, + `worktimeRate` varchar(255) NOT NULL, + `people` varchar(255) NOT NULL, + `startDate` date NOT NULL, + `endDate` date NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_effort` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `product` text NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `account` varchar(30) NOT NULL, + `work` text, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `date` date NOT NULL, + `left` float NOT NULL, + `consumed` float NOT NULL, + `begin` smallint(4) unsigned zerofill NOT NULL, + `end` smallint(4) unsigned zerofill NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `execution` (`execution`), + KEY `objectID` (`objectID`), + KEY `date` (`date`), + KEY `account` (`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_entry` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `account` varchar(30) NOT NULL DEFAULT '', + `code` varchar(20) NOT NULL, + `key` varchar(32) NOT NULL, + `freePasswd` enum('0','1') NOT NULL DEFAULT '0', + `ip` varchar(100) NOT NULL, + `desc` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `calledTime` int(10) unsigned NOT NULL DEFAULT '0', + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_expect` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `userID` mediumint(8) NOT NULL, + `project` mediumint(8) NOT NULL DEFAULT '0', + `expect` text NOT NULL, + `progress` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_extension` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(150) NOT NULL, + `code` varchar(30) NOT NULL, + `version` varchar(50) NOT NULL, + `author` varchar(100) NOT NULL, + `desc` mediumtext NOT NULL, + `license` text NOT NULL, + `type` varchar(20) NOT NULL DEFAULT 'extension', + `site` varchar(150) NOT NULL, + `zentaoCompatible` varchar(100) NOT NULL, + `installedTime` datetime NOT NULL, + `depends` varchar(100) NOT NULL, + `dirs` mediumtext NOT NULL, + `files` mediumtext NOT NULL, + `status` varchar(20) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`), + KEY `name` (`name`), + KEY `installedTime` (`installedTime`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_faq` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `module` mediumint(9) NOT NULL, + `product` mediumint(9) NOT NULL, + `question` varchar(255) NOT NULL, + `answer` text NOT NULL, + `addedtime` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_feedback` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `module` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `type` char(30) NOT NULL, + `solution` char(30) NOT NULL, + `desc` text NOT NULL, + `status` varchar(30) NOT NULL, + `subStatus` varchar(30) NOT NULL DEFAULT '', + `public` enum('0','1') NOT NULL DEFAULT '0', + `notify` enum('0','1') NOT NULL DEFAULT '0', + `notifyEmail` varchar(100) NOT NULL, + `likes` text NOT NULL, + `result` mediumint(8) unsigned NOT NULL, + `faq` mediumint(8) unsigned NOT NULL, + `openedBy` char(30) NOT NULL, + `openedDate` datetime NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `reviewedDate` datetime NOT NULL, + `processedBy` char(30) NOT NULL, + `processedDate` datetime NOT NULL, + `closedBy` char(30) NOT NULL, + `closedDate` datetime NOT NULL, + `closedReason` varchar(30) NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedTo` varchar(255) NOT NULL, + `assignedDate` datetime NOT NULL, + `feedbackBy` varchar(100) NOT NULL, + `mailto` varchar(255) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_feedbackview` ( + `account` char(30) NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + UNIQUE KEY `account_product` (`account`,`product`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_file` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `pathname` char(100) NOT NULL, + `title` varchar(255) NOT NULL, + `extension` char(30) NOT NULL, + `size` int(10) unsigned NOT NULL DEFAULT '0', + `objectType` char(30) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `addedBy` char(30) NOT NULL DEFAULT '', + `addedDate` datetime NOT NULL, + `downloads` mediumint(8) unsigned NOT NULL DEFAULT '0', + `extra` varchar(255) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `objectType` (`objectType`), + KEY `objectID` (`objectID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_gapanalysis` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `account` varchar(30) NOT NULL, + `role` varchar(20) NOT NULL, + `analysis` mediumtext NOT NULL, + `needTrain` enum('no','yes') NOT NULL DEFAULT 'no', + `createdBy` char(30) DEFAULT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `project_account` (`project`,`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_group` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `name` char(30) NOT NULL, + `role` char(30) NOT NULL DEFAULT '', + `desc` char(255) NOT NULL DEFAULT '', + `acl` text, + `developer` enum('0','1') NOT NULL DEFAULT '1', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_grouppriv` ( + `group` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` char(30) NOT NULL DEFAULT '', + `method` char(30) NOT NULL DEFAULT '', + UNIQUE KEY `group` (`group`,`module`,`method`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_history` ( + `id` int(9) unsigned NOT NULL AUTO_INCREMENT, + `action` mediumint(8) unsigned NOT NULL DEFAULT '0', + `field` varchar(30) NOT NULL DEFAULT '', + `old` text NOT NULL, + `new` text NOT NULL, + `diff` mediumtext NOT NULL, + PRIMARY KEY (`id`), + KEY `action` (`action`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_holiday` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(30) NOT NULL DEFAULT '', + `type` enum('holiday','working') NOT NULL DEFAULT 'holiday', + `desc` mediumtext NOT NULL, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_host` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `assetID` mediumint(8) unsigned NOT NULL, + `admin` smallint(5) unsigned NOT NULL DEFAULT '0', + `serverRoom` mediumint(8) unsigned NOT NULL, + `cabinet` varchar(128) NOT NULL, + `serverModel` varchar(256) NOT NULL, + `hardwareType` varchar(64) NOT NULL, + `hostType` enum('physical','virtual') NOT NULL, + `cpuBrand` varchar(128) NOT NULL, + `cpuModel` varchar(128) NOT NULL, + `cpuNumber` varchar(16) NOT NULL, + `cpuCores` varchar(30) NOT NULL, + `cpuRate` varchar(30) NOT NULL, + `memory` varchar(30) NOT NULL, + `diskType` varchar(30) NOT NULL, + `diskSize` varchar(30) NOT NULL, + `unit` enum('GB','TB') NOT NULL DEFAULT 'GB', + `privateIP` varchar(128) NOT NULL, + `publicIP` varchar(128) NOT NULL, + `nic` varchar(128) NOT NULL, + `mac` varchar(128) NOT NULL, + `osName` varchar(64) NOT NULL, + `osVersion` varchar(64) NOT NULL, + `webserver` varchar(128) NOT NULL, + `database` varchar(128) NOT NULL, + `language` varchar(16) NOT NULL, + `status` varchar(50) NOT NULL, + `agentPort` varchar(10) NOT NULL, + `instanceNum` tinyint(4) NOT NULL DEFAULT '0', + `pri` smallint(5) unsigned NOT NULL DEFAULT '0', + `heartbeatTime` datetime NOT NULL, + `tags` varchar(50) NOT NULL DEFAULT '', + `provider` varchar(255) NOT NULL DEFAULT '', + `bridgeID` varchar(255) NOT NULL DEFAULT '', + `cloudKey` varchar(255) NOT NULL DEFAULT '', + `cloudSecret` varchar(255) NOT NULL DEFAULT '', + `cloudRegion` varchar(255) NOT NULL DEFAULT '', + `cloudNamespace` varchar(255) NOT NULL DEFAULT '', + `cloudUser` varchar(255) NOT NULL DEFAULT '', + `cloudAccount` varchar(255) NOT NULL DEFAULT '', + `cloudPassword` varchar(255) NOT NULL DEFAULT '', + `couldVPC` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_chat` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `gid` char(40) NOT NULL DEFAULT '', + `name` varchar(60) NOT NULL DEFAULT '', + `type` varchar(20) NOT NULL DEFAULT 'group', + `admins` varchar(255) NOT NULL DEFAULT '', + `committers` varchar(255) NOT NULL DEFAULT '', + `subject` mediumint(8) unsigned NOT NULL DEFAULT '0', + `public` enum('0','1') NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL DEFAULT '', + `createdDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `ownedBy` varchar(30) NOT NULL DEFAULT '', + `editedBy` varchar(30) NOT NULL DEFAULT '', + `editedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `mergedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastActiveTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastMessage` int(11) unsigned NOT NULL DEFAULT '0', + `lastMessageIndex` int(11) unsigned NOT NULL DEFAULT 0, + `dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `pinnedMessages` text NOT NULL, + `mergedChats` text NOT NULL DEFAULT '', + `adminInvite` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `gid` (`gid`), + KEY `name` (`name`), + KEY `type` (`type`), + KEY `public` (`public`), + KEY `createdBy` (`createdBy`), + KEY `editedBy` (`editedBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_chat_message_index` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `gid` char(40) NOT NULL, + `tableName` char(64) NOT NULL, + `start` int(11) unsigned NOT NULL, + `end` int(11) unsigned NOT NULL, + `startIndex` int(11) unsigned NOT NULL, + `endIndex` int(11) unsigned NOT NULL, + `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `count` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `chattable` (`gid`,`tableName`), + KEY `start` (`start`), + KEY `end` (`end`), + KEY `startDate` (`startDate`), + KEY `endDate` (`endDate`), + KEY `chatstartindex` (`gid`,`startIndex`), + KEY `chatendindex` (`gid`,`endIndex`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_chatuser` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `cgid` char(40) NOT NULL DEFAULT '', + `user` mediumint(8) NOT NULL DEFAULT '0', + `order` smallint(5) NOT NULL DEFAULT '0', + `star` enum('0','1') NOT NULL DEFAULT '0', + `hide` enum('0','1') NOT NULL DEFAULT '0', + `mute` enum('0','1') NOT NULL DEFAULT '0', + `freeze` enum('0','1') NOT NULL DEFAULT '0', + `join` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `quit` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `category` varchar(40) NOT NULL DEFAULT '', + `lastReadMessage` int(11) unsigned NOT NULL DEFAULT '0', + `lastReadMessageIndex` int(11) unsigned NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `chatuser` (`cgid`,`user`), + KEY `cgid` (`cgid`), + KEY `user` (`user`), + KEY `order` (`order`), + KEY `star` (`star`), + KEY `hide` (`hide`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_client` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `version` char(30) NOT NULL DEFAULT '', + `desc` varchar(100) NOT NULL DEFAULT '', + `changeLog` text NOT NULL, + `strategy` varchar(10) NOT NULL DEFAULT '', + `downloads` text NOT NULL, + `createdDate` datetime NOT NULL, + `createdBy` varchar(30) NOT NULL DEFAULT '', + `editedDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL DEFAULT '', + `status` enum('released','wait') NOT NULL DEFAULT 'wait', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_conference` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `rid` char(40) NOT NULL DEFAULT '', + `cgid` char(40) NOT NULL DEFAULT '', + `status` enum('closed','open') NOT NULL DEFAULT 'closed', + `participants` text NOT NULL, + `invitee` text NOT NULL, + `openedBy` mediumint(8) NOT NULL DEFAULT '0', + `openedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_conferenceaction` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `rid` char(40) NOT NULL DEFAULT '', + `type` enum('create','invite','join','leave','close','publish') NOT NULL DEFAULT 'create', + `data` text NOT NULL, + `user` mediumint(8) NOT NULL DEFAULT '0', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `device` char(40) NOT NULL DEFAULT 'default', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_message` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `gid` char(40) NOT NULL DEFAULT '', + `cgid` char(40) NOT NULL DEFAULT '', + `user` varchar(30) NOT NULL DEFAULT '', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `index` int(11) unsigned NOT NULL DEFAULT 0, + `type` enum('normal','broadcast','notify','bulletin') NOT NULL DEFAULT 'normal', + `content` text NOT NULL, + `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text', + `data` text NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `mgid` (`gid`), + KEY `mcgid` (`cgid`), + KEY `muser` (`user`), + KEY `mtype` (`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_message_backup` ( + `id` int(11) unsigned NOT NULL, + `gid` char(40) NOT NULL DEFAULT '', + `cgid` char(40) NOT NULL DEFAULT '', + `user` varchar(30) NOT NULL DEFAULT '', + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `index` int(11) unsigned NOT NULL DEFAULT 0, + `type` enum('normal','broadcast','notify') NOT NULL DEFAULT 'normal', + `content` text NOT NULL, + `contentType` enum('text','plain','emotion','image','file','object','code') NOT NULL DEFAULT 'text', + `data` text NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0' +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_message_index` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `tableName` char(64) NOT NULL, + `start` int(11) unsigned NOT NULL, + `end` int(11) unsigned NOT NULL, + `startDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `chats` text NOT NULL, + PRIMARY KEY (`id`), + KEY `tableName` (`tableName`), + KEY `start` (`start`), + KEY `end` (`end`), + KEY `startDate` (`startDate`), + KEY `endDate` (`endDate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_messagestatus` ( + `user` mediumint(8) NOT NULL DEFAULT '0', + `message` int(11) unsigned NOT NULL, + `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting', + UNIQUE KEY `user` (`user`,`message`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_queue` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `content` text NOT NULL, + `addDate` datetime NOT NULL, + `processDate` datetime NOT NULL, + `result` text NOT NULL, + `status` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_im_userdevice` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `user` mediumint(8) NOT NULL DEFAULT '0', + `device` char(40) NOT NULL DEFAULT 'default', + `deviceID` char(40) NOT NULL DEFAULT '', + `token` char(64) NOT NULL DEFAULT '', + `validUntil` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastLogout` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`id`), + UNIQUE KEY `userdevice` (`user`,`device`), + KEY `user` (`user`), + KEY `lastLogin` (`lastLogin`), + KEY `lastLogout` (`lastLogout`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_intervention` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `activity` mediumint(8) NOT NULL, + `status` char(30) NOT NULL, + `partake` text NOT NULL, + `begin` date NOT NULL, + `realBegin` date NOT NULL, + `situation` varchar(255) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `project` (`project`,`activity`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_issue` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `resolvedBy` varchar(30) NOT NULL, + `project` varchar(255) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `pri` char(30) NOT NULL, + `severity` char(30) NOT NULL, + `type` char(30) NOT NULL, + `activity` varchar(255) NOT NULL, + `deadline` date NOT NULL, + `resolution` char(30) NOT NULL, + `resolutionComment` text NOT NULL, + `objectID` varchar(255) NOT NULL, + `resolvedDate` date NOT NULL, + `status` varchar(30) NOT NULL, + `owner` varchar(255) NOT NULL, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `activateBy` varchar(30) NOT NULL, + `activateDate` date NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` date NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `approvedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_job` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(50) NOT NULL, + `repo` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `frame` varchar(20) NOT NULL, + `engine` varchar(20) NOT NULL, + `server` mediumint(8) unsigned NOT NULL, + `pipeline` varchar(500) NOT NULL, + `triggerType` varchar(255) NOT NULL, + `sonarqubeServer` mediumint(8) unsigned NOT NULL, + `projectKey` varchar(255) NOT NULL, + `svnDir` varchar(255) NOT NULL, + `atDay` varchar(255) DEFAULT NULL, + `atTime` varchar(10) DEFAULT NULL, + `customParam` text NOT NULL, + `comment` varchar(255) DEFAULT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `lastExec` datetime DEFAULT NULL, + `lastStatus` varchar(255) DEFAULT NULL, + `lastTag` varchar(255) DEFAULT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanban` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `space` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `owner` varchar(30) NOT NULL, + `team` text NOT NULL, + `desc` mediumtext NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `archived` enum('0','1') NOT NULL DEFAULT '1', + `performable` enum('0','1') NOT NULL DEFAULT '0', + `status` enum('active','closed') NOT NULL DEFAULT 'active', + `order` mediumint(8) NOT NULL DEFAULT '0', + `displayCards` smallint(6) NOT NULL DEFAULT '0', + `showWIP` enum('0','1') NOT NULL DEFAULT '1', + `fluidBoard` enum('0','1') NOT NULL DEFAULT '0', + `object` varchar(255) NOT NULL, + `alignment` varchar(10) NOT NULL DEFAULT 'center', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `closedBy` char(30) NOT NULL, + `closedDate` datetime NOT NULL, + `activatedBy` char(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbancard` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `kanban` mediumint(8) unsigned NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `group` mediumint(8) unsigned NOT NULL, + `fromID` mediumint(8) unsigned NOT NULL, + `fromType` varchar(30) NOT NULL, + `name` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'doing', + `pri` mediumint(8) unsigned NOT NULL, + `assignedTo` text NOT NULL, + `desc` mediumtext NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `estimate` float unsigned NOT NULL, + `progress` float unsigned NOT NULL DEFAULT '0', + `color` char(7) NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `order` mediumint(8) NOT NULL DEFAULT '0', + `archived` enum('0','1') NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `archivedBy` char(30) NOT NULL, + `archivedDate` datetime NOT NULL, + `assignedBy` char(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbancell` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `kanban` mediumint(8) NOT NULL, + `lane` mediumint(8) NOT NULL, + `column` mediumint(8) NOT NULL, + `type` char(30) NOT NULL, + `cards` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbancolumn` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `parent` mediumint(8) NOT NULL DEFAULT '0', + `type` char(30) NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `group` mediumint(8) NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL DEFAULT '', + `color` char(30) NOT NULL, + `limit` smallint(6) NOT NULL DEFAULT '-1', + `order` mediumint(8) NOT NULL DEFAULT '0', + `archived` enum('0','1') NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbangroup` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `kanban` mediumint(8) unsigned NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `order` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbanlane` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `execution` mediumint(8) NOT NULL DEFAULT '0', + `type` char(30) NOT NULL, + `region` mediumint(8) unsigned NOT NULL, + `group` mediumint(8) unsigned NOT NULL, + `groupby` char(30) NOT NULL, + `extra` char(30) NOT NULL, + `name` varchar(255) NOT NULL DEFAULT '', + `color` char(30) NOT NULL, + `order` smallint(6) NOT NULL DEFAULT '0', + `lastEditedTime` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbanregion` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `space` mediumint(8) unsigned NOT NULL, + `kanban` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `order` mediumint(8) NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_kanbanspace` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(50) NOT NULL, + `owner` varchar(30) NOT NULL, + `team` text NOT NULL, + `desc` mediumtext NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `status` enum('active','closed') NOT NULL DEFAULT 'active', + `order` mediumint(8) NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `closedBy` char(30) NOT NULL, + `closedDate` datetime NOT NULL, + `activatedBy` char(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_lang` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `lang` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL, + `section` varchar(30) NOT NULL, + `key` varchar(60) NOT NULL, + `value` text NOT NULL, + `system` enum('0','1') NOT NULL DEFAULT '1', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`) +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_leave` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0', + `backDate` datetime NOT NULL, + `type` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + `level` tinyint(3) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `reviewers` text NOT NULL, + `backReviewers` text NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `type` (`type`), + KEY `status` (`status`), + KEY `createdBy` (`createdBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_lieu` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0', + `overtime` char(255) NOT NULL, + `trip` char(255) NOT NULL, + `desc` text NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + `level` tinyint(3) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `reviewers` text NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `status` (`status`), + KEY `createdBy` (`createdBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_log` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `action` mediumint(8) unsigned NOT NULL, + `date` datetime NOT NULL, + `url` varchar(255) NOT NULL, + `contentType` varchar(30) NOT NULL, + `data` text NOT NULL, + `result` text NOT NULL, + PRIMARY KEY (`id`), + KEY `objectType` (`objectType`), + KEY `obejctID` (`objectID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_measqueue` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(30) NOT NULL, + `mid` mediumint(8) unsigned NOT NULL, + `status` varchar(255) NOT NULL, + `logs` text, + `execTime` varchar(10) NOT NULL, + `params` text, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `updateDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_measrecords` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `type` varchar(30) NOT NULL, + `mid` mediumint(8) NOT NULL, + `measCode` char(50) NOT NULL DEFAULT '', + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `params` text NOT NULL, + `year` char(4) NOT NULL, + `month` char(6) NOT NULL, + `week` char(8) NOT NULL, + `day` char(8) NOT NULL, + `value` varchar(255) NOT NULL, + `date` date NOT NULL, + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `project` (`project`), + KEY `time` (`year`,`month`,`day`,`week`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_meastemplate` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `model` char(30) NOT NULL, + `name` varchar(255) NOT NULL, + `content` mediumtext NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_meeting` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) NOT NULL, + `execution` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `begin` time NOT NULL, + `end` time NOT NULL, + `dept` mediumint(8) NOT NULL, + `mode` varchar(255) NOT NULL, + `host` varchar(30) NOT NULL, + `participant` text NOT NULL, + `date` date NOT NULL, + `room` int(11) NOT NULL, + `minutes` text NOT NULL, + `minutedBy` varchar(30) NOT NULL, + `minutedDate` datetime NOT NULL, + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_meetingroom` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `position` varchar(30) NOT NULL, + `seats` int(11) NOT NULL, + `equipment` varchar(255) NOT NULL, + `openTime` varchar(255) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_module` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `root` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` char(60) NOT NULL DEFAULT '', + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) unsigned NOT NULL DEFAULT '0', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `type` char(30) NOT NULL, + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `owner` varchar(30) NOT NULL, + `collector` text NOT NULL, + `short` varchar(30) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `root` (`root`), + KEY `type` (`type`), + KEY `path` (`path`) +) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_mr` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `hostID` mediumint(8) unsigned NOT NULL, + `sourceProject` varchar(50) NOT NULL, + `sourceBranch` varchar(100) NOT NULL, + `targetProject` varchar(50) NOT NULL, + `targetBranch` varchar(100) NOT NULL, + `mriid` int(10) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `description` text NOT NULL, + `assignee` varchar(255) NOT NULL, + `reviewer` varchar(255) NOT NULL, + `approver` varchar(255) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `status` char(30) NOT NULL, + `mergeStatus` char(30) NOT NULL, + `approvalStatus` char(30) NOT NULL, + `needApproved` enum('0','1') NOT NULL DEFAULT '0', + `needCI` enum('0','1') NOT NULL DEFAULT '0', + `repoID` mediumint(8) unsigned NOT NULL, + `jobID` mediumint(8) unsigned NOT NULL, + `compileID` mediumint(8) unsigned NOT NULL, + `compileStatus` char(30) NOT NULL, + `removeSourceBranch` enum('0','1') NOT NULL DEFAULT '0', + `synced` enum('0','1') NOT NULL DEFAULT '1', + `syncError` varchar(255) NOT NULL, + `hasNoConflict` enum('0','1') NOT NULL DEFAULT '0', + `diffs` longtext, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_mrapproval` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `mrID` mediumint(8) unsigned NOT NULL, + `account` varchar(255) NOT NULL, + `date` datetime NOT NULL, + `action` char(30) NOT NULL, + `comment` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_nc` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `auditplan` mediumint(8) NOT NULL, + `listID` mediumint(8) NOT NULL, + `title` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `type` char(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'active', + `severity` char(30) NOT NULL, + `deadline` date NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `resolution` char(30) NOT NULL, + `resolvedDate` date NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` date NOT NULL, + `parent` mediumint(8) unsigned NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` date NOT NULL, + `activateDate` date NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_notify` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(50) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `action` mediumint(9) NOT NULL, + `toList` varchar(255) NOT NULL, + `ccList` text NOT NULL, + `subject` varchar(255) NOT NULL, + `data` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `sendTime` datetime NOT NULL, + `status` varchar(10) NOT NULL DEFAULT 'wait', + `failReason` text NOT NULL, + PRIMARY KEY (`id`), + KEY `objectType_toList_status` (`objectType`,`toList`,`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_oauth` ( + `account` varchar(30) NOT NULL, + `openID` varchar(255) NOT NULL, + `providerType` varchar(30) NOT NULL, + `providerID` mediumint(8) unsigned NOT NULL, + KEY `account` (`account`), + KEY `providerType` (`providerType`), + KEY `providerID` (`providerID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_object` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) NOT NULL, + `from` mediumint(8) NOT NULL, + `title` varchar(255) NOT NULL, + `category` char(30) NOT NULL, + `version` varchar(255) NOT NULL, + `type` enum('reviewed','taged') NOT NULL, + `range` text NOT NULL, + `data` text NOT NULL, + `storyEst` char(30) NOT NULL, + `taskEst` char(30) NOT NULL, + `requestEst` char(30) NOT NULL, + `testEst` char(30) NOT NULL, + `devEst` char(30) NOT NULL, + `designEst` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_opportunity` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `source` char(30) NOT NULL, + `type` char(30) NOT NULL, + `strategy` char(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'active', + `impact` mediumint(8) NOT NULL, + `chance` mediumint(8) NOT NULL, + `ratio` mediumint(8) NOT NULL, + `pri` char(30) NOT NULL, + `identifiedDate` date NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` date NOT NULL, + `approvedDate` date NOT NULL, + `prevention` mediumtext NOT NULL, + `plannedClosedDate` date NOT NULL, + `actualClosedDate` date NOT NULL, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `activatedBy` varchar(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` datetime NOT NULL, + `canceledBy` varchar(30) NOT NULL, + `canceledDate` datetime NOT NULL, + `cancelReason` char(30) NOT NULL, + `hangupedBy` varchar(30) NOT NULL, + `hangupedDate` datetime NOT NULL, + `resolution` mediumtext NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `resolvedDate` datetime NOT NULL, + `lastCheckedBy` varchar(30) NOT NULL, + `lastCheckedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_overtime` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `hours` float(4,1) unsigned NOT NULL DEFAULT '0.0', + `leave` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `status` varchar(30) NOT NULL DEFAULT '', + `rejectReason` varchar(100) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `reviewedBy` char(30) NOT NULL, + `reviewedDate` datetime NOT NULL, + `level` tinyint(3) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `reviewers` text NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `type` (`type`), + KEY `status` (`status`), + KEY `createdBy` (`createdBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_pipeline` ( + `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` char(30) NOT NULL, + `name` varchar(50) NOT NULL, + `url` varchar(255) DEFAULT NULL, + `account` varchar(30) DEFAULT NULL, + `password` varchar(255) NOT NULL, + `token` varchar(255) DEFAULT NULL, + `private` char(32) DEFAULT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_planstory` ( + `plan` mediumint(8) unsigned NOT NULL, + `story` mediumint(8) unsigned NOT NULL, + `order` mediumint(9) NOT NULL, + UNIQUE KEY `plan_story` (`plan`,`story`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_process` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `model` char(30) NOT NULL DEFAULT 'waterfall', + `name` varchar(255) NOT NULL, + `type` char(30) NOT NULL, + `abbr` char(30) NOT NULL, + `desc` mediumtext NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `order` mediumint(9) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_product` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `program` mediumint(8) unsigned NOT NULL, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `bind` enum('0','1') NOT NULL DEFAULT '0', + `line` mediumint(8) NOT NULL, + `type` varchar(30) NOT NULL DEFAULT 'normal', + `status` varchar(30) NOT NULL DEFAULT '', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `desc` mediumtext NOT NULL, + `PO` varchar(30) NOT NULL, + `QD` varchar(30) NOT NULL, + `RD` varchar(30) NOT NULL, + `feedback` varchar(30) NOT NULL, + `acl` enum('open','private','custom') NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `reviewer` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `createdVersion` varchar(20) NOT NULL, + `order` mediumint(8) unsigned NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `acl` (`acl`), + KEY `order` (`order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_productplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `product` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL, + `parent` mediumint(9) NOT NULL DEFAULT '0', + `title` varchar(90) NOT NULL, + `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait', + `desc` mediumtext NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `order` text NOT NULL, + `closedReason` varchar(20) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `end` (`end`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_programactivity` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `process` mediumint(8) NOT NULL, + `activity` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `content` text NOT NULL, + `reason` varchar(255) NOT NULL, + `result` char(30) NOT NULL, + `linkedBy` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_programoutput` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `process` mediumint(8) NOT NULL, + `activity` mediumint(8) NOT NULL, + `output` mediumint(8) NOT NULL, + `content` text NOT NULL, + `name` varchar(255) NOT NULL, + `reason` varchar(255) NOT NULL, + `result` char(30) NOT NULL, + `linkedBy` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_programprocess` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `process` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `type` char(30) NOT NULL, + `abbr` char(30) NOT NULL, + `desc` text NOT NULL, + `reason` varchar(255) NOT NULL, + `linkedBy` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_programreport` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `template` mediumint(8) NOT NULL, + `project` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `params` text NOT NULL, + `content` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_project` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) NOT NULL DEFAULT '0', + `model` char(30) NOT NULL, + `type` char(30) NOT NULL DEFAULT 'sprint', + `lifetime` char(30) NOT NULL DEFAULT '', + `budget` varchar(30) NOT NULL DEFAULT '0', + `budgetUnit` char(30) NOT NULL DEFAULT 'CNY', + `attribute` varchar(30) NOT NULL DEFAULT '', + `percent` float unsigned NOT NULL DEFAULT '0', + `milestone` enum('0','1') NOT NULL DEFAULT '0', + `output` text NOT NULL, + `auth` char(30) NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` varchar(255) NOT NULL, + `grade` tinyint(3) unsigned NOT NULL, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `realBegan` date NOT NULL, + `realEnd` date NOT NULL, + `days` smallint(5) unsigned NOT NULL, + `status` varchar(10) NOT NULL, + `subStatus` varchar(30) NOT NULL DEFAULT '', + `pri` enum('1','2','3','4') NOT NULL DEFAULT '1', + `desc` mediumtext NOT NULL, + `version` smallint(6) NOT NULL, + `parentVersion` smallint(6) NOT NULL, + `planDuration` int(11) NOT NULL, + `realDuration` int(11) NOT NULL, + `openedBy` varchar(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `openedVersion` varchar(20) NOT NULL, + `lastEditedBy` varchar(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `canceledBy` varchar(30) NOT NULL DEFAULT '', + `canceledDate` datetime NOT NULL, + `suspendedDate` date NOT NULL, + `PO` varchar(30) NOT NULL DEFAULT '', + `PM` varchar(30) NOT NULL DEFAULT '', + `QD` varchar(30) NOT NULL DEFAULT '', + `RD` varchar(30) NOT NULL DEFAULT '', + `team` varchar(90) NOT NULL, + `acl` char(30) NOT NULL DEFAULT 'open', + `whitelist` text NOT NULL, + `order` mediumint(8) unsigned NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `displayCards` smallint(6) NOT NULL DEFAULT '0', + `fluidBoard` enum('0','1') NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `parent` (`parent`), + KEY `begin` (`begin`), + KEY `end` (`end`), + KEY `status` (`status`), + KEY `acl` (`acl`), + KEY `order` (`order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectadmin` ( + `group` smallint(6) NOT NULL, + `account` char(30) NOT NULL, + `programs` text NOT NULL, + `projects` text NOT NULL, + `products` text NOT NULL, + `executions` text NOT NULL, + UNIQUE KEY `group_account` (`group`, `account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectcase` ( + `project` mediumint(8) unsigned NOT NULL DEFAULT '0', + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `case` mediumint(8) unsigned NOT NULL DEFAULT '0', + `count` mediumint(8) unsigned NOT NULL DEFAULT '1', + `version` smallint(6) NOT NULL DEFAULT '1', + `order` smallint(6) unsigned NOT NULL, + UNIQUE KEY `project` (`project`,`case`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectproduct` ( + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL, + `plan` varchar(255) NOT NULL, + PRIMARY KEY (`project`,`product`,`branch`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectspec` ( + `project` mediumint(8) NOT NULL, + `version` smallint(6) NOT NULL, + `name` varchar(255) NOT NULL, + `milestone` enum('0','1') NOT NULL DEFAULT '0', + `begin` date NOT NULL, + `end` date NOT NULL, + UNIQUE KEY `project` (`project`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_projectstory` ( + `project` mediumint(8) unsigned NOT NULL DEFAULT '0', + `product` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL, + `story` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `order` smallint(6) unsigned NOT NULL, + UNIQUE KEY `project` (`project`,`story`), + KEY `story` (`story`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_relation` ( + `id` int(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) NOT NULL, + `product` mediumint(8) NOT NULL, + `execution` mediumint(8) NOT NULL, + `AType` char(30) NOT NULL, + `AID` mediumint(8) NOT NULL, + `AVersion` char(30) NOT NULL, + `relation` char(30) NOT NULL, + `BType` char(30) NOT NULL, + `BID` mediumint(8) NOT NULL, + `BVersion` char(30) NOT NULL, + `extra` char(30) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`,`AID`,`BID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_relationoftasks` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `execution` mediumint(8) unsigned NOT NULL, + `pretask` mediumint(8) unsigned NOT NULL, + `condition` enum('begin','end') NOT NULL, + `task` mediumint(8) unsigned NOT NULL, + `action` enum('begin','end') NOT NULL, + PRIMARY KEY (`id`), + KEY `relationoftasks` (`execution`,`task`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_release` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `build` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL DEFAULT '', + `marker` enum('0','1') NOT NULL DEFAULT '0', + `date` date NOT NULL, + `stories` text NOT NULL, + `bugs` text NOT NULL, + `leftBugs` text NOT NULL, + `desc` mediumtext NOT NULL, + `mailto` text, + `notify` varchar(255) DEFAULT NULL, + `status` varchar(20) NOT NULL DEFAULT 'normal', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `build` (`build`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_repo` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `product` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `path` varchar(255) NOT NULL, + `prefix` varchar(100) NOT NULL, + `encoding` varchar(20) NOT NULL, + `SCM` varchar(10) NOT NULL, + `client` varchar(100) NOT NULL, + `serviceHost` varchar(50) NOT NULL, + `serviceProject` varchar(100) NOT NULL, + `commits` mediumint(8) unsigned NOT NULL, + `account` varchar(30) NOT NULL, + `password` varchar(30) NOT NULL, + `encrypt` varchar(30) NOT NULL DEFAULT 'plain', + `acl` text NOT NULL, + `synced` tinyint(1) NOT NULL DEFAULT '0', + `lastSync` datetime NOT NULL, + `desc` text NOT NULL, + `extra` char(30) NOT NULL, + `preMerge` enum('0','1') NOT NULL DEFAULT '0', + `job` mediumint(8) unsigned NOT NULL, + `fileServerUrl` text, + `fileServerAccount` varchar(40) NOT NULL DEFAULT '', + `fileServerPassword` varchar(100) NOT NULL DEFAULT '', + `deleted` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_repobranch` ( + `repo` mediumint(8) unsigned NOT NULL, + `revision` mediumint(8) unsigned NOT NULL, + `branch` varchar(255) NOT NULL, + UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`), + KEY `branch` (`branch`), + KEY `revision` (`revision`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_repofiles` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `repo` mediumint(8) unsigned NOT NULL, + `revision` mediumint(8) unsigned NOT NULL, + `path` varchar(255) NOT NULL, + `parent` varchar(255) NOT NULL, + `type` varchar(20) NOT NULL, + `action` char(1) NOT NULL, + PRIMARY KEY (`id`), + KEY `path` (`path`), + KEY `parent` (`parent`), + KEY `repo` (`repo`), + KEY `revision` (`revision`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_repohistory` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `repo` mediumint(9) NOT NULL, + `revision` varchar(40) NOT NULL, + `commit` mediumint(8) unsigned NOT NULL, + `comment` text NOT NULL, + `committer` varchar(100) NOT NULL, + `time` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `repo` (`repo`), + KEY `revision` (`revision`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_report` ( + `id` mediumint(9) NOT NULL AUTO_INCREMENT, + `code` varchar(100) NOT NULL, + `name` text NOT NULL, + `module` varchar(100) NOT NULL, + `sql` text NOT NULL, + `vars` text NOT NULL, + `langs` text NOT NULL, + `params` text NOT NULL, + `step` tinyint(1) NOT NULL DEFAULT '2', + `desc` text NOT NULL, + `addedBy` char(30) NOT NULL, + `addedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_researchplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `customer` varchar(255) NOT NULL, + `stakeholder` varchar(255) NOT NULL, + `objective` varchar(255) NOT NULL, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `location` varchar(255) NOT NULL, + `team` varchar(255) NOT NULL, + `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL, + `outline` mediumtext NOT NULL, + `schedule` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_researchreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `relatedPlan` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `author` varchar(30) NOT NULL, + `content` mediumtext NOT NULL, + `customer` varchar(255) NOT NULL, + `researchObjects` varchar(255) NOT NULL, + `begin` datetime NOT NULL, + `end` datetime NOT NULL, + `location` varchar(255) NOT NULL, + `method` enum('','videoConference','interview','questionnaire','telephoneInterview') NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_review` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `title` varchar(255) NOT NULL, + `object` mediumint(8) NOT NULL, + `template` mediumint(8) NOT NULL, + `doc` mediumint(8) DEFAULT NULL, + `docVersion` smallint(6) NOT NULL, + `status` char(30) NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `auditedBy` varchar(255) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deadline` date NOT NULL, + `lastReviewedBy` varchar(255) DEFAULT NULL, + `lastReviewedDate` date NOT NULL, + `lastAuditedBy` varchar(255) NOT NULL, + `lastAuditedDate` date NOT NULL, + `lastEditedBy` varchar(255) NOT NULL, + `lastEditedDate` date NOT NULL, + `result` char(30) NOT NULL, + `auditResult` char(30) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewcl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `object` char(30) NOT NULL, + `category` char(30) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `order` mediumint(8) DEFAULT '0', + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewissue` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `review` mediumint(8) NOT NULL, + `approval` mediumint(8) NOT NULL, + `injection` mediumint(8) NOT NULL, + `identify` mediumint(8) NOT NULL, + `type` char(30) NOT NULL DEFAULT 'review', + `listID` mediumint(8) NOT NULL, + `title` varchar(255) NOT NULL, + `opinion` varchar(255) NOT NULL, + `opinionDate` date NOT NULL, + `status` char(30) NOT NULL, + `resolution` char(30) NOT NULL, + `resolutionBy` char(30) NOT NULL, + `resolutionDate` date NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewlist` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(255) NOT NULL, + `object` char(30) NOT NULL, + `category` char(30) NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedBy` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_reviewresult` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `review` mediumint(8) NOT NULL, + `type` char(30) NOT NULL DEFAULT 'review', + `result` char(30) NOT NULL, + `opinion` text NOT NULL, + `reviewer` char(30) NOT NULL, + `remainIssue` char(30) NOT NULL, + `createdDate` date NOT NULL, + `consumed` float NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_risk` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` varchar(255) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `source` char(30) NOT NULL, + `category` char(30) NOT NULL, + `strategy` char(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'active', + `impact` char(30) NOT NULL, + `probability` char(30) NOT NULL, + `rate` char(30) NOT NULL, + `pri` char(30) NOT NULL, + `identifiedDate` date NOT NULL, + `prevention` mediumtext NOT NULL, + `remedy` mediumtext NOT NULL, + `plannedClosedDate` date NOT NULL, + `actualClosedDate` date NOT NULL, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `from` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` smallint(6) NOT NULL DEFAULT '1', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `resolution` mediumtext NOT NULL, + `resolvedBy` varchar(30) NOT NULL, + `activateBy` varchar(30) NOT NULL, + `activateDate` date NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` date NOT NULL, + `cancelBy` varchar(30) NOT NULL, + `cancelDate` date NOT NULL, + `cancelReason` char(30) NOT NULL, + `hangupBy` varchar(30) NOT NULL, + `hangupDate` date NOT NULL, + `trackedBy` varchar(30) NOT NULL, + `trackedDate` date NOT NULL, + `assignedDate` date NOT NULL, + `approvedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_riskissue` ( + `risk` mediumint(8) unsigned NOT NULL, + `issue` mediumint(8) unsigned NOT NULL, + UNIQUE KEY `risk_issue` (`risk`,`issue`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_score` ( + `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT, + `account` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL DEFAULT '', + `method` varchar(30) NOT NULL, + `desc` varchar(250) NOT NULL DEFAULT '', + `before` int(11) NOT NULL DEFAULT '0', + `score` int(11) NOT NULL DEFAULT '0', + `after` int(11) NOT NULL DEFAULT '0', + `time` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `model` (`module`), + KEY `method` (`method`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_searchdict` ( + `key` smallint(5) unsigned NOT NULL, + `value` char(3) NOT NULL, + PRIMARY KEY (`key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_searchindex` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `objectType` char(20) NOT NULL, + `objectID` mediumint(9) NOT NULL, + `title` text NOT NULL, + `content` text NOT NULL, + `addedDate` datetime NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `object` (`objectType`,`objectID`), + KEY `addedDate` (`addedDate`), + FULLTEXT KEY `content` (`content`), + FULLTEXT KEY `title` (`title`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_serverroom` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(128) NOT NULL, + `city` varchar(128) NOT NULL, + `line` varchar(20) NOT NULL, + `bandwidth` varchar(128) NOT NULL, + `provider` varchar(128) NOT NULL, + `owner` varchar(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_service` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `external` enum('0','1') NOT NULL DEFAULT '0', + `port` smallint(5) unsigned NOT NULL, + `entry` varchar(255) NOT NULL, + `deploy` varchar(255) NOT NULL, + `version` varchar(64) NOT NULL, + `color` char(7) NOT NULL, + `desc` mediumtext, + `dept` varchar(128) NOT NULL, + `devel` varchar(30) NOT NULL, + `qa` varchar(30) NOT NULL, + `ops` varchar(30) NOT NULL, + `hosts` text, + `softName` varchar(128) NOT NULL, + `softVersion` varchar(128) NOT NULL, + `type` varchar(20) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) unsigned NOT NULL DEFAULT '0', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_solutions` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `contents` text NOT NULL COMMENT '问题描述', + `support` text NOT NULL COMMENT '是否需要高层支持', + `measures` text NOT NULL COMMENT '解决建议', + `type` char(30) NOT NULL, + `addedBy` varchar(30) NOT NULL, + `addedDate` date NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_sqlview` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(90) NOT NULL, + `code` varchar(45) NOT NULL, + `sql` text NOT NULL, + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_stage` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `percent` varchar(255) NOT NULL, + `type` varchar(255) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_stakeholder` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, + `objectID` mediumint(8) NOT NULL, + `objectType` char(30) NOT NULL, + `user` char(30) NOT NULL, + `type` char(30) NOT NULL, + `key` enum('0','1') NOT NULL, + `from` char(30) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL, + KEY `objectID` (`objectID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_story` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `parent` mediumint(9) NOT NULL DEFAULT '0', + `product` mediumint(8) unsigned NOT NULL DEFAULT '0', + `branch` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `plan` text, + `source` varchar(20) NOT NULL, + `sourceNote` varchar(255) NOT NULL, + `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0', + `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0', + `title` varchar(255) NOT NULL, + `keywords` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL DEFAULT 'story', + `category` varchar(30) NOT NULL DEFAULT 'feature', + `pri` tinyint(3) unsigned NOT NULL DEFAULT '3', + `estimate` float unsigned NOT NULL, + `status` enum('','changed','active','draft','closed') NOT NULL DEFAULT '', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released','closed') NOT NULL DEFAULT 'wait', + `stagedBy` char(30) NOT NULL, + `mailto` text, + `lib` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromStory` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromVersion` smallint(6) NOT NULL DEFAULT '1', + `openedBy` varchar(30) NOT NULL DEFAULT '', + `openedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL DEFAULT '', + `assignedDate` datetime NOT NULL, + `approvedDate` date NOT NULL, + `lastEditedBy` varchar(30) NOT NULL DEFAULT '', + `lastEditedDate` datetime NOT NULL, + `changedBy` VARCHAR(30) NOT NULL, + `changedDate` DATETIME NOT NULL, + `reviewedBy` varchar(255) NOT NULL, + `reviewedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `closedReason` varchar(30) NOT NULL, + `activatedDate` datetime NOT NULL, + `toBug` mediumint(8) unsigned NOT NULL, + `childStories` varchar(255) NOT NULL, + `linkStories` varchar(255) NOT NULL, + `linkRequirements` varchar(255) NOT NULL, + `duplicateStory` mediumint(8) unsigned NOT NULL, + `version` smallint(6) NOT NULL DEFAULT '1', + `storyChanged` enum('0','1') NOT NULL DEFAULT '0', + `feedbackBy` varchar(100) NOT NULL, + `notifyEmail` varchar(100) NOT NULL, + `URChanged` enum('0','1') NOT NULL DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `status` (`status`), + KEY `assignedTo` (`assignedTo`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_storyestimate` ( + `story` mediumint(9) NOT NULL, + `round` smallint(6) NOT NULL, + `estimate` text NOT NULL, + `average` float NOT NULL, + `openedBy` varchar(30) NOT NULL, + `openedDate` datetime NOT NULL, + UNIQUE KEY `story` (`story`,`round`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_storyreview` ( + `story` mediumint(9) NOT NULL, + `version` smallint(6) NOT NULL, + `reviewer` varchar(30) NOT NULL, + `result` varchar(30) NOT NULL, + `reviewDate` datetime NOT NULL, + UNIQUE KEY `story` (`story`,`version`,`reviewer`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_storyspec` ( + `story` mediumint(9) NOT NULL, + `version` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `spec` mediumtext NOT NULL, + `verify` mediumtext NOT NULL, + UNIQUE KEY `story` (`story`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_storystage` ( + `story` mediumint(8) unsigned NOT NULL, + `branch` mediumint(8) unsigned NOT NULL, + `stage` varchar(50) NOT NULL, + `stagedBy` char(30) NOT NULL, + UNIQUE KEY `story_branch` (`story`,`branch`), + KEY `story` (`story`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_suitecase` ( + `suite` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `case` mediumint(8) unsigned NOT NULL, + `version` smallint(5) unsigned NOT NULL, + UNIQUE KEY `suitecase` (`suite`,`case`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_task` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `parent` mediumint(8) NOT NULL DEFAULT '0', + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `module` mediumint(8) unsigned NOT NULL DEFAULT '0', + `design` mediumint(8) unsigned NOT NULL, + `story` mediumint(8) unsigned NOT NULL DEFAULT '0', + `storyVersion` smallint(6) NOT NULL DEFAULT '1', + `designVersion` smallint(6) unsigned NOT NULL, + `fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0', + `fromIssue` mediumint(8) unsigned NOT NULL DEFAULT '0', + `feedback` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `type` varchar(20) NOT NULL, + `mode` varchar(10) NOT NULL, + `pri` tinyint(3) unsigned NOT NULL DEFAULT '0', + `estimate` float unsigned NOT NULL, + `consumed` float unsigned NOT NULL, + `left` float unsigned NOT NULL, + `deadline` date NOT NULL, + `status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `color` char(7) NOT NULL, + `mailto` text, + `desc` mediumtext NOT NULL, + `version` smallint(6) NOT NULL, + `openedBy` varchar(30) NOT NULL, + `openedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `estStarted` date NOT NULL, + `realStarted` datetime NOT NULL, + `finishedBy` varchar(30) NOT NULL, + `finishedDate` datetime NOT NULL, + `finishedList` text NOT NULL, + `canceledBy` varchar(30) NOT NULL, + `canceledDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL, + `closedDate` datetime NOT NULL, + `planDuration` int(11) NOT NULL, + `realDuration` int(11) NOT NULL, + `closedReason` varchar(30) NOT NULL, + `lastEditedBy` varchar(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `activatedDate` datetime NOT NULL, + `order` mediumint(8) NOT NULL DEFAULT 0, + `repo` mediumint(8) unsigned NOT NULL, + `mr` mediumint(8) unsigned NOT NULL, + `entry` varchar(255) NOT NULL, + `lines` varchar(10) NOT NULL, + `v1` varchar(40) NOT NULL, + `v2` varchar(40) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + KEY `execution` (`execution`), + KEY `story` (`story`), + KEY `parent` (`parent`), + KEY `assignedTo` (`assignedTo`), + KEY `order` (`order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_taskestimate` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `date` date NOT NULL, + `left` float unsigned NOT NULL DEFAULT '0', + `consumed` float unsigned NOT NULL, + `account` char(30) NOT NULL DEFAULT '', + `work` text, + PRIMARY KEY (`id`), + KEY `task` (`task`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_taskspec` ( + `task` mediumint(8) NOT NULL, + `version` smallint(6) NOT NULL, + `name` varchar(255) NOT NULL, + `estStarted` date NOT NULL, + `deadline` date NOT NULL, + UNIQUE KEY `task` (`task`,`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_team` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `root` mediumint(8) unsigned NOT NULL DEFAULT '0', + `type` enum('project','task','execution') NOT NULL DEFAULT 'project', + `account` char(30) NOT NULL DEFAULT '', + `role` char(30) NOT NULL DEFAULT '', + `position` varchar(30) NOT NULL, + `limited` char(8) NOT NULL DEFAULT 'no', + `join` date NOT NULL DEFAULT '0000-00-00', + `days` smallint(5) unsigned NOT NULL, + `hours` float(3,1) unsigned NOT NULL DEFAULT '0.0', + `estimate` decimal(12,2) unsigned NOT NULL DEFAULT '0.00', + `consumed` decimal(12,2) unsigned NOT NULL DEFAULT '0.00', + `left` decimal(12,2) unsigned NOT NULL DEFAULT '0.00', + `order` tinyint(3) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `team` (`root`,`type`,`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `execution` mediumint(8) unsigned NOT NULL, + `tasks` varchar(255) NOT NULL, + `builds` varchar(255) NOT NULL, + `title` varchar(255) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `owner` char(30) NOT NULL, + `members` text NOT NULL, + `stories` text NOT NULL, + `bugs` text NOT NULL, + `cases` text NOT NULL, + `report` text NOT NULL, + `objectType` varchar(20) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testresult` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `run` mediumint(8) unsigned NOT NULL, + `case` mediumint(8) unsigned NOT NULL, + `version` smallint(5) unsigned NOT NULL, + `job` mediumint(8) unsigned NOT NULL, + `compile` mediumint(8) unsigned NOT NULL, + `caseResult` char(30) NOT NULL, + `stepResults` text NOT NULL, + `lastRunner` varchar(30) NOT NULL, + `date` datetime NOT NULL, + `duration` float NOT NULL, + `xml` text NOT NULL, + `deploy` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`id`), + KEY `case` (`case`), + KEY `version` (`version`), + KEY `run` (`run`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testrun` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `task` mediumint(8) unsigned NOT NULL DEFAULT '0', + `case` mediumint(8) unsigned NOT NULL DEFAULT '0', + `version` tinyint(3) unsigned NOT NULL DEFAULT '0', + `assignedTo` char(30) NOT NULL DEFAULT '', + `lastRunner` varchar(30) NOT NULL, + `lastRunDate` datetime NOT NULL, + `lastRunResult` char(30) NOT NULL, + `status` char(30) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `task` (`task`,`case`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testsuite` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `desc` mediumtext NOT NULL, + `type` varchar(20) NOT NULL, + `addedBy` char(30) NOT NULL, + `addedDate` datetime NOT NULL, + `lastEditedBy` char(30) NOT NULL, + `lastEditedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL, + PRIMARY KEY (`id`), + KEY `product` (`product`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_testtask` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `product` mediumint(8) unsigned NOT NULL, + `name` char(90) NOT NULL, + `execution` mediumint(8) unsigned NOT NULL DEFAULT '0', + `build` char(30) NOT NULL, + `type` varchar(255) NOT NULL DEFAULT '', + `owner` varchar(30) NOT NULL, + `pri` tinyint(3) unsigned NOT NULL DEFAULT '0', + `begin` date NOT NULL, + `end` date NOT NULL, + `realFinishedDate` datetime NOT NULL, + `mailto` text, + `desc` mediumtext NOT NULL, + `report` text NOT NULL, + `status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait', + `testreport` mediumint(8) unsigned NOT NULL, + `auto` varchar(10) NOT NULL DEFAULT 'no', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `build` (`build`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_todo` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `date` date NOT NULL, + `begin` smallint(4) unsigned zerofill NOT NULL, + `end` smallint(4) unsigned zerofill NOT NULL, + `feedback` mediumint(8) unsigned NOT NULL, + `type` char(15) NOT NULL, + `cycle` tinyint(3) unsigned NOT NULL DEFAULT '0', + `idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0', + `pri` tinyint(3) unsigned NOT NULL, + `name` char(150) NOT NULL, + `desc` mediumtext NOT NULL, + `status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait', + `private` tinyint(1) NOT NULL, + `config` varchar(255) NOT NULL, + `assignedTo` varchar(30) NOT NULL DEFAULT '', + `assignedBy` varchar(30) NOT NULL DEFAULT '', + `assignedDate` datetime NOT NULL, + `finishedBy` varchar(30) NOT NULL DEFAULT '', + `finishedDate` datetime NOT NULL, + `closedBy` varchar(30) NOT NULL DEFAULT '', + `closedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `assignedTo` (`assignedTo`), + KEY `finishedBy` (`finishedBy`), + KEY `date` (`date`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_traincategory` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL DEFAULT '', + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `grade` tinyint(3) NOT NULL, + `order` mediumint(8) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `parent` (`parent`), + KEY `path` (`path`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_traincontents` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `code` varchar(50) NOT NULL, + `course` mediumint(8) unsigned NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `parent` mediumint(8) unsigned NOT NULL DEFAULT '0', + `path` char(255) NOT NULL DEFAULT '', + `desc` text NOT NULL, + `order` mediumint(8) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` tinyint(1) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_traincourse` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `code` varchar(50) NOT NULL, + `category` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `status` varchar(10) NOT NULL, + `teacher` varchar(30) NOT NULL DEFAULT '', + `desc` mediumtext NOT NULL, + `createdBy` varchar(255) NOT NULL, + `createdDate` date NOT NULL, + `editedBy` varchar(255) NOT NULL, + `editedDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_trainplan` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `place` varchar(255) NOT NULL, + `trainee` text NOT NULL, + `lecturer` varchar(20) NOT NULL, + `type` enum('inside','outside') NOT NULL DEFAULT 'inside', + `status` varchar(20) NOT NULL, + `summary` mediumtext NOT NULL, + `createdBy` char(30) DEFAULT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_trainrecords` ( + `user` char(30) NOT NULL, + `objectId` mediumint(8) unsigned NOT NULL, + `objectType` varchar(10) NOT NULL, + `status` varchar(10) NOT NULL, + PRIMARY KEY (`user`,`objectId`,`objectType`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_trip` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('trip','egress') NOT NULL DEFAULT 'trip', + `customers` varchar(20) NOT NULL, + `name` char(30) NOT NULL, + `desc` text NOT NULL, + `year` char(4) NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `start` time NOT NULL, + `finish` time NOT NULL, + `from` char(50) NOT NULL, + `to` char(50) NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `year` (`year`), + KEY `createdBy` (`createdBy`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_user` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `company` mediumint(8) unsigned NOT NULL, + `type` char(30) NOT NULL DEFAULT 'inside', + `dept` mediumint(8) unsigned NOT NULL DEFAULT '0', + `account` char(30) NOT NULL DEFAULT '', + `password` char(32) NOT NULL DEFAULT '', + `role` char(10) NOT NULL DEFAULT '', + `realname` varchar(100) NOT NULL DEFAULT '', + `pinyin` varchar(255) NOT NULL DEFAULT '', + `nickname` char(60) NOT NULL DEFAULT '', + `commiter` varchar(100) NOT NULL, + `avatar` text NOT NULL, + `birthday` date NOT NULL DEFAULT '0000-00-00', + `gender` enum('f','m') NOT NULL DEFAULT 'f', + `email` char(90) NOT NULL DEFAULT '', + `skype` char(90) NOT NULL DEFAULT '', + `qq` char(20) NOT NULL DEFAULT '', + `mobile` char(11) NOT NULL DEFAULT '', + `phone` char(20) NOT NULL DEFAULT '', + `weixin` varchar(90) NOT NULL DEFAULT '', + `dingding` varchar(90) NOT NULL DEFAULT '', + `slack` varchar(90) NOT NULL DEFAULT '', + `whatsapp` varchar(90) NOT NULL DEFAULT '', + `address` char(120) NOT NULL DEFAULT '', + `zipcode` char(10) NOT NULL DEFAULT '', + `nature` text NOT NULL, + `analysis` text NOT NULL, + `strategy` text NOT NULL, + `join` date NOT NULL DEFAULT '0000-00-00', + `visits` mediumint(8) unsigned NOT NULL DEFAULT '0', + `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite', + `ip` char(15) NOT NULL DEFAULT '', + `last` int(10) unsigned NOT NULL DEFAULT '0', + `fails` tinyint(5) NOT NULL DEFAULT '0', + `locked` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `feedback` enum('0','1') NOT NULL DEFAULT '0', + `ranzhi` char(30) NOT NULL DEFAULT '', + `ldap` char(30) NOT NULL, + `score` int(11) NOT NULL DEFAULT '0', + `scoreLevel` int(11) NOT NULL DEFAULT '0', + `resetToken` varchar(50) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `clientStatus` enum('online','away','busy','offline','meeting') NOT NULL DEFAULT 'offline', + `clientLang` varchar(10) NOT NULL DEFAULT 'zh-cn', + PRIMARY KEY (`id`), + UNIQUE KEY `account` (`account`), + KEY `dept` (`dept`), + KEY `email` (`email`), + KEY `commiter` (`commiter`), + KEY `deleted` (`deleted`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_usercontact` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `listName` varchar(60) NOT NULL, + `userList` text NOT NULL, + PRIMARY KEY (`id`), + KEY `account` (`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_usergroup` ( + `account` char(30) NOT NULL DEFAULT '', + `group` mediumint(8) unsigned NOT NULL DEFAULT '0', + `project` text NOT NULL, + UNIQUE KEY `account` (`account`,`group`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_userquery` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `module` varchar(30) NOT NULL, + `title` varchar(90) NOT NULL, + `form` text NOT NULL, + `sql` text NOT NULL, + `shortcut` enum('0','1') NOT NULL DEFAULT '0', + `common` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `account` (`account`), + KEY `module` (`module`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_usertpl` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `account` char(30) NOT NULL, + `type` char(30) NOT NULL, + `title` varchar(150) NOT NULL, + `content` text NOT NULL, + `public` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `account` (`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_userview` ( + `account` char(30) NOT NULL, + `programs` mediumtext NOT NULL, + `products` mediumtext NOT NULL, + `projects` mediumtext NOT NULL, + `sprints` mediumtext NOT NULL, + UNIQUE KEY `account` (`account`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_vm` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `hostID` int(10) unsigned NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL DEFAULT '', + `osCategory` varchar(50) NOT NULL DEFAULT '', + `osType` varchar(50) NOT NULL DEFAULT '', + `osArch` varchar(50) NOT NULL DEFAULT '', + `osLang` varchar(50) NOT NULL DEFAULT '', + `osCpu` tinyint(2) NOT NULL DEFAULT 0, + `osMemory` smallint(6) NOT NULL DEFAULT 0, + `osDisk` smallint(6) NOT NULL DEFAULT 0, + `status` varchar(50) NOT NULL DEFAULT '', + `destroyAt` datetime DEFAULT NULL, + `macAddress` varchar(255) NOT NULL DEFAULT '', + `workspace` varchar(255) NOT NULL DEFAULT '', + `templateID` int(10) unsigned NOT NULL DEFAULT '0', + `baseImageID` int(10) unsigned NOT NULL DEFAULT '0', + `baseImagePath` varchar(255) NOT NULL DEFAULT '', + `desc` varchar(255) NOT NULL DEFAULT '', + `heatbeat` datetime DEFAULT NULL, + `vncPort` int(10) NOT NULL DEFAULT 0, + `instance` varchar(255) NOT NULL DEFAULT '', + `eip` varchar(255) NOT NULL DEFAULT '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `public` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_vmtemplate` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `hostID` int(10) unsigned NOT NULL DEFAULT '0', + `templateName` varchar(255) NOT NULL DEFAULT '', + `osType` varchar(50) NOT NULL DEFAULT '', + `osCategory` varchar(50) NOT NULL DEFAULT '', + `osVersion` varchar(50) NOT NULL DEFAULT '', + `osLang` varchar(50) NOT NULL, + `cpuCoreNum` smallint(4) NOT NULL DEFAULT 0, + `memorySize` int NOT NULL DEFAULT 0, + `diskSize` int NOT NULL DEFAULT 0, + `osArch` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_webhook` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` varchar(15) NOT NULL DEFAULT 'default', + `name` varchar(50) NOT NULL, + `url` varchar(255) NOT NULL, + `domain` varchar(255) NOT NULL, + `secret` varchar(255) NOT NULL, + `contentType` varchar(30) NOT NULL DEFAULT 'application/json', + `sendType` enum('sync','async') NOT NULL DEFAULT 'sync', + `products` text NOT NULL, + `executions` text NOT NULL, + `params` varchar(100) NOT NULL, + `actions` text NOT NULL, + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_weeklyreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `weekStart` date NOT NULL, + `pv` float(9,2) NOT NULL, + `ev` float(9,2) NOT NULL, + `ac` float(9,2) NOT NULL, + `sv` float(9,2) NOT NULL, + `cv` float(9,2) NOT NULL, + `staff` smallint(5) unsigned NOT NULL, + `progress` varchar(255) NOT NULL, + `workload` varchar(255) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `week` (`project`,`weekStart`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workestimation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `project` mediumint(8) unsigned NOT NULL, + `scale` decimal(10,2) unsigned NOT NULL, + `productivity` decimal(10,2) unsigned NOT NULL, + `duration` decimal(10,2) unsigned NOT NULL, + `unitLaborCost` decimal(10,2) unsigned NOT NULL, + `totalLaborCost` decimal(10,2) unsigned NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `assignedTo` varchar(30) NOT NULL, + `assignedDate` datetime NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + `dayHour` decimal(10,2) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflow` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `parent` varchar(30) NOT NULL, + `child` varchar(30) NOT NULL, + `type` varchar(10) NOT NULL DEFAULT 'flow', + `navigator` varchar(10) NOT NULL, + `app` varchar(20) NOT NULL, + `position` varchar(30) NOT NULL, + `module` varchar(30) NOT NULL, + `table` varchar(50) NOT NULL, + `name` varchar(30) NOT NULL, + `titleField` varchar(30) NOT NULL, + `contentField` text NOT NULL, + `flowchart` text NOT NULL, + `js` text NOT NULL, + `css` text NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `administrator` text NOT NULL, + `desc` text NOT NULL, + `version` varchar(10) NOT NULL DEFAULT '1.0', + `status` varchar(10) NOT NULL DEFAULT 'wait', + `approval` enum('enabled', 'disabled') NOT NULL DEFAULT 'disabled', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`app`,`module`,`vision`), + KEY `type` (`type`), + KEY `app` (`app`), + KEY `module` (`module`), + KEY `order` (`order`) +) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowaction` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `action` varchar(50) NOT NULL, + `method` varchar(50) NOT NULL, + `name` varchar(50) NOT NULL, + `type` enum('single','batch') NOT NULL DEFAULT 'single', + `batchMode` enum('same','different') NOT NULL DEFAULT 'different', + `extensionType` varchar(10) NOT NULL DEFAULT 'override' COMMENT 'none | extend | override', + `open` varchar(20) NOT NULL, + `position` enum('menu','browseandview','browse','view') NOT NULL DEFAULT 'browseandview', + `layout` char(20) NOT NULL, + `show` enum('dropdownlist','direct') NOT NULL DEFAULT 'dropdownlist', + `order` smallint(5) unsigned NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', + `virtual` tinyint(1) unsigned NOT NULL, + `conditions` text NOT NULL, + `verifications` text NOT NULL, + `hooks` text NOT NULL, + `linkages` text NOT NULL, + `js` text NOT NULL, + `css` text NOT NULL, + `toList` char(255) NOT NULL, + `blocks` text NOT NULL, + `desc` text NOT NULL, + `status` varchar(10) NOT NULL DEFAULT 'enable', + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`module`,`action`,`vision`), + KEY `module` (`module`), + KEY `action` (`action`), + KEY `order` (`order`) +) ENGINE=InnoDB AUTO_INCREMENT=190 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowdatasource` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('system','sql','func','option','lang','category') NOT NULL DEFAULT 'option', + `name` varchar(30) NOT NULL, + `code` varchar(30) NOT NULL, + `datasource` text NOT NULL, + `view` varchar(20) NOT NULL, + `keyField` varchar(50) NOT NULL, + `valueField` varchar(50) NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `type` (`type`) +) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowfield` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `field` varchar(50) NOT NULL, + `type` varchar(20) NOT NULL DEFAULT 'varchar', + `length` varchar(10) NOT NULL, + `name` varchar(50) NOT NULL, + `control` varchar(20) NOT NULL, + `expression` text NOT NULL, + `options` text NOT NULL, + `default` varchar(100) NOT NULL, + `rules` varchar(255) NOT NULL, + `placeholder` varchar(100) NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0', + `exportOrder` smallint(5) unsigned NOT NULL DEFAULT '0', + `canExport` enum('0','1') NOT NULL DEFAULT '0', + `canSearch` enum('0','1') NOT NULL DEFAULT '0', + `isValue` enum('0','1') NOT NULL DEFAULT '0', + `readonly` enum('0','1') NOT NULL DEFAULT '0', + `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', + `desc` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`module`,`field`), + KEY `module` (`module`), + KEY `field` (`field`), + KEY `order` (`order`) +) ENGINE=InnoDB AUTO_INCREMENT=360 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowlabel` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `action` varchar(30) NOT NULL DEFAULT 'browse', + `code` varchar(30) NOT NULL, + `label` varchar(255) NOT NULL, + `params` text NOT NULL, + `orderBy` text NOT NULL, + `order` tinyint(3) NOT NULL, + `buildin` tinyint(1) unsigned NOT NULL, + `role` varchar(10) NOT NULL DEFAULT 'custom', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `module` (`module`) +) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowlayout` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `action` varchar(50) NOT NULL, + `field` varchar(50) NOT NULL, + `order` smallint(5) unsigned NOT NULL, + `width` smallint(5) NOT NULL, + `position` text NOT NULL, + `readonly` enum('0','1') NOT NULL DEFAULT '0', + `mobileShow` enum('0','1') NOT NULL DEFAULT '1', + `summary` varchar(20) NOT NULL, + `defaultValue` text NOT NULL, + `layoutRules` varchar(255) NOT NULL, + `vision` varchar(10) NOT NULL DEFAULT 'rnd', + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`module`,`action`,`field`,`vision`), + KEY `module` (`module`), + KEY `action` (`action`), + KEY `order` (`order`) +) ENGINE=InnoDB AUTO_INCREMENT=138 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowlinkdata` ( + `objectType` varchar(30) NOT NULL, + `objectID` mediumint(8) unsigned NOT NULL, + `linkedType` varchar(30) NOT NULL, + `linkedID` mediumint(8) unsigned NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + UNIQUE KEY `unique` (`objectType`,`objectID`,`linkedType`,`linkedID`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowrelation` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `prev` varchar(30) NOT NULL, + `next` varchar(30) NOT NULL, + `field` varchar(50) NOT NULL, + `actions` varchar(20) NOT NULL, + `actionCodes` text NOT NULL, + `buildin` enum('0','1') NOT NULL DEFAULT '0', + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowrelationlayout` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `prev` varchar(30) NOT NULL, + `next` varchar(30) NOT NULL, + `action` varchar(50) NOT NULL, + `field` varchar(50) NOT NULL, + `order` smallint(5) unsigned NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique` (`prev`,`next`,`action`,`field`), + KEY `prev` (`prev`), + KEY `next` (`next`), + KEY `action` (`action`), + KEY `order` (`order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowreport` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL COMMENT 'module name', + `name` varchar(100) NOT NULL COMMENT 'report name', + `type` enum('pie','line','bar') NOT NULL DEFAULT 'pie' COMMENT 'report type', + `countType` enum('sum','count') NOT NULL DEFAULT 'sum' COMMENT 'report count method', + `displayType` enum('value','percent') NOT NULL DEFAULT 'value' COMMENT 'report display method', + `dimension` varchar(130) NOT NULL COMMENT 'dimension field code of zt_workflowfield', + `fields` text NOT NULL COMMENT 'count fileds code of zt_workflowfield,use comma split', + `order` smallint(5) unsigned NOT NULL DEFAULT '0', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowrule` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('system','regex','func') NOT NULL DEFAULT 'regex', + `name` varchar(30) NOT NULL, + `rule` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` char(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `type` (`type`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowsql` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `field` varchar(50) NOT NULL, + `action` varchar(50) NOT NULL, + `sql` text NOT NULL, + `vars` text NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `module` (`module`), + KEY `field` (`field`), + KEY `action` (`action`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_workflowversion` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `module` varchar(30) NOT NULL, + `version` varchar(10) NOT NULL, + `fields` text NOT NULL, + `actions` text NOT NULL, + `layouts` text NOT NULL, + `sqls` text NOT NULL, + `labels` text NOT NULL, + `table` text NOT NULL, + `datas` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `moduleversion` (`module`,`version`), + KEY `module` (`module`), + KEY `version` (`version`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_zoutput` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `activity` mediumint(8) NOT NULL, + `name` varchar(255) NOT NULL, + `content` mediumtext NOT NULL, + `optional` char(20) NOT NULL, + `tailorNorm` varchar(255) NOT NULL, + `status` varchar(30) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `editedBy` varchar(30) NOT NULL, + `editedDate` datetime NOT NULL, + `order` mediumint(8) DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=130 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_dayactions` AS SELECT + 1 AS `actions`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daybugopen` AS SELECT + 1 AS `bugopen`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daybugresolve` AS SELECT + 1 AS `bugresolve`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_dayeffort` AS SELECT + 1 AS `consumed`, + 1 AS `date`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daystoryclose` AS SELECT + 1 AS `storyclose`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daystoryopen` AS SELECT + 1 AS `storyopen`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daytaskfinish` AS SELECT + 1 AS `taskfinish`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_daytaskopen` AS SELECT + 1 AS `taskopen`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_dayuserlogin` AS SELECT + 1 AS `userlogin`, + 1 AS `day`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_executionsummary` AS SELECT + 1 AS `execution`, + 1 AS `estimate`, + 1 AS `consumed`, + 1 AS `left`, + 1 AS `number`, + 1 AS `undone`, + 1 AS `totalReal`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_productbugs` AS SELECT + 1 AS `product`, + 1 AS `bugs`, + 1 AS `resolutions`, + 1 AS `seriousBugs`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_productstories` AS SELECT + 1 AS `product`, + 1 AS `stories`, + 1 AS `undone`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_projectbugs` AS SELECT + 1 AS `execution`, + 1 AS `bugs`, + 1 AS `resolutions`, + 1 AS `seriousBugs`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_projectstories` AS SELECT + 1 AS `execution`, + 1 AS `stories`, + 1 AS `undone`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_projectsummary` AS SELECT + 1 AS `project`, + 1 AS `estimate`, + 1 AS `consumed`, + 1 AS `left`, + 1 AS `number`, + 1 AS `undone`, + 1 AS `totalReal`*/; +SET character_set_client = @saved_cs_client; +SET @saved_cs_client = @@character_set_client; +SET character_set_client = utf8; +/*!50001 CREATE VIEW `ztv_projectteams` AS SELECT + 1 AS `execution`, + 1 AS `teams`*/; +SET character_set_client = @saved_cs_client; +/*!50001 DROP VIEW IF EXISTS `view_datasource_10`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_10` AS select `zt_build`.`id` AS `id`,`zt_build`.`name` AS `name` from `zt_build` where (`zt_build`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_11`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_11` AS select `zt_module`.`id` AS `id`,`zt_module`.`name` AS `name` from `zt_module` where (`zt_module`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_12`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_12` AS select `zt_productplan`.`id` AS `id`,`zt_productplan`.`title` AS `title` from `zt_productplan` where (`zt_productplan`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_4`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_4` AS select `zt_story`.`id` AS `id`,`zt_story`.`title` AS `title` from `zt_story` where (`zt_story`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_41`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_41` AS select `zt_case`.`id` AS `id`,`zt_case`.`title` AS `title` from `zt_case` where (`zt_case`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_46`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_46` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'lite')) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_5`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_5` AS select `zt_task`.`id` AS `id`,`zt_task`.`name` AS `name` from `zt_task` where ((`zt_task`.`deleted` = '0') and (`zt_task`.`vision` = 'rnd')) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `view_datasource_6`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `view_datasource_6` AS select `zt_bug`.`id` AS `id`,`zt_bug`.`title` AS `title` from `zt_bug` where (`zt_bug`.`deleted` = '0') */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_dayactions`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_dayactions` AS select count(0) AS `actions`,left(`zt_action`.`date`,10) AS `day` from `zt_action` group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daybugopen`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daybugopen` AS select count(0) AS `bugopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daybugresolve`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daybugresolve` AS select count(0) AS `bugresolve`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'bug') and (`zt_action`.`action` = 'resolved')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_dayeffort`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_dayeffort` AS select round(sum(`zt_effort`.`consumed`),1) AS `consumed`,`zt_effort`.`date` AS `date` from `zt_effort` group by `zt_effort`.`date` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daystoryclose`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daystoryclose` AS select count(0) AS `storyclose`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'closed')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daystoryopen`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daystoryopen` AS select count(0) AS `storyopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'story') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daytaskfinish`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daytaskfinish` AS select count(0) AS `taskfinish`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'finished')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_daytaskopen`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_daytaskopen` AS select count(0) AS `taskopen`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'task') and (`zt_action`.`action` = 'opened')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_dayuserlogin`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_dayuserlogin` AS select count(0) AS `userlogin`,left(`zt_action`.`date`,10) AS `day` from `zt_action` where ((`zt_action`.`objectType` = 'user') and (`zt_action`.`action` = 'login')) group by left(`zt_action`.`date`,10) */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_executionsummary`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_executionsummary` AS select `zt_task`.`execution` AS `execution`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`execution` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_productbugs`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_productbugs` AS select `zt_bug`.`product` AS `product`,count(0) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`product` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_productstories`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_productstories` AS select `zt_story`.`product` AS `product`,count('*') AS `stories`,sum(if((`zt_story`.`status` = 'closed'),0,1)) AS `undone` from `zt_story` where (`zt_story`.`deleted` = '0') group by `zt_story`.`product` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_projectbugs`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_projectbugs` AS select `zt_bug`.`execution` AS `execution`,count(0) AS `bugs`,sum(if((`zt_bug`.`resolution` = ''),0,1)) AS `resolutions`,sum(if((`zt_bug`.`severity` <= 2),1,0)) AS `seriousBugs` from `zt_bug` where (`zt_bug`.`deleted` = '0') group by `zt_bug`.`execution` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_projectstories`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_projectstories` AS select `t1`.`project` AS `execution`,count('*') AS `stories`,sum(if((`t2`.`status` = 'closed'),0,1)) AS `undone` from ((`zt_projectstory` `t1` left join `zt_story` `t2` on((`t1`.`story` = `t2`.`id`))) left join `zt_project` `t3` on((`t1`.`project` = `t3`.`id`))) where ((`t2`.`deleted` = '0') and (`t3`.`type` in ('sprint','stage'))) group by `t1`.`project` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_projectsummary`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_projectsummary` AS select `zt_task`.`project` AS `project`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`project` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; +/*!50001 DROP VIEW IF EXISTS `ztv_projectteams`*/; +/*!50001 SET @saved_cs_client = @@character_set_client */; +/*!50001 SET @saved_cs_results = @@character_set_results */; +/*!50001 SET @saved_col_connection = @@collation_connection */; +/*!50001 SET character_set_client = utf8 */; +/*!50001 SET character_set_results = utf8 */; +/*!50001 SET collation_connection = utf8_general_ci */; +/*!50001 CREATE ALGORITHM=UNDEFINED */ +/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ +/*!50001 VIEW `ztv_projectteams` AS select `zt_team`.`root` AS `execution`,count('*') AS `teams` from `zt_team` where (`zt_team`.`type` = 'execution') group by `zt_team`.`root` */; +/*!50001 SET character_set_client = @saved_cs_client */; +/*!50001 SET character_set_results = @saved_cs_results */; +/*!50001 SET collation_connection = @saved_col_connection */; diff --git a/db/update17.4.sql b/db/update17.4.sql new file mode 100644 index 0000000000..746f691ab8 --- /dev/null +++ b/db/update17.4.sql @@ -0,0 +1,62 @@ +ALTER TABLE `zt_task` ADD `order` mediumint(8) NOT NULL DEFAULT 0 AFTER `activatedDate`; +ALTER TABLE `zt_task` ADD INDEX `order` (`order`); +ALTER TABLE `zt_story` ADD COLUMN `linkRequirements` varchar(255) NOT NULL AFTER `linkStories`; + +ALTER TABLE `zt_productplan` ADD `createdBy` varchar(30) NOT NULL AFTER `closedReason`; +ALTER TABLE `zt_productplan` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +ALTER TABLE `zt_release` ADD `createdBy` varchar(30) NOT NULL AFTER `subStatus`; +ALTER TABLE `zt_release` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +ALTER TABLE `zt_testtask` ADD `createdBy` varchar(30) NOT NULL AFTER `subStatus`; +ALTER TABLE `zt_testtask` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +ALTER TABLE `zt_build` ADD `createdBy` varchar(30) NOT NULL AFTER `desc`; +ALTER TABLE `zt_build` ADD `createdDate` datetime NOT NULL AFTER `createdBy`; + +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackType' ORDER BY `id` DESC LIMIT 1) WHERE `module`='feedback' AND `field`='type'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackSolution' ORDER BY `id` DESC LIMIT 1) WHERE `module`='feedback' AND `field`='solution'; +UPDATE `zt_workflowfield` SET `options`=(SELECT id FROM `zt_workflowdatasource` WHERE `code`='feedbackclosedReason' ORDER BY `id` DESC LIMIT 1), `control`='select' WHERE `module`='feedback' AND `field`='closedReason'; + +UPDATE `zt_project` SET `closedDate`='' AND `closedBy`='' WHERE `status` != 'closed'; +UPDATE `zt_grouppriv` SET `method`='exportTemplate' WHERE `method` = 'exportTemplet'; + +INSERT INTO `zt_grouppriv` (SELECT `group`,`module`,'reply' FROM `zt_grouppriv` WHERE `module` = 'feedback' AND `method` = 'comment'); +INSERT INTO `zt_grouppriv` (SELECT `group`,`module`,'ask' FROM `zt_grouppriv` WHERE `module` = 'feedback' AND `method` = 'comment'); + +CREATE TABLE `zt_chart` ( + `id` mediumint NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `dataset` varchar(30) NOT NULL, + `desc` mediumtext NOT NULL, + `settings` mediumtext NOT NULL, + `filters` mediumtext NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dashboard` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `module` mediumint NOT NULL, + `desc` mediumtext NOT NULL, + `layout` mediumtext NOT NULL, + `filters` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +CREATE TABLE `zt_dataset` ( + `id` mediumint unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(155) NOT NULL, + `sql` text NOT NULL, + `fields` mediumtext NOT NULL, + `objects` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/db/update17.5.sql b/db/update17.5.sql new file mode 100644 index 0000000000..925889dfce --- /dev/null +++ b/db/update17.5.sql @@ -0,0 +1,264 @@ +ALTER TABLE `zt_story` MODIFY `status` enum('','changed','active','draft','closed','reviewing') NOT NULL DEFAULT '' AFTER `estimate`; +UPDATE `zt_story` SET `status` = 'reviewing' WHERE `status` = 'changed'; +ALTER TABLE `zt_story` MODIFY `status` enum('','changing','active','draft','closed','reviewing') NOT NULL DEFAULT '' AFTER `estimate`; + +ALTER TABLE `zt_feedback` ADD `repeatFeedback` mediumint(8) NOT NULL DEFAULT 0 AFTER `feedbackBy`; + +ALTER TABLE `zt_assetlib` ADD `order` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `desc`; +ALTER TABLE `zt_testsuite` ADD `order` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `type`; + +ALTER TABLE `zt_bug` MODIFY COLUMN `os` varchar(255) NOT NULL default ''; +ALTER TABLE `zt_bug` MODIFY COLUMN `browser` varchar(255) NOT NULL default ''; + +INSERT IGNORE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`, `vision`) VALUES +('zh-cn', 'bug', 'browserList', 'all', '全部', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'chrome', 'Chrome', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'edge', 'Edge', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'ie', 'IE系列', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'ie11', 'IE11', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'ie10', 'IE10', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'ie9', 'IE9', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'ie8', 'IE8', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'ie7', 'IE7', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'ie6', 'IE6', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'firefox', 'firefox系列', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'firefox4', 'firefox4', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'firefox3', 'firefox3', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'firefox2', 'firefox2', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'opera', 'Opera系列', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'opera11', 'opera11', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'opera10', 'opera10', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'opera9', 'opera9', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'safari', 'safari', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', '360', '360浏览器', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'qq', 'QQ浏览器', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'maxthon', '遨游', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'uc', 'UC', '1', 'rnd'), +('zh-cn', 'bug', 'browserList', 'other', '其他', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'all', '全部', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'chrome', 'Chrome', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'edge', 'Edge', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'ie', 'IE系列', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'ie11', 'IE11', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'ie10', 'IE10', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'ie9', 'IE9', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'ie8', 'IE8', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'ie7', 'IE7', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'ie6', 'IE6', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'firefox', 'firefox系列', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'firefox4', 'firefox4', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'firefox3', 'firefox3', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'firefox2', 'firefox2', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'opera', 'Opera系列', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'opera11', 'opera11', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'opera10', 'opera10', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'opera9', 'opera9', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'safari', 'safari', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', '360', '360瀏覽器', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'qq', 'QQ瀏覽器', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'maxthon', '遨游', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'uc', 'UC', '1', 'rnd'), +('zh-tw', 'bug', 'browserList', 'other', '其他', '1', 'rnd'), +('en', 'bug', 'browserList', 'all', 'All', '1', 'rnd'), +('en', 'bug', 'browserList', 'chrome', 'Chrome', '1', 'rnd'), +('en', 'bug', 'browserList', 'edge', 'Edge', '1', 'rnd'), +('en', 'bug', 'browserList', 'ie', 'IE series', '1', 'rnd'), +('en', 'bug', 'browserList', 'ie11', 'IE11', '1', 'rnd'), +('en', 'bug', 'browserList', 'ie10', 'IE10', '1', 'rnd'), +('en', 'bug', 'browserList', 'ie9', 'IE9', '1', 'rnd'), +('en', 'bug', 'browserList', 'ie8', 'IE8', '1', 'rnd'), +('en', 'bug', 'browserList', 'ie7', 'IE7', '1', 'rnd'), +('en', 'bug', 'browserList', 'ie6', 'IE6', '1', 'rnd'), +('en', 'bug', 'browserList', 'firefox', 'Firefox series', '1', 'rnd'), +('en', 'bug', 'browserList', 'firefox4', 'Firefox4', '1', 'rnd'), +('en', 'bug', 'browserList', 'firefox3', 'Firefox3', '1', 'rnd'), +('en', 'bug', 'browserList', 'firefox2', 'Firefox2', '1', 'rnd'), +('en', 'bug', 'browserList', 'opera', 'Opera series', '1', 'rnd'), +('en', 'bug', 'browserList', 'opera11', 'Opera11', '1', 'rnd'), +('en', 'bug', 'browserList', 'opera10', 'Opera10', '1', 'rnd'), +('en', 'bug', 'browserList', 'opera9', 'Opera9', '1', 'rnd'), +('en', 'bug', 'browserList', 'safari', 'Safari', '1', 'rnd'), +('en', 'bug', 'browserList', '360', '360', '1', 'rnd'), +('en', 'bug', 'browserList', 'qq', 'QQ', '1', 'rnd'), +('en', 'bug', 'browserList', 'maxthon', 'Maxthon', '1', 'rnd'), +('en', 'bug', 'browserList', 'uc', 'UC', '1', 'rnd'), +('en', 'bug', 'browserList', 'other', 'Others', '1', 'rnd'), +('fr', 'bug', 'browserList', 'all', 'Tous', '1', 'rnd'), +('fr', 'bug', 'browserList', 'chrome', 'Chrome', '1', 'rnd'), +('fr', 'bug', 'browserList', 'edge', 'Edge', '1', 'rnd'), +('fr', 'bug', 'browserList', 'ie', 'IE series', '1', 'rnd'), +('fr', 'bug', 'browserList', 'ie11', 'IE11', '1', 'rnd'), +('fr', 'bug', 'browserList', 'ie10', 'IE10', '1', 'rnd'), +('fr', 'bug', 'browserList', 'ie9', 'IE9', '1', 'rnd'), +('fr', 'bug', 'browserList', 'ie8', 'IE8', '1', 'rnd'), +('fr', 'bug', 'browserList', 'ie7', 'IE7', '1', 'rnd'), +('fr', 'bug', 'browserList', 'ie6', 'IE6', '1', 'rnd'), +('fr', 'bug', 'browserList', 'firefox', 'Firefox series', '1', 'rnd'), +('fr', 'bug', 'browserList', 'firefox4', 'Firefox4', '1', 'rnd'), +('fr', 'bug', 'browserList', 'firefox3', 'Firefox3', '1', 'rnd'), +('fr', 'bug', 'browserList', 'firefox2', 'Firefox2', '1', 'rnd'), +('fr', 'bug', 'browserList', 'opera', 'Opera series', '1', 'rnd'), +('fr', 'bug', 'browserList', 'opera11', 'Opera11', '1', 'rnd'), +('fr', 'bug', 'browserList', 'opera10', 'Opera10', '1', 'rnd'), +('fr', 'bug', 'browserList', 'opera9', 'Opera9', '1', 'rnd'), +('fr', 'bug', 'browserList', 'safari', 'Safari', '1', 'rnd'), +('fr', 'bug', 'browserList', '360', '360', '1', 'rnd'), +('fr', 'bug', 'browserList', 'qq', 'QQ', '1', 'rnd'), +('fr', 'bug', 'browserList', 'maxthon', 'Maxthon', '1', 'rnd'), +('fr', 'bug', 'browserList', 'uc', 'UC', '1', 'rnd'), +('fr', 'bug', 'browserList', 'other', 'Autres', '1', 'rnd'), +('de', 'bug', 'browserList', 'all', 'Alle', '1', 'rnd'), +('de', 'bug', 'browserList', 'chrome', 'Chrome', '1', 'rnd'), +('de', 'bug', 'browserList', 'edge', 'Edge', '1', 'rnd'), +('de', 'bug', 'browserList', 'ie', 'IE series', '1', 'rnd'), +('de', 'bug', 'browserList', 'ie11', 'IE11', '1', 'rnd'), +('de', 'bug', 'browserList', 'ie10', 'IE10', '1', 'rnd'), +('de', 'bug', 'browserList', 'ie9', 'IE9', '1', 'rnd'), +('de', 'bug', 'browserList', 'ie8', 'IE8', '1', 'rnd'), +('de', 'bug', 'browserList', 'ie7', 'IE7', '1', 'rnd'), +('de', 'bug', 'browserList', 'ie6', 'IE6', '1', 'rnd'), +('de', 'bug', 'browserList', 'firefox', 'Firefox series', '1', 'rnd'), +('de', 'bug', 'browserList', 'firefox4', 'Firefox4', '1', 'rnd'), +('de', 'bug', 'browserList', 'firefox3', 'Firefox3', '1', 'rnd'), +('de', 'bug', 'browserList', 'firefox2', 'Firefox2', '1', 'rnd'), +('de', 'bug', 'browserList', 'opera', 'Opera series', '1', 'rnd'), +('de', 'bug', 'browserList', 'opera11', 'Opera11', '1', 'rnd'), +('de', 'bug', 'browserList', 'opera10', 'Opera10', '1', 'rnd'), +('de', 'bug', 'browserList', 'opera9', 'Opera9', '1', 'rnd'), +('de', 'bug', 'browserList', 'safari', 'Safari', '1', 'rnd'), +('de', 'bug', 'browserList', '360', '360', '1', 'rnd'), +('de', 'bug', 'browserList', 'qq', 'QQ', '1', 'rnd'), +('de', 'bug', 'browserList', 'maxthon', 'Maxthon', '1', 'rnd'), +('de', 'bug', 'browserList', 'uc', 'UC', '1', 'rnd'), +('de', 'bug', 'browserList', 'other', 'Andere', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'all', '全部', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'windows', 'Windows', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'win11', 'Windows 11', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'win10', 'Windows 10', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'win8', 'Windows 8', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'win7', 'Windows 7', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'winxp', 'Windows XP', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'osx', 'Mac OS', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'android', 'Android', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'ios', 'IOS', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'linux', 'Linux', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'ubuntu', 'Ubuntu', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'chromeos', 'Chrome OS', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'fedora', 'Fedora', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'vista', 'Windows Vista', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'win2012', 'Windows 2012', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'win2008', 'Windows 2008', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'win2003', 'Windows 2003', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'win2000', 'Windows 2000', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'wp8', 'WP8', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'wp7', 'WP7', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'symbian', 'Symbian', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'freebsd', 'FreeBSD', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'unix', 'Unix', '1', 'rnd'), +('zh-cn', 'bug', 'osList', 'others', '其他', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'all', '全部', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'windows', 'Windows', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'win11', 'Windows 11', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'win10', 'Windows 10', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'win8', 'Windows 8', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'win7', 'Windows 7', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'winxp', 'Windows XP', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'osx', 'Mac OS', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'android', 'Android', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'ios', 'IOS', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'linux', 'Linux', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'ubuntu', 'Ubuntu', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'chromeos', 'Chrome OS', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'fedora', 'Fedora', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'vista', 'Windows Vista', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'win2012', 'Windows 2012', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'win2008', 'Windows 2008', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'win2003', 'Windows 2003', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'win2000', 'Windows 2000', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'wp8', 'WP8', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'wp7', 'WP7', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'symbian', 'Symbian', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'freebsd', 'FreeBSD', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'unix', 'Unix', '1', 'rnd'), +('zh-tw', 'bug', 'osList', 'others', '其他', '1', 'rnd'), +('en', 'bug', 'osList', 'all', 'All', '1', 'rnd'), +('en', 'bug', 'osList', 'windows', 'Windows', '1', 'rnd'), +('en', 'bug', 'osList', 'win11', 'Windows 11', '1', 'rnd'), +('en', 'bug', 'osList', 'win10', 'Windows 10', '1', 'rnd'), +('en', 'bug', 'osList', 'win8', 'Windows 8', '1', 'rnd'), +('en', 'bug', 'osList', 'win7', 'Windows 7', '1', 'rnd'), +('en', 'bug', 'osList', 'winxp', 'Windows XP', '1', 'rnd'), +('en', 'bug', 'osList', 'osx', 'Mac OS', '1', 'rnd'), +('en', 'bug', 'osList', 'android', 'Android', '1', 'rnd'), +('en', 'bug', 'osList', 'ios', 'IOS', '1', 'rnd'), +('en', 'bug', 'osList', 'linux', 'Linux', '1', 'rnd'), +('en', 'bug', 'osList', 'ubuntu', 'Ubuntu', '1', 'rnd'), +('en', 'bug', 'osList', 'chromeos', 'Chrome OS', '1', 'rnd'), +('en', 'bug', 'osList', 'fedora', 'Fedora', '1', 'rnd'), +('en', 'bug', 'osList', 'vista', 'Windows Vista', '1', 'rnd'), +('en', 'bug', 'osList', 'win2012', 'Windows 2012', '1', 'rnd'), +('en', 'bug', 'osList', 'win2008', 'Windows 2008', '1', 'rnd'), +('en', 'bug', 'osList', 'win2003', 'Windows 2003', '1', 'rnd'), +('en', 'bug', 'osList', 'win2000', 'Windows 2000', '1', 'rnd'), +('en', 'bug', 'osList', 'wp8', 'WP8', '1', 'rnd'), +('en', 'bug', 'osList', 'wp7', 'WP7', '1', 'rnd'), +('en', 'bug', 'osList', 'symbian', 'Symbian', '1', 'rnd'), +('en', 'bug', 'osList', 'freebsd', 'FreeBSD', '1', 'rnd'), +('en', 'bug', 'osList', 'unix', 'Unix', '1', 'rnd'), +('en', 'bug', 'osList', 'others', 'Others', '1', 'rnd'), +('fr', 'bug', 'osList', 'all', 'Tous', '1', 'rnd'), +('fr', 'bug', 'osList', 'windows', 'Windows', '1', 'rnd'), +('fr', 'bug', 'osList', 'win11', 'Windows 11', '1', 'rnd'), +('fr', 'bug', 'osList', 'win10', 'Windows 10', '1', 'rnd'), +('fr', 'bug', 'osList', 'win8', 'Windows 8', '1', 'rnd'), +('fr', 'bug', 'osList', 'win7', 'Windows 7', '1', 'rnd'), +('fr', 'bug', 'osList', 'winxp', 'Windows XP', '1', 'rnd'), +('fr', 'bug', 'osList', 'osx', 'Mac OS', '1', 'rnd'), +('fr', 'bug', 'osList', 'android', 'Android', '1', 'rnd'), +('fr', 'bug', 'osList', 'ios', 'IOS', '1', 'rnd'), +('fr', 'bug', 'osList', 'linux', 'Linux', '1', 'rnd'), +('fr', 'bug', 'osList', 'ubuntu', 'Ubuntu', '1', 'rnd'), +('fr', 'bug', 'osList', 'chromeos', 'Chrome OS', '1', 'rnd'), +('fr', 'bug', 'osList', 'fedora', 'Fedora', '1', 'rnd'), +('fr', 'bug', 'osList', 'vista', 'Windows Vista', '1', 'rnd'), +('fr', 'bug', 'osList', 'win2012', 'Windows 2012', '1', 'rnd'), +('fr', 'bug', 'osList', 'win2008', 'Windows 2008', '1', 'rnd'), +('fr', 'bug', 'osList', 'win2003', 'Windows 2003', '1', 'rnd'), +('fr', 'bug', 'osList', 'win2000', 'Windows 2000', '1', 'rnd'), +('fr', 'bug', 'osList', 'wp8', 'WP8', '1', 'rnd'), +('fr', 'bug', 'osList', 'wp7', 'WP7', '1', 'rnd'), +('fr', 'bug', 'osList', 'symbian', 'Symbian', '1', 'rnd'), +('fr', 'bug', 'osList', 'freebsd', 'FreeBSD', '1', 'rnd'), +('fr', 'bug', 'osList', 'unix', 'Unix', '1', 'rnd'), +('fr', 'bug', 'osList', 'others', 'Autres', '1', 'rnd'), +('de', 'bug', 'osList', 'all', 'Alle', '1', 'rnd'), +('de', 'bug', 'osList', 'windows', 'Windows', '1', 'rnd'), +('de', 'bug', 'osList', 'win11', 'Windows 11', '1', 'rnd'), +('de', 'bug', 'osList', 'win10', 'Windows 10', '1', 'rnd'), +('de', 'bug', 'osList', 'win8', 'Windows 8', '1', 'rnd'), +('de', 'bug', 'osList', 'win7', 'Windows 7', '1', 'rnd'), +('de', 'bug', 'osList', 'winxp', 'Windows XP', '1', 'rnd'), +('de', 'bug', 'osList', 'osx', 'Mac OS', '1', 'rnd'), +('de', 'bug', 'osList', 'android', 'Android', '1', 'rnd'), +('de', 'bug', 'osList', 'ios', 'IOS', '1', 'rnd'), +('de', 'bug', 'osList', 'linux', 'Linux', '1', 'rnd'), +('de', 'bug', 'osList', 'ubuntu', 'Ubuntu', '1', 'rnd'), +('de', 'bug', 'osList', 'chromeos', 'Chrome OS', '1', 'rnd'), +('de', 'bug', 'osList', 'fedora', 'Fedora', '1', 'rnd'), +('de', 'bug', 'osList', 'vista', 'Windows Vista', '1', 'rnd'), +('de', 'bug', 'osList', 'win2012', 'Windows 2012', '1', 'rnd'), +('de', 'bug', 'osList', 'win2008', 'Windows 2008', '1', 'rnd'), +('de', 'bug', 'osList', 'win2003', 'Windows 2003', '1', 'rnd'), +('de', 'bug', 'osList', 'win2000', 'Windows 2000', '1', 'rnd'), +('de', 'bug', 'osList', 'wp8', 'WP8', '1', 'rnd'), +('de', 'bug', 'osList', 'wp7', 'WP7', '1', 'rnd'), +('de', 'bug', 'osList', 'symbian', 'Symbian', '1', 'rnd'), +('de', 'bug', 'osList', 'freebsd', 'FreeBSD', '1', 'rnd'), +('de', 'bug', 'osList', 'unix', 'Unix', '1', 'rnd'), +('de', 'bug', 'osList', 'others', 'Andere', '1', 'rnd'); + +UPDATE `zt_grouppriv` SET `module` = 'testcase' WHERE `module` = 'story' and `method` = 'zeroCase'; +UPDATE `zt_grouppriv` SET `module` = 'product' WHERE `module` = 'story' and `method` = 'track'; + +ALTER TABLE `zt_job` ADD `lastSyncDate` datetime DEFAULT NULL AFTER `lastTag`; +INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES ('*/5', '*', '*', '*', '*', 'moduleName=compile&methodName=syncCompile', '定时同步构建记录', 'zentao', 1, 'normal', '0000-00-00 00:00:00'); diff --git a/db/zentao.sql b/db/zentao.sql index c0af747c5d..ac6389009a 100755 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `zt_acl` ( `type` char(40) NOT NULL DEFAULT 'whitelist', `source` char(30) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_action`; CREATE TABLE IF NOT EXISTS `zt_action` ( `id` int(9) unsigned NOT NULL auto_increment, @@ -29,9 +29,9 @@ CREATE TABLE IF NOT EXISTS `zt_action` ( KEY `project` (`project`), KEY `action` (`action`), KEY `objectID` (`objectID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_api_lib_release`; -CREATE TABLE `zt_api_lib_release` ( +CREATE TABLE IF NOT EXISTS `zt_api_lib_release` ( `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `lib` int UNSIGNED NOT NULL DEFAULT 0, `desc` varchar(255) NOT NULL DEFAULT '', @@ -40,9 +40,9 @@ CREATE TABLE `zt_api_lib_release` ( `addedBy` varchar(30) NOT NULL DEFAULT 0, `addedDate` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_api`; -CREATE TABLE `zt_api` ( +CREATE TABLE IF NOT EXISTS `zt_api` ( `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `product` varchar(255) NOT NULL DEFAULT '', `lib` int UNSIGNED NOT NULL DEFAULT 0, @@ -68,9 +68,9 @@ CREATE TABLE `zt_api` ( `editedDate` datetime NOT NULL, `deleted` enum ('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_apispec`; -CREATE TABLE `zt_apispec` ( +CREATE TABLE IF NOT EXISTS `zt_apispec` ( `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `doc` int UNSIGNED NOT NULL DEFAULT 0, `module` int UNSIGNED NOT NULL DEFAULT 0, @@ -91,9 +91,9 @@ CREATE TABLE `zt_apispec` ( `addedBy` varchar(30) NOT NULL DEFAULT 0, `addedDate` datetime NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_apistruct`; -CREATE TABLE `zt_apistruct` ( +CREATE TABLE IF NOT EXISTS `zt_apistruct` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `lib` int UNSIGNED NOT NULL DEFAULT 0, `name` varchar(30) NOT NULL DEFAULT '', @@ -107,9 +107,9 @@ CREATE TABLE `zt_apistruct` ( `editedDate` datetime NOT NULL, `deleted` enum ('0', '1') NOT NULL DEFAULT '0', primary key (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_apistruct_spec`; -CREATE TABLE `zt_apistruct_spec` ( +CREATE TABLE IF NOT EXISTS `zt_apistruct_spec` ( `id` int UNSIGNED NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `type` varchar(50) NOT NULL DEFAULT '', @@ -119,9 +119,9 @@ CREATE TABLE `zt_apistruct_spec` ( `addedBy` varchar(30) NOT NULL DEFAULT 0, `addedDate` datetime NOT NULL, primary key (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approval`; -CREATE TABLE `zt_approval` ( +CREATE TABLE IF NOT EXISTS `zt_approval` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, `flow` mediumint(8) NOT NULL, `objectType` varchar(30) NOT NULL, @@ -134,9 +134,9 @@ CREATE TABLE `zt_approval` ( `createdDate` datetime NOT NULL, `deleted` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalflow`; -CREATE TABLE `zt_approvalflow` ( +CREATE TABLE IF NOT EXISTS `zt_approvalflow` ( `id` int(8) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `code` varchar(100) NOT NULL, @@ -147,9 +147,9 @@ CREATE TABLE `zt_approvalflow` ( `type` varchar(30) NOT NULL, `deleted` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalflowobject`; -CREATE TABLE `zt_approvalflowobject` ( +CREATE TABLE IF NOT EXISTS `zt_approvalflowobject` ( `id` int(8) NOT NULL AUTO_INCREMENT, `root` int(8) NOT NULL, `flow` int(8) NOT NULL, @@ -157,9 +157,9 @@ CREATE TABLE `zt_approvalflowobject` ( `objectID` mediumint(9) NOT NULL, `extra` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalflowspec`; -CREATE TABLE `zt_approvalflowspec` ( +CREATE TABLE IF NOT EXISTS `zt_approvalflowspec` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, `flow` mediumint(8) NOT NULL, `version` mediumint(8) NOT NULL, @@ -167,9 +167,9 @@ CREATE TABLE `zt_approvalflowspec` ( `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalnode`; -CREATE TABLE `zt_approvalnode` ( +CREATE TABLE IF NOT EXISTS `zt_approvalnode` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, `approval` mediumint(8) NOT NULL, `type` enum('review','cc') NOT NULL, @@ -189,18 +189,18 @@ CREATE TABLE `zt_approvalnode` ( `reviewedDate` datetime NOT NULL, PRIMARY KEY (`id`), KEY `idx_reviewed_date` (`reviewedDate`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalobject`; -CREATE TABLE `zt_approvalobject` ( +CREATE TABLE IF NOT EXISTS `zt_approvalobject` ( `id` int(8) NOT NULL AUTO_INCREMENT, `approval` int(8) NOT NULL, `objectType` char(30) NOT NULL, `objectID` mediumint(8) NOT NULL, `extra` varchar(255) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_approvalrole`; -CREATE TABLE `zt_approvalrole` ( +CREATE TABLE IF NOT EXISTS `zt_approvalrole` ( `id` int(8) NOT NULL AUTO_INCREMENT, `code` char(30) NOT NULL, `name` varchar(255) NOT NULL, @@ -208,7 +208,7 @@ CREATE TABLE `zt_approvalrole` ( `users` longtext NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_block`; CREATE TABLE IF NOT EXISTS `zt_block` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -227,7 +227,7 @@ CREATE TABLE IF NOT EXISTS `zt_block` ( PRIMARY KEY (`id`), UNIQUE KEY `account_vision_module_type_order` (`account`,`vision`,`module`,`type`,`order`), KEY `account` (`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_branch`; CREATE TABLE IF NOT EXISTS `zt_branch` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -242,7 +242,7 @@ CREATE TABLE IF NOT EXISTS `zt_branch` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `product` (`product`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_bug`; CREATE TABLE IF NOT EXISTS `zt_bug` ( `id` mediumint(8) NOT NULL auto_increment, @@ -262,8 +262,8 @@ CREATE TABLE IF NOT EXISTS `zt_bug` ( `severity` tinyint(4) NOT NULL default '0', `pri` tinyint(3) unsigned NOT NULL, `type` varchar(30) NOT NULL default '', - `os` varchar(30) NOT NULL default '', - `browser` varchar(30) NOT NULL default '', + `os` varchar(255) NOT NULL default '', + `browser` varchar(255) NOT NULL default '', `hardware` varchar(30) NOT NULL, `found` varchar(30) NOT NULL default '', `steps` mediumtext NOT NULL, @@ -315,7 +315,7 @@ CREATE TABLE IF NOT EXISTS `zt_bug` ( KEY `toStory` (`toStory`), KEY `result` (`result`), KEY `assignedTo` (`assignedTo`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_build`; CREATE TABLE IF NOT EXISTS `zt_build` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -331,11 +331,13 @@ CREATE TABLE IF NOT EXISTS `zt_build` ( `bugs` text NOT NULL, `builder` char(30) NOT NULL default '', `desc` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), KEY `execution` (`execution`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_burn`; CREATE TABLE IF NOT EXISTS `zt_burn` ( `execution` mediumint(8) unsigned NOT NULL, @@ -347,7 +349,7 @@ CREATE TABLE IF NOT EXISTS `zt_burn` ( `consumed` float NOT NULL, `storyPoint` float NOT NULL, PRIMARY KEY (`execution`,`date`,`task`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_case`; CREATE TABLE IF NOT EXISTS `zt_case` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -398,7 +400,7 @@ CREATE TABLE IF NOT EXISTS `zt_case` ( KEY `story` (`story`), KEY `fromBug` (`fromBug`), KEY `module` (`module`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_casestep`; CREATE TABLE IF NOT EXISTS `zt_casestep` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -411,9 +413,9 @@ CREATE TABLE IF NOT EXISTS `zt_casestep` ( PRIMARY KEY (`id`), KEY `case` (`case`), KEY `version` (`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_cfd`; -CREATE TABLE `zt_cfd` ( +CREATE TABLE IF NOT EXISTS `zt_cfd` ( `id` int(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, `execution` int(8) NOT NULL, `type` char(30) NOT NULL, @@ -421,7 +423,21 @@ CREATE TABLE `zt_cfd` ( `count` smallint NOT NULL, `date` date NOT NULL, UNIQUE KEY `execution_type_name_date` (`execution`,`type`,`name`,`date`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_chart`; +CREATE TABLE `zt_chart` ( + `id` mediumint NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `type` varchar(30) NOT NULL, + `dataset` varchar(30) NOT NULL, + `desc` mediumtext NOT NULL, + `settings` mediumtext NOT NULL, + `filters` mediumtext NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_company`; CREATE TABLE IF NOT EXISTS `zt_company` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -436,7 +452,7 @@ CREATE TABLE IF NOT EXISTS `zt_company` ( `admins` char(255) default NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_compile`; CREATE TABLE IF NOT EXISTS `zt_compile` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -454,7 +470,7 @@ CREATE TABLE IF NOT EXISTS `zt_compile` ( `updateDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_config`; CREATE TABLE IF NOT EXISTS `zt_config` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -466,7 +482,7 @@ CREATE TABLE IF NOT EXISTS `zt_config` ( `value` longtext NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique` (`vision`,`owner`,`module`,`section`,`key`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_cron`; CREATE TABLE IF NOT EXISTS `zt_cron` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -483,7 +499,32 @@ CREATE TABLE IF NOT EXISTS `zt_cron` ( `lastTime` datetime NOT NULL, PRIMARY KEY (`id`), KEY `lastTime` (`lastTime`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_dashboard`; +CREATE TABLE `zt_dashboard` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `module` mediumint NOT NULL, + `desc` mediumtext NOT NULL, + `layout` mediumtext NOT NULL, + `filters` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +-- DROP TABLE IF EXISTS `zt_dataset`; +CREATE TABLE `zt_dataset` ( + `id` mediumint unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(155) NOT NULL, + `sql` text NOT NULL, + `fields` mediumtext NOT NULL, + `objects` mediumtext NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, + `deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_dept`; CREATE TABLE IF NOT EXISTS `zt_dept` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -498,7 +539,7 @@ CREATE TABLE IF NOT EXISTS `zt_dept` ( PRIMARY KEY (`id`), KEY `parent` (`parent`), KEY `path` (`path`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_design`; CREATE TABLE IF NOT EXISTS `zt_design` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -522,7 +563,7 @@ CREATE TABLE IF NOT EXISTS `zt_design` ( `version` smallint(6) NOT NULL, `type` char(30) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_designspec`; CREATE TABLE IF NOT EXISTS `zt_designspec` ( `design` mediumint(8) NOT NULL, @@ -531,7 +572,7 @@ CREATE TABLE IF NOT EXISTS `zt_designspec` ( `desc` mediumtext NOT NULL, `files` varchar(255) NOT NULL, UNIQUE KEY `design` (`design`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_doc`; CREATE TABLE IF NOT EXISTS `zt_doc` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -561,7 +602,7 @@ CREATE TABLE IF NOT EXISTS `zt_doc` ( KEY `product` (`product`), KEY `execution` (`execution`), KEY `lib` (`lib`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_doccontent`; CREATE TABLE IF NOT EXISTS `zt_doccontent` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -574,7 +615,7 @@ CREATE TABLE IF NOT EXISTS `zt_doccontent` ( `version` smallint(5) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `doc_version` (`doc`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_doclib`; CREATE TABLE IF NOT EXISTS `zt_doclib` ( `id` smallint(5) unsigned NOT NULL auto_increment, @@ -596,7 +637,7 @@ CREATE TABLE IF NOT EXISTS `zt_doclib` ( PRIMARY KEY (`id`), KEY `product` (`product`), KEY `execution` (`execution`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_effort`; CREATE TABLE IF NOT EXISTS `zt_effort` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -613,7 +654,7 @@ CREATE TABLE IF NOT EXISTS `zt_effort` ( `status` enum('1','2','3') NOT NULL default '1', PRIMARY KEY (`id`), KEY `user` (`user`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_entry`; CREATE TABLE IF NOT EXISTS `zt_entry` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -631,7 +672,7 @@ CREATE TABLE IF NOT EXISTS `zt_entry` ( `editedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_expect`; CREATE TABLE IF NOT EXISTS `zt_expect` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -642,7 +683,7 @@ CREATE TABLE IF NOT EXISTS `zt_expect` ( `createdBy` char(30) NOT NULL, `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_extension`; CREATE TABLE IF NOT EXISTS `zt_extension` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -664,7 +705,7 @@ CREATE TABLE IF NOT EXISTS `zt_extension` ( UNIQUE KEY `code` (`code`), KEY `name` (`name`), KEY `installedTime` (`installedTime`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_file`; CREATE TABLE IF NOT EXISTS `zt_file` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -682,7 +723,7 @@ CREATE TABLE IF NOT EXISTS `zt_file` ( PRIMARY KEY (`id`), KEY `objectType` (`objectType`), KEY `objectID` (`objectID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_group`; CREATE TABLE IF NOT EXISTS `zt_group` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -693,14 +734,14 @@ CREATE TABLE IF NOT EXISTS `zt_group` ( `desc` char(255) NOT NULL default '', `acl` text, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_grouppriv`; CREATE TABLE IF NOT EXISTS `zt_grouppriv` ( `group` mediumint(8) unsigned NOT NULL default '0', `module` char(30) NOT NULL default '', `method` char(30) NOT NULL default '', UNIQUE KEY `group` (`group`,`module`,`method`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_holiday`; CREATE TABLE IF NOT EXISTS `zt_holiday` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -713,7 +754,7 @@ CREATE TABLE IF NOT EXISTS `zt_holiday` ( PRIMARY KEY (`id`), KEY `year` (`year`), KEY `name` (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_history`; CREATE TABLE IF NOT EXISTS `zt_history` ( `id` int(9) unsigned NOT NULL auto_increment, @@ -724,7 +765,7 @@ CREATE TABLE IF NOT EXISTS `zt_history` ( `diff` mediumtext NOT NULL, PRIMARY KEY (`id`), KEY `action` (`action`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_job`; CREATE TABLE IF NOT EXISTS `zt_job` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -750,11 +791,12 @@ CREATE TABLE IF NOT EXISTS `zt_job` ( `lastExec` datetime DEFAULT NULL, `lastStatus` varchar(255) DEFAULT NULL, `lastTag` varchar(255) DEFAULT NULL, + `lastSyncDate` datetime DEFAULT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbanspace`; -CREATE TABLE `zt_kanbanspace` ( +CREATE TABLE IF NOT EXISTS `zt_kanbanspace` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `type` varchar(50) NOT NULL, @@ -775,9 +817,9 @@ CREATE TABLE `zt_kanbanspace` ( `activatedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanban`; -CREATE TABLE `zt_kanban` ( +CREATE TABLE IF NOT EXISTS `zt_kanban` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `space` mediumint(8) unsigned NOT NULL, `name` varchar(255) NOT NULL, @@ -805,9 +847,9 @@ CREATE TABLE `zt_kanban` ( `activatedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbanregion`; -CREATE TABLE `zt_kanbanregion` ( +CREATE TABLE IF NOT EXISTS `zt_kanbanregion` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `space` mediumint(8) unsigned NOT NULL, `kanban` mediumint(8) unsigned NOT NULL, @@ -819,9 +861,9 @@ CREATE TABLE `zt_kanbanregion` ( `lastEditedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbancard`; -CREATE TABLE `zt_kanbancard` ( +CREATE TABLE IF NOT EXISTS `zt_kanbancard` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `kanban` mediumint(8) unsigned NOT NULL, `region` mediumint(8) unsigned NOT NULL, @@ -852,9 +894,9 @@ CREATE TABLE `zt_kanbancard` ( `assignedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbancell`; -CREATE TABLE `zt_kanbancell` ( +CREATE TABLE IF NOT EXISTS `zt_kanbancell` ( `id` int(8) NOT NULL AUTO_INCREMENT, `kanban` mediumint(8) NOT NULL, `lane` mediumint(8) NOT NULL, @@ -863,15 +905,15 @@ CREATE TABLE `zt_kanbancell` ( `cards` text NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `card_group` (`kanban`,`type`,`lane`,`column`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbangroup`; -CREATE TABLE `zt_kanbangroup` ( +CREATE TABLE IF NOT EXISTS `zt_kanbangroup` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `kanban` mediumint(8) unsigned NOT NULL, `region` mediumint(8) unsigned NOT NULL, `order` smallint(6) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbanlane`; CREATE TABLE IF NOT EXISTS `zt_kanbanlane` ( `id` int(8) NOT NULL AUTO_INCREMENT, @@ -887,7 +929,7 @@ CREATE TABLE IF NOT EXISTS `zt_kanbanlane` ( `lastEditedTime` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_kanbancolumn`; CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` ( `id` int(8) NOT NULL AUTO_INCREMENT, @@ -902,7 +944,7 @@ CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` ( `archived` enum('0', '1') NOT NULL DEFAULT '0', `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_lang`; CREATE TABLE IF NOT EXISTS `zt_lang` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -915,7 +957,7 @@ CREATE TABLE IF NOT EXISTS `zt_lang` ( `vision` varchar(10) NOT NULL DEFAULT 'rnd', PRIMARY KEY (`id`), UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`,`vision`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_log`; CREATE TABLE IF NOT EXISTS `zt_log` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -930,7 +972,7 @@ CREATE TABLE IF NOT EXISTS `zt_log` ( PRIMARY KEY `id` (`id`), KEY `objectType` (`objectType`), KEY `obejctID` (`objectID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_module`; CREATE TABLE IF NOT EXISTS `zt_module` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -951,7 +993,7 @@ CREATE TABLE IF NOT EXISTS `zt_module` ( KEY `root` (`root`), KEY `type` (`type`), KEY `path` (`path`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_mr`; CREATE TABLE IF NOT EXISTS `zt_mr` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -987,7 +1029,7 @@ CREATE TABLE IF NOT EXISTS `zt_mr` ( `hasNoConflict` enum('0','1') COLLATE 'utf8_general_ci' NOT NULL DEFAULT '0', `diffs` longtext COLLATE 'utf8_general_ci' NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_mrapproval`; CREATE TABLE IF NOT EXISTS `zt_mrapproval` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -997,7 +1039,7 @@ CREATE TABLE IF NOT EXISTS `zt_mrapproval` ( `action` char(30) NOT NULL, `comment` text NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_notify`; CREATE TABLE IF NOT EXISTS `zt_notify` ( `id` mediumint unsigned NOT NULL AUTO_INCREMENT, @@ -1015,7 +1057,7 @@ CREATE TABLE IF NOT EXISTS `zt_notify` ( `failReason` text NOT NULL, PRIMARY KEY (`id`), KEY `objectType_toList_status` (`objectType`,`toList`,`status`) -) ENGINE='MyISAM' COLLATE 'utf8_general_ci'; +) ENGINE='InnoDB' COLLATE 'utf8_general_ci'; -- DROP TABLE IF EXISTS `zt_oauth`; CREATE TABLE IF NOT EXISTS `zt_oauth` ( `account` varchar(30) NOT NULL, @@ -1025,7 +1067,7 @@ CREATE TABLE IF NOT EXISTS `zt_oauth` ( KEY `account` (`account`), KEY `providerType` (`providerType`), KEY `providerID` (`providerID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_pipeline`; CREATE TABLE IF NOT EXISTS `zt_pipeline` ( `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1042,14 +1084,14 @@ CREATE TABLE IF NOT EXISTS `zt_pipeline` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_planstory`; CREATE TABLE IF NOT EXISTS `zt_planstory` ( `plan` mediumint(8) unsigned NOT NULL, `story` mediumint(8) unsigned NOT NULL, `order` mediumint(9) NOT NULL, UNIQUE KEY `plan_story` (`plan`,`story`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_product`; CREATE TABLE IF NOT EXISTS `zt_product` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1077,7 +1119,7 @@ CREATE TABLE IF NOT EXISTS `zt_product` ( PRIMARY KEY (`id`), KEY `acl` (`acl`), KEY `order` (`order`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_productplan`; CREATE TABLE IF NOT EXISTS `zt_productplan` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1091,11 +1133,13 @@ CREATE TABLE IF NOT EXISTS `zt_productplan` ( `end` date NOT NULL, `order` text NOT NULL, `closedReason` varchar(20) NOT NULL, + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), KEY `end` (`end`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_project`; CREATE TABLE IF NOT EXISTS `zt_project` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1157,9 +1201,9 @@ CREATE TABLE IF NOT EXISTS `zt_project` ( KEY `status` (`status`), KEY `acl` (`acl`), KEY `order` (`order`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectadmin`; -CREATE TABLE `zt_projectadmin` ( +CREATE TABLE IF NOT EXISTS `zt_projectadmin` ( `group` smallint(6) NOT NULL, `account` char(30) NOT NULL, `programs` text NOT NULL, @@ -1167,7 +1211,7 @@ CREATE TABLE `zt_projectadmin` ( `products` text NOT NULL, `executions` text NOT NULL, UNIQUE KEY `group_account` (`group`, `account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectcase`; CREATE TABLE IF NOT EXISTS `zt_projectcase` ( `project` mediumint(8) unsigned NOT NULL DEFAULT '0', @@ -1177,7 +1221,7 @@ CREATE TABLE IF NOT EXISTS `zt_projectcase` ( `version` smallint(6) NOT NULL DEFAULT '1', `order` smallint(6) unsigned NOT NULL, UNIQUE KEY `project` (`project`,`case`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectproduct`; CREATE TABLE IF NOT EXISTS `zt_projectproduct` ( `project` mediumint(8) unsigned NOT NULL, @@ -1185,7 +1229,7 @@ CREATE TABLE IF NOT EXISTS `zt_projectproduct` ( `branch` mediumint(8) unsigned NOT NULL, `plan` varchar(255) NOT NULL, PRIMARY KEY (`project`, `product`, `branch`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectspec`; CREATE TABLE IF NOT EXISTS `zt_projectspec` ( `project` mediumint(8) NOT NULL, @@ -1195,7 +1239,7 @@ CREATE TABLE IF NOT EXISTS `zt_projectspec` ( `begin` date NOT NULL, `end` date NOT NULL, UNIQUE KEY `project` (`project`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectstory`; CREATE TABLE IF NOT EXISTS `zt_projectstory` ( `project` mediumint(8) unsigned NOT NULL default '0', @@ -1206,7 +1250,7 @@ CREATE TABLE IF NOT EXISTS `zt_projectstory` ( `order` smallint(6) unsigned NOT NULL, UNIQUE KEY `project` (`project`,`story`), KEY `story` (`story`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_relation`; CREATE TABLE IF NOT EXISTS `zt_relation` ( `id` int(8) NOT NULL AUTO_INCREMENT, @@ -1223,7 +1267,7 @@ CREATE TABLE IF NOT EXISTS `zt_relation` ( `extra` char(30) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `relation` (`product`,`relation`,`AType`,`BType`, `AID`, `BID`) -) ENGINE='MyISAM' DEFAULT CHARSET=utf8; +) ENGINE='InnoDB' DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_release`; CREATE TABLE IF NOT EXISTS `zt_release` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1242,11 +1286,13 @@ CREATE TABLE IF NOT EXISTS `zt_release` ( `notify` varchar(255), `status` varchar(20) NOT NULL default 'normal', `subStatus` varchar(30) NOT NULL default '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), KEY `build` (`build`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_repo`; CREATE TABLE IF NOT EXISTS `zt_repo` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, @@ -1275,7 +1321,7 @@ CREATE TABLE IF NOT EXISTS `zt_repo` ( `fileServerPassword` varchar(100) NOT NULL default '', `deleted` tinyint(1) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_repobranch`; CREATE TABLE IF NOT EXISTS `zt_repobranch` ( `repo` mediumint(8) unsigned NOT NULL, @@ -1284,7 +1330,7 @@ CREATE TABLE IF NOT EXISTS `zt_repobranch` ( UNIQUE KEY `repo_revision_branch` (`repo`,`revision`,`branch`), KEY `branch` (`branch`), KEY `revision` (`revision`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_repofiles`; CREATE TABLE IF NOT EXISTS `zt_repofiles` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -1299,7 +1345,7 @@ CREATE TABLE IF NOT EXISTS `zt_repofiles` ( KEY `parent` (`parent`), KEY `repo` (`repo`), KEY `revision` (`revision`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_repohistory`; CREATE TABLE IF NOT EXISTS `zt_repohistory` ( `id` mediumint(9) NOT NULL AUTO_INCREMENT, @@ -1312,7 +1358,7 @@ CREATE TABLE IF NOT EXISTS `zt_repohistory` ( PRIMARY KEY (`id`), KEY `repo` (`repo`), KEY `revision` (`revision`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_score`; CREATE TABLE IF NOT EXISTS `zt_score` ( `id` bigint(12) unsigned NOT NULL AUTO_INCREMENT, @@ -1328,13 +1374,13 @@ CREATE TABLE IF NOT EXISTS `zt_score` ( KEY `account` (`account`), KEY `model` (`module`), KEY `method` (`method`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_searchdict`; CREATE TABLE IF NOT EXISTS `zt_searchdict` ( `key` smallint(5) unsigned NOT NULL, `value` char(3) NOT NULL, PRIMARY KEY (`key`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_searchindex`; CREATE TABLE IF NOT EXISTS `zt_searchindex` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -1348,9 +1394,8 @@ CREATE TABLE IF NOT EXISTS `zt_searchindex` ( PRIMARY KEY (`id`), UNIQUE KEY `object` (`objectType`,`objectID`), KEY `addedDate` (`addedDate`), - FULLTEXT KEY `content` (`content`), - FULLTEXT KEY `title` (`title`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; + FULLTEXT KEY `title_content` (`title`, `content`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_stage`; CREATE TABLE IF NOT EXISTS `zt_stage` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1363,7 +1408,7 @@ CREATE TABLE IF NOT EXISTS `zt_stage` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_stakeholder`; CREATE TABLE IF NOT EXISTS `zt_stakeholder` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT PRIMARY KEY, @@ -1379,7 +1424,7 @@ CREATE TABLE IF NOT EXISTS `zt_stakeholder` ( `editedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL, KEY `objectID` (`objectID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_story`; CREATE TABLE IF NOT EXISTS `zt_story` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1398,7 +1443,7 @@ CREATE TABLE IF NOT EXISTS `zt_story` ( `category` varchar(30) NOT NULL default 'feature', `pri` tinyint(3) unsigned NOT NULL default '3', `estimate` float unsigned NOT NULL, - `status` enum('','changed','active','draft','closed') NOT NULL default '', + `status` enum('','changing','active','draft', 'reviewing', 'closed') NOT NULL default '', `subStatus` varchar(30) NOT NULL default '', `color` char(7) NOT NULL, `stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released', 'closed') NOT NULL DEFAULT 'wait', @@ -1421,6 +1466,7 @@ CREATE TABLE IF NOT EXISTS `zt_story` ( `toBug` mediumint(8) unsigned NOT NULL, `childStories` varchar(255) NOT NULL, `linkStories` varchar(255) NOT NULL, + `linkRequirements` varchar(255) NOT NULL, `duplicateStory` mediumint(8) unsigned NOT NULL, `version` smallint(6) NOT NULL default '1', `feedbackBy` varchar(100) NOT NULL, @@ -1431,7 +1477,7 @@ CREATE TABLE IF NOT EXISTS `zt_story` ( KEY `product` (`product`), KEY `status` (`status`), KEY `assignedTo` (`assignedTo`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storyreview`; CREATE TABLE IF NOT EXISTS `zt_storyreview` ( `story` mediumint(9) NOT NULL, @@ -1440,7 +1486,7 @@ CREATE TABLE IF NOT EXISTS `zt_storyreview` ( `result` varchar(30) NOT NULL, `reviewDate` datetime NOT NULL, UNIQUE KEY `story` (`story`,`version`,`reviewer`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storyestimate`; CREATE TABLE IF NOT EXISTS `zt_storyestimate` ( `story` mediumint(9) NOT NULL, @@ -1450,7 +1496,7 @@ CREATE TABLE IF NOT EXISTS `zt_storyestimate` ( `openedBy` varchar(30) NOT NULL, `openedDate` datetime NOT NULL, UNIQUE KEY `story` (`story`,`round`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storyspec`; CREATE TABLE IF NOT EXISTS `zt_storyspec` ( `story` mediumint(9) NOT NULL, @@ -1459,7 +1505,7 @@ CREATE TABLE IF NOT EXISTS `zt_storyspec` ( `spec` mediumtext NOT NULL, `verify` mediumtext NOT NULL, UNIQUE KEY `story` (`story`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storystage`; CREATE TABLE IF NOT EXISTS `zt_storystage` ( `story` mediumint(8) unsigned NOT NULL, @@ -1468,7 +1514,7 @@ CREATE TABLE IF NOT EXISTS `zt_storystage` ( `stagedBy` char(30) NOT NULL, UNIQUE KEY `story_branch` (`story`,`branch`), KEY `story` (`story`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_suitecase`; CREATE TABLE IF NOT EXISTS `zt_suitecase` ( `suite` mediumint(8) unsigned NOT NULL, @@ -1476,7 +1522,7 @@ CREATE TABLE IF NOT EXISTS `zt_suitecase` ( `case` mediumint(8) unsigned NOT NULL, `version` smallint(5) unsigned NOT NULL, UNIQUE KEY `suitecase` (`suite`,`case`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_task`; CREATE TABLE IF NOT EXISTS `zt_task` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1523,6 +1569,7 @@ CREATE TABLE IF NOT EXISTS `zt_task` ( `lastEditedBy` varchar(30) NOT NULL, `lastEditedDate` datetime NOT NULL, `activatedDate` datetime NOT NULL, + `order` mediumint(8) unsigned NOT NULL, `repo` mediumint(8) unsigned NOT NULL, `mr` mediumint(8) unsigned NOT NULL, `entry` varchar(255) NOT NULL, @@ -1535,8 +1582,9 @@ CREATE TABLE IF NOT EXISTS `zt_task` ( KEY `execution` (`execution`), KEY `story` (`story`), KEY `parent` (`parent`), - KEY `assignedTo` (`assignedTo`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; + KEY `assignedTo` (`assignedTo`), + KEY `order` (`order`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_taskestimate`; CREATE TABLE IF NOT EXISTS `zt_taskestimate` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1548,7 +1596,7 @@ CREATE TABLE IF NOT EXISTS `zt_taskestimate` ( `work` text, PRIMARY KEY (`id`), KEY `task` (`task`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_taskspec`; CREATE TABLE IF NOT EXISTS `zt_taskspec` ( `task` mediumint(8) NOT NULL, @@ -1557,7 +1605,7 @@ CREATE TABLE IF NOT EXISTS `zt_taskspec` ( `estStarted` date NOT NULL, `deadline` date NOT NULL, UNIQUE KEY `task` (`task`,`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_team`; CREATE TABLE IF NOT EXISTS `zt_team` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1575,7 +1623,7 @@ CREATE TABLE IF NOT EXISTS `zt_team` ( `order` TINYINT(3) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `team` (`root`,`type`,`account`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testreport`; CREATE TABLE IF NOT EXISTS `zt_testreport` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1599,7 +1647,7 @@ CREATE TABLE IF NOT EXISTS `zt_testreport` ( `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testresult`; CREATE TABLE IF NOT EXISTS `zt_testresult` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1618,7 +1666,7 @@ CREATE TABLE IF NOT EXISTS `zt_testresult` ( KEY `case` (`case`), KEY `version` (`version`), KEY `run` (`run`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testrun`; CREATE TABLE IF NOT EXISTS `zt_testrun` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1632,7 +1680,7 @@ CREATE TABLE IF NOT EXISTS `zt_testrun` ( `status` char(30) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `task` (`task`,`case`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testsuite`; CREATE TABLE IF NOT EXISTS `zt_testsuite` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1641,6 +1689,7 @@ CREATE TABLE IF NOT EXISTS `zt_testsuite` ( `name` varchar(255) NOT NULL, `desc` mediumtext NOT NULL, `type` varchar(20) NOT NULL, + `order` smallint unsigned NOT NULL DEFAULT '0', `addedBy` char(30) NOT NULL, `addedDate` datetime NOT NULL, `lastEditedBy` char(30) NOT NULL, @@ -1648,7 +1697,7 @@ CREATE TABLE IF NOT EXISTS `zt_testsuite` ( `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`), KEY `product` (`product`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testtask`; CREATE TABLE IF NOT EXISTS `zt_testtask` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1670,11 +1719,13 @@ CREATE TABLE IF NOT EXISTS `zt_testtask` ( `testreport` mediumint(8) unsigned NOT NULL, `auto` varchar(10) NOT NULL DEFAULT 'no', `subStatus` varchar(30) NOT NULL default '', + `createdBy` varchar(30) NOT NULL, + `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`), KEY `build` (`build`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_todo`; CREATE TABLE IF NOT EXISTS `zt_todo` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1705,7 +1756,7 @@ CREATE TABLE IF NOT EXISTS `zt_todo` ( KEY `assignedTo` (`assignedTo`), KEY `finishedBy` (`finishedBy`), KEY `date` (`date`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_user`; CREATE TABLE IF NOT EXISTS `zt_user` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1753,7 +1804,7 @@ CREATE TABLE IF NOT EXISTS `zt_user` ( KEY `email` (`email`), KEY `commiter` (`commiter`), KEY `deleted` (`deleted`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_usercontact`; CREATE TABLE IF NOT EXISTS `zt_usercontact` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1762,14 +1813,14 @@ CREATE TABLE IF NOT EXISTS `zt_usercontact` ( `userList` text NOT NULL, PRIMARY KEY (`id`), KEY `account` (`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_usergroup`; CREATE TABLE IF NOT EXISTS `zt_usergroup` ( `account` char(30) NOT NULL default '', `group` mediumint(8) unsigned NOT NULL default '0', `project` text NOT NULL, UNIQUE KEY `account` (`account`,`group`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_userquery`; CREATE TABLE IF NOT EXISTS `zt_userquery` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1783,7 +1834,7 @@ CREATE TABLE IF NOT EXISTS `zt_userquery` ( PRIMARY KEY (`id`), KEY `account` (`account`), KEY `module` (`module`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_usertpl`; CREATE TABLE IF NOT EXISTS `zt_usertpl` ( `id` mediumint(8) unsigned NOT NULL auto_increment, @@ -1794,7 +1845,7 @@ CREATE TABLE IF NOT EXISTS `zt_usertpl` ( `public` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `account` (`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_userview`; CREATE TABLE IF NOT EXISTS `zt_userview` ( `account` char(30) NOT NULL, @@ -1803,7 +1854,7 @@ CREATE TABLE IF NOT EXISTS `zt_userview` ( `projects` mediumtext NOT NULL, `sprints` mediumtext NOT NULL, UNIQUE KEY `account` (`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_weeklyreport`; CREATE TABLE IF NOT EXISTS `zt_weeklyreport`( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1819,7 +1870,7 @@ CREATE TABLE IF NOT EXISTS `zt_weeklyreport`( `workload` varchar(255) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `week` (`project`,`weekStart`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_webhook`; CREATE TABLE IF NOT EXISTS `zt_webhook` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -1841,7 +1892,7 @@ CREATE TABLE IF NOT EXISTS `zt_webhook` ( `editedDate` datetime NOT NULL, `deleted` enum('0', '1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES ('*', '*', '*', '*', '*', '', '监控定时任务', 'zentao', 1, 'normal', '0000-00-00 00:00:00'), @@ -1858,7 +1909,8 @@ INSERT INTO `zt_cron` (`m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type ('1', '0', '*', '*', '*', 'moduleName=ci&methodName=initQueue', '创建周期性任务', 'zentao', 1, 'normal', '0000-00-00 00:00:00'), ('*/5', '*', '*', '*', '*', 'moduleName=ci&methodName=checkCompileStatus', '同步DevOps构建任务状态', 'zentao', 1, 'normal', '0000-00-00 00:00:00'), ('*/5', '*', '*', '*', '*', 'moduleName=ci&methodName=exec', '执行DevOps构建任务', 'zentao', 1, 'normal', '0000-00-00 00:00:00'), -('*/5', '*', '*', '*', '*', 'moduleName=mr&methodName=syncMR', '定时同步GitLab合并数据到禅道数据库', 'zentao', 1, 'normal', '0000-00-00 00:00:00'); +('*/5', '*', '*', '*', '*', 'moduleName=mr&methodName=syncMR', '定时同步GitLab合并数据到禅道数据库', 'zentao', 1, 'normal', '0000-00-00 00:00:00'), +('*/5', '*', '*', '*', '*', 'moduleName=compile&methodName=syncCompile', '定时同步构建记录', 'zentao', 1, 'normal', '0000-00-00 00:00:00'); INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES (1, 'rnd', 'ADMIN', 'admin', 'for administrator'), @@ -2358,9 +2410,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'story','report'), (1,'story','review'), (1,'story','tasks'), -(1,'story','track'), +(1,'product','track'), (1,'story','view'), -(1,'story','zeroCase'), +(1,'testcase','zeroCase'), +(1,'requirement','activate'), +(1,'requirement','assignTo'), +(1,'requirement','batchAssignTo'), +(1,'requirement','batchChangeBranch'), +(1,'requirement','batchChangeModule'), +(1,'requirement','batchClose'), +(1,'requirement','batchCreate'), +(1,'requirement','batchEdit'), +(1,'requirement','batchReview'), +(1,'requirement','change'), +(1,'requirement','close'), +(1,'requirement','create'), +(1,'requirement','delete'), +(1,'requirement','edit'), +(1,'requirement','export'), +(1,'requirement','recall'), +(1,'requirement','report'), +(1,'requirement','review'), +(1,'requirement','view'), (1,'svn','apiSync'), (1,'svn','cat'), (1,'svn','diff'), @@ -2729,8 +2800,10 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (2,'story','cases'), (2,'story','report'), (2,'story','tasks'), -(2,'story','track'), +(2,'product','track'), (2,'story','view'), +(2,'requirement','report'), +(2,'requirement','view'), (2,'svn','apiSync'), (2,'svn','cat'), (2,'svn','diff'), @@ -3025,9 +3098,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (3,'story','processStoryChange'), (3,'story','report'), (3,'story','tasks'), -(3,'story','track'), +(3,'product','track'), (3,'story','view'), -(3,'story','zeroCase'), +(3,'testcase','zeroCase'), +(3,'requirement','export'), +(3,'requirement','report'), +(3,'requirement','view'), (3,'svn','apiSync'), (3,'svn','cat'), (3,'svn','diff'), @@ -3519,9 +3595,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (4,'story','report'), (4,'story','review'), (4,'story','tasks'), -(4,'story','track'), +(4,'product','track'), (4,'story','view'), -(4,'story','zeroCase'), +(4,'testcase','zeroCase'), +(4,'requirement','activate'), +(4,'requirement','assignTo'), +(4,'requirement','batchAssignTo'), +(4,'requirement','batchChangeBranch'), +(4,'requirement','batchChangeModule'), +(4,'requirement','batchClose'), +(4,'requirement','batchCreate'), +(4,'requirement','batchEdit'), +(4,'requirement','batchReview'), +(4,'requirement','change'), +(4,'requirement','close'), +(4,'requirement','create'), +(4,'requirement','delete'), +(4,'requirement','edit'), +(4,'requirement','export'), +(4,'requirement','recall'), +(4,'requirement','report'), +(4,'requirement','review'), +(4,'requirement','view'), (4,'svn','apiSync'), (4,'svn','cat'), (4,'svn','diff'), @@ -4019,9 +4114,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (5,'story','report'), (5,'story','review'), (5,'story','tasks'), -(5,'story','track'), +(5,'product','track'), (5,'story','view'), -(5,'story','zeroCase'), +(5,'testcase','zeroCase'), +(5,'requirement','activate'), +(5,'requirement','assignTo'), +(5,'requirement','batchAssignTo'), +(5,'requirement','batchChangeBranch'), +(5,'requirement','batchChangeModule'), +(5,'requirement','batchClose'), +(5,'requirement','batchCreate'), +(5,'requirement','batchEdit'), +(5,'requirement','batchReview'), +(5,'requirement','change'), +(5,'requirement','close'), +(5,'requirement','create'), +(5,'requirement','delete'), +(5,'requirement','edit'), +(5,'requirement','export'), +(5,'requirement','recall'), +(5,'requirement','report'), +(5,'requirement','review'), +(5,'requirement','view'), (5,'svn','apiSync'), (5,'svn','cat'), (5,'svn','diff'), @@ -4393,9 +4507,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (6,'story','processStoryChange'), (6,'story','report'), (6,'story','tasks'), -(6,'story','track'), +(6,'product','track'), (6,'story','view'), -(6,'story','zeroCase'), +(6,'testcase','zeroCase'), +(6,'requirement','export'), +(6,'requirement','report'), +(6,'requirement','view'), (6,'svn','apiSync'), (6,'svn','cat'), (6,'svn','diff'), @@ -4798,9 +4915,28 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (7,'story','report'), (7,'story','review'), (7,'story','tasks'), -(7,'story','track'), +(7,'product','track'), (7,'story','view'), -(7,'story','zeroCase'), +(7,'testcase','zeroCase'), +(7,'requirement','activate'), +(7,'requirement','assignTo'), +(7,'requirement','batchAssignTo'), +(7,'requirement','batchChangeBranch'), +(7,'requirement','batchChangeModule'), +(7,'requirement','batchClose'), +(7,'requirement','batchCreate'), +(7,'requirement','batchEdit'), +(7,'requirement','batchReview'), +(7,'requirement','change'), +(7,'requirement','close'), +(7,'requirement','create'), +(7,'requirement','delete'), +(7,'requirement','edit'), +(7,'requirement','export'), +(7,'requirement','recall'), +(7,'requirement','report'), +(7,'requirement','review'), +(7,'requirement','view'), (7,'svn','apiSync'), (7,'svn','cat'), (7,'svn','diff'), @@ -5143,9 +5279,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (8,'story','processStoryChange'), (8,'story','report'), (8,'story','tasks'), -(8,'story','track'), +(8,'product','track'), (8,'story','view'), -(8,'story','zeroCase'), +(8,'testcase','zeroCase'), +(8,'requirement','export'), +(8,'requirement','report'), +(8,'requirement','view'), (8,'svn','apiSync'), (8,'svn','cat'), (8,'svn','diff'), @@ -5529,9 +5668,13 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (9,'story','report'), (9,'story','review'), (9,'story','tasks'), -(9,'story','track'), +(9,'product','track'), (9,'story','view'), -(9,'story','zeroCase'), +(9,'testcase','zeroCase'), +(9,'requirement','export'), +(9,'requirement','report'), +(9,'requirement','review'), +(9,'requirement','view'), (9,'svn','apiSync'), (9,'svn','cat'), (9,'svn','diff'), @@ -5780,8 +5923,11 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (10,'story','processStoryChange'), (10,'story','report'), (10,'story','tasks'), -(10,'story','track'), +(10,'product','track'), (10,'story','view'), +(10,'requirement','export'), +(10,'requirement','report'), +(10,'requirement','view'), (10,'svn','apiSync'), (10,'svn','cat'), (10,'svn','diff'), @@ -6030,9 +6176,12 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (11,'story','export'), (11,'story','report'), (11,'story','tasks'), -(11,'story','track'), +(11,'product','track'), (11,'story','view'), -(11,'story','zeroCase'), +(11,'testcase','zeroCase'), +(11,'requirement','export'), +(11,'requirement','report'), +(11,'requirement','view'), (11,'svn','apiSync'), (11,'svn','cat'), (11,'svn','diff'), @@ -6160,6 +6309,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_chat` ( `dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `pinnedMessages` text NOT NULL DEFAULT '', `mergedChats` text NOT NULL DEFAULT '', + `adminInvite` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `gid` (`gid`), KEY `name` (`name`), @@ -6167,7 +6317,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_chat` ( KEY `public` (`public`), KEY `createdBy` (`createdBy`), KEY `editedBy` (`editedBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_chatuser`; CREATE TABLE IF NOT EXISTS `zt_im_chatuser` ( @@ -6191,7 +6341,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_chatuser` ( KEY `star` (`star`), KEY `hide` (`hide`), UNIQUE KEY `chatuser` (`cgid`, `user`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_client`; CREATE TABLE IF NOT EXISTS `zt_im_client` ( @@ -6207,7 +6357,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_client` ( `editedBy` varchar(30) NOT NULL DEFAULT '', `status` enum('released','wait') NOT NULL DEFAULT 'wait', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_message`; CREATE TABLE IF NOT EXISTS `zt_im_message` ( @@ -6227,7 +6377,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_message` ( KEY `mcgid` (`cgid`), KEY `muser` (`user`), KEY `mtype` (`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_message_backup`; CREATE TABLE IF NOT EXISTS `zt_im_message_backup` ( @@ -6242,7 +6392,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_message_backup` ( `contentType` enum('text', 'plain', 'emotion', 'image', 'file', 'object', 'code') NOT NULL DEFAULT 'text', `data` text NOT NULL DEFAULT '', `deleted` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_message_index`; CREATE TABLE IF NOT EXISTS `zt_im_message_index` ( @@ -6259,7 +6409,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_message_index` ( KEY `end` (`end`), KEY `startDate` (`startDate`), KEY `endDate` (`endDate`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_chat_message_index`; CREATE TABLE IF NOT EXISTS `zt_im_chat_message_index` ( @@ -6281,7 +6431,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_chat_message_index` ( KEY `endDate` (`endDate`), KEY `chatstartindex` (`gid`,`startIndex`), KEY `chatendindex` (`gid`,`endIndex`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_messagestatus`; CREATE TABLE IF NOT EXISTS `zt_im_messagestatus` ( @@ -6289,7 +6439,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_messagestatus` ( `message` int(11) unsigned NOT NULL, `status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting', UNIQUE KEY `user` (`user`,`message`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_queue`; CREATE TABLE IF NOT EXISTS `zt_im_queue` ( @@ -6301,7 +6451,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_queue` ( `result` text NOT NULL, `status` char(30) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_conference`; CREATE TABLE IF NOT EXISTS `zt_im_conference` ( @@ -6314,7 +6464,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_conference` ( `openedBy` mediumint(8) NOT NULL DEFAULT 0, `openedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_conferenceaction`; CREATE TABLE IF NOT EXISTS `zt_im_conferenceaction` ( @@ -6326,7 +6476,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_conferenceaction` ( `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `device` char(40) NOT NULL DEFAULT 'default', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_im_userdevice`; CREATE TABLE IF NOT EXISTS `zt_im_userdevice` ( @@ -6343,7 +6493,7 @@ CREATE TABLE IF NOT EXISTS `zt_im_userdevice` ( KEY `lastLogin` (`lastLogin`), KEY `lastLogout` (`lastLogout`), UNIQUE KEY `userdevice` (`user`, `device`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_file` CHANGE `pathname` `pathname` char(100) NOT NULL; ALTER TABLE `zt_user` ADD `clientStatus` enum('online', 'away', 'busy', 'offline', 'meeting') NOT NULL DEFAULT 'offline'; @@ -6637,7 +6787,7 @@ CREATE TABLE IF NOT EXISTS `zt_relationoftasks` ( `action` ENUM( 'begin', 'end' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , PRIMARY KEY (`id`), KEY `relationoftasks` (`execution`,`task`) -) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; +) ENGINE = InnoDB CHARACTER SET utf8 COLLATE utf8_general_ci; REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'execution','gantt'), (1,'execution','relation'), @@ -6820,7 +6970,7 @@ CREATE TABLE IF NOT EXISTS `zt_report` ( `addedDate` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE OR REPLACE VIEW `ztv_executionsummary` AS select `zt_task`.`execution` AS `execution`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`execution`; CREATE OR REPLACE VIEW `ztv_projectsummary` AS select `zt_task`.`project` AS `project`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`estimate`,0)) AS `estimate`,sum(if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0)) AS `consumed`,sum(if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0)) AS `left`,count(0) AS `number`,sum(if(((`zt_task`.`status` <> 'done') and (`zt_task`.`status` <> 'closed')),1,0)) AS `undone`,sum((if((`zt_task`.`parent` >= '0'),`zt_task`.`consumed`,0) + if(((`zt_task`.`status` <> 'cancel') and (`zt_task`.`status` <> 'closed') and (`zt_task`.`parent` >= '0')),`zt_task`.`left`,0))) AS `totalReal` from `zt_task` where (`zt_task`.`deleted` = '0') group by `zt_task`.`project`; @@ -6941,10 +7091,11 @@ CREATE TABLE IF NOT EXISTS `zt_feedback` ( `assignedTo` varchar(255) NOT NULL, `assignedDate` datetime NOT NULL, `feedbackBy` varchar(100) NOT NULL, + `repeatFeedback` mediumint(8) NOT NULL DEFAULT 0, `mailto` varchar(255) NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_bug` ADD `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `caseVersion`; ALTER TABLE `zt_story` ADD `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0' AFTER `fromBug`; @@ -6956,7 +7107,7 @@ CREATE TABLE IF NOT EXISTS `zt_feedbackview` ( `account` char(30) NOT NULL, `product` mediumint(8) unsigned NOT NULL, UNIQUE KEY `account_product` (`account`,`product`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_serverroom`; CREATE TABLE IF NOT EXISTS `zt_serverroom` ( @@ -6973,7 +7124,7 @@ CREATE TABLE IF NOT EXISTS `zt_serverroom` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_account`; CREATE TABLE IF NOT EXISTS `zt_account` ( @@ -6997,7 +7148,7 @@ CREATE TABLE IF NOT EXISTS `zt_account` ( key `name` (`name`), key `provider` (`provider`), key `status` (`status`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_asset`; CREATE TABLE IF NOT EXISTS `zt_asset` ( @@ -7012,7 +7163,7 @@ CREATE TABLE IF NOT EXISTS `zt_asset` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_host`; CREATE TABLE IF NOT EXISTS `zt_host` ( @@ -7059,7 +7210,7 @@ CREATE TABLE IF NOT EXISTS `zt_host` ( `cloudPassword` varchar(255) NOT NULL DEFAULT '', `couldVPC` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_service`; CREATE TABLE IF NOT EXISTS `zt_service` ( @@ -7090,7 +7241,7 @@ CREATE TABLE IF NOT EXISTS `zt_service` ( `order` smallint(5) unsigned NOT NULL default '0', `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1, 'tree', 'editHost'); @@ -7120,7 +7271,7 @@ CREATE TABLE IF NOT EXISTS `zt_attend` ( KEY `reviewStatus` (`reviewStatus`), KEY `reviewedBy` (`reviewedBy`), UNIQUE KEY `attend` (`date`,`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_attendstat`; CREATE TABLE IF NOT EXISTS `zt_attendstat` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7146,7 +7297,7 @@ CREATE TABLE IF NOT EXISTS `zt_attendstat` ( KEY `month` (`month`), KEY `status` (`status`), UNIQUE KEY `attend` (`month`,`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_overtime`; CREATE TABLE IF NOT EXISTS `zt_overtime` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7170,7 +7321,7 @@ CREATE TABLE IF NOT EXISTS `zt_overtime` ( KEY `type` (`type`), KEY `status` (`status`), KEY `createdBy` (`createdBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_holiday`; CREATE TABLE IF NOT EXISTS `zt_holiday` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7183,7 +7334,7 @@ CREATE TABLE IF NOT EXISTS `zt_holiday` ( PRIMARY KEY (`id`), KEY `year` (`year`), KEY `name` (`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_leave`; CREATE TABLE IF NOT EXISTS `zt_leave` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7206,7 +7357,7 @@ CREATE TABLE IF NOT EXISTS `zt_leave` ( KEY `type` (`type`), KEY `status` (`status`), KEY `createdBy` (`createdBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_lieu`; CREATE TABLE IF NOT EXISTS `zt_lieu` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7228,7 +7379,7 @@ CREATE TABLE IF NOT EXISTS `zt_lieu` ( KEY `year` (`year`), KEY `status` (`status`), KEY `createdBy` (`createdBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_trip`; CREATE TABLE IF NOT EXISTS `zt_trip` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7248,7 +7399,7 @@ CREATE TABLE IF NOT EXISTS `zt_trip` ( PRIMARY KEY (`id`), KEY `year` (`year`), KEY `createdBy` (`createdBy`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_deploy`; CREATE TABLE IF NOT EXISTS `zt_deploy` ( @@ -7267,7 +7418,7 @@ CREATE TABLE IF NOT EXISTS `zt_deploy` ( `result` varchar(20) NOT NULL, `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_deployproduct`; CREATE TABLE IF NOT EXISTS `zt_deployproduct` ( `deploy` mediumint(8) unsigned NOT NULL, @@ -7275,7 +7426,7 @@ CREATE TABLE IF NOT EXISTS `zt_deployproduct` ( `release` mediumint(8) unsigned NOT NULL, `package` varchar(255) NOT NULL, UNIQUE KEY `deploy_product_release` (`deploy`,`product`,`release`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_deploystep`; CREATE TABLE IF NOT EXISTS `zt_deploystep` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7294,7 +7445,7 @@ CREATE TABLE IF NOT EXISTS `zt_deploystep` ( `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_testresult` ADD `deploy` mediumint(8) unsigned NOT NULL; -- DROP TABLE IF EXISTS `zt_deployscope`; CREATE TABLE IF NOT EXISTS `zt_deployscope` ( @@ -7303,7 +7454,7 @@ CREATE TABLE IF NOT EXISTS `zt_deployscope` ( `hosts` text NOT NULL, `remove` text NOT NULL, `add` text NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_vm`; CREATE TABLE IF NOT EXISTS `zt_vm` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -7335,7 +7486,7 @@ CREATE TABLE IF NOT EXISTS `zt_vm` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', `public` varchar(50) NOT NULL DEFAULT '', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_baseimage`; CREATE TABLE IF NOT EXISTS `zt_baseimage` ( `id` SMALLINT(7) unsigned NOT NULL AUTO_INCREMENT, @@ -7350,7 +7501,7 @@ CREATE TABLE IF NOT EXISTS `zt_baseimage` ( `suggestMemory` mediumint(6) unsigned NOT NULL DEFAULT 0, `suggestVolume` mediumint(6) unsigned NOT NULL DEFAULT 0, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_vmtemplate`; CREATE TABLE IF NOT EXISTS `zt_vmtemplate` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -7366,7 +7517,7 @@ CREATE TABLE IF NOT EXISTS `zt_vmtemplate` ( `diskSize` int NOT NULL DEFAULT 0, `osArch` varchar(50) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_browser`; CREATE TABLE IF NOT EXISTS `zt_browser` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -7377,16 +7528,16 @@ CREATE TABLE IF NOT EXISTS `zt_browser` ( `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_baseimagebrowser`; CREATE TABLE IF NOT EXISTS `zt_baseimagebrowser` ( `vmBackingID` int(10) NOT NULL, `browserID` int(10) NOT NULL, PRIMARY KEY (`vmBackingID`, `browserID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_traincourse`; -CREATE TABLE `zt_traincourse` ( +CREATE TABLE IF NOT EXISTS `zt_traincourse` ( `id` mediumint(8) NOT NULL AUTO_INCREMENT, `code` varchar(50) NOT NULL, `category` mediumint(8) NOT NULL, @@ -7400,7 +7551,7 @@ CREATE TABLE `zt_traincourse` ( `editedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_traincontents`; CREATE TABLE IF NOT EXISTS `zt_traincontents` ( @@ -7419,7 +7570,7 @@ CREATE TABLE IF NOT EXISTS `zt_traincontents` ( `editedDate` datetime NOT NULL, `deleted` tinyint(1) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_traincategory`; CREATE TABLE IF NOT EXISTS `zt_traincategory` ( @@ -7433,7 +7584,7 @@ CREATE TABLE IF NOT EXISTS `zt_traincategory` ( PRIMARY KEY (`id`), KEY `parent` (`parent`), KEY `path` (`path`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_trainrecords`; CREATE TABLE IF NOT EXISTS `zt_trainrecords` ( @@ -7442,7 +7593,7 @@ CREATE TABLE IF NOT EXISTS `zt_trainrecords` ( `objectType` varchar(10) NOT NULL, `status` varchar(10) NOT NULL, PRIMARY KEY (`user`, `objectId`, `objectType`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_doc` ADD `parent` smallint(5) unsigned NOT NULL DEFAULT '0' AFTER `type`, @@ -7472,7 +7623,7 @@ CREATE TABLE IF NOT EXISTS `zt_faq` ( `answer` text NOT NULL, `addedtime` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_task` ADD `feedback` mediumint(8) unsigned NOT NULL AFTER `fromBug`; ALTER TABLE `zt_todo` ADD `feedback` mediumint(8) unsigned NOT NULL AFTER `end`; @@ -7494,7 +7645,7 @@ CREATE TABLE IF NOT EXISTS `zt_domain`( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), key `domain` (`domain`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP VIEW IF EXISTS `view_datasource_5`; CREATE VIEW `view_datasource_5` AS select `id`,`name` from `zt_task` where `deleted` = '0' and vision = 'rnd'; @@ -8530,7 +8681,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflow` ( KEY `module` (`module`), KEY `order` (`order`), UNIQUE KEY `unique` (`app`, `module`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowaction`; CREATE TABLE IF NOT EXISTS `zt_workflowaction` ( @@ -8569,7 +8720,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowaction` ( KEY `action` (`action`), KEY `order` (`order`), UNIQUE KEY `unique` (`module`, `action`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowdatasource`; CREATE TABLE IF NOT EXISTS `zt_workflowdatasource` ( @@ -8588,7 +8739,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowdatasource` ( `editedDate` datetime NOT NULL, PRIMARY KEY (`id`), KEY `type` (`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowfield`; CREATE TABLE IF NOT EXISTS `zt_workflowfield` ( @@ -8623,7 +8774,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowfield` ( KEY `field` (`field`), KEY `order` (`order`), UNIQUE KEY `unique` (`module`, `field`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowlayout`; CREATE TABLE IF NOT EXISTS `zt_workflowlayout` ( @@ -8644,7 +8795,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlayout` ( KEY `action` (`action`), KEY `order` (`order`), UNIQUE KEY `unique` (`module`, `action`, `field`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowlabel`; CREATE TABLE IF NOT EXISTS `zt_workflowlabel` ( @@ -8664,7 +8815,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlabel` ( `editedDate` datetime NOT NULL, PRIMARY KEY (`id`), KEY `module` (`module`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowlinkdata`; CREATE TABLE IF NOT EXISTS `zt_workflowlinkdata` ( @@ -8675,7 +8826,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlinkdata` ( `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, UNIQUE KEY `unique` (`objectType`, `objectID`, `linkedType`, `linkedID`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowrelation`; CREATE TABLE IF NOT EXISTS `zt_workflowrelation` ( @@ -8689,7 +8840,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowrelation` ( `createdBy` char(30) NOT NULL, `createdDate` datetime NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowrelationlayout`; CREATE TABLE IF NOT EXISTS `zt_workflowrelationlayout` ( @@ -8705,7 +8856,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowrelationlayout` ( KEY `action` (`action`), KEY `order` (`order`), UNIQUE KEY `unique` (`prev`, `next`, `action`, `field`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowrule`; CREATE TABLE IF NOT EXISTS `zt_workflowrule` ( @@ -8719,7 +8870,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowrule` ( `editedDate` datetime NOT NULL, PRIMARY KEY (`id`), KEY `type` (`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowsql`; CREATE TABLE IF NOT EXISTS `zt_workflowsql` ( @@ -8737,7 +8888,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowsql` ( KEY `module` (`module`), KEY `field` (`field`), KEY `action` (`action`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowversion`; CREATE TABLE IF NOT EXISTS `zt_workflowversion` ( @@ -8755,7 +8906,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowversion` ( UNIQUE KEY `moduleversion` (`module`, `version`), KEY `module` (`module`), KEY `version` (`version`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workflowreport`; CREATE TABLE IF NOT EXISTS `zt_workflowreport` ( @@ -8771,7 +8922,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowreport` ( `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, PRIMARY KEY `id` (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_action` CHANGE `action` `action` varchar(80) NOT NULL DEFAULT ''; ALTER TABLE `zt_action` CHANGE `extra` `extra` text; @@ -8994,7 +9145,7 @@ CREATE TABLE IF NOT EXISTS `zt_durationestimation` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_workestimation`; CREATE TABLE IF NOT EXISTS `zt_workestimation` ( @@ -9014,7 +9165,7 @@ CREATE TABLE IF NOT EXISTS `zt_workestimation` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', `dayHour` decimal(10,2) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_intervention`; CREATE TABLE IF NOT EXISTS `zt_intervention` ( @@ -9031,7 +9182,7 @@ CREATE TABLE IF NOT EXISTS `zt_intervention` ( `deleted` enum('0','1') NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `project` (`project`,`activity`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_activity`; CREATE TABLE IF NOT EXISTS `zt_activity` ( @@ -9052,7 +9203,7 @@ CREATE TABLE IF NOT EXISTS `zt_activity` ( `order` mediumint(8) DEFAULT '0', `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_auditcl`; CREATE TABLE IF NOT EXISTS `zt_auditcl` ( @@ -9073,7 +9224,7 @@ CREATE TABLE IF NOT EXISTS `zt_auditcl` ( `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_auditplan`; CREATE TABLE IF NOT EXISTS `zt_auditplan` ( @@ -9101,7 +9252,7 @@ CREATE TABLE IF NOT EXISTS `zt_auditplan` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', `checkBy` varchar(30) NOT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_auditresult`; CREATE TABLE IF NOT EXISTS `zt_auditresult` ( @@ -9122,7 +9273,7 @@ CREATE TABLE IF NOT EXISTS `zt_auditresult` ( `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_nc`; CREATE TABLE IF NOT EXISTS `zt_nc` ( @@ -9151,7 +9302,7 @@ CREATE TABLE IF NOT EXISTS `zt_nc` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_zoutput`; CREATE TABLE IF NOT EXISTS `zt_zoutput` ( @@ -9169,7 +9320,7 @@ CREATE TABLE IF NOT EXISTS `zt_zoutput` ( `order` mediumint(8) DEFAULT '0', `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_process`; CREATE TABLE IF NOT EXISTS `zt_process` ( @@ -9190,7 +9341,7 @@ CREATE TABLE IF NOT EXISTS `zt_process` ( `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_programactivity`; CREATE TABLE IF NOT EXISTS `zt_programactivity` ( @@ -9208,7 +9359,7 @@ CREATE TABLE IF NOT EXISTS `zt_programactivity` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_programoutput`; CREATE TABLE IF NOT EXISTS `zt_programoutput` ( @@ -9227,7 +9378,7 @@ CREATE TABLE IF NOT EXISTS `zt_programoutput` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_programprocess`; CREATE TABLE IF NOT EXISTS `zt_programprocess` ( @@ -9244,7 +9395,7 @@ CREATE TABLE IF NOT EXISTS `zt_programprocess` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_basicmeas`; CREATE TABLE IF NOT EXISTS `zt_basicmeas` ( @@ -9271,7 +9422,7 @@ CREATE TABLE IF NOT EXISTS `zt_basicmeas` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_budget`; CREATE TABLE IF NOT EXISTS `zt_budget` ( @@ -9288,7 +9439,7 @@ CREATE TABLE IF NOT EXISTS `zt_budget` ( `lastEditedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_researchplan`; CREATE TABLE IF NOT EXISTS `zt_researchplan` ( @@ -9311,7 +9462,7 @@ CREATE TABLE IF NOT EXISTS `zt_researchplan` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_researchreport`; CREATE TABLE IF NOT EXISTS `zt_researchreport` ( @@ -9333,7 +9484,7 @@ CREATE TABLE IF NOT EXISTS `zt_researchreport` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_meeting`; CREATE TABLE IF NOT EXISTS `zt_meeting` ( @@ -9361,7 +9512,7 @@ CREATE TABLE IF NOT EXISTS `zt_meeting` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM CHARSET=utf8; +) ENGINE=InnoDB CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_meetingroom`; CREATE TABLE IF NOT EXISTS `zt_meetingroom` ( @@ -9377,7 +9528,7 @@ CREATE TABLE IF NOT EXISTS `zt_meetingroom` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM CHARSET=utf8; +) ENGINE=InnoDB CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_assetlib`; CREATE TABLE IF NOT EXISTS `zt_assetlib` ( @@ -9385,13 +9536,14 @@ CREATE TABLE IF NOT EXISTS `zt_assetlib` ( `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `desc` mediumtext NOT NULL, + `order` SMALLINT UNSIGNED NOT NULL DEFAULT '0', `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, `editedBy` varchar(30) NOT NULL, `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM CHARSET=utf8; +) ENGINE=InnoDB CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_meastemplate`; CREATE TABLE IF NOT EXISTS `zt_meastemplate` ( @@ -9403,7 +9555,7 @@ CREATE TABLE IF NOT EXISTS `zt_meastemplate` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_programreport`; CREATE TABLE IF NOT EXISTS `zt_programreport` ( @@ -9417,7 +9569,7 @@ CREATE TABLE IF NOT EXISTS `zt_programreport` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_measrecords`; CREATE TABLE IF NOT EXISTS `zt_measrecords` ( @@ -9439,7 +9591,7 @@ CREATE TABLE IF NOT EXISTS `zt_measrecords` ( KEY `product` (`product`), KEY `project` (`project`), KEY `time` (`year`, `month`, `day`, `week`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_object`; CREATE TABLE IF NOT EXISTS `zt_object` ( @@ -9462,7 +9614,7 @@ CREATE TABLE IF NOT EXISTS `zt_object` ( `createdBy` char(30) NOT NULL, `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_review`; CREATE TABLE IF NOT EXISTS `zt_review` ( @@ -9489,7 +9641,7 @@ CREATE TABLE IF NOT EXISTS `zt_review` ( `auditResult` char(30) NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_reviewcl`; CREATE TABLE IF NOT EXISTS `zt_reviewcl` ( @@ -9508,7 +9660,7 @@ CREATE TABLE IF NOT EXISTS `zt_reviewcl` ( `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; +) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_reviewresult`; CREATE TABLE IF NOT EXISTS `zt_reviewresult` ( @@ -9522,7 +9674,7 @@ CREATE TABLE IF NOT EXISTS `zt_reviewresult` ( `createdDate` date NOT NULL, `consumed` float NOT NULL, UNIQUE KEY `reviewer` (`review`,`reviewer`,`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_reviewissue`; CREATE TABLE IF NOT EXISTS `zt_reviewissue` ( @@ -9545,7 +9697,7 @@ CREATE TABLE IF NOT EXISTS `zt_reviewissue` ( `createdDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_reviewlist`; CREATE TABLE IF NOT EXISTS `zt_reviewlist` ( @@ -9562,7 +9714,7 @@ CREATE TABLE IF NOT EXISTS `zt_reviewlist` ( `assignedBy` varchar(30) NOT NULL, `assignedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_cmcl`; CREATE TABLE IF NOT EXISTS `zt_cmcl` ( @@ -9579,7 +9731,7 @@ CREATE TABLE IF NOT EXISTS `zt_cmcl` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_solutions`; CREATE TABLE IF NOT EXISTS `zt_solutions` ( @@ -9596,7 +9748,7 @@ CREATE TABLE IF NOT EXISTS `zt_solutions` ( `editedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_measqueue`; CREATE TABLE IF NOT EXISTS `zt_measqueue` ( @@ -9612,7 +9764,7 @@ CREATE TABLE IF NOT EXISTS `zt_measqueue` ( `updateDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_issue`; CREATE TABLE IF NOT EXISTS `zt_issue` ( @@ -9650,7 +9802,7 @@ CREATE TABLE IF NOT EXISTS `zt_issue` ( `approvedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_risk`; CREATE TABLE IF NOT EXISTS `zt_risk` ( @@ -9696,14 +9848,14 @@ CREATE TABLE IF NOT EXISTS `zt_risk` ( `approvedDate` date NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_riskissue`; CREATE TABLE IF NOT EXISTS `zt_riskissue` ( `risk` mediumint(8) unsigned NOT NULL, `issue` mediumint(8) unsigned NOT NULL, UNIQUE KEY `risk_issue` (`risk`,`issue`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_opportunity`; CREATE TABLE IF NOT EXISTS `zt_opportunity` ( @@ -9749,7 +9901,7 @@ CREATE TABLE IF NOT EXISTS `zt_opportunity` ( `lastCheckedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_trainplan`; CREATE TABLE IF NOT EXISTS `zt_trainplan` ( @@ -9770,7 +9922,7 @@ CREATE TABLE IF NOT EXISTS `zt_trainplan` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_gapanalysis`; CREATE TABLE IF NOT EXISTS `zt_gapanalysis` ( @@ -9787,7 +9939,7 @@ CREATE TABLE IF NOT EXISTS `zt_gapanalysis` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `project_account` (`project`,`account`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; ALTER TABLE `zt_bug` ADD `injection` mediumint(8) unsigned NOT NULL AFTER `product`, @@ -13570,7 +13722,7 @@ CREATE TABLE IF NOT EXISTS `zt_sqlview` ( `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8; SET global log_bin_trust_function_creators = 1; SET global sql_mode = ''; USE `__TABLE__`; diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 19bd0cad7b..eacaf00de5 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -1,3 +1,277 @@ +2022-08-25 17.6 +完成的需求 +开源版: +30520 用户需求和研发需求权限区分 +30718 我的地盘软件需求列表区块软件需求列表中将草稿状态调整为评审中,新增草稿状态的需求展示 +30721 贡献列表中用户需求和软件需求列表中将草稿状态调整为评审中 +30722 提软件需求和提用户需求页面中增加存为草稿按钮 +30724 草稿状态的需求详情中增加提交评审操作 +30725 软件需求和用户需求列表筛选标签中将草稿标签调整为评审中 +30726 软件需求和用户需求列表筛选标签中增加草稿标签 +30727 计划关联需求时搜索列表中将草稿调整为评审中 +30729 需求报表中按状态进行统计表中将草稿调整为评审中,新增草稿状态的统计 +30730 release关联需求时过滤掉草稿和评审中状态的需求 +30731 项目关联需求时过滤掉草稿和评审中状态的需求 +30732 项目需求列表中通过新增需求,可以展示草稿和评审中的需求 +30733 执行关联需求时过滤掉草稿和评审中状态的需求 +30734 执行需求列表中通过新增需求后可以展示草稿和评审中状态的需求 +30735 Scrum看板的需求类泳道中通过新增需求可以展示草稿和评审中状态的需求 +30736 专业研发看板的需求类泳道中通过新增需求可以展示草稿和评审中状态的需求 +30737 build关联需求时过滤掉草稿和评审中状态的需求 +30738 年度总结报表中需求状态分布中将草稿状态调整为评审中,新增草稿状态 +30739 产品统计报表中产品汇总表中将草稿状态调整为评审中,新增草稿状态 +30740 产品统计报表中产品需求状态分布表中将草稿状态调整为评审中,新增草稿状态 +30741 项目统计报表中项目需求状态分布表中将草稿状态调整为评审中,新增草稿状态 +30743 草稿状态对应需求阶段的规则 +31134 新增的草稿状态需求不受强制评审流程控制 +31251 实现草稿状态需求的提交评审功能 +34650 产品列表中用户需求和研发需求增加评审中状态 +34651 产品概况中其他信息模块软需维度优化 +34896 软件需求状态“已变更”调整为“变更中” +34897 用户需求状态“已变更”调整为“变更中” +34898 已关闭的软件需求激活后状态可以选择“激活”或者关闭前的状态 +34899 已关闭的用户需求激活后状态可以选择“激活”或者关闭前的状态 +34900 软需从草稿提交评审,根据不同评审结果进行后续处理 +34901 用需从草稿提交评审,根据不同评审结果进行后续处理 +34902 软件需求草稿状态时按钮调整 +34903 软件需求评审中状态时按钮调整 +34904 软件需求变更中状态时按钮调整 +34922 软件需求激活状态时按钮调整 +34924 用户需求草稿状态时按钮调整 +34925 用户需求评审中状态时按钮调整 +34926 用户需求变更中状态时按钮调整 +34927 用户需求激活状态时按钮调整 +34931 Bug转需求时可以保存为草稿 +34933 已关闭的需求激活后指派人不能选择closed +34934 需求变更评审时,系统根据需求不同评审结果进行后续处理 +34935 草稿需求评审时,评审人可选择确认通过、有待明确、拒绝 +35080 创建bug页面操作系统、浏览器支持多选 +35278 执行中转入任务页面增加分页展示 +35301 回收站的执行列表中增加所属项目字段 +35320 需求草稿状态时可以修改草稿内容 +35321 发起人对变更流程提交至”评审中“的需求选择撤销后需求根据状态回溯到不同内容 +35356 父阶段状态跟随子阶段状态自动更改 +35413 文档切换所属文档库时需要同步附件 +35821 回收站的任务列表中增加所属执行字段 +35887 关闭的bug指派人显示closed,不可编辑 +35908 在搜索表单中通过日期字段检索时去掉00:00:00的格式 +35935 修改零用例软需和矩阵的权限位置 +35998 更新bug中操作系统码值 +35999 更新bug中浏览器码值 +36111 bug编辑页面可以关联用例 +36184 测试单列表增加项目信息展示 +36188 需求按照优先级排序时,空值放最后 +36189 Bug按照优先级或严重程度排序时,空值放最后 +36190 用例关联bug和用例页增加分页 +36522 注册系统管理员的密码规则同系统中中级密码强度 +企业版: +28045 反馈关闭原因为重复时,增加重复反馈输入的选项 +30523 反馈转Bug时取消选择项目弹窗直接进入提Bug页面 +30912 地盘日志列表新建日志时可以搜索该用户参与的所有执行 +31984 反馈增加批量导入功能 +33940 反馈增加导出模板功能 +34296 提交反馈默认公开 +34844 组织日志菜单下增加增加未填写日志成员的选项 +34998 反馈导出时的时间支持精确到分秒 +35024 用户需求和研发需求的导出数据增加类别字段 +35083 执行甘特图支持在图上用连接的方式维护任务关系 +35861 甘特图全屏样式优化 +36185 执行甘特图查看任务关系维护按钮、设置按钮、甘特图按钮优化 +36581 任务工时明细表的横向滚动条置顶显示 +36618 有编辑他人反馈权限,可以批量编辑他人反馈 +旗舰版: +30432 瀑布项目设计功能类型支持自定义功能 +34682 资产库可以排序 +修复的Bug +26232 执行软件需求列表简单表格下横向滚动条显示遮挡 +26272 地盘待处理/贡献研发需求列表中,子需求的名称和所属产品未显示title +26380 复制项目时项目计划起止日期还是受项目集计划起止日期限制 +26448 列表设置弹窗界面高度需要优化 +26614 编辑项目页面计划起止日期/预算提示文案样式优化 +26618 创建测试任务时可以选择到已创建测试任务的需求 +26644 超出项目集计划起止日期提示换行 +26645 鼠标悬浮在附上时页面抖动 +25925 执行信息确认页面,日期选择后控件没有自动收起 +25929 敏捷项目和迭代设置中的白名单列表没有被复制 +25969 阶段信息确认页面没有显示已有的阶段负责人和阶段类型 +25974 阶段信息确认页面修改负责人后,没有按照修改后的负责人进行显示 +25989 英文下迭代信息确认页面表头显示优化 +25996 复制项目时,执行信息确认页面执行的状态默认设置应该为未开始 +25999 复制项目时,执行信息确认页面没有校验计划开始结束时间的先后 +26032 项目中发起评审,弹窗字段未居中 +26034 英文下项目中发起审批,文本换行 +26054 英德法下甘特图页面报错 +26057 英德法下甘特图页面没有显示分组选项 +26303 复制迭代时间控件一直显示 +26326 甘特图阶段工期计算错误 +26327 阶段甘特图中任务工期计算错误 +26365 项目计划评审页面自定义表单设置样式问题 +26580 评审项目计划页面甘特图切换为按指派给分组跳转到了阶段甘特图页面 +26638 甘特图拖动排序历史记录没有写中文语言项 +26655 瀑布项目设计三级导航不高亮了 +25961 迅捷页面用户授权异常 +26200 自定义库目录修改所属文档库到wiki库不能查看 +26221 导出数据的excel中,“抄送给”显示成了用户名 +26265 导入大数据测试用例页面有报错 +26278 导入文件超出PHP最大上传大小时没有提示 +26364 编辑项目页面有代码报错 +26371 导出的需求,用户名的显示不一致 +26424 导入用例页面无影响,提示PHPExcel原因 +26657 不能批量编辑他人反馈 + +2022-08-11 17.5 +完成的需求 +开源版: +15665 可以设置用户查看的团队范围 +15666 增加部门维度查看团队 +31754 Scrum看板中任务看板按需求分组时需求列支持按条件排序 +34360 修改会议详情页面附件重命名样式 +34928 代理原因登录失败时,提醒用户检查代理服务 +34994 面板客户端下载菜单中增加移动端的下载功能 +35050 项目执行列表的筛选标签右侧增加编辑执行的设置 +35057 需求通过编辑或批量设置调整计划后,计划历史记录中增加关联或移除的记录 +35058 Bug通过编辑调整计划后,计划历史记录中增加关联或移除的记录 +35169 需求编辑页面增加关联相关需求功能 +35172 需求详情页面展示关联的相关需求 +35173 用户需求编辑页面增加关联相关用户需求功能 +35175 用户需求详情页面展示关联的相关用户需求 +35189 批量创建测试类型任务后子任务所属模块默认取需求所属模块 +35255 创建测试单页面中描述编辑器支持保存模板和应用模板功能 +35270 创建/编辑项目集时项目集同名提示优化 +35279 执行列表增加搜索功能 +35295 后台权限中将选择项目模板权限合并到创建项目权限中 +35357 LDAP原因登录失败时,提醒用户检查LDAP服务 +35362 用例搜索表单中搜索结果条件增加“未执行”选项 +35373 地盘待处理的任务列表中过滤掉已取消、已暂停、已关闭、已删除状态的任务 +35410 在文档库下创建文档时,第一步不默认创建空白文档,第二步保存后才创建成功 +35411 文档编辑页面中编辑基本信息后不保存,信息不保存 +35412 文档编辑页面中附件编辑后局部刷新 +35414 创建/编辑产品时产品同名提示优化 +35415 创建/编辑项目时项目同名提示优化 +35416 创建/编辑执行时执行同名提示优化 +35441 通用看板导入的执行卡片同步展示执行进度 +35442 通用看板导入的计划、发布、版本卡片不展示进度 +35444 Bug列表中所属执行、所属计划、创建者字段鼠标悬浮时支持显示全称 +35451 创建/编辑执行时执行同代号提示优化 +35453 创建/编辑项目时项目同代号提示优化 +35455 创建/编辑产品时产品同代号提示优化 +35468 文档创建页面中基本信息的抄送给用户列表维护弹窗样式优化 +35473 编辑项目时,允许项目预算超过父项目集 +35474 创建项目时,允许项目预算超过父项目集 +35476 编辑子项目集时,预算允许超过父项目集 +35477 创建子项目集时,预算允许超过父项目集的金额 +35478 创建项目时,计划开始日期允许小于父项目集 +35479 创建子项目集时,计划开始日期允许小于父项目集 +35480 编辑项目时,项目集的计划开始日期允许小于父项目集 +35481 编辑子项目集时,允许修改子项目集的计划开始时间小于父项目集的计划开始时间 +35482 创建项目时,项目的计划完成时间允许大于父项目集的计划完成时间 +35483 创建子项目集时,子项目集的计划完成时间允许大于父项目集的计划完成时间 +35484 编辑项目时,允许修改项目的计划完成时间大于父项目集的计划完成时间 +35485 编辑子项目集时,允许修改子项目集的计划完成时间大于父项目集的计划完成时间 +35490 优化修改密码的密码提示语 +35491 优化邮箱修改密码的密码提示语 +35493 全局搜索的搜索项优化排序 +35599 批量编辑项目时,允许修改项目的时间范围超出所属项目集的时间范围 +35600 创建和编辑项目时,计划起止日期超出父项目集日期范围,增加提示信息 +35601 创建和编辑项目时,预算金额超出父项目集时增加提示信息 +35602 创建和编辑子项目集时,计划起止日期超出父项目集的日期范围时,增加提示信息 +35603 创建和编辑子项目集时,预算金超出父项目集时,增加提示信息 +35624 累积流图时间周期优化 +35706 执行需求列表批量转任务时增加必填项判断 +35737 产品列表筛选标签的数量统计逻辑优化 +35771 编辑父项目集时,计划起止日期不包含子项目集的日期范围时,增加提示信息 +35799 地盘执行列表中角色字段修改为“我的角色”,鼠标悬浮展示全称 +35800 地盘贡献研发需求列表中,名称和所属产品字段支持鼠标悬浮显示全部内容 +35801 产品研发需求列表中版本号居中显示 +35816 用例关联多个测试单时,用例列表展示多条用例,分别对应不同测试单 +35817 修改发布中研发需求列表的子需求图标的圆角和颜色 +35818 发布中解决bug列表的解决日期没有定义时,显示为空 +35819 发布中研发需求列表预计字段的右侧内间距修改为16px +35826 修改项目集列表预算字段表头右侧内边距为16px +35834 产品研发需求列表中日期字段不定义时,显示为空 +35835 用例列表中最后修改者字段的宽度调整为92px +35863 项目度量的统计项目汇总表的负责人、计划开始、计划完成和任务数量字段居中显示 +35865 执行列表中执行状态字段居中显示 +35867 项目发布列表中日期类字段居中显示 +35937 产品发布通知邮件中直接展示完成的需求、解决的Bug、遗留的Bug +35939 密码难度规则优化 +企业版: +6130 甘特图支持拖拽设置任务的起止日期 +7742 反馈模块动作设计增加回复和追问动作 +8252 动作界面只读字段设置默认值,创建的时候写入到数据库 +9004 数据校验取消校验按钮交互优化 +33993 甘特图样式优化 +34482 新增反馈编辑他人反馈的权限 +35082 执行甘特图,增加任务顺序的拖动排序功能 +35857 反馈列表转用户需求icon更换 +35933 执行甘特图的持续天数改成工期 +35236 在执行需求列表的搜索条件中可以搜索工作流的需求流程中新增的字段 +35699 bug模块动作设计增加批量激活的动作 +35802 工作流自定义流程,保存成功的提示交互优化 +旗舰版: +35836 项目问题列表中优先级字段居中显示 +35837 项目问题列表“优先级”字段修改为“P” +35838 项目风险列表中风险系数和优先级字段居中显示 +35868 瀑布项目培训能力差距分析列表各字段宽度调整 +35997 项目度量的项目工作量报表的右侧标题加粗显示 +32555 瀑布项目甘特图支持拖动调整起止日期 +33995 甘特图样式优化 +34893 项目计划甘特图,增加阶段/任务顺序的拖动排序功能 +34895 增加按指派分组功能 +35061 甘特图编辑权限 +35382 复制项目交互样式优化 +35393 甘特图升级到最近版本 +34372 新建项目增加复制项目信息入口 +34723 项目复制选择项目 +34724 项目复制信息 +34725 项目复制项目信息确认 +34726 项目复制阶段信息确认 +34727 项目复制迭代信息确认 +34728 项目复制弹窗提示 +35217 复制项目,阶段信息确认页面增加阶段选择弹窗 +35218 复制项目的交互样式优化 +35310 复制项目增加团队成员与权限复制 +36036 关闭审批后停用发起动作,再次开启审批未自动启用动作 +禅道客户端: +34119 一键包集成喧喧网页端 +34460 优化会话中禅道链接卡片的跳转交互 +34667 完善XXD命令行应用给出的提示 +34668 修改docker入口脚本,确保owt中的rabbitmq正常启动 +34669 服务器地址不正确导致客户端登录失败后,尝试去掉路径后进行重试 +34670 完善音视频服务器端口配置和提示 +34671 优化音视频服务配置中“是否启用HTTPS”的设置 +34672 设计并增加离线部署SRS音视频的方案 +34673 没有麦克风时允许加入会议 +34848 解决服务器时间和客户端时间不一样的问题 +35087 研究喧喧和其他应用系统的多页面集成 +35088 删除服务器聊天记录的功能 +35268 通过服务端下载客户端后,登录时带入服务端地址 +35280 实现自动清理解散90天以上群数据的功能 +35294 后台检查XXC是否有新版时去掉XXB的版本判断 +35297 网络诊断时给出具体提示以引导用户 +修复的Bug +22662 执行任务列表父子任务显示错乱 +24608 英文下批量编辑执行页面执行状态名称显示不全 +24743 测试单下所有用例页面执行状态排序按钮部分遮挡 +25416 产品列表分页逻辑问题 +25563 已设置颜色的任务名称,阶段列表显示任务名称的颜色 +25837 产品-计划的需求列表没有展示需求标题颜色 +25851 导入任务相关研发需求详情弹窗中样式问题 +25282 导入用户时,左右滚动条必须拖动到底部才显示 +25019 需要测试再进行详细确认:xxd以windows服务的形式启动(注意是在windows管理的服务里面点击启动),日志会存在C:\Windows\System32\log下 +25273 禅道卡片中的弹窗不展示 +25390 一张图片发送多人再撤回其中一张图,在其他窗口中图片显示已撤回 +25402 sendChatMessage返回值有问题 +25427 提示升级页面不显示了 +25526 后台没有被禁用的用户登录客户端时提示“账号被禁用” +25603 喧喧一键安装包安装xxd错误 +25605 独立消息记录窗口中链接打不开 +25622 连续发送消息不给提示 +25628 客户端链接转任务跳转到地盘 +25630 消息记录点击两次喧喧直接崩溃了 +25644 产品计划卡片没显示内容 +25646 禅道客户端一、口、x遮挡成员按钮 + 2022-07-27 17.4 完成的需求 开源版: @@ -82,6 +356,19 @@ 33530 资产机会库机会列表页面审批字段居左显示 33823 问题指派页面增加备注 34097 修改执行QA不符合项详情页面中解决图标 +34729 QA质量保证计划可以批量编辑 +30071 项目甘特图中增加任务名称的显示 +28556 瀑布项目中计划的甘特图支持按日/周/月维度查看 +29700 项目甘特图中的任务支持点击查看详情 +29944 项目甘特图中支持显示阶段和任务的负责人 +34795 项目甘特图可以在阶段或任务前增加图标显示状态 +34742 项目甘特图中没有起止日期的任务的时间显示为所属阶段时间 +34729 QA质量保证计划可以批量编辑 +35424 产品计划增加审批设置 +35437 内置模块显示审批进度。 +35438 内置模块增加待我审批标签 +35596 产品发布增加审批设置 +35597 测试单增加审批设置 禅道客户端: 34124 XXD可以从XXB主动拉取配置 34123 喧喧增加禅道的checktable.php以便自动修复数据库 @@ -107,6 +394,7 @@ 23200 多人任务串行,可以操作出负的消耗工时 24357 多人任务填写日志后把日志删除对应的消耗工时仍然存在 25185 内置报表里,执行状态的下拉框里都没有已完成 +25603 修复新版一键安装包中XXD服务可能安装失败的问题。 2022-07-13 17.3 完成的需求 diff --git a/extension/lite/block/ext/view/printassigntomeblock.lite.html.hook.php b/extension/lite/block/ext/view/printassigntomeblock.lite.html.hook.php index ddfa6fcaa1..e69de29bb2 100644 --- a/extension/lite/block/ext/view/printassigntomeblock.lite.html.hook.php +++ b/extension/lite/block/ext/view/printassigntomeblock.lite.html.hook.php @@ -1,3 +0,0 @@ - diff --git a/extension/lite/common/ext/lang/de/lite.php b/extension/lite/common/ext/lang/de/lite.php index 6146068c76..5096451099 100644 --- a/extension/lite/common/ext/lang/de/lite.php +++ b/extension/lite/common/ext/lang/de/lite.php @@ -51,6 +51,7 @@ else } $lang->task->common = 'Task'; +$lang->dashboard = isset($lang->dashboard->common) ? $lang->dashboard->common : $lang->dashboard; /* My menu. */ $lang->my->menu = new stdclass(); diff --git a/extension/lite/common/ext/lang/en/lite.php b/extension/lite/common/ext/lang/en/lite.php index 6146068c76..5096451099 100644 --- a/extension/lite/common/ext/lang/en/lite.php +++ b/extension/lite/common/ext/lang/en/lite.php @@ -51,6 +51,7 @@ else } $lang->task->common = 'Task'; +$lang->dashboard = isset($lang->dashboard->common) ? $lang->dashboard->common : $lang->dashboard; /* My menu. */ $lang->my->menu = new stdclass(); diff --git a/extension/lite/common/ext/lang/fr/lite.php b/extension/lite/common/ext/lang/fr/lite.php index 6146068c76..5096451099 100644 --- a/extension/lite/common/ext/lang/fr/lite.php +++ b/extension/lite/common/ext/lang/fr/lite.php @@ -51,6 +51,7 @@ else } $lang->task->common = 'Task'; +$lang->dashboard = isset($lang->dashboard->common) ? $lang->dashboard->common : $lang->dashboard; /* My menu. */ $lang->my->menu = new stdclass(); diff --git a/extension/lite/common/ext/lang/zh-cn/lite.php b/extension/lite/common/ext/lang/zh-cn/lite.php index edf2a0267d..c74deb3e3f 100644 --- a/extension/lite/common/ext/lang/zh-cn/lite.php +++ b/extension/lite/common/ext/lang/zh-cn/lite.php @@ -51,6 +51,7 @@ else } $lang->task->common = '任务'; +$lang->dashboard = isset($lang->dashboard->common) ? $lang->dashboard->common : $lang->dashboard; /* My menu. */ $lang->my->menu = new stdclass(); @@ -197,7 +198,8 @@ $lang->admin->menu->dev['menuOrder'][15] = 'editor'; $lang->admin->menu->dev['menuOrder'][20] = 'entry'; $lang->admin->menu->system['subMenu'] = new stdclass(); -$lang->admin->menu->system['subMenu']->data = array('link' => "{$lang->admin->data}|backup|index", 'subModule' => 'action'); +$lang->admin->menu->system['subMenu']->backup = array('link' => "{$lang->backup->common}|backup|index"); +$lang->admin->menu->system['subMenu']->trash = array('link' => "{$lang->action->trash}|action|trash"); $lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->security|admin|safe", 'alias' => 'checkweak'); $lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron'); $lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone"); diff --git a/extension/lite/feedback/ext/view/view.lite.html.hook.php b/extension/lite/feedback/ext/view/view.lite.html.hook.php index d4ee0a9836..b6d5647aaa 100644 --- a/extension/lite/feedback/ext/view/view.lite.html.hook.php +++ b/extension/lite/feedback/ext/view/view.lite.html.hook.php @@ -1,8 +1,4 @@ diff --git a/extension/lite/group/ext/lang/resource.php b/extension/lite/group/ext/lang/resource.php index ec5c6714a9..45d77bcd6f 100644 --- a/extension/lite/group/ext/lang/resource.php +++ b/extension/lite/group/ext/lang/resource.php @@ -261,6 +261,7 @@ $lang->resource->story->delete = 'deleteAction'; $lang->resource->story->view = 'view'; $lang->resource->story->change = 'changeAction'; $lang->resource->story->review = 'reviewAction'; +$lang->resource->story->submitReview = 'submitReview'; $lang->resource->story->batchReview = 'batchReview'; $lang->resource->story->recall = 'recall'; $lang->resource->story->assignTo = 'assignAction'; @@ -289,6 +290,7 @@ $lang->story->methodOrder[25] = 'delete'; $lang->story->methodOrder[30] = 'view'; $lang->story->methodOrder[35] = 'change'; $lang->story->methodOrder[40] = 'review'; +$lang->story->methodOrder[44] = 'submitReview'; $lang->story->methodOrder[45] = 'batchReview'; $lang->story->methodOrder[50] = 'recall'; $lang->story->methodOrder[55] = 'close'; @@ -551,7 +553,7 @@ $lang->resource->task->recordEstimate = 'recordEstimateAction'; $lang->resource->task->editEstimate = 'editEstimate'; $lang->resource->task->deleteEstimate = 'deleteEstimate'; $lang->resource->task->report = 'reportChart'; -if($config->edition != 'open') $lang->resource->task->exportTemplet = 'exportTemplet'; +if($config->edition != 'open') $lang->resource->task->exportTemplate = 'exportTemplate'; if($config->edition != 'open') $lang->resource->task->import = 'import'; $lang->task->methodOrder[5] = 'create'; @@ -577,7 +579,7 @@ $lang->task->methodOrder[100] = 'editEstimate'; $lang->task->methodOrder[105] = 'deleteEstimate'; $lang->task->methodOrder[110] = 'report'; $lang->task->methodOrder[115] = 'batchChangeModule'; -$lang->task->methodOrder[120] = 'exportTemplet'; +$lang->task->methodOrder[120] = 'exportTemplate'; $lang->task->methodOrder[125] = 'import'; /* Doc. */ @@ -974,6 +976,7 @@ if($config->edition == 'biz' or $config->edition == 'max') $lang->resource->feedback->delete = 'delete'; $lang->resource->feedback->close = 'closeAction'; $lang->resource->feedback->export = 'exportAction'; + $lang->resource->feedback->assignTo = 'assignAction'; if($config->visions == ',lite,') unset($lang->resource->feedback); diff --git a/extension/lite/my/ext/view/task.html.php b/extension/lite/my/ext/view/task.html.php index f4679b24d8..01f53c561d 100644 --- a/extension/lite/my/ext/view/task.html.php +++ b/extension/lite/my/ext/view/task.html.php @@ -95,7 +95,9 @@ } else { - echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', '', $task->project), $task->name, null, "style='color: $task->color'"); + $onlybody = $task->executionType == 'kanban' ? true : ''; + $class = $task->executionType == 'kanban' ? 'iframe' : ''; + echo html::a($this->createLink('task', 'view', "taskID=$task->id", '', $onlybody, $task->project), $task->name, null, "class='$class' data-width='80%' style='color: $task->color'"); } ?> children)) echo '';?> diff --git a/extension/lite/project/ext/view/execution.html.php b/extension/lite/project/ext/view/execution.html.php index a11aaf3846..8961898aad 100644 --- a/extension/lite/project/ext/view/execution.html.php +++ b/extension/lite/project/ext/view/execution.html.php @@ -14,7 +14,7 @@ @@ -136,6 +136,11 @@ $(function() }); } setTimeout(checkRemind, 1000); + + $('#dashboard .row .panel').each(function() + { + refreshBlock($(this)); + }) }); getExtViewFile(__FILE__)){include $extView; return helper::cd();}?> diff --git a/module/block/view/executionblock.html.php b/module/block/view/executionblock.html.php index 5f1e4e89d4..d3d3804164 100644 --- a/module/block/view/executionblock.html.php +++ b/module/block/view/executionblock.html.php @@ -41,11 +41,8 @@ children)) continue; - $appid = isset($_GET['entry']) ? "class='app-btn text-center' data-id='{$this->get->entry}'" : "class='text-center'"; $viewLink = $this->createLink('execution', 'task', 'executionID=' . $execution->id); - if($config->systemMode == 'new') $execution->name = zget($projectPairs, $execution->project, '') . ' / ' . $execution->name; ?> > name, '', "title='$execution->name'");?> diff --git a/module/block/view/taskblock.html.php b/module/block/view/taskblock.html.php index 795761def4..dc8423c01e 100644 --- a/module/block/view/taskblock.html.php +++ b/module/block/view/taskblock.html.php @@ -44,7 +44,11 @@ id);?> task->priList, $task->pri, $task->pri)?> - createLink('task', 'view', "taskID=$task->id", '', '', $task->project), $task->name)?> + executionType == 'kanban' ? true : ''; + $class = $task->executionType == 'kanban' ? "class='iframe' data-toggle='modal'" : ''; + ?> + createLink('task', 'view', "taskID=$task->id", '', $onlybody, $task->project), $task->name, null, "$class data-width='80%'")?> estimate . $lang->execution->workHourUnit;?> deadline, 0, 4) > 0) echo $task->deadline;?> diff --git a/module/bug/config.php b/module/bug/config.php index 5f6f19c8b9..0ba621fbc7 100644 --- a/module/bug/config.php +++ b/module/bug/config.php @@ -26,7 +26,7 @@ $config->bug->list->allFields = 'id, module, execution, story, task, $config->bug->list->defaultFields = 'id,severity,pri,title,openedBy,assignedTo,resolvedBy,resolution'; -$config->bug->list->exportFields = 'id, product, branch, module, project, execution, story, task, +$config->bug->exportFields = 'id, product, branch, module, project, execution, story, task, title, keywords, severity, pri, type, os, browser, steps, status, deadline, activatedCount, confirmed, mailto, openedBy, openedDate, openedBuild, @@ -37,7 +37,8 @@ $config->bug->list->exportFields = 'id, product, branch, module, project, execut case, lastEditedBy, lastEditedDate, files ,feedbackBy, notifyEmail'; -if($config->systemMode == 'classic') $config->bug->list->exportFields = str_replace(' project,', '', $config->bug->list->exportFields); + +if($config->systemMode == 'classic') $config->bug->exportFields = str_replace(' project,', '', $config->bug->exportFields); $config->bug->list->customCreateFields = 'execution,noticefeedbackBy,story,task,pri,severity,os,browser,deadline,mailto,keywords'; $config->bug->list->customBatchEditFields = 'type,severity,pri,productplan,assignedTo,deadline,resolvedBy,resolution,os,browser,keywords'; @@ -132,35 +133,28 @@ $config->bug->search['params']['branch'] = array('operator' => '=', $config->bug->search['params']['plan'] = array('operator' => '=', 'control' => 'select', 'values' => ''); $config->bug->search['params']['module'] = array('operator' => 'belong', 'control' => 'select', 'values' => 'modules'); $config->bug->search['params']['execution'] = array('operator' => '=', 'control' => 'select', 'values' => 'executions'); - $config->bug->search['params']['severity'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->severityList); $config->bug->search['params']['pri'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->priList); $config->bug->search['params']['type'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->typeList); -$config->bug->search['params']['os'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->osList); -$config->bug->search['params']['browser'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->browserList); +$config->bug->search['params']['os'] = array('operator' => 'include', 'control' => 'select', 'values' => $lang->bug->osList); +$config->bug->search['params']['browser'] = array('operator' => 'include', 'control' => 'select', 'values' => $lang->bug->browserList); $config->bug->search['params']['resolution'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->bug->resolutionList); - $config->bug->search['params']['activatedCount']= array('operator' => '>=', 'control' => 'input', 'values' => ''); - $config->bug->search['params']['toTask'] = array('operator' => '=', 'control' => 'input', 'values' => ''); $config->bug->search['params']['toStory'] = array('operator' => '=', 'control' => 'input', 'values' => ''); - $config->bug->search['params']['openedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); $config->bug->search['params']['closedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); $config->bug->search['params']['lastEditedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); - -$config->bug->search['params']['mailto'] = array('operator' => 'include', 'control' => 'select', 'values' => 'users'); - +$config->bug->search['params']['mailto'] = array('operator' => 'include', 'control' => 'select', 'values' => 'users'); $config->bug->search['params']['openedBuild'] = array('operator' => 'include', 'control' => 'select', 'values' => 'builds'); $config->bug->search['params']['resolvedBuild'] = array('operator' => '=', 'control' => 'select', 'values' => 'builds'); - -$config->bug->search['params']['openedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); -$config->bug->search['params']['assignedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); -$config->bug->search['params']['resolvedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); -$config->bug->search['params']['closedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); -$config->bug->search['params']['lastEditedDate']= array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); -$config->bug->search['params']['deadline'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); -$config->bug->search['params']['activatedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->bug->search['params']['openedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->bug->search['params']['assignedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->bug->search['params']['resolvedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->bug->search['params']['closedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->bug->search['params']['lastEditedDate']= array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->bug->search['params']['deadline'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->bug->search['params']['activatedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); $config->bug->datatable = new stdclass(); $config->bug->datatable->defaultField = array('id', 'severity', 'pri', 'confirmed', 'title', 'status', 'openedBy', 'openedDate', 'assignedTo', 'resolution', 'actions'); @@ -170,6 +164,14 @@ $config->bug->datatable->fieldList['id']['fixed'] = 'left'; $config->bug->datatable->fieldList['id']['width'] = '70'; $config->bug->datatable->fieldList['id']['required'] = 'yes'; +$config->bug->datatable->fieldList['product']['title'] = 'product'; +$config->bug->datatable->fieldList['product']['control'] = 'hidden'; +$config->bug->datatable->fieldList['product']['dataSource'] = array('module' => 'product', 'method' => 'getPairs'); + +$config->bug->datatable->fieldList['module']['control'] = 'select'; +$config->bug->datatable->fieldList['module']['title'] = 'module'; +$config->bug->datatable->fieldList['module']['dataSource'] = array('module' => 'tree', 'method' => 'getOptionMenu', 'params' => '$productID&bug'); + $config->bug->datatable->fieldList['severity']['title'] = 'severityAB'; $config->bug->datatable->fieldList['severity']['fixed'] = 'left'; $config->bug->datatable->fieldList['severity']['width'] = '50'; @@ -193,10 +195,12 @@ $config->bug->datatable->fieldList['title']['width'] = 'auto'; $config->bug->datatable->fieldList['title']['required'] = 'yes'; $config->bug->datatable->fieldList['title']['minWidth'] = '200'; -$config->bug->datatable->fieldList['branch']['title'] = 'branch'; -$config->bug->datatable->fieldList['branch']['fixed'] = 'left'; -$config->bug->datatable->fieldList['branch']['width'] = '100'; -$config->bug->datatable->fieldList['branch']['required'] = 'no'; +$config->bug->datatable->fieldList['branch']['title'] = 'branch'; +$config->bug->datatable->fieldList['branch']['fixed'] = 'left'; +$config->bug->datatable->fieldList['branch']['width'] = '100'; +$config->bug->datatable->fieldList['branch']['required'] = 'no'; +$config->bug->datatable->fieldList['branch']['control'] = 'select'; +$config->bug->datatable->fieldList['branch']['dataSource'] = array('module' => 'bug', 'method' => 'getRelatedObjects', 'params' => 'branch&id,name'); $config->bug->datatable->fieldList['type']['title'] = 'type'; $config->bug->datatable->fieldList['type']['fixed'] = 'no'; @@ -205,16 +209,19 @@ $config->bug->datatable->fieldList['type']['required'] = 'no'; if($config->systemMode == 'new') { - $config->bug->datatable->fieldList['project']['title'] = 'project'; - $config->bug->datatable->fieldList['project']['fixed'] = 'no'; - $config->bug->datatable->fieldList['project']['width'] = '120'; - $config->bug->datatable->fieldList['project']['required'] = 'no'; + $config->bug->datatable->fieldList['project']['title'] = 'project'; + $config->bug->datatable->fieldList['project']['fixed'] = 'no'; + $config->bug->datatable->fieldList['project']['width'] = '120'; + $config->bug->datatable->fieldList['project']['required'] = 'no'; + $config->bug->datatable->fieldList['project']['control'] = 'hidden'; + $config->bug->datatable->fieldList['project']['dataSource'] = array('module' => 'product', 'method' => 'getProjectPairsByProduct', 'params' => '$productID'); } -$config->bug->datatable->fieldList['execution']['title'] = 'execution'; -$config->bug->datatable->fieldList['execution']['fixed'] = 'no'; -$config->bug->datatable->fieldList['execution']['width'] = '120'; -$config->bug->datatable->fieldList['execution']['required'] = 'no'; +$config->bug->datatable->fieldList['execution']['title'] = 'execution'; +$config->bug->datatable->fieldList['execution']['fixed'] = 'no'; +$config->bug->datatable->fieldList['execution']['width'] = '120'; +$config->bug->datatable->fieldList['execution']['required'] = 'no'; +$config->bug->datatable->fieldList['execution']['dataSource'] = array('module' => 'product', 'method' =>'getAllExecutionPairsByProduct', 'params' => '$productID&$branch'); $config->bug->datatable->fieldList['plan']['title'] = 'plan'; $config->bug->datatable->fieldList['plan']['fixed'] = 'no'; @@ -236,15 +243,18 @@ $config->bug->datatable->fieldList['activatedDate']['fixed'] = 'no'; $config->bug->datatable->fieldList['activatedDate']['width'] = '90'; $config->bug->datatable->fieldList['activatedDate']['required'] = 'no'; -$config->bug->datatable->fieldList['story']['title'] = 'story'; -$config->bug->datatable->fieldList['story']['fixed'] = 'no'; -$config->bug->datatable->fieldList['story']['width'] = '120'; -$config->bug->datatable->fieldList['story']['required'] = 'no'; +$config->bug->datatable->fieldList['story']['title'] = 'story'; +$config->bug->datatable->fieldList['story']['fixed'] = 'no'; +$config->bug->datatable->fieldList['story']['width'] = '120'; +$config->bug->datatable->fieldList['story']['required'] = 'no'; +$config->bug->datatable->fieldList['story']['control'] = 'select'; +$config->bug->datatable->fieldList['story']['dataSource'] = array('module' => 'bug', 'method' =>'getRelatedObjects', 'params' => 'story&id,title'); -$config->bug->datatable->fieldList['task']['title'] = 'task'; -$config->bug->datatable->fieldList['task']['fixed'] = 'no'; -$config->bug->datatable->fieldList['task']['width'] = '120'; -$config->bug->datatable->fieldList['task']['required'] = 'no'; +$config->bug->datatable->fieldList['task']['title'] = 'task'; +$config->bug->datatable->fieldList['task']['fixed'] = 'no'; +$config->bug->datatable->fieldList['task']['width'] = '120'; +$config->bug->datatable->fieldList['task']['required'] = 'no'; +$config->bug->datatable->fieldList['task']['dataSource'] = array('module' => 'bug', 'method' =>'getRelatedObjects', 'params' => 'task&id,name'); $config->bug->datatable->fieldList['toTask']['title'] = 'toTask'; $config->bug->datatable->fieldList['toTask']['fixed'] = 'no'; @@ -281,15 +291,18 @@ $config->bug->datatable->fieldList['openedDate']['fixed'] = 'no'; $config->bug->datatable->fieldList['openedDate']['width'] = '90'; $config->bug->datatable->fieldList['openedDate']['required'] = 'no'; -$config->bug->datatable->fieldList['openedBuild']['title'] = 'openedBuild'; -$config->bug->datatable->fieldList['openedBuild']['fixed'] = 'no'; -$config->bug->datatable->fieldList['openedBuild']['width'] = '120'; -$config->bug->datatable->fieldList['openedBuild']['required'] = 'no'; +$config->bug->datatable->fieldList['openedBuild']['title'] = 'openedBuild'; +$config->bug->datatable->fieldList['openedBuild']['fixed'] = 'no'; +$config->bug->datatable->fieldList['openedBuild']['width'] = '120'; +$config->bug->datatable->fieldList['openedBuild']['required'] = 'no'; +$config->bug->datatable->fieldList['openedBuild']['control'] = 'multiple'; +$config->bug->datatable->fieldList['openedBuild']['dataSource'] = array('module' => 'build', 'method' =>'getBuildPairs', 'params' => '$productID&$branch&noempty,noterminate,nodone,withbranch'); $config->bug->datatable->fieldList['assignedTo']['title'] = 'assignedToAB'; $config->bug->datatable->fieldList['assignedTo']['fixed'] = 'no'; $config->bug->datatable->fieldList['assignedTo']['width'] = '120'; $config->bug->datatable->fieldList['assignedTo']['required'] = 'no'; +$config->bug->datatable->fieldList['assignedTo']['dataSource'] = array('module' => 'bug', 'method' =>'getProductMemberPairs', 'params' => '$productID&$branch'); $config->bug->datatable->fieldList['assignedDate']['title'] = 'assignedDate'; $config->bug->datatable->fieldList['assignedDate']['fixed'] = 'no'; @@ -300,6 +313,7 @@ $config->bug->datatable->fieldList['deadline']['title'] = 'deadline'; $config->bug->datatable->fieldList['deadline']['fixed'] = 'no'; $config->bug->datatable->fieldList['deadline']['width'] = '90'; $config->bug->datatable->fieldList['deadline']['required'] = 'no'; +$config->bug->datatable->fieldList['deadline']['control'] = 'date'; $config->bug->datatable->fieldList['resolvedBy']['title'] = 'resolvedByAB'; $config->bug->datatable->fieldList['resolvedBy']['fixed'] = 'no'; @@ -320,6 +334,8 @@ $config->bug->datatable->fieldList['resolvedBuild']['title'] = 'resolvedBuild $config->bug->datatable->fieldList['resolvedBuild']['fixed'] = 'no'; $config->bug->datatable->fieldList['resolvedBuild']['width'] = '120'; $config->bug->datatable->fieldList['resolvedBuild']['required'] = 'no'; +$config->bug->datatable->fieldList['resolvedBuild']['control'] = 'select'; +$config->bug->datatable->fieldList['resolvedBuild']['dataSource'] = array('module' => 'bug', 'method' =>'getRelatedObjects', 'params' => 'resolvedBuild&id,name'); $config->bug->datatable->fieldList['closedBy']['title'] = 'closedBy'; $config->bug->datatable->fieldList['closedBy']['fixed'] = 'no'; @@ -346,6 +362,12 @@ $config->bug->datatable->fieldList['actions']['fixed'] = 'right'; $config->bug->datatable->fieldList['actions']['width'] = '150'; $config->bug->datatable->fieldList['actions']['required'] = 'yes'; +$config->bug->datatable->fieldList['steps']['title'] = 'steps'; +$config->bug->datatable->fieldList['steps']['control'] = 'textarea'; + +$config->bug->datatable->fieldList['case']['title'] = 'case'; +$config->bug->datatable->fieldList['case']['dataSource'] = array('module' => 'bug', 'method' =>'getRelatedObjects', 'params' => 'case&id,title'); + $config->bug->colorList = new stdclass(); $config->bug->colorList->pri[0] = '#c0c0c0'; $config->bug->colorList->pri[1] = '#d50000'; diff --git a/module/bug/control.php b/module/bug/control.php index 81c5d74116..fd6740cc13 100755 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -859,6 +859,7 @@ class bug extends control $this->view->moduleID = $moduleID; $this->view->branch = $branch; $this->view->branches = $branches; + $this->display(); } @@ -1132,6 +1133,8 @@ class bug extends control $moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $bug->branch); if(!isset($moduleOptionMenu[$bug->module])) $moduleOptionMenu += $this->tree->getModulesName($bug->module); + $cases = $this->loadmodel('testcase')->getPairsByProduct($bug->product, array(0, $bug->branch)); + /* Get assigned to member. */ if($bug->execution) { @@ -1149,22 +1152,27 @@ class bug extends control } if($bug->status == 'closed') $assignedToList['closed'] = 'Closed'; + $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; + $productBugs = $this->bug->getProductBugPairs($productID, $branch); + $this->view->bug = $bug; $this->view->productID = $productID; $this->view->product = $product; + $this->view->productBugs = $productBugs; $this->view->productName = $this->products[$productID]; $this->view->plans = $this->loadModel('productplan')->getPairs($productID, $bug->branch, '', true); $this->view->projects = array(0 => '') + $this->product->getProjectPairsByProduct($productID, $bug->branch, $bug->project); $this->view->moduleOptionMenu = $moduleOptionMenu; $this->view->currentModuleID = $currentModuleID; $this->view->executions = array(0 => '') + $this->product->getExecutionPairsByProduct($bug->product, $bug->branch, 'id_desc', $bug->project); - $this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch); + $this->view->stories = $bug->execution ? $this->story->getExecutionStoryPairs($bug->execution) : $this->story->getProductStoryPairs($bug->product, $bug->branch, 0, 'all', 'id_desc', 0, 'full', 'story', false); $this->view->branchOption = $branchOption; $this->view->branchTagOption = $branchTagOption; $this->view->tasks = $this->task->getExecutionTaskPairs($bug->execution); $this->view->testtasks = $this->loadModel('testtask')->getPairs($bug->product, $bug->execution, $bug->testtask); $this->view->users = $this->user->getPairs('', "$bug->assignedTo,$bug->resolvedBy,$bug->closedBy,$bug->openedBy"); $this->view->assignedToList = $assignedToList; + $this->view->cases = array('' => '') + $cases; $this->view->openedBuilds = $openedBuilds; $this->view->resolvedBuilds = array('' => '') + $openedBuilds + $oldResolvedBuild; $this->view->actions = $this->action->getList('bug', $bugID); @@ -1297,6 +1305,7 @@ class bug extends control $branchIdList = array(); $projectIdList = array(); $executionIdList = array(); + $productBugList = array(); foreach($bugs as $bug) { $projectIdList[$bug->project] = $bug->project; @@ -1305,6 +1314,10 @@ class bug extends control $branchIdList[$bug->product][$bug->branch] = $bug->branch; if(!isset($modules[$bug->product][$bug->branch]) and isset($modules[$bug->product])) $modules[$bug->product][$bug->branch] = $modules[$bug->product][0] + $this->tree->getModulesName($bug->module); + + $bugProduct = isset($productList) ? $productList[$bug->product] : $product; + $branch = $bugProduct->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; + if(!isset($productBugList[$bug->product][$bug->branch])) $productBugList[$bug->product][$bug->branch] = $this->bug->getProductBugPairs($bug->product, $branch); } /* Get assigned to member. */ @@ -1379,13 +1392,12 @@ class bug extends control $this->view->priList = array('0' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->priList; $this->view->resolutionList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->resolutionList; $this->view->statusList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->statusList; - $this->view->osList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->osList; - $this->view->browserList = array('' => '', 'ditto' => $this->lang->bug->ditto) + $this->lang->bug->browserList; $this->view->bugs = $bugs; $this->view->branch = $branch; $this->view->users = $users; $this->view->modules = $modules; $this->view->branchTagOption = $branchTagOption; + $this->view->productBugList = $productBugList; $this->display(); } @@ -1795,17 +1807,22 @@ class bug extends control if(!isset($users[$assignedTo])) $assignedTo = $this->bug->getModuleOwner($bug->module, $productID); unset($this->lang->bug->resolutionList['tostory']); + $product = $this->loadModel('product')->getById($productID); + $branch = $product->type == 'branch' ? ($bug->branch > 0 ? $bug->branch . ',0' : '0') : ''; + $productBugs = $this->bug->getProductBugPairs($productID, $branch); + $this->bug->checkBugExecutionPriv($bug); $this->qa->setMenu($this->products, $productID, $bug->branch); - $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; - $this->view->bug = $bug; - $this->view->users = $users; - $this->view->assignedTo = $assignedTo; - $this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID); - $this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'withbranch'); - $this->view->actions = $this->action->getList('bug', $bugID); - $this->view->execution = isset($execution) ? $execution : ''; + $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->bug->resolve; + $this->view->bug = $bug; + $this->view->users = $users; + $this->view->assignedTo = $assignedTo; + $this->view->productBugs = $productBugs; + $this->view->executions = $this->loadModel('product')->getExecutionPairsByProduct($productID, $bug->branch ? "0,{$bug->branch}" : 0, 'id_desc', $projectID); + $this->view->builds = $this->loadModel('build')->getBuildPairs($productID, $bug->branch, 'withbranch'); + $this->view->actions = $this->action->getList('bug', $bugID); + $this->view->execution = isset($execution) ? $execution : ''; $this->display(); } @@ -2090,7 +2107,7 @@ class bug extends control if(!$this->post->bugIDList) return print(js::locate($this->session->bugList, 'parent')); $bugIDList = array_unique($this->post->bugIDList); - $bugs = $this->dao->select('id, title, status, resolvedBy, openedBuild')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id'); + $bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($bugIDList)->fetchAll('id'); $this->qa->setMenu($this->products, $productID, $branch); @@ -2292,183 +2309,10 @@ class bug extends control { if($_POST) { - $this->loadModel('file'); - $this->loadModel('branch'); - $bugLang = $this->lang->bug; - $bugConfig = $this->config->bug; - - /* Create field lists. */ - $fields = $this->post->exportFields ? $this->post->exportFields : explode(',', $bugConfig->list->exportFields); - foreach($fields as $key => $fieldName) - { - $fieldName = trim($fieldName); - $fields[$fieldName] = isset($bugLang->$fieldName) ? $bugLang->$fieldName : $fieldName; - unset($fields[$key]); - } - - /* Get bugs. */ - $bugs = $this->dao->select('*')->from(TABLE_BUG)->where($this->session->bugQueryCondition) - ->beginIF($this->post->exportType == 'selected')->andWhere('id')->in($this->cookie->checkedItem)->fi() - ->orderBy($orderBy)->fetchAll('id'); - - /* Get users, products and executions. */ - $users = $this->loadModel('user')->getPairs('noletter'); - $products = $this->loadModel('product')->getPairs(); - $projects = $this->loadModel('project')->getPairsByProgram(); - $executions = $this->loadModel('execution')->getPairs($this->projectID, 'all', 'all'); - - /* Get related objects id lists. */ - $relatedProductIdList = array(); - $relatedStoryIdList = array(); - $relatedTaskIdList = array(); - $relatedBugIdList = array(); - $relatedCaseIdList = array(); - $relatedBuildIdList = array(); - $relatedBranchIdList = array(); - - foreach($bugs as $bug) - { - $relatedProductIdList[$bug->product] = $bug->product; - $relatedStoryIdList[$bug->story] = $bug->story; - $relatedTaskIdList[$bug->task] = $bug->task; - $relatedCaseIdList[$bug->case] = $bug->case; - $relatedBugIdList[$bug->duplicateBug] = $bug->duplicateBug; - $relatedBranchIdList[$bug->branch] = $bug->branch; - - /* Process link bugs. */ - $linkBugs = explode(',', $bug->linkBug); - foreach($linkBugs as $linkBugID) - { - if($linkBugID) $relatedBugIdList[$linkBugID] = trim($linkBugID); - } - - /* Process builds. */ - $builds = $bug->openedBuild . ',' . $bug->resolvedBuild; - $builds = explode(',', $builds); - foreach($builds as $buildID) - { - if($buildID) $relatedBuildIdList[$buildID] = trim($buildID); - } - } - - /* Get related objects title or names. */ - $productsType = $this->dao->select('id, type')->from(TABLE_PRODUCT)->where('id')->in($relatedProductIdList)->fetchPairs(); - $relatedStories = $this->dao->select('id,title')->from(TABLE_STORY) ->where('id')->in($relatedStoryIdList)->fetchPairs(); - $relatedTasks = $this->dao->select('id, name')->from(TABLE_TASK)->where('id')->in($relatedTaskIdList)->fetchPairs(); - $relatedBugs = $this->dao->select('id, title')->from(TABLE_BUG)->where('id')->in($relatedBugIdList)->fetchPairs(); - $relatedCases = $this->dao->select('id, title')->from(TABLE_CASE)->where('id')->in($relatedCaseIdList)->fetchPairs(); - $relatedBranch = array('0' => $this->lang->branch->main) + $this->dao->select('id, name')->from(TABLE_BRANCH)->where('id')->in($relatedBranchIdList)->fetchPairs(); - $relatedBuilds = array('trunk' => $this->lang->trunk) + $this->dao->select('id, name')->from(TABLE_BUILD)->where('id')->in($relatedBuildIdList)->fetchPairs(); - $relatedFiles = $this->dao->select('id, objectID, pathname, title')->from(TABLE_FILE)->where('objectType')->eq('bug')->andWhere('objectID')->in(@array_keys($bugs))->andWhere('extra')->ne('editor')->fetchGroup('objectID'); - $relatedModules = $this->loadModel('tree')->getAllModulePairs('bug'); - if($this->config->edition == 'max') $reviews = $this->loadModel('review')->getPairs(0, $productID); - - foreach($bugs as $bug) - { - if($this->post->fileType == 'csv') - { - $bug->steps = str_replace("
", "\n", $bug->steps); - $bug->steps = str_replace('"', '""', $bug->steps); - $bug->steps = str_replace(' ', ' ', $bug->steps); - } - - $bug->openedDate = !helper::isZeroDate($bug->openedDate) ? $bug->openedDate : ''; - $bug->assignedDate = !helper::isZeroDate($bug->assignedDate) ? $bug->assignedDate : ''; - $bug->resolvedDate = !helper::isZeroDate($bug->resolvedDate) ? $bug->resolvedDate : ''; - $bug->closedDate = !helper::isZeroDate($bug->closedDate) ? $bug->closedDate : ''; - $bug->lastEditedDate = !helper::isZeroDate($bug->lastEditedDate) ? $bug->lastEditedDate : ''; - $bug->deadline = !helper::isZeroDate($bug->deadline) ? $bug->deadline : ''; - - /* fill some field with useful value. */ - $bug->product = !isset($products[$bug->product]) ? '' : $products[$bug->product] . "(#$bug->product)"; - $bug->project = !isset($projects[$bug->project]) ? '' : $projects[$bug->project] . "(#$bug->project)"; - $bug->execution = !isset($executions[$bug->execution]) ? '' : $executions[$bug->execution] . "(#$bug->execution)"; - $bug->story = !isset($relatedStories[$bug->story]) ? '' : $relatedStories[$bug->story] . "(#$bug->story)"; - $bug->task = !isset($relatedTasks[$bug->task]) ? '' : $relatedTasks[$bug->task] . "($bug->task)"; - $bug->case = !isset($relatedCases[$bug->case]) ? '' : $relatedCases[$bug->case] . "($bug->case)"; - if($this->config->edition == 'max' and isset($reviews)) $bug->identify = !isset($reviews[$bug->identify]) ? '' : $reviews[$bug->identify] . "(#$bug->identify)"; - - if(isset($relatedModules[$bug->module])) $bug->module = $relatedModules[$bug->module] . "(#$bug->module)"; - if(isset($relatedBugs[$bug->duplicateBug])) $bug->duplicateBug = $relatedBugs[$bug->duplicateBug] . "($bug->duplicateBug)"; - if(isset($relatedBuilds[$bug->resolvedBuild])) $bug->resolvedBuild = $relatedBuilds[$bug->resolvedBuild] . "(#$bug->resolvedBuild)"; - if(isset($relatedBranch[$bug->branch])) $bug->branch = $relatedBranch[$bug->branch] . "(#$bug->branch)"; - - if(isset($bugLang->priList[$bug->pri])) $bug->pri = $bugLang->priList[$bug->pri]; - if(isset($bugLang->typeList[$bug->type])) $bug->type = $bugLang->typeList[$bug->type]; - if(isset($bugLang->severityList[$bug->severity])) $bug->severity = $bugLang->severityList[$bug->severity]; - if(isset($bugLang->osList[$bug->os])) $bug->os = $bugLang->osList[$bug->os]; - if(isset($bugLang->browserList[$bug->browser])) $bug->browser = $bugLang->browserList[$bug->browser]; - if(isset($bugLang->statusList[$bug->status])) $bug->status = $this->processStatus('bug', $bug); - if(isset($bugLang->confirmedList[$bug->confirmed])) $bug->confirmed = $bugLang->confirmedList[$bug->confirmed]; - if(isset($bugLang->resolutionList[$bug->resolution])) $bug->resolution = $bugLang->resolutionList[$bug->resolution]; - - if(isset($users[$bug->openedBy])) $bug->openedBy = $users[$bug->openedBy]; - if(isset($users[$bug->assignedTo])) $bug->assignedTo = $users[$bug->assignedTo] . "(#$bug->assignedTo)"; - if(isset($users[$bug->resolvedBy])) $bug->resolvedBy = $users[$bug->resolvedBy]; - if(isset($users[$bug->lastEditedBy])) $bug->lastEditedBy = $users[$bug->lastEditedBy]; - if(isset($users[$bug->closedBy])) $bug->closedBy = $users[$bug->closedBy]; - - $bug->title = htmlspecialchars_decode($bug->title,ENT_QUOTES); - - if($bug->linkBug) - { - $tmpLinkBugs = array(); - $linkBugIdList = explode(',', $bug->linkBug); - foreach($linkBugIdList as $linkBugID) - { - $linkBugID = trim($linkBugID); - $tmpLinkBugs[] = isset($relatedBugs[$linkBugID]) ? $relatedBugs[$linkBugID] : $linkBugID; - } - $bug->linkBug = join("; \n", $tmpLinkBugs); - } - - if($bug->openedBuild) - { - $tmpOpenedBuilds = array(); - $tmpResolvedBuilds = array(); - $buildIdList = explode(',', $bug->openedBuild); - foreach($buildIdList as $buildID) - { - $buildID = trim($buildID); - $tmpOpenedBuilds[] = isset($relatedBuilds[$buildID]) ? $relatedBuilds[$buildID] . "(#$buildID)" : $buildID; - } - $bug->openedBuild = join("\n", $tmpOpenedBuilds); - if($this->post->fileType == 'html') $bug->openedBuild = nl2br($bug->openedBuild); - } - - /* Set related files. */ - $bug->files = ''; - if(isset($relatedFiles[$bug->id])) - { - foreach($relatedFiles[$bug->id] as $file) - { - $fileURL = common::getSysURL() . $this->file->webPath . $this->file->getRealPathName($file->pathname); - $bug->files .= html::a($fileURL, $file->title, '_blank') . '
'; - } - } - - $bug->mailto = trim(trim($bug->mailto), ','); - $mailtos = explode(',', $bug->mailto); - $bug->mailto = ''; - foreach($mailtos as $mailto) - { - $mailto = trim($mailto); - if(isset($users[$mailto])) $bug->mailto .= $users[$mailto] . ','; - } - $bug->mailto = rtrim($bug->mailto, ','); - - unset($bug->caseVersion); - unset($bug->result); - unset($bug->deleted); - } - - if(!(in_array('platform', $productsType) or in_array('branch', $productsType))) unset($fields['branch']);// If products's type are normal, unset branch field. - if($this->config->edition != 'open') list($fields, $bugs) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $bugs); - - $this->post->set('fields', $fields); - $this->post->set('rows', $bugs); - $this->post->set('kind', 'bug'); - $this->fetch('file', 'export2' . $this->post->fileType, $_POST); + $this->loadModel('port'); + $this->session->set('bugPortParams', array('productID' => $productID, 'executionID' => $executionID, 'branch' => 'all')); + $this->port->export('bug'); + $this->fetch('file', 'export2' . $_POST['fileType'], $_POST); } $fileName = $this->lang->bug->common; @@ -2486,7 +2330,7 @@ class bug extends control } $this->view->fileName = $fileName; - $this->view->allExportFields = $this->config->bug->list->exportFields; + $this->view->allExportFields = $this->config->bug->exportFields; $this->view->customExport = true; $this->display(); } diff --git a/module/bug/css/create.css b/module/bug/css/create.css index 470dd51d77..557bf69e84 100644 --- a/module/bug/css/create.css +++ b/module/bug/css/create.css @@ -55,3 +55,4 @@ html[lang='de'] #keywordsAddonLabel, .task {width: 73px;} #executionLabel {display: inline; position: relative; width: 50%; left: 37%;} #projectLabel {display: inline;} #openedBuildLabel {display: inline; position: relative; width: 50%; left: 14%;} +#bugTypeInputGroup > .table-col {width: 40% !important;} diff --git a/module/bug/css/view.css b/module/bug/css/view.css index 452146b88a..9c7f59111b 100644 --- a/module/bug/css/view.css +++ b/module/bug/css/view.css @@ -5,3 +5,6 @@ .tab-pane table {border: 1px solid #ddd; border-top: none;} .btn-edit-comment {z-index: 100;} .select-project-modal .modal-body {right: 15px;} +.osContent, .browserContent {margin: 0 0 5px;} +.browserContent {margin-left: -4px;} +.resolution {white-space: nowrap; overflow: hidden;} diff --git a/module/bug/js/batchedit.js b/module/bug/js/batchedit.js index 42770c7cfc..0b15187841 100644 --- a/module/bug/js/batchedit.js +++ b/module/bug/js/batchedit.js @@ -77,4 +77,10 @@ $(function() { hiddenRequireFields(); }); + + $('select[id^="duplicateBugs"]').picker( + { + disableEmptySearch : true, + dropWidth : 'auto' + }); }); diff --git a/module/bug/js/browse.js b/module/bug/js/browse.js index 6d469700d9..0cc3ce246d 100644 --- a/module/bug/js/browse.js +++ b/module/bug/js/browse.js @@ -8,4 +8,27 @@ $(function() $("#sidebarHeader").toggle("fast"); }); if($("main").is(".hide-sidebar")) $("#sidebarHeader").hide(); + + $('#bugList').on('change', "[name='bugIDList[]']", checkClosed); }); + +/** + * Closed bugs are not assignable. + * + * @access public + * @return void + */ +function checkClosed() +{ + var disabledAssigned = $('#bugList tr.checked .c-assignedTo a').length > 0 ? true : false; + $('#bugList tr.checked .c-assignedTo a').each(function() + { + if(!$(this).hasClass('disabled')) + { + disabledAssigned = false; + return false; + } + }); + + $('#mulAssigned').prop('disabled', disabledAssigned); +} diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 3ddab97a57..e6e93f396c 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -678,7 +678,7 @@ function setStories(moduleID, productID, storyID) if(typeof(branch) == 'undefined') branch = 0; var executionID = $('#execution').val(); if(typeof(executionID) == 'undefined') executionID = 0; - link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=' + storyID + '&onlyOption=false&status=&limit=0&type=full&hasParent=1&executionID=' + executionID); + link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleID=' + moduleID + '&storyID=' + storyID + '&onlyOption=false&status=&limit=0&type=full&hasParent=0&executionID=' + executionID); $.get(link, function(stories) { if(!stories) stories = ''; diff --git a/module/bug/js/edit.js b/module/bug/js/edit.js index 2669cde048..f9003597c9 100644 --- a/module/bug/js/edit.js +++ b/module/bug/js/edit.js @@ -19,6 +19,12 @@ $(function() } }); } + + $('#duplicateBug').picker( + { + disableEmptySearch : true, + dropWidth : 'auto' + }); }); /** diff --git a/module/bug/js/resolve.js b/module/bug/js/resolve.js index 884490f541..8afea5743c 100644 --- a/module/bug/js/resolve.js +++ b/module/bug/js/resolve.js @@ -45,4 +45,10 @@ $(function() $('#newBuildExecutionBox').addClass('hidden'); } }) + + $('#duplicateBug').picker( + { + disableEmptySearch : true, + dropWidth : 'auto' + }); }) diff --git a/module/bug/lang/de.php b/module/bug/lang/de.php index c9e6875e7b..ae67b3dac0 100644 --- a/module/bug/lang/de.php +++ b/module/bug/lang/de.php @@ -176,6 +176,7 @@ $lang->bug->labelPostponed = 'Postponed'; $lang->bug->changed = 'Changed'; $lang->bug->storyChanged = 'Story Changed'; $lang->bug->linkMR = 'Related MRs'; +$lang->bug->duplicateTip = 'Please enter keyword search'; /* Page tags. */ $lang->bug->lblAssignedTo = 'Bearbeiter'; @@ -232,51 +233,39 @@ $lang->bug->priList[2] = '2'; $lang->bug->priList[3] = '3'; $lang->bug->priList[4] = '4'; -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = 'Alle'; -$lang->bug->osList['windows'] = 'Windows'; -$lang->bug->osList['win10'] = 'Windows 10'; -$lang->bug->osList['win8'] = 'Windows 8'; -$lang->bug->osList['win7'] = 'Windows 7'; -$lang->bug->osList['vista'] = 'Windows Vista'; -$lang->bug->osList['winxp'] = 'Windows XP'; -$lang->bug->osList['win2012'] = 'Windows 2012'; -$lang->bug->osList['win2008'] = 'Windows 2008'; -$lang->bug->osList['win2003'] = 'Windows 2003'; -$lang->bug->osList['win2000'] = 'Windows 2000'; -$lang->bug->osList['android'] = 'Android'; -$lang->bug->osList['ios'] = 'IOS'; -$lang->bug->osList['wp8'] = 'WP8'; -$lang->bug->osList['wp7'] = 'WP7'; -$lang->bug->osList['symbian'] = 'Symbian'; -$lang->bug->osList['linux'] = 'Linux'; -$lang->bug->osList['freebsd'] = 'FreeBSD'; -$lang->bug->osList['osx'] = 'OS X'; -$lang->bug->osList['unix'] = 'Unix'; -$lang->bug->osList['others'] = 'Andere'; +$lang->bug->osList[''] = ''; +$lang->bug->osList['all'] = 'Alle'; +$lang->bug->osList['windows'] = 'Windows'; +$lang->bug->osList['win11'] = 'Windows 11'; +$lang->bug->osList['win10'] = 'Windows 10'; +$lang->bug->osList['win8'] = 'Windows 8'; +$lang->bug->osList['win7'] = 'Windows 7'; +$lang->bug->osList['winxp'] = 'Windows XP'; +$lang->bug->osList['osx'] = 'Mac OS'; +$lang->bug->osList['android'] = 'Android'; +$lang->bug->osList['ios'] = 'IOS'; +$lang->bug->osList['linux'] = 'Linux'; +$lang->bug->osList['ubuntu'] = 'Ubuntu'; +$lang->bug->osList['chromeos'] = 'Chrome OS'; +$lang->bug->osList['fedora'] = 'Fedora'; +$lang->bug->osList['unix'] = 'Unix'; +$lang->bug->osList['others'] = 'Andere'; -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = 'Alle'; -$lang->bug->browserList['ie'] = 'IE series'; -$lang->bug->browserList['ie11'] = 'IE11'; -$lang->bug->browserList['ie10'] = 'IE10'; -$lang->bug->browserList['ie9'] = 'IE9'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['ie7'] = 'IE7'; -$lang->bug->browserList['ie6'] = 'IE6'; -$lang->bug->browserList['chrome'] = 'chrome'; -$lang->bug->browserList['firefox'] = 'Firefox series'; -$lang->bug->browserList['firefox4'] = 'Firefox4'; -$lang->bug->browserList['firefox3'] = 'Firefox3'; -$lang->bug->browserList['firefox2'] = 'Firefox2'; -$lang->bug->browserList['opera'] = 'Opera series'; -$lang->bug->browserList['oprea11'] = 'Opera11'; -$lang->bug->browserList['oprea10'] = 'Opera10'; -$lang->bug->browserList['opera9'] = 'Opera9'; -$lang->bug->browserList['safari'] = 'Safari'; -$lang->bug->browserList['maxthon'] = 'Maxthon'; -$lang->bug->browserList['uc'] = 'UC'; -$lang->bug->browserList['other'] = 'Andere'; +$lang->bug->browserList[''] = ''; +$lang->bug->browserList['all'] = 'Alle'; +$lang->bug->browserList['chrome'] = 'Chrome'; +$lang->bug->browserList['edge'] = 'Edge'; +$lang->bug->browserList['ie'] = 'IE series'; +$lang->bug->browserList['ie11'] = 'IE11'; +$lang->bug->browserList['ie10'] = 'IE10'; +$lang->bug->browserList['ie9'] = 'IE9'; +$lang->bug->browserList['ie8'] = 'IE8'; +$lang->bug->browserList['firefox'] = 'Firefox series'; +$lang->bug->browserList['opera'] = 'Opera series'; +$lang->bug->browserList['safari'] = 'Safari'; +$lang->bug->browserList['360'] = '360 series'; +$lang->bug->browserList['qq'] = 'QQ series'; +$lang->bug->browserList['other'] = 'Andere'; $lang->bug->typeList[''] = ''; $lang->bug->typeList['codeerror'] = 'Code Fehler'; diff --git a/module/bug/lang/en.php b/module/bug/lang/en.php index fc62a14d4f..f29895386a 100644 --- a/module/bug/lang/en.php +++ b/module/bug/lang/en.php @@ -77,7 +77,7 @@ $lang->bug->deadlineAB = 'Deadline'; $lang->bug->plan = 'Plan'; $lang->bug->closedBy = 'ClosedBy'; $lang->bug->closedDate = 'ClosedDate'; -$lang->bug->duplicateBug = 'Duplicated Bug ID'; +$lang->bug->duplicateBug = 'Duplicated Bug'; $lang->bug->lastEditedBy = 'EditedBy'; $lang->bug->linkBug = 'Linked Bugs'; $lang->bug->linkBugs = 'Link Bug'; @@ -176,6 +176,7 @@ $lang->bug->labelPostponed = 'Postponed'; $lang->bug->changed = 'Changed'; $lang->bug->storyChanged = 'Story Changed'; $lang->bug->linkMR = 'Related MRs'; +$lang->bug->duplicateTip = 'Please enter keyword search'; /* Page tags. */ $lang->bug->lblAssignedTo = 'AssignTo'; @@ -232,51 +233,39 @@ $lang->bug->priList[2] = '2'; $lang->bug->priList[3] = '3'; $lang->bug->priList[4] = '4'; -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = 'All'; -$lang->bug->osList['windows'] = 'Windows'; -$lang->bug->osList['win10'] = 'Windows 10'; -$lang->bug->osList['win8'] = 'Windows 8'; -$lang->bug->osList['win7'] = 'Windows 7'; -$lang->bug->osList['vista'] = 'Windows Vista'; -$lang->bug->osList['winxp'] = 'Windows XP'; -$lang->bug->osList['win2012'] = 'Windows 2012'; -$lang->bug->osList['win2008'] = 'Windows 2008'; -$lang->bug->osList['win2003'] = 'Windows 2003'; -$lang->bug->osList['win2000'] = 'Windows 2000'; -$lang->bug->osList['android'] = 'Android'; -$lang->bug->osList['ios'] = 'IOS'; -$lang->bug->osList['wp8'] = 'WP8'; -$lang->bug->osList['wp7'] = 'WP7'; -$lang->bug->osList['symbian'] = 'Symbian'; -$lang->bug->osList['linux'] = 'Linux'; -$lang->bug->osList['freebsd'] = 'FreeBSD'; -$lang->bug->osList['osx'] = 'OS X'; -$lang->bug->osList['unix'] = 'Unix'; -$lang->bug->osList['others'] = 'Others'; +$lang->bug->osList[''] = ''; +$lang->bug->osList['all'] = 'All'; +$lang->bug->osList['windows'] = 'Windows'; +$lang->bug->osList['win11'] = 'Windows 11'; +$lang->bug->osList['win10'] = 'Windows 10'; +$lang->bug->osList['win8'] = 'Windows 8'; +$lang->bug->osList['win7'] = 'Windows 7'; +$lang->bug->osList['winxp'] = 'Windows XP'; +$lang->bug->osList['osx'] = 'Mac OS'; +$lang->bug->osList['android'] = 'Android'; +$lang->bug->osList['ios'] = 'IOS'; +$lang->bug->osList['linux'] = 'Linux'; +$lang->bug->osList['ubuntu'] = 'Ubuntu'; +$lang->bug->osList['chromeos'] = 'Chrome OS'; +$lang->bug->osList['fedora'] = 'Fedora'; +$lang->bug->osList['unix'] = 'Unix'; +$lang->bug->osList['others'] = 'Others'; -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = 'All'; -$lang->bug->browserList['ie'] = 'IE series'; -$lang->bug->browserList['ie11'] = 'IE11'; -$lang->bug->browserList['ie10'] = 'IE10'; -$lang->bug->browserList['ie9'] = 'IE9'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['ie7'] = 'IE7'; -$lang->bug->browserList['ie6'] = 'IE6'; -$lang->bug->browserList['chrome'] = 'Chrome'; -$lang->bug->browserList['firefox'] = 'Firefox series'; -$lang->bug->browserList['firefox4'] = 'Firefox4'; -$lang->bug->browserList['firefox3'] = 'Firefox3'; -$lang->bug->browserList['firefox2'] = 'Firefox2'; -$lang->bug->browserList['opera'] = 'Opera series'; -$lang->bug->browserList['oprea11'] = 'Opera11'; -$lang->bug->browserList['oprea10'] = 'Opera10'; -$lang->bug->browserList['opera9'] = 'Opera9'; -$lang->bug->browserList['safari'] = 'Safari'; -$lang->bug->browserList['maxthon'] = 'Maxthon'; -$lang->bug->browserList['uc'] = 'UC'; -$lang->bug->browserList['other'] = 'Others'; +$lang->bug->browserList[''] = ''; +$lang->bug->browserList['all'] = 'All'; +$lang->bug->browserList['chrome'] = 'Chrome'; +$lang->bug->browserList['edge'] = 'Edge'; +$lang->bug->browserList['ie'] = 'IE series'; +$lang->bug->browserList['ie11'] = 'IE11'; +$lang->bug->browserList['ie10'] = 'IE10'; +$lang->bug->browserList['ie9'] = 'IE9'; +$lang->bug->browserList['ie8'] = 'IE8'; +$lang->bug->browserList['firefox'] = 'Firefox series'; +$lang->bug->browserList['opera'] = 'Opera series'; +$lang->bug->browserList['safari'] = 'Safari'; +$lang->bug->browserList['360'] = '360 series'; +$lang->bug->browserList['qq'] = 'QQ series'; +$lang->bug->browserList['other'] = 'Others'; $lang->bug->typeList[''] = ''; $lang->bug->typeList['codeerror'] = 'CodeError'; diff --git a/module/bug/lang/fr.php b/module/bug/lang/fr.php index ff95166866..1d8df84e71 100644 --- a/module/bug/lang/fr.php +++ b/module/bug/lang/fr.php @@ -77,7 +77,7 @@ $lang->bug->deadlineAB = 'Butoir'; $lang->bug->plan = 'Plan'; $lang->bug->closedBy = 'Fermé par'; $lang->bug->closedDate = 'Date Fermeture'; -$lang->bug->duplicateBug = 'Bug ID en doublon'; +$lang->bug->duplicateBug = 'Bug en doublon'; $lang->bug->lastEditedBy = 'Edité par'; $lang->bug->linkBug = 'Bugs Liés'; $lang->bug->linkBugs = 'Associer Bug'; @@ -176,6 +176,7 @@ $lang->bug->labelPostponed = 'Postponed'; $lang->bug->changed = 'Changed'; $lang->bug->storyChanged = 'Story Changed'; $lang->bug->linkMR = 'Related MRs'; +$lang->bug->duplicateTip = 'Please enter keyword search'; /* Page tags. */ $lang->bug->lblAssignedTo = 'Affecté à'; @@ -232,51 +233,39 @@ $lang->bug->priList[2] = '2'; $lang->bug->priList[3] = '3'; $lang->bug->priList[4] = '4'; -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = 'Tous'; -$lang->bug->osList['windows'] = 'Windows'; -$lang->bug->osList['win10'] = 'Windows 10'; -$lang->bug->osList['win8'] = 'Windows 8'; -$lang->bug->osList['win7'] = 'Windows 7'; -$lang->bug->osList['vista'] = 'Windows Vista'; -$lang->bug->osList['winxp'] = 'Windows XP'; -$lang->bug->osList['win2012'] = 'Windows 2012'; -$lang->bug->osList['win2008'] = 'Windows 2008'; -$lang->bug->osList['win2003'] = 'Windows 2003'; -$lang->bug->osList['win2000'] = 'Windows 2000'; -$lang->bug->osList['android'] = 'Android'; -$lang->bug->osList['ios'] = 'IOS'; -$lang->bug->osList['wp8'] = 'WP8'; -$lang->bug->osList['wp7'] = 'WP7'; -$lang->bug->osList['symbian'] = 'Symbian'; -$lang->bug->osList['linux'] = 'Linux'; -$lang->bug->osList['freebsd'] = 'FreeBSD'; -$lang->bug->osList['osx'] = 'OS X'; -$lang->bug->osList['unix'] = 'Unix'; -$lang->bug->osList['others'] = 'Autres'; +$lang->bug->osList[''] = ''; +$lang->bug->osList['all'] = 'Tous'; +$lang->bug->osList['windows'] = 'Windows'; +$lang->bug->osList['win11'] = 'Windows 11'; +$lang->bug->osList['win10'] = 'Windows 10'; +$lang->bug->osList['win8'] = 'Windows 8'; +$lang->bug->osList['win7'] = 'Windows 7'; +$lang->bug->osList['winxp'] = 'Windows XP'; +$lang->bug->osList['osx'] = 'Mac OS'; +$lang->bug->osList['android'] = 'Android'; +$lang->bug->osList['ios'] = 'IOS'; +$lang->bug->osList['linux'] = 'Linux'; +$lang->bug->osList['ubuntu'] = 'Ubuntu'; +$lang->bug->osList['chromeos'] = 'Chrome OS'; +$lang->bug->osList['fedora'] = 'Fedora'; +$lang->bug->osList['unix'] = 'Unix'; +$lang->bug->osList['others'] = 'Autres'; -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = 'Tous'; -$lang->bug->browserList['ie'] = 'IE series'; -$lang->bug->browserList['ie11'] = 'IE11'; -$lang->bug->browserList['ie10'] = 'IE10'; -$lang->bug->browserList['ie9'] = 'IE9'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['ie7'] = 'IE7'; -$lang->bug->browserList['ie6'] = 'IE6'; -$lang->bug->browserList['chrome'] = 'Chrome'; -$lang->bug->browserList['firefox'] = 'Firefox series'; -$lang->bug->browserList['firefox4'] = 'Firefox4'; -$lang->bug->browserList['firefox3'] = 'Firefox3'; -$lang->bug->browserList['firefox2'] = 'Firefox2'; -$lang->bug->browserList['opera'] = 'Opera series'; -$lang->bug->browserList['oprea11'] = 'Opera11'; -$lang->bug->browserList['oprea10'] = 'Opera10'; -$lang->bug->browserList['opera9'] = 'Opera9'; -$lang->bug->browserList['safari'] = 'Safari'; -$lang->bug->browserList['maxthon'] = 'Maxthon'; -$lang->bug->browserList['uc'] = 'UC'; -$lang->bug->browserList['other'] = 'Autres'; +$lang->bug->browserList[''] = ''; +$lang->bug->browserList['all'] = 'Tous'; +$lang->bug->browserList['chrome'] = 'Chrome'; +$lang->bug->browserList['edge'] = 'Edge'; +$lang->bug->browserList['ie'] = 'IE series'; +$lang->bug->browserList['ie11'] = 'IE11'; +$lang->bug->browserList['ie10'] = 'IE10'; +$lang->bug->browserList['ie9'] = 'IE9'; +$lang->bug->browserList['ie8'] = 'IE8'; +$lang->bug->browserList['firefox'] = 'Firefox series'; +$lang->bug->browserList['opera'] = 'Opera series'; +$lang->bug->browserList['safari'] = 'Safari'; +$lang->bug->browserList['360'] = '360 series'; +$lang->bug->browserList['qq'] = 'QQ series'; +$lang->bug->browserList['other'] = 'Autres'; $lang->bug->typeList[''] = ''; $lang->bug->typeList['codeerror'] = 'Code Erreur'; diff --git a/module/bug/lang/zh-cn.php b/module/bug/lang/zh-cn.php index 73c41b12e0..9a6ad14c53 100644 --- a/module/bug/lang/zh-cn.php +++ b/module/bug/lang/zh-cn.php @@ -77,7 +77,7 @@ $lang->bug->deadlineAB = '截止'; $lang->bug->plan = '所属' . '计划'; $lang->bug->closedBy = '由谁关闭'; $lang->bug->closedDate = '关闭日期'; -$lang->bug->duplicateBug = '重复ID'; +$lang->bug->duplicateBug = '重复Bug'; $lang->bug->lastEditedBy = '最后修改者'; $lang->bug->linkBug = '相关Bug'; $lang->bug->linkBugs = '关联相关Bug'; @@ -176,6 +176,7 @@ $lang->bug->labelPostponed = '被延期'; $lang->bug->changed = '已变动'; $lang->bug->storyChanged = '需求变动'; $lang->bug->linkMR = '相关合并请求'; +$lang->bug->duplicateTip = '请输入关键字'; /* 页面标签。*/ $lang->bug->lblAssignedTo = '当前指派'; @@ -232,51 +233,39 @@ $lang->bug->priList[2] = '2'; $lang->bug->priList[3] = '3'; $lang->bug->priList[4] = '4'; -$lang->bug->osList[''] = ''; -$lang->bug->osList['all'] = '全部'; -$lang->bug->osList['windows'] = 'Windows'; -$lang->bug->osList['win10'] = 'Windows 10'; -$lang->bug->osList['win8'] = 'Windows 8'; -$lang->bug->osList['win7'] = 'Windows 7'; -$lang->bug->osList['vista'] = 'Windows Vista'; -$lang->bug->osList['winxp'] = 'Windows XP'; -$lang->bug->osList['win2012'] = 'Windows 2012'; -$lang->bug->osList['win2008'] = 'Windows 2008'; -$lang->bug->osList['win2003'] = 'Windows 2003'; -$lang->bug->osList['win2000'] = 'Windows 2000'; -$lang->bug->osList['android'] = 'Android'; -$lang->bug->osList['ios'] = 'IOS'; -$lang->bug->osList['wp8'] = 'WP8'; -$lang->bug->osList['wp7'] = 'WP7'; -$lang->bug->osList['symbian'] = 'Symbian'; -$lang->bug->osList['linux'] = 'Linux'; -$lang->bug->osList['freebsd'] = 'FreeBSD'; -$lang->bug->osList['osx'] = 'OS X'; -$lang->bug->osList['unix'] = 'Unix'; -$lang->bug->osList['others'] = '其他'; +$lang->bug->osList[''] = ''; +$lang->bug->osList['all'] = '全部'; +$lang->bug->osList['windows'] = 'Windows'; +$lang->bug->osList['win11'] = 'Windows 11'; +$lang->bug->osList['win10'] = 'Windows 10'; +$lang->bug->osList['win8'] = 'Windows 8'; +$lang->bug->osList['win7'] = 'Windows 7'; +$lang->bug->osList['winxp'] = 'Windows XP'; +$lang->bug->osList['osx'] = 'Mac OS'; +$lang->bug->osList['android'] = 'Android'; +$lang->bug->osList['ios'] = 'IOS'; +$lang->bug->osList['linux'] = 'Linux'; +$lang->bug->osList['ubuntu'] = 'Ubuntu'; +$lang->bug->osList['chromeos'] = 'Chrome OS'; +$lang->bug->osList['fedora'] = 'Fedora'; +$lang->bug->osList['unix'] = 'Unix'; +$lang->bug->osList['others'] = '其他'; -$lang->bug->browserList[''] = ''; -$lang->bug->browserList['all'] = '全部'; -$lang->bug->browserList['ie'] = 'IE系列'; -$lang->bug->browserList['ie11'] = 'IE11'; -$lang->bug->browserList['ie10'] = 'IE10'; -$lang->bug->browserList['ie9'] = 'IE9'; -$lang->bug->browserList['ie8'] = 'IE8'; -$lang->bug->browserList['ie7'] = 'IE7'; -$lang->bug->browserList['ie6'] = 'IE6'; -$lang->bug->browserList['chrome'] = 'chrome'; -$lang->bug->browserList['firefox'] = 'firefox系列'; -$lang->bug->browserList['firefox4'] = 'firefox4'; -$lang->bug->browserList['firefox3'] = 'firefox3'; -$lang->bug->browserList['firefox2'] = 'firefox2'; -$lang->bug->browserList['opera'] = 'opera系列'; -$lang->bug->browserList['oprea11'] = 'opera11'; -$lang->bug->browserList['oprea10'] = 'opera10'; -$lang->bug->browserList['opera9'] = 'opera9'; -$lang->bug->browserList['safari'] = 'safari'; -$lang->bug->browserList['maxthon'] = '傲游'; -$lang->bug->browserList['uc'] = 'UC'; -$lang->bug->browserList['other'] = '其他'; +$lang->bug->browserList[''] = ''; +$lang->bug->browserList['all'] = '全部'; +$lang->bug->browserList['chrome'] = 'Chrome'; +$lang->bug->browserList['edge'] = 'Edge'; +$lang->bug->browserList['ie'] = 'IE系列'; +$lang->bug->browserList['ie11'] = 'IE11'; +$lang->bug->browserList['ie10'] = 'IE10'; +$lang->bug->browserList['ie9'] = 'IE9'; +$lang->bug->browserList['ie8'] = 'IE8'; +$lang->bug->browserList['firefox'] = 'firefox系列'; +$lang->bug->browserList['opera'] = 'Opera系列'; +$lang->bug->browserList['safari'] = 'safari'; +$lang->bug->browserList['360'] = '360浏览器'; +$lang->bug->browserList['qq'] = 'QQ浏览器'; +$lang->bug->browserList['other'] = '其他'; $lang->bug->typeList[''] = ''; $lang->bug->typeList['codeerror'] = '代码错误'; diff --git a/module/bug/model.php b/module/bug/model.php index ffaa661385..66472d082b 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -76,6 +76,8 @@ class bugModel extends model ->trim('title') ->join('openedBuild', ',') ->join('mailto', ',') + ->join('os', ',') + ->join('browser', ',') ->remove('files,labels,uid,oldTaskID,contactListMenu,region,lane') ->get(); @@ -163,25 +165,24 @@ class bugModel extends model $execution = 0; $type = ''; $pri = 0; - $os = ''; - $browser = ''; foreach($data->title as $i => $title) { + $oses = array_filter($data->oses[$i]); + $browsers = array_filter($data->browsers[$i]); + if($data->modules[$i] != 'ditto') $module = (int)$data->modules[$i]; if($data->projects[$i] != 'ditto') $project = (int)$data->projects[$i]; if($data->executions[$i] != 'ditto') $execution = (int)$data->executions[$i]; if($data->types[$i] != 'ditto') $type = $data->types[$i]; if($data->pris[$i] != 'ditto') $pri = $data->pris[$i]; - if($data->oses[$i] != 'ditto') $os = $data->oses[$i]; - if($data->browsers[$i] != 'ditto') $browser = $data->browsers[$i]; $data->modules[$i] = (int)$module; $data->projects[$i] = (int)$project; $data->executions[$i] = (int)$execution; $data->types[$i] = $type; $data->pris[$i] = $pri; - $data->oses[$i] = $os; - $data->browsers[$i] = $browser; + $data->oses[$i] = implode(',', $oses); + $data->browsers[$i] = implode(',', $browsers); } /* Get bug data. */ @@ -383,6 +384,9 @@ class bugModel extends model $browseType = ($browseType == 'bymodule' and $this->session->bugBrowseType and $this->session->bugBrowseType != 'bysearch') ? $this->session->bugBrowseType : $browseType; $browseType = $browseType == 'bybranch' ? 'bymodule' : $browseType; + if(strpos($sort, 'pri_') !== false) $sort = str_replace('pri_', 'priOrder_', $sort); + if(strpos($sort, 'severity_') !== false) $sort = str_replace('severity_', 'severityOrder_', $sort); + /* Get bugs by browse type. */ $bugs = array(); if($browseType == 'all') $bugs = $this->getAllBugs($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID); @@ -401,6 +405,7 @@ class bugModel extends model elseif($browseType == 'bysearch') $bugs = $this->getBySearch($productIDList, $branch, $queryID, $sort, '', $pager, $projectID); elseif($browseType == 'overduebugs') $bugs = $this->getOverdueBugs($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID); elseif($browseType == 'assignedbyme') $bugs = $this->getByAssignedbyme($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID); + elseif($browseType == 'review') $bugs = $this->getReviewBugs($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID); return $this->checkDelayedBugs($bugs); } @@ -481,7 +486,7 @@ class bugModel extends model */ public function getModuleBugs($productIDList, $branch = 0, $moduleIdList = 0, $executions = array(), $orderBy = 'id_desc', $pager = null, $projectID = 0) { - return $this->dao->select('*')->from(TABLE_BUG) + return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) ->beginIF($branch !== 'all')->andWhere('branch')->eq($branch)->fi() ->beginIF(!empty($moduleIdList))->andWhere('module')->in($moduleIdList)->fi() @@ -504,7 +509,8 @@ class bugModel extends model */ public function getPlanBugs($planID, $status = 'all', $orderBy = 'id_desc', $pager = null) { - $bugs = $this->dao->select('*')->from(TABLE_BUG) + if(strpos($orderBy, 'pri_') !== false) $orderBy = str_replace('pri_', 'priOrder_', $orderBy); + $bugs = $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder")->from(TABLE_BUG) ->where('plan')->eq((int)$planID) ->beginIF(!$this->app->user->admin)->andWhere('execution')->in('0,' . $this->app->user->view->sprints)->fi() ->beginIF($status != 'all')->andWhere('status')->in($status)->fi() @@ -688,6 +694,8 @@ class bugModel extends model ->stripTags($this->config->bug->editor->edit['id'], $this->config->allowedTags) ->setDefault('product,module,execution,story,task,duplicateBug,branch', 0) ->setDefault('openedBuild', '') + ->setDefault('os', '') + ->setDefault('browser', '') ->setDefault('plan', 0) ->setDefault('deadline', '0000-00-00') ->setDefault('resolvedDate', '0000-00-00 00:00:00') @@ -698,6 +706,8 @@ class bugModel extends model ->join('openedBuild', ',') ->join('mailto', ',') ->join('linkBug', ',') + ->join('os', ',') + ->join('browser', ',') ->setIF($this->post->assignedTo != $oldBug->assignedTo, 'assignedDate', $now) ->setIF($this->post->resolvedBy != '' and $this->post->resolvedDate == '', 'resolvedDate', $now) ->setIF($this->post->resolution != '' and $this->post->resolvedDate == '', 'resolvedDate', $now) @@ -715,6 +725,7 @@ class bugModel extends model ->setIF($this->post->resolution != '', 'confirmed', 1) ->setIF($this->post->story != false and $this->post->story != $oldBug->story, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) ->setIF(!$this->post->linkBug, 'linkBug', '') + ->setIF($this->post->case === '', 'case', 0) ->remove('comment,files,labels,uid,contactListMenu') ->get(); @@ -740,6 +751,13 @@ class bugModel extends model $this->linkBugToBuild($bugID, $bug->resolvedBuild); } + if($bug->plan != $oldBug->plan) + { + $this->loadModel('action'); + if(!empty($oldBug->plan)) $this->action->create('productplan', $oldBug->plan, 'unlinkbug', '', $bugID); + if(!empty($bug->plan)) $this->action->create('productplan', $bug->plan, 'linkbug', '', $bugID); + } + $linkBugs = explode(',', $bug->linkBug); $oldLinkBugs = explode(',', $oldBug->linkBug); $addBugs = array_diff($linkBugs, $oldLinkBugs); @@ -777,11 +795,13 @@ class bugModel extends model */ public function batchUpdate() { - $bugs = array(); - $allChanges = array(); - $now = helper::now(); - $data = fixer::input('post')->get(); - $bugIDList = $this->post->bugIDList ? $this->post->bugIDList : array(); + $bugs = array(); + $allChanges = array(); + $now = helper::now(); + $data = fixer::input('post')->get(); + $bugIDList = $this->post->bugIDList ? $this->post->bugIDList : array(); + $unlinkPlans = array(); + $link2Plans = array(); if(!empty($bugIDList)) { @@ -795,8 +815,6 @@ class bugModel extends model if($data->assignedTos[$bugID] == 'ditto') $data->assignedTos[$bugID] = isset($prev['assignedTo']) ? $prev['assignedTo'] : ''; if($data->resolvedBys[$bugID] == 'ditto') $data->resolvedBys[$bugID] = isset($prev['resolvedBy']) ? $prev['resolvedBy'] : ''; if($data->resolutions[$bugID] == 'ditto') $data->resolutions[$bugID] = isset($prev['resolution']) ? $prev['resolution'] : ''; - if($data->os[$bugID] == 'ditto') $data->os[$bugID] = isset($prev['os']) ? $prev['os'] : ''; - if($data->browsers[$bugID] == 'ditto') $data->browsers[$bugID] = isset($prev['browser']) ? $prev['browser'] : ''; if(isset($data->branches[$bugID]) and $data->branches[$bugID] == 'ditto') $data->branches[$bugID] = isset($prev['branch']) ? $prev['branch'] : 0; $prev['type'] = $data->types[$bugID]; @@ -807,8 +825,6 @@ class bugModel extends model $prev['assignedTo'] = $data->assignedTos[$bugID]; $prev['resolvedBy'] = $data->resolvedBys[$bugID]; $prev['resolution'] = $data->resolutions[$bugID]; - $prev['os'] = $data->os[$bugID]; - $prev['browser'] = $data->browsers[$bugID]; } /* Initialize bugs from the post data.*/ @@ -818,6 +834,9 @@ class bugModel extends model { $oldBug = $oldBugs[$bugID]; + $os = array_filter($data->os[$bugID]); + $browsers = array_filter($data->browsers[$bugID]); + $bug = new stdclass(); $bug->id = $bugID; $bug->lastEditedBy = $this->app->user->account; @@ -830,12 +849,12 @@ class bugModel extends model $bug->plan = empty($data->plans[$bugID]) ? 0 : $data->plans[$bugID]; $bug->branch = empty($data->branches[$bugID]) ? 0 : $data->branches[$bugID]; $bug->module = $data->modules[$bugID]; - $bug->assignedTo = $data->assignedTos[$bugID]; + $bug->assignedTo = $bug->status == 'closed' ? $oldBug->assignedTo : $data->assignedTos[$bugID]; $bug->deadline = $data->deadlines[$bugID]; $bug->resolvedBy = $data->resolvedBys[$bugID]; $bug->keywords = $data->keywords[$bugID]; - $bug->os = $data->os[$bugID]; - $bug->browser = $data->browsers[$bugID]; + $bug->os = implode(',', $os); + $bug->browser = implode(',', $browsers); $bug->resolution = $data->resolutions[$bugID]; $bug->duplicateBug = $data->duplicateBugs[$bugID] ? $data->duplicateBugs[$bugID] : $oldBug->duplicateBug; @@ -861,6 +880,12 @@ class bugModel extends model $bug->{$extendField->field} = htmlSpecialString($bug->{$extendField->field}); } + if($bug->plan != $oldBug->plan) + { + if($bug->plan != $oldBug->plan and !empty($oldBug->plan)) $unlinkPlans[$oldBug->plan] = empty($unlinkPlans[$oldBug->plan]) ? $bugID : "{$unlinkPlans[$oldBug->plan]},$bugID"; + if($bug->plan != $oldBug->plan and !empty($bug->plan)) $link2Plans[$bug->plan] = empty($link2Plans[$bug->plan]) ? $bugID : "{$link2Plans[$bug->plan]},$bugID"; + } + $bugs[$bugID] = $bug; unset($bug); } @@ -902,7 +927,14 @@ class bugModel extends model } } } - if(!dao::isError()) $this->loadModel('score')->create('ajax', 'batchEdit'); + if(!dao::isError()) + { + $this->loadModel('score')->create('ajax', 'batchEdit'); + + $this->loadModel('action'); + foreach($unlinkPlans as $planID => $bugs) $this->action->create('productplan', $planID, 'unlinkbug', '', $bugs); + foreach($link2Plans as $planID => $bugs) $this->action->create('productplan', $planID, 'linkbug', '', $bugs); + } return $allChanges; } @@ -922,6 +954,7 @@ class bugModel extends model if(empty($bugIDList)) return $activateBugs; + $extendFields = $this->getFlowExtendFields(); foreach($bugIDList as $bugID) { if($data->statusList[$bugID] == 'active') continue; @@ -944,6 +977,15 @@ class bugModel extends model $activateBugs[$bugID]['toStory'] = 0; $activateBugs[$bugID]['lastEditedBy'] = $this->app->user->account; $activateBugs[$bugID]['lastEditedDate'] = $now; + + foreach($extendFields as $extendField) + { + $postFieldData = $this->post->{$extendField->field}; + + if(is_array($postFieldData[$bugID])) $postFieldData[$bugID] = join(',', $postFieldData[$bugID]); + + $activateBugs[$bugID][$extendField->field] = htmlSpecialString($postFieldData[$bugID]); + } } /* Update bugs. */ @@ -953,6 +995,8 @@ class bugModel extends model if(dao::isError()) return print(js::error('bug#' . $bugID . dao::getError(true))); $this->dao->update(TABLE_BUG)->set('activatedCount = activatedCount + 1')->where('id')->eq((int)$bugID)->exec(); + + $this->executeHooks($bugID); } return $activateBugs; @@ -969,6 +1013,8 @@ class bugModel extends model { $now = helper::now(); $oldBug = $this->getById($bugID); + if($oldBug->status == 'closed') return false; + $bug = fixer::input('post') ->add('id', $bugID) ->setDefault('lastEditedBy', $this->app->user->account) @@ -1083,6 +1129,7 @@ class bugModel extends model ->setDefault('assignedDate', $now) ->setDefault('resolvedDate', $now) ->setDefault('assignedTo', $oldBug->openedBy) + ->setDefault('duplicateBug', 0) ->removeIF($this->post->resolution != 'duplicate', 'duplicateBug') ->stripTags($this->config->bug->editor->resolve['id'], $this->config->allowedTags) ->remove('files,labels') @@ -1123,13 +1170,15 @@ class bugModel extends model if(dao::isError()) return false; $buildData = new stdclass(); - $buildData->product = (int)$oldBug->product; - $buildData->branch = (int)$oldBug->branch; - $buildData->project = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($bug->buildExecution)->fetch('project'); - $buildData->execution = $bug->buildExecution; - $buildData->name = $bug->buildName; - $buildData->date = date('Y-m-d'); - $buildData->builder = $this->app->user->account; + $buildData->product = (int)$oldBug->product; + $buildData->branch = (int)$oldBug->branch; + $buildData->project = $this->dao->select('project')->from(TABLE_EXECUTION)->where('id')->eq($bug->buildExecution)->fetch('project'); + $buildData->execution = $bug->buildExecution; + $buildData->name = $bug->buildName; + $buildData->date = date('Y-m-d'); + $buildData->builder = $this->app->user->account; + $buildData->createdBy = $this->app->user->account; + $buildData->createdDate = helper::now(); $this->dao->insert(TABLE_BUILD)->data($buildData)->autoCheck() ->check('name', 'unique', "product = {$buildData->product} AND branch = {$buildData->branch} AND deleted = '0'") ->exec(); @@ -1242,13 +1291,17 @@ class bugModel extends model */ public function batchChangePlan($bugIDList, $planID) { - $now = helper::now(); - $allChanges = array(); - $oldBugs = $this->getByList($bugIDList); + $now = helper::now(); + $allChanges = array(); + $oldBugs = $this->getByList($bugIDList); + $unlinkPlans = array(); + $link2Plans = array(); foreach($bugIDList as $bugID) { $oldBug = $oldBugs[$bugID]; if($planID == $oldBug->plan) continue; + $unlinkPlans[$oldBug->plan] = empty($unlinkPlans[$oldBug->plan]) ? $bugID : "{$unlinkPlans[$oldBug->plan]},$bugID"; + $link2Plans[$planID] = empty($link2Plans[$planID]) ? $bugID : "{$link2Plans[$planID]},$bugID"; $bug = new stdclass(); $bug->lastEditedBy = $this->app->user->account; @@ -1258,6 +1311,12 @@ class bugModel extends model $this->dao->update(TABLE_BUG)->data($bug)->autoCheck()->where('id')->eq((int)$bugID)->exec(); if(!dao::isError()) $allChanges[$bugID] = common::createChanges($oldBug, $bug); } + if(!dao::isError()) + { + $this->loadModel('action'); + foreach($unlinkPlans as $planID => $bugs) $this->action->create('productplan', $planID, 'unlinkbug', '', $bugs); + foreach($link2Plans as $planID => $bugs) $this->action->create('productplan', $planID, 'linkbug', '', $bugs); + } return $allChanges; } @@ -1511,7 +1570,6 @@ class bugModel extends model $bugCount = $this->dao->select("count(id) as num, date_format($field, '%m/%d') as date")->from(TABLE_BUG) ->where('product')->eq($productID) ->andWhere($field)->ne('0000-00-00 00:00:00') - ->andWhere($field)->ne('') ->andWhere('deleted')->eq(0) ->andWhere($field)->between($startDate, $endDate . ' 23:50:59') ->groupBy('date') @@ -1659,11 +1717,10 @@ class bugModel extends model $moduleName = $this->app->rawMethod == 'work' ? 'workBug' : 'contributeBug'; $queryName = $moduleName . 'Query'; $formName = $moduleName . 'Form'; - - $bugIDList = array(); + $bugIDList = array(); if($moduleName == 'contributeBug') { - $bugsAssignedByMe = $this->loadModel('my')->getAssignedByMe($account, 0, $pager, $orderBy, 0, 'bug'); + $bugsAssignedByMe = $this->loadModel('my')->getAssignedByMe($account, 0, '', $orderBy, 'bug'); foreach($bugsAssignedByMe as $bugID => $bug) $bugIDList[$bugID] = $bugID; } @@ -1688,7 +1745,7 @@ class bugModel extends model $query = preg_replace('/`(\w+)`/', 't1.`$1`', $query); if($type != 'bySearch' and !$this->loadModel('common')->checkField(TABLE_BUG, $type)) return array(); - return $this->dao->select('t1.*,t2.name as productName')->from(TABLE_BUG)->alias('t1') + return $this->dao->select("t1.*,t2.name as productName, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) as severityOrder")->from(TABLE_BUG)->alias('t1') ->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id') ->where('t1.deleted')->eq(0) ->andWhere('t2.deleted')->eq('0') @@ -1697,8 +1754,8 @@ class bugModel extends model ->beginIF($type != 'closedBy' and $this->app->moduleName == 'block')->andWhere('t1.status')->ne('closed')->fi() ->beginIF($type != 'all' and $type != 'bySearch')->andWhere("t1.`$type`")->eq($account)->fi() ->beginIF($type == 'bySearch' and $moduleName == 'workBug')->andWhere("t1.assignedTo")->eq($account)->fi() - ->beginIF($type == 'bySearch' and $moduleName == 'contributeBug') ->beginIF($type == 'assignedTo' and $moduleName == 'workBug')->andWhere('t1.status')->ne('closed')->fi() + ->beginIF($type == 'bySearch' and $moduleName == 'contributeBug') ->andWhere('t1.openedBy', 1)->eq($account) ->orWhere('t1.closedBy')->eq($account) ->orWhere('t1.resolvedBy')->eq($account) @@ -1769,6 +1826,9 @@ class bugModel extends model public function getProjectBugs($projectID, $productID = 0, $branchID = 0, $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null) { $type = strtolower($type); + if(strpos($orderBy, 'pri_') !== false) $orderBy = str_replace('pri_', 'priOrder_', $orderBy); + if(strpos($orderBy, 'severity_') !== false) $orderBy = str_replace('severity_', 'severityOrder_', $orderBy); + if($type == 'bysearch') { $queryID = (int)$param; @@ -1785,7 +1845,7 @@ class bugModel extends model $bugQuery = $this->getBugQuery($this->session->projectBugQuery); - $bugs = $this->dao->select('*')->from(TABLE_BUG) + $bugs = $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where($bugQuery) ->andWhere('project')->eq((int)$projectID) ->andWhere('deleted')->eq(0) @@ -1798,7 +1858,7 @@ class bugModel extends model } else { - $bugs = $this->dao->select('t1.*')->from(TABLE_BUG)->alias('t1') + $bugs = $this->dao->select("t1.*, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) as severityOrder")->from(TABLE_BUG)->alias('t1') ->leftJoin(TABLE_MODULE)->alias('t2')->on('t1.module=t2.id') ->where('t1.deleted')->eq(0) ->beginIF(empty($build))->andWhere('t1.project')->eq($projectID)->fi() @@ -1814,7 +1874,7 @@ class bugModel extends model ->orderBy($orderBy)->page($pager)->fetchAll(); } - $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug'); + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug', false); return $bugs; } @@ -1837,6 +1897,9 @@ class bugModel extends model public function getExecutionBugs($executionID, $productID = 0, $branchID = 'all', $build = 0, $type = '', $param = 0, $orderBy = 'id_desc', $excludeBugs = '', $pager = null) { $type = strtolower($type); + if(strpos($orderBy, 'pri_') !== false) $orderBy = str_replace('pri_', 'priOrder_', $orderBy); + if(strpos($orderBy, 'severity_') !== false) $orderBy = str_replace('severity_', 'severityOrder_', $orderBy); + if($type == 'bysearch') { $queryID = (int)$param; @@ -1853,7 +1916,7 @@ class bugModel extends model $bugQuery = $this->getBugQuery($this->session->executionBugQuery); - $bugs = $this->dao->select('*')->from(TABLE_BUG) + $bugs = $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where($bugQuery) ->andWhere('execution')->eq((int)$executionID) ->andWhere('deleted')->eq(0) @@ -1866,7 +1929,7 @@ class bugModel extends model } else { - $bugs = $this->dao->select('t1.*')->from(TABLE_BUG)->alias('t1') + $bugs = $this->dao->select("t1.*, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) as severityOrder")->from(TABLE_BUG)->alias('t1') ->leftJoin(TABLE_MODULE)->alias('t2')->on('t1.module=t2.id') ->where('t1.deleted')->eq(0) ->beginIF(!empty($productID) and $branchID !== 'all')->andWhere('t1.branch')->eq($branchID)->fi() @@ -1882,7 +1945,7 @@ class bugModel extends model ->fetchAll('id'); } - $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug'); + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug', false); return $bugs; } @@ -1931,16 +1994,18 @@ class bugModel extends model /** * get Product Bug Pairs * - * @param int $productID + * @param int $productID + * @param int|string $branch * @access public * @return void */ - public function getProductBugPairs($productID) + public function getProductBugPairs($productID, $branch = '') { $bugs = array('' => ''); $data = $this->dao->select('id, title')->from(TABLE_BUG) ->where('product')->eq((int)$productID) ->beginIF(!$this->app->user->admin)->andWhere('execution')->in('0,' . $this->app->user->view->sprints)->fi() + ->beginIF($branch !== '')->andWhere('branch')->in($branch)->fi() ->andWhere('deleted')->eq(0) ->orderBy('id desc') ->fetchAll(); @@ -2208,6 +2273,7 @@ class bugModel extends model } } + $this->app->loadLang('report'); foreach($datas as $buildID => $data) { $data->name = isset($builds[$buildID]) ? $builds[$buildID] : $this->lang->report->undefined; @@ -2487,7 +2553,7 @@ class bugModel extends model */ public function getAllBugs($productIDList, $branch, $modules, $executions, $orderBy, $pager = null, $projectID = 0) { - $bugs = $this->dao->select('t1.*, t2.title as planTitle')->from(TABLE_BUG)->alias('t1') + $bugs = $this->dao->select("t1.*, t2.title as planTitle, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) as severityOrder")->from(TABLE_BUG)->alias('t1') ->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id') ->where('t1.product')->in($productIDList) ->andWhere('t1.execution')->in(array_keys($executions)) @@ -2518,7 +2584,9 @@ class bugModel extends model */ public function getByAssigntome($productIDList, $branch, $modules, $executions, $orderBy, $pager, $projectID) { - return $this->dao->findByAssignedTo($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->in($productIDList) + return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) + ->where('assignedTo')->eq($this->app->user->account) + ->andWhere('product')->in($productIDList) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() @@ -2543,7 +2611,9 @@ class bugModel extends model */ public function getByOpenedbyme($productIDList, $branch, $modules, $executions, $orderBy, $pager, $projectID) { - return $this->dao->findByOpenedBy($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->in($productIDList) + return $this->dao->select("*,IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) + ->where('openedBy')->eq($this->app->user->account) + ->andWhere('product')->in($productIDList) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() @@ -2568,7 +2638,9 @@ class bugModel extends model */ public function getByResolvedbyme($productIDList, $branch, $modules, $executions, $orderBy, $pager, $projectID) { - return $this->dao->findByResolvedBy($this->app->user->account)->from(TABLE_BUG)->andWhere('product')->in($productIDList) + return $this->dao->select("*,IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) + ->where('resolvedBy')->eq($this->app->user->account) + ->andWhere('product')->in($productIDList) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() @@ -2594,7 +2666,9 @@ class bugModel extends model public function getByAssigntonull($productIDList, $branch, $modules, $executions, $orderBy, $pager, $projectID) { - return $this->dao->findByAssignedTo('')->from(TABLE_BUG)->andWhere('product')->in($productIDList) + return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) + ->where('assignedTo')->eq('') + ->andWhere('product')->in($productIDList) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() @@ -2619,7 +2693,7 @@ class bugModel extends model */ public function getUnconfirmed($productIDList, $branch, $modules, $executions, $orderBy, $pager, $projectID) { - return $this->dao->select('*')->from(TABLE_BUG) + return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) ->andWhere('execution')->in(array_keys($executions)) ->andWhere('deleted')->eq(0) @@ -2647,7 +2721,7 @@ class bugModel extends model */ public function getOverdueBugs($productIDList, $branch, $modules, $executions, $orderBy, $pager, $projectID) { - return $this->dao->select('*')->from(TABLE_BUG) + return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) ->andWhere('execution')->in(array_keys($executions)) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() @@ -2677,7 +2751,7 @@ class bugModel extends model */ public function getByStatus($productIDList, $branch, $modules, $executions, $status, $orderBy, $pager, $projectID) { - return $this->dao->select('*')->from(TABLE_BUG) + return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) ->andWhere('execution')->in(array_keys($executions)) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() @@ -2708,7 +2782,9 @@ class bugModel extends model public function getByLonglifebugs($productIDList, $branch, $modules, $executions, $orderBy, $pager, $projectID) { $lastEditedDate = date(DT_DATE1, time() - $this->config->bug->longlife * 24 * 3600); - return $this->dao->findByLastEditedDate("<", $lastEditedDate)->from(TABLE_BUG)->andWhere('product')->in($productIDList) + return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) + ->where('lastEditedDate')->lt($lastEditedDate) + ->andWhere('product')->in($productIDList) ->andWhere('execution')->in(array_keys($executions)) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() @@ -2734,7 +2810,9 @@ class bugModel extends model */ public function getByPostponedbugs($productIDList, $branch, $modules, $executions, $orderBy, $pager, $projectID) { - return $this->dao->findByResolution('postponed')->from(TABLE_BUG)->andWhere('product')->in($productIDList) + return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) + ->where('resolution')->eq('postponed') + ->andWhere('product')->in($productIDList) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() ->beginIF($projectID)->andWhere('project')->eq($projectID)->fi() @@ -2759,7 +2837,7 @@ class bugModel extends model */ public function getByNeedconfirm($productIDList, $branch, $modules, $executions, $orderBy, $pager, $projectID) { - return $this->dao->select('t1.*, t2.title AS storyTitle')->from(TABLE_BUG)->alias('t1') + return $this->dao->select("t1.*, t2.title AS storyTitle, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) as priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) as severityOrder")->from(TABLE_BUG)->alias('t1') ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') ->where("t2.status = 'active'") ->andWhere('t1.product')->in($productIDList) @@ -2791,7 +2869,7 @@ class bugModel extends model public function getByAssignedbyme($productIDList, $branch, $modules, $executions, $sort, $pager, $projectID) { $actionIDList = $this->dao->select('objectID')->from(TABLE_ACTION)->where('objectType')->eq('bug')->andWhere('action')->eq('assigned')->andWhere('actor')->eq($this->app->user->account)->fetchPairs('objectID', 'objectID'); - return $this->dao->select('*')->from(TABLE_BUG) + return $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG) ->where('product')->in($productIDList) ->beginIF($branch !== 'all')->andWhere('branch')->in($branch)->fi() ->beginIF($modules)->andWhere('module')->in($modules)->fi() @@ -2863,7 +2941,7 @@ class bugModel extends model if($branch !== 'all' and strpos($bugQuery, '`branch` =') === false) $bugQuery .= " AND `branch` in('0','$branch')"; if(strpos($bugQuery, $allBranch) !== false) $bugQuery = str_replace($allBranch, '1', $bugQuery); - $bugs = $this->dao->select('*')->from(TABLE_BUG)->where($bugQuery) + $bugs = $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG)->where($bugQuery) ->beginIF(!$this->app->user->admin)->andWhere('execution')->in('0,' . $this->app->user->view->sprints)->fi() ->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi() @@ -2880,6 +2958,38 @@ class bugModel extends model return $bugs; } + /** + * Get bugs to review. + * + * @param array $productIDList + * @param int|string $branch + * @param array $modules + * @param array $executions + * @param string $orderBy + * @param object $pager + * @param int $projectID + * @access public + * @return array + */ + public function getReviewBugs($productIDList, $branch, $modules, $executions, $orderBy, $pager = null, $projectID = 0) + { + $bugs = $this->dao->select("t1.*, t2.title as planTitle, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder, IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder")->from(TABLE_BUG)->alias('t1') + ->leftJoin(TABLE_PRODUCTPLAN)->alias('t2')->on('t1.plan = t2.id') + ->where('t1.product')->in($productIDList) + ->andWhere('t1.execution')->in(array_keys($executions)) + ->beginIF($branch !== 'all')->andWhere('t1.branch')->eq($branch)->fi() + ->beginIF($modules)->andWhere('t1.module')->in($modules)->fi() + ->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi() + ->andWhere('t1.deleted')->eq(0) + ->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)") + ->beginIF(!$this->app->user->admin)->andWhere('t1.project')->in('0,' . $this->app->user->view->projects)->fi() + ->orderBy($orderBy)->page($pager)->fetchAll(); + + $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'bug'); + + return $bugs; + } + /** * Get bug query. * @@ -3090,9 +3200,25 @@ class bugModel extends model } } - $bugLink = helper::createLink('bug', 'view', "bugID=$bug->id"); - $account = $this->app->user->account; - $id = $col->id; + $bugLink = helper::createLink('bug', 'view', "bugID=$bug->id"); + $account = $this->app->user->account; + $id = $col->id; + $os = ''; + $browser = ''; + $osList = explode(',', $bug->os); + $browserList = explode(',', $bug->browser); + foreach($osList as $value) + { + if(empty($value)) continue; + $os .= $this->lang->bug->osList[$value] . ','; + } + foreach($browserList as $value) + { + if(empty($value)) continue; + $browser .= $this->lang->bug->browserList[$value] . ','; + } + $os = trim($os, ','); + $browser = trim($browser, ','); if($col->show) { $class = "c-$id"; @@ -3124,13 +3250,31 @@ class bugModel extends model $class .= ' c-user'; $title = "title='" . zget($users, $bug->resolvedBy) . "'"; break; + case 'openedBy': + $class .= ' c-user'; + $title = "title='" . zget($users, $bug->openedBy) . "'"; + break; case 'project': $title = "title='" . zget($projectPairs, $bug->project, '') . "'"; break; + case 'plan': + $title = "title='" . zget($plans, $bug->plan) . "'"; + break; + case 'execution': + $title = "title='" . zget($executions, $bug->execution) . "'"; + break; case 'resolvedBuild': $class .= ' text-ellipsis'; $title = "title='" . $bug->resolvedBuild . "'"; break; + case 'os': + $class .= ' text-ellipsis'; + $title = "title='" . $os . "'"; + break; + case 'browser': + $class .= ' text-ellipsis'; + $title = "title='" . $browser . "'"; + break; } if($id == 'deadline' && isset($bug->delay) && $bug->status == 'active') $class .= ' delayed'; @@ -3229,10 +3373,10 @@ class bugModel extends model echo $bug->keywords; break; case 'os': - echo zget($this->lang->bug->osList, $bug->os); + echo $os; break; case 'browser': - echo zget($this->lang->bug->browserList, $bug->browser); + echo $browser; break; case 'mailto': $mailto = explode(',', $bug->mailto); @@ -3438,7 +3582,7 @@ class bugModel extends model $toStoryParams = "product=$bug->product&branch=$bug->branch&module=0&story=0&execution=0&bugID=$bug->id"; $menu .= $this->buildMenu('bug', 'confirmBug', $params, $bug, $type, 'ok', '', "iframe", true); - if($type == 'view') $menu .= $this->buildMenu('bug', 'assignTo', $params, $bug, $type, '', '', "iframe", true); + if($type == 'view' and $bug->status != 'closed') $menu .= $this->buildMenu('bug', 'assignTo', $params, $bug, $type, '', '', "iframe", true); $menu .= $this->buildMenu('bug', 'resolve', $params, $bug, $type, 'checked', '', "iframe showinonlybody", true); $menu .= $this->buildMenu('bug', 'close', $params, $bug, $type, '', '', "text-danger iframe showinonlybody", true); if($type == 'view') $menu .= $this->buildMenu('bug', 'activate', $params, $bug, $type, '', '', "text-success iframe showinonlybody", true); @@ -3460,4 +3604,33 @@ class bugModel extends model return $menu; } + + /** + * Get related objects id lists. + * + * @param int $object + * @param string $pairs + * @access public + * @return void + */ + public function getRelatedObjects($object, $pairs = '') + { + /* Get bugs. */ + $bugs = $this->dao->select('*')->from(TABLE_BUG)->where($this->session->bugQueryCondition)->fetchAll('id'); + + /* Get related objects id lists. */ + $relatedObjectIdList = array(); + $relatedObjects = array(); + + foreach($bugs as $bug) $relatedObjectIdList[$bug->$object] = $bug->$object; + + if($object == 'openedBuild' or $object == 'resolvedBuild') $object = 'build'; + + /* Get related objects title or names. */ + $table = $this->config->objectTables[$object]; + if($table) $relatedObjects = $this->dao->select($pairs)->from($table)->where('id')->in($relatedObjectIdList)->fetchPairs(); + + if(in_array($object, array('build','resolvedBuild'))) $relatedObjects= array('trunk' => $this->lang->trunk) + $relatedObjects; + return array('' => '', 0 => '') + $relatedObjects; + } } diff --git a/module/bug/view/batchactivate.html.php b/module/bug/view/batchactivate.html.php index fbf496252a..5969957b10 100644 --- a/module/bug/view/batchactivate.html.php +++ b/module/bug/view/batchactivate.html.php @@ -11,6 +11,16 @@ */ ?> + +config->edition == 'biz' || $this->config->edition == 'max') +{ + $action = $this->loadModel('workflowaction')->getByModuleAndAction('bug', 'batchactivate'); + if($action->js) echo ""; + if($action->css) echo ""; +} +?> +

bug->common . $lang->colon . $lang->bug->batchActivate;?>

@@ -24,6 +34,14 @@ bug->assignedTo;?> bug->openedBuild;?> bug->legendComment;?> + bug->getFlowExtendFields(); + foreach($extendFields as $extendField) + { + $required = strpos(",$extendField->rules,", ',1,') !== false ? 'required' : ''; + echo "{$extendField->name}"; + } + ?> @@ -34,11 +52,15 @@ id]", $users, $bug->resolvedBy, "class='form-control chosen'");?> id]", $builds, $bug->openedBuild, 'size=4 multiple=multiple class="form-control chosen"');?> id]", '', "class='form-control'");?> + loadModel('flow'); + foreach($extendFields as $extendField) echo "control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->flow->getFieldControl($extendField, $bug, $extendField->field . "[$bug->id]") . ""; + ?> - + diff --git a/module/bug/view/batchcreate.html.php b/module/bug/view/batchcreate.html.php index 762b5634ed..5e167e4891 100755 --- a/module/bug/view/batchcreate.html.php +++ b/module/bug/view/batchcreate.html.php @@ -92,8 +92,6 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field) $executions += array('ditto' => $lang->bug->ditto); $lang->bug->typeList += array('ditto' => $lang->bug->ditto); $lang->bug->priList += array('ditto' => $lang->bug->ditto); - $lang->bug->osList += array('ditto' => $lang->bug->ditto); - $lang->bug->browserList += array('ditto' => $lang->bug->ditto); ?> @@ -104,8 +102,6 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field) $executionID = $i == 1 ? $executionID : 'ditto'; $type = $i == 1 ? '' : 'ditto'; $pri = $i == 1 ? 0 : 'ditto'; - $os = $i == 1 ? '' : 'ditto'; - $browser = $i == 1 ? '' : 'ditto'; ?> @@ -139,8 +135,8 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field) typeBox' style='overflow:visible'> bug->typeList, $type, "class='form-control chosen'");?> priBox' style='overflow:visible'> bug->priList, $pri, "class='form-control'");?> severityBox' style='overflow:visible'>bug->severityList, '3', "class='form-control'");?> - osBox' style='overflow:visible'> bug->osList, $os, "class='form-control chosen'");?> - browserBox' style='overflow:visible'> bug->browserList, $browser, "class='form-control chosen'");?> + osBox' style='overflow:visible'> bug->osList, '', "class='form-control chosen' multiple");?> + browserBox' style='overflow:visible'> bug->browserList, '', "class='form-control chosen' multiple");?> keywordsBox'> loadModel('flow'); @@ -164,8 +160,6 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field) $executionID = $i - $nextStart == 0 ? $executionID : 'ditto'; $type = $i - $nextStart == 0 ? '' : 'ditto'; $pri = $i - $nextStart == 0 ? 0 : 'ditto'; - $os = $i - $nextStart == 0 ? '' : 'ditto'; - $browser = $i - $nextStart == 0 ? '' : 'ditto'; ?> @@ -199,8 +193,8 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field) typeBox' style='overflow:visible'> bug->typeList, $type, "class='form-control chosen'");?> priBox' style='overflow:visible'> bug->priList, $pri, "class='form-control'");?> severityBox' style='overflow:visible'>bug->severityList, '3', "class='form-control'");?> - osBox' style='overflow:visible'> bug->osList, $os, "class='form-control chosen'");?> - browserBox' style='overflow:visible'> bug->browserList, $browser, "class='form-control chosen'");?> + osBox' style='overflow:visible'> bug->osList, '', "class='form-control chosen' multiple");?> + browserBox' style='overflow:visible'> bug->browserList, '', "class='form-control chosen' multiple");?> keywordsBox'> loadModel('flow'); @@ -258,8 +252,8 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field) typeBox' style='overflow:visible'> bug->typeList, $type, "class='form-control chosen'");?> priBox' style='overflow:visible'> bug->priList, $pri, "class='form-control'");?> severityBox' style='overflow:visible'>bug->severityList, '3', "class='form-control'");?> - osBox' style='overflow:visible'> bug->osList, $os, "class='form-control chosen'");?> - browserBox' style='overflow:visible'> bug->browserList, $browser, "class='form-control chosen'");?> + osBox' style='overflow:visible'> bug->osList, '', "class='form-control chosen' multiple");?> + browserBox' style='overflow:visible'> bug->browserList, '', "class='form-control chosen' multiple");?> keywordsBox'> loadModel('flow'); @@ -307,8 +301,8 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field) typeBox' style='overflow:visible'> bug->typeList, $type, "class='form-control chosen'");?> priBox' style='overflow:visible'> bug->priList, $pri, "class='form-control'");?> severityBox' style='overflow:visible'>bug->severityList, '3', "class='form-control'");?> - osBox' style='overflow:visible'> bug->osList, $os, "class='form-control chosen'");?> - browserBox' style='overflow:visible'> bug->browserList, $browser, "class='form-control chosen'");?> + osBox' style='overflow:visible'> bug->osList, '', "class='form-control chosen' multiple");?> + browserBox' style='overflow:visible'> bug->browserList, '', "class='form-control chosen' multiple");?> keywordsBox'> loadModel('flow'); diff --git a/module/bug/view/batchedit.html.php b/module/bug/view/batchedit.html.php index 68d5f4bd91..f1e9c9c348 100644 --- a/module/bug/view/batchedit.html.php +++ b/module/bug/view/batchedit.html.php @@ -132,18 +132,18 @@ unset($assignedToList['closed']); } ?> - ' style='overflow:visible'>assignedTo, "class='form-control picker-select' data-drop-width='135px'");?> + ' style='overflow:visible'>status == 'closed' ? html::input("assignedTos[$bugID]", ucfirst($bug->assignedTo), 'class=form-control disabled') : html::select("assignedTos[$bugID]", $assignedToList, $bug->assignedTo, "class='form-control picker-select' data-drop-width='135px'");?> ' style='overflow:visible'>deadline) ? '' : $bug->deadline, "class='form-control form-date'");?> - >os, 'class=form-control');?> - >browser, 'class=form-control');?> + >bug->osList, $bug->os, 'class="form-control chosen" multiple');?> + >bug->browserList, $bug->browser, 'class="form-control chosen" multiple');?> >keywords, 'class=form-control');?> ' style='overflow:visible'>resolvedBy, "class='form-control picker-select' data-drop-width='auto'");?> > - +
resolution, "class='form-control' onchange=setDuplicate(this.value,$bugID)");?> ' resolution != 'duplicate') echo "style='display:none'";?>> - bug->duplicateBug}'");?> + product][$bug->branch], $bug->duplicateBug, "class='form-control' placeholder='{$lang->bug->duplicateTip}'");?>
diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 8774ed36d9..79c85912a5 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -37,6 +37,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
moduleName, $this->methodName); foreach($menus as $menuItem) { @@ -70,16 +71,16 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow { $moreLabel = $lang->more; $moreLabelActive = ''; - if(isset($lang->bug->moreSelects[$browseType])) + if(isset($lang->bug->moreSelects[$this->session->bugBrowseType])) { - $moreLabel = "{$lang->bug->moreSelects[$browseType]} {$pager->recTotal}"; + $moreLabel = "{$lang->bug->moreSelects[$this->session->bugBrowseType]} {$pager->recTotal}"; $moreLabelActive = 'btn-active-text'; } echo "
{$moreLabel} "; echo "
'; @@ -402,7 +403,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
- + 6;?> diff --git a/module/bug/view/linkbugs.html.php b/module/bug/view/linkbugs.html.php index 6f883c20ae..ba9f34c460 100644 --- a/module/bug/view/linkbugs.html.php +++ b/module/bug/view/linkbugs.html.php @@ -90,7 +90,7 @@ $(function() output += checkbox; }); $.closeModal(); - parent.$('#linkBugsBox').html(output); + parent.$('#linkBugsBox').html(output).closest('tr').removeClass('hidden'); return false; }); }); diff --git a/module/bug/view/resolve.html.php b/module/bug/view/resolve.html.php index e665c4c250..12e1e27e31 100644 --- a/module/bug/view/resolve.html.php +++ b/module/bug/view/resolve.html.php @@ -38,7 +38,7 @@ js::set('productID' , $bug->product); bug->duplicateBug;?> - + bug->duplicateTip}'");?> bug->resolvedBuild;?> diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 46013377fa..02a731de39 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -232,11 +232,29 @@ bug->os;?> - bug->osList[$bug->os];?> + + os);?> + +

+ + " . zget($lang->bug->osList, $os) . "";?> + +

+ + bug->browser;?> - bug->browserList[$bug->browser];?> + + browser);?> + +

+ + " . zget($lang->bug->browserList, $browser) . "";?> + +

+ + bug->keywords;?> @@ -244,7 +262,14 @@ bug->mailto;?> - mailto)); foreach($mailto as $account) echo ' ' . zget($users, $account); ?> + + mailto)) + { + foreach(explode(',', str_replace(' ', '', $bug->mailto)) as $account) echo ' ' . zget($users, $account); + } + ?> + @@ -330,10 +355,10 @@ bug->resolution;?> - + bug->resolutionList[$bug->resolution]) ? $lang->bug->resolutionList[$bug->resolution] : $bug->resolution; - if(isset($bug->duplicateBugTitle)) echo " #$bug->duplicateBug:" . html::a($this->createLink('bug', 'view', "bugID=$bug->duplicateBug", '', true), $bug->duplicateBugTitle, '', "class='iframe' data-width='80%'"); + if(isset($bug->duplicateBugTitle)) echo " #$bug->duplicateBug:" . html::a($this->createLink('bug', 'view', "bugID=$bug->duplicateBug", '', true), $bug->duplicateBugTitle, '', "title='{$bug->duplicateBugTitle}' class='iframe' data-width='80%'"); ?> diff --git a/module/build/control.php b/module/build/control.php index df9d5102d1..182eace820 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -233,26 +233,34 @@ class build extends control $this->app->loadClass('pager', $static = true); if($this->app->getViewType() == 'mhtml') $recPerPage = 10; + $sort = common::appendOrder($orderBy); + if(strpos($sort, 'pri_') !== false) $sort = str_replace('pri_', 'priOrder_', $sort); + /* Get product and bugs. */ $product = $this->loadModel('product')->getById($build->product); if($product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); $bugPager = new pager($type == 'bug' ? $recTotal : 0, $recPerPage, $type == 'bug' ? $pageID : 1); - $bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($build->bugs)->andWhere('deleted')->eq(0) - ->beginIF($type == 'bug')->orderBy($orderBy)->fi() + $bugs = $this->dao->select('*')->from(TABLE_BUG) + ->where('id')->in($build->bugs) + ->andWhere('deleted')->eq(0) + ->beginIF($type == 'bug')->orderBy($sort)->fi() ->page($bugPager) ->fetchAll(); /* Get stories and stages. */ $storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1); - $stories = $this->dao->select('t1.*, t2.stage')->from(TABLE_STORY)->alias('t1') - ->leftJoin(TABLE_STORYSTAGE)->alias('t2')->on('t1.id = t2.story') - ->where('t1.id')->in($build->stories) - ->andWhere('t1.deleted')->eq(0) - ->beginIF($type == 'story')->orderBy("t1.$orderBy")->fi() + $stories = $this->dao->select("*, IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder")->from(TABLE_STORY) + ->where('id')->in($build->stories) + ->andWhere('deleted')->eq(0) + ->beginIF($type == 'story')->orderBy($sort)->fi() ->page($storyPager) ->fetchAll('id'); + $stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in(array_keys($stories))->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage'); + foreach($stages as $storyID => $stage) $stories[$storyID]->stage = $stage; + + /* Set menu. */ if($this->app->tab == 'project') { @@ -270,7 +278,7 @@ class build extends control $this->view->storyPager = $storyPager; $generatedBugPager = new pager($type == 'generatedBug' ? $recTotal : 0, $recPerPage, $type == 'generatedBug' ? $pageID : 1); - $this->view->generatedBugs = $this->bug->getExecutionBugs($build->execution, $build->product, 'all', $build->id, $type, $param, $type == 'generatedBug' ? $orderBy : 'status_desc,id_desc', '', $generatedBugPager); + $this->view->generatedBugs = $this->bug->getExecutionBugs($build->execution, $build->product, 'all', $build->id, $type, $param, $type == 'generatedBug' ? $sort : 'status_desc,id_desc', '', $generatedBugPager); $this->view->generatedBugPager = $generatedBugPager; $this->executeHooks($buildID); @@ -583,21 +591,6 @@ class build extends control { $this->build->unlinkStory($buildID, $storyID); - /* if ajax request, send result. */ - if($this->server->ajax) - { - if(dao::isError()) - { - $response['result'] = 'fail'; - $response['message'] = dao::getError(); - } - else - { - $response['result'] = 'success'; - $response['message'] = ''; - } - return $this->send($response); - } return print(js::reload('parent')); } diff --git a/module/build/css/create.css b/module/build/css/create.css index af5a421167..9bc04f46aa 100644 --- a/module/build/css/create.css +++ b/module/build/css/create.css @@ -1,2 +1 @@ -#branch_chosen .chosen-single {border-left: 0px;} #noProduct {display: inline-block; width: 110%;} diff --git a/module/build/lang/de.php b/module/build/lang/de.php index 9ffa1dfda4..d714465ad7 100644 --- a/module/build/lang/de.php +++ b/module/build/lang/de.php @@ -68,3 +68,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, erstellt von $actor, Build $extra.' . "\n"; $lang->backhome = 'zurück'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/en.php b/module/build/lang/en.php index 79cd2f6480..73ec7a1d33 100644 --- a/module/build/lang/en.php +++ b/module/build/lang/en.php @@ -68,3 +68,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, created by $actor, Build $extra.' . "\n"; $lang->backhome = 'back'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/fr.php b/module/build/lang/fr.php index cbf8cc4469..48326670ad 100644 --- a/module/build/lang/fr.php +++ b/module/build/lang/fr.php @@ -68,3 +68,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, Build $extra créé par $actor.' . "\n"; $lang->backhome = 'Retour'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/lang/vi.php b/module/build/lang/vi.php index adf75db272..e0080ba5da 100644 --- a/module/build/lang/vi.php +++ b/module/build/lang/vi.php @@ -64,3 +64,5 @@ $lang->build->action = new stdclass(); $lang->build->action->buildopened = '$date, được tạo bởi $actor, Bản dựng $extra.' . "\n"; $lang->backhome = 'Trở lại'; + +$lang->build->featureBar['browse']['all'] = 'Build List'; diff --git a/module/build/model.php b/module/build/model.php index 599601c50a..9debed159f 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -72,6 +72,7 @@ class buildModel extends model ->beginIF($projectID)->andWhere('t1.project')->eq((int)$projectID)->fi() ->beginIF($type == 'product' and $param)->andWhere('t1.product')->eq($param)->fi() ->beginIF($type == 'bysearch')->andWhere($param)->fi() + ->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); @@ -136,6 +137,7 @@ class buildModel extends model ->beginIF($executionID)->andWhere('t1.execution')->eq((int)$executionID)->fi() ->beginIF($type == 'product' and $param)->andWhere('t1.product')->eq($param)->fi() ->beginIF($type == 'bysearch')->andWhere($param)->fi() + ->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)")->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); @@ -311,6 +313,8 @@ class buildModel extends model ->setDefault('branch', 0) ->cleanInt('product,branch') ->add('execution', (int)$executionID) + ->add('createdBy', $this->app->user->account) + ->add('createdDate', helper::now()) ->stripTags($this->config->build->editor->create['id'], $this->config->allowedTags) ->remove('resolvedBy,allchecker,files,labels,uid') ->get(); diff --git a/module/build/view/linkstory.html.php b/module/build/view/linkstory.html.php index 560807515e..9700032238 100644 --- a/module/build/view/linkstory.html.php +++ b/module/build/view/linkstory.html.php @@ -54,7 +54,7 @@ openedBy);?> assignedTo);?> estimate . $config->hourUnit;?> - + processStatus('story', $story);?> diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index 9dc0536718..ea39390fb3 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -131,7 +131,7 @@ tbody tr td:first-child input {display: none;} if($canBeChanged and common::hasPriv('build', 'unlinkStory')) { $unlinkURL = inlink('unlinkStory', "buildID=$build->id&story=$story->id"); - echo html::a("###", '', '', "onclick='ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)' class='btn' title='{$lang->build->unlinkStory}'"); + echo html::a($unlinkURL, '', 'hiddenwin', "class='btn' title='{$lang->build->unlinkStory}'"); } ?> @@ -204,9 +204,9 @@ tbody tr td:first-child input {display: none;} openedBy);?> - openedDate, 5, 11)?> + openedDate) ? '' : substr($bug->openedDate, 5, 11);?> resolvedBy);?> - resolvedDate, 5, 11)?> + resolvedDate) ? '' : substr($bug->resolvedDate, 5, 11);?> openedBy);?> - openedDate, 5, 11)?> + openedDate) ? '' : substr($bug->openedDate, 5, 11);?> resolvedBy);?> - resolvedDate, 5, 11)?> + resolvedDate) ? '' : substr($bug->resolvedDate, 5, 11);?> diff --git a/module/caselib/control.php b/module/caselib/control.php index 0b74d70736..138b3b872f 100644 --- a/module/caselib/control.php +++ b/module/caselib/control.php @@ -442,7 +442,7 @@ class caselib extends control * @access public * @return void */ - public function exportTemplet($libID) + public function exportTemplate($libID) { $this->loadModel('testcase'); if($_POST) @@ -795,4 +795,26 @@ class caselib extends control $this->view->dataInsert = $insert; $this->display(); } + + /** + * For lib sort + * + * @access public + * @return void + */ + public function libSort() + { + $idList = explode(',', trim($this->post->caselib, ',')); + $order = $this->dao->select('*')->from(TABLE_TESTSUITE)->where('id')->in($idList)->andWhere('type')->eq('library')->orderBy('order_asc')->fetch('order'); + $idList = array_reverse($idList); + + /* Init Order. */ + if(empty($order)) $order = 1; + + foreach($idList as $caselibID) + { + $this->dao->update(TABLE_TESTSUITE)->set('`order`')->eq($order)->where('id')->eq($caselibID)->andWhere('type')->eq('library')->exec(); + $order++; + } + } } diff --git a/module/caselib/css/showimport.css b/module/caselib/css/showimport.css index 9e7a963939..df3757a2cf 100644 --- a/module/caselib/css/showimport.css +++ b/module/caselib/css/showimport.css @@ -1,2 +1 @@ .table table td,.outer .table table tbody > tr:last-child td {padding: 2px 0 2px 5px !important; border: none !important;} -.c-pri{width: 70px;} diff --git a/module/caselib/lang/de.php b/module/caselib/lang/de.php index 652875e151..55da26ed6d 100644 --- a/module/caselib/lang/de.php +++ b/module/caselib/lang/de.php @@ -12,25 +12,25 @@ $lang->caselib->common = 'Case Library'; $lang->caselib->all = 'All Case Libraries'; -$lang->caselib->index = "Library Home"; -$lang->caselib->create = "Create Case Library"; -$lang->caselib->edit = 'Edit Case Library'; -$lang->caselib->browse = 'View Cases in Library'; -$lang->caselib->view = 'Library Detail'; -$lang->caselib->createCase = 'Create Case'; -$lang->caselib->delete = "Delete Suite"; -$lang->caselib->linkVersion = "Version"; -$lang->caselib->deleted = 'Deleted'; -$lang->caselib->exportTemplet = 'Export Template'; -$lang->caselib->batchCreateCase = 'Batch Create'; -$lang->caselib->import = 'Import'; -$lang->caselib->showImport = 'Imported Data'; -$lang->caselib->type = 'Type'; -$lang->caselib->product = $lang->productCommon; -$lang->caselib->browseAction = 'Caselib List'; -$lang->caselib->deleteAction = "Delete Caselib"; -$lang->caselib->importAction = 'Import Case'; -$lang->caselib->linkVersion = "Version"; +$lang->caselib->index = "Library Home"; +$lang->caselib->create = "Create Case Library"; +$lang->caselib->edit = 'Edit Case Library'; +$lang->caselib->browse = 'View Cases in Library'; +$lang->caselib->view = 'Library Detail'; +$lang->caselib->createCase = 'Create Case'; +$lang->caselib->delete = "Delete Suite"; +$lang->caselib->linkVersion = "Version"; +$lang->caselib->deleted = 'Deleted'; +$lang->caselib->exportTemplate = 'Export Template'; +$lang->caselib->batchCreateCase = 'Batch Create'; +$lang->caselib->import = 'Import'; +$lang->caselib->showImport = 'Imported Data'; +$lang->caselib->type = 'Type'; +$lang->caselib->product = $lang->productCommon; +$lang->caselib->browseAction = 'Caselib List'; +$lang->caselib->deleteAction = "Delete Caselib"; +$lang->caselib->importAction = 'Import Case'; +$lang->caselib->linkVersion = "Version"; $lang->caselib->id = 'ID'; $lang->caselib->name = 'Name'; @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Do you want to delete this library?'; $lang->caselib->noModule = '
You have no modules.
Manage it now.
'; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/en.php b/module/caselib/lang/en.php index 652875e151..55da26ed6d 100644 --- a/module/caselib/lang/en.php +++ b/module/caselib/lang/en.php @@ -12,25 +12,25 @@ $lang->caselib->common = 'Case Library'; $lang->caselib->all = 'All Case Libraries'; -$lang->caselib->index = "Library Home"; -$lang->caselib->create = "Create Case Library"; -$lang->caselib->edit = 'Edit Case Library'; -$lang->caselib->browse = 'View Cases in Library'; -$lang->caselib->view = 'Library Detail'; -$lang->caselib->createCase = 'Create Case'; -$lang->caselib->delete = "Delete Suite"; -$lang->caselib->linkVersion = "Version"; -$lang->caselib->deleted = 'Deleted'; -$lang->caselib->exportTemplet = 'Export Template'; -$lang->caselib->batchCreateCase = 'Batch Create'; -$lang->caselib->import = 'Import'; -$lang->caselib->showImport = 'Imported Data'; -$lang->caselib->type = 'Type'; -$lang->caselib->product = $lang->productCommon; -$lang->caselib->browseAction = 'Caselib List'; -$lang->caselib->deleteAction = "Delete Caselib"; -$lang->caselib->importAction = 'Import Case'; -$lang->caselib->linkVersion = "Version"; +$lang->caselib->index = "Library Home"; +$lang->caselib->create = "Create Case Library"; +$lang->caselib->edit = 'Edit Case Library'; +$lang->caselib->browse = 'View Cases in Library'; +$lang->caselib->view = 'Library Detail'; +$lang->caselib->createCase = 'Create Case'; +$lang->caselib->delete = "Delete Suite"; +$lang->caselib->linkVersion = "Version"; +$lang->caselib->deleted = 'Deleted'; +$lang->caselib->exportTemplate = 'Export Template'; +$lang->caselib->batchCreateCase = 'Batch Create'; +$lang->caselib->import = 'Import'; +$lang->caselib->showImport = 'Imported Data'; +$lang->caselib->type = 'Type'; +$lang->caselib->product = $lang->productCommon; +$lang->caselib->browseAction = 'Caselib List'; +$lang->caselib->deleteAction = "Delete Caselib"; +$lang->caselib->importAction = 'Import Case'; +$lang->caselib->linkVersion = "Version"; $lang->caselib->id = 'ID'; $lang->caselib->name = 'Name'; @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Do you want to delete this library?'; $lang->caselib->noModule = '
You have no modules.
Manage it now.
'; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/fr.php b/module/caselib/lang/fr.php index 9f02e7f2e9..829de7fdbc 100644 --- a/module/caselib/lang/fr.php +++ b/module/caselib/lang/fr.php @@ -12,25 +12,25 @@ $lang->caselib->common = 'Case Library'; $lang->caselib->all = 'All Case Libraries'; -$lang->caselib->index = "Accueil Library"; -$lang->caselib->create = "Créer une Library"; -$lang->caselib->edit = 'Editer Library'; -$lang->caselib->browse = 'Voir CasTests dans Library'; -$lang->caselib->view = 'Détail Library'; -$lang->caselib->createCase = 'Créer CasTest'; -$lang->caselib->delete = "Supprimer Suite"; -$lang->caselib->linkVersion = "Version"; -$lang->caselib->deleted = 'Supprimé'; -$lang->caselib->exportTemplet = 'Exporter Modèle'; -$lang->caselib->batchCreateCase = 'Créer par lot'; -$lang->caselib->import = 'Importer'; -$lang->caselib->showImport = 'Données Importées'; -$lang->caselib->type = 'Type'; -$lang->caselib->product = $lang->productCommon; -$lang->caselib->browseAction = 'Caselib List'; -$lang->caselib->deleteAction = "Delete Caselib"; -$lang->caselib->importAction = 'Importer CasTest'; -$lang->caselib->linkVersion = "Version"; +$lang->caselib->index = "Accueil Library"; +$lang->caselib->create = "Créer une Library"; +$lang->caselib->edit = 'Editer Library'; +$lang->caselib->browse = 'Voir CasTests dans Library'; +$lang->caselib->view = 'Détail Library'; +$lang->caselib->createCase = 'Créer CasTest'; +$lang->caselib->delete = "Supprimer Suite"; +$lang->caselib->linkVersion = "Version"; +$lang->caselib->deleted = 'Supprimé'; +$lang->caselib->exportTemplate = 'Exporter Modèle'; +$lang->caselib->batchCreateCase = 'Créer par lot'; +$lang->caselib->import = 'Importer'; +$lang->caselib->showImport = 'Données Importées'; +$lang->caselib->type = 'Type'; +$lang->caselib->product = $lang->productCommon; +$lang->caselib->browseAction = 'Caselib List'; +$lang->caselib->deleteAction = "Delete Caselib"; +$lang->caselib->importAction = 'Importer CasTest'; +$lang->caselib->linkVersion = "Version"; $lang->caselib->id = 'ID'; $lang->caselib->name = 'Nom'; @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = 'Description'; $lang->caselib->libraryDelete = 'Voulez vous supprimer cette library ?'; $lang->caselib->noModule = "
Vous n'avez aucun modules.
Gérer les modules maintenant.
"; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/vi.php b/module/caselib/lang/vi.php index 48202a34e2..50e5831f53 100644 --- a/module/caselib/lang/vi.php +++ b/module/caselib/lang/vi.php @@ -21,7 +21,7 @@ $lang->caselib->createCase = 'Tạo tình huống'; $lang->caselib->delete = "Xóa Suite"; $lang->caselib->linkVersion = "Phiên bản"; $lang->caselib->deleted = 'Đã xóa'; -$lang->caselib->exportTemplet = 'Xuất mẫu'; +$lang->caselib->exportTemplate = 'Xuất mẫu'; $lang->caselib->batchCreateCase = 'Tạo hàng loạt'; $lang->caselib->import = 'Nhập'; $lang->caselib->importAction = 'Nhập tình huống'; @@ -39,3 +39,6 @@ $lang->caselib->legendDesc = 'Mô tả'; $lang->caselib->libraryDelete = 'Bạn có muốn xóa thư viện này?'; $lang->caselib->noModule = '
Chưa có Module.
Quản lý ngay.
'; + +$lang->caselib->featureBar['browse']['all'] = 'All'; +$lang->caselib->featureBar['browse']['wait'] = 'Waiting'; diff --git a/module/caselib/lang/zh-cn.php b/module/caselib/lang/zh-cn.php index e54c946d4e..adee941f47 100644 --- a/module/caselib/lang/zh-cn.php +++ b/module/caselib/lang/zh-cn.php @@ -12,25 +12,25 @@ $lang->caselib->common = '用例库'; $lang->caselib->all = '所有用例库'; -$lang->caselib->index = "用例库首页"; -$lang->caselib->create = "创建用例库"; -$lang->caselib->edit = '编辑用例库'; -$lang->caselib->browse = '浏览用例库'; -$lang->caselib->view = '查看库概况'; -$lang->caselib->createCase = '创建用例'; -$lang->caselib->delete = "删除"; -$lang->caselib->linkVersion = "版本"; -$lang->caselib->deleted = '已删除'; -$lang->caselib->exportTemplet = '导出模板'; -$lang->caselib->batchCreateCase = '批量创建用例'; -$lang->caselib->import = '导入'; -$lang->caselib->showImport = '显示导入数据'; -$lang->caselib->type = '类型'; -$lang->caselib->product = '所属' . $lang->productCommon; -$lang->caselib->browseAction = '用例库列表'; -$lang->caselib->deleteAction = "删除用例库"; -$lang->caselib->importAction = '导入用例'; -$lang->caselib->linkVersion = "版本"; +$lang->caselib->index = "用例库首页"; +$lang->caselib->create = "创建用例库"; +$lang->caselib->edit = '编辑用例库'; +$lang->caselib->browse = '浏览用例库'; +$lang->caselib->view = '查看库概况'; +$lang->caselib->createCase = '创建用例'; +$lang->caselib->delete = "删除"; +$lang->caselib->linkVersion = "版本"; +$lang->caselib->deleted = '已删除'; +$lang->caselib->exportTemplate = '导出模板'; +$lang->caselib->batchCreateCase = '批量创建用例'; +$lang->caselib->import = '导入'; +$lang->caselib->showImport = '显示导入数据'; +$lang->caselib->type = '类型'; +$lang->caselib->product = '所属' . $lang->productCommon; +$lang->caselib->browseAction = '用例库列表'; +$lang->caselib->deleteAction = "删除用例库"; +$lang->caselib->importAction = '导入用例'; +$lang->caselib->linkVersion = "版本"; $lang->caselib->id = '编号'; $lang->caselib->name = '名称'; @@ -44,3 +44,6 @@ $lang->caselib->legendDesc = '描述'; $lang->caselib->libraryDelete = '您确认要删除该用例库吗?'; $lang->caselib->noModule = '
您现在还没有模块信息
请维护用例库模块
'; + +$lang->caselib->featureBar['browse']['all'] = '所有'; +$lang->caselib->featureBar['browse']['wait'] = '待评审'; diff --git a/module/caselib/lang/zh-tw.php b/module/caselib/lang/zh-tw.php index e0043a96a7..a6c51091eb 100644 --- a/module/caselib/lang/zh-tw.php +++ b/module/caselib/lang/zh-tw.php @@ -21,7 +21,7 @@ $lang->caselib->createCase = '創建用例'; $lang->caselib->delete = "刪除"; $lang->caselib->linkVersion = "版本"; $lang->caselib->deleted = '已刪除'; -$lang->caselib->exportTemplet = '導出模板'; +$lang->caselib->exportTemplate = '導出模板'; $lang->caselib->batchCreateCase = '批量創建用例'; $lang->caselib->import = '導入'; $lang->caselib->showImport = '顯示導入數據'; diff --git a/module/caselib/model.php b/module/caselib/model.php index 977bc56463..8f03af8c2e 100644 --- a/module/caselib/model.php +++ b/module/caselib/model.php @@ -145,24 +145,26 @@ class caselibModel extends model ->where('product')->eq(0) ->andWhere('deleted')->eq(0) ->andWhere('type')->eq('library') - ->orderBy('id_desc') + ->orderBy('order_desc, id_desc') ->fetchPairs('id', 'name'); } /** * Get library list. * + * @param string $type * @param string $orderBy * @param object $pager * @access public * @return array */ - public function getList($orderBy = 'id_desc', $pager = null) + public function getList($type = 'all', $orderBy = 'id_desc', $pager = null) { return $this->dao->select('*')->from(TABLE_TESTSUITE) ->where('product')->eq(0) ->andWhere('deleted')->eq(0) ->andWhere('type')->eq('library') + ->beginIF($type == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', `reviewers`)")->fi() ->orderBy($orderBy) ->page($pager) ->fetchAll('id'); @@ -220,13 +222,14 @@ class caselibModel extends model $browseType = ($browseType == 'bymodule' and $this->session->libBrowseType and $this->session->libBrowseType != 'bysearch') ? $this->session->libBrowseType : $browseType; $cases = array(); - if($browseType == 'bymodule' or $browseType == 'all' or $browseType == 'wait') + if($browseType == 'bymodule' or $browseType == 'all' or $browseType == 'wait' or $browseType == 'review') { $cases = $this->dao->select('*')->from(TABLE_CASE) ->where('lib')->eq((int)$libID) ->andWhere('product')->eq(0) ->beginIF($moduleIdList)->andWhere('module')->in($moduleIdList)->fi() ->beginIF($browseType == 'wait')->andWhere('status')->eq($browseType)->fi() + ->beginIF($browseType == 'review')->andWhere("FIND_IN_SET('{$this->app->user->account}', `reviewers`)")->fi() ->andWhere('deleted')->eq('0') ->orderBy($sort)->page($pager)->fetchAll('id'); } @@ -644,7 +647,7 @@ class caselibModel extends model $menu = ''; $params = "caseID=$case->id"; - if($this->config->testcase->needReview || !empty($this->config->testcase->forceReview)) + if($case->status == 'wait' and ($this->config->testcase->needReview or !empty($this->config->testcase->forceReview))) { $menu .= $this->buildMenu('testcase', 'review', $params, $case, 'browse', 'glasses', '', 'iframe'); } diff --git a/module/caselib/view/browse.html.php b/module/caselib/view/browse.html.php index 20a7880ebc..eed4bc7943 100644 --- a/module/caselib/view/browse.html.php +++ b/module/caselib/view/browse.html.php @@ -40,10 +40,12 @@ js::set('flow', $config->global->flow);
testcase->needReview && empty($config->testcase->forceReview)) unset($lang->caselib->featureBar['browse']['wait']); + foreach($lang->caselib->featureBar['browse'] as $featureType => $label) { - echo html::a($this->inlink('browse', "libID=$libID&browseType=all"), "{$lang->testcase->allCases}", '', "id='allTab' class='btn btn-link'"); - if($config->testcase->needReview or !empty($config->testcase->forceReview)) echo html::a($this->inlink('browse', "libID=$libID&browseType=wait"), "" . $lang->testcase->statusList['wait'] . "", '', "id='waitTab' class='btn btn-link'"); + $activeClass = $browseType == $featureType ? 'btn-active-text' : ''; + echo html::a(inlink('browse', "libID=$libID&browseType=$featureType"), "$label", '',"class='btn btn-link $activeClass' data-app={$app->tab} id=" . $featureType .'Tab'); } ?> testcase->bySearch;?> @@ -57,7 +59,7 @@ js::set('flow', $config->global->flow); } ?>
- " . $lang->caselib->exportTemplet, '', "class='btn btn-link export' data-width='40%'");?> + " . $lang->caselib->exportTemplate, '', "class='btn btn-link export' data-width='40%'");?> " . $lang->testcase->fileImport, '', "class='btn btn-link export'");?>
createLink('caselib', 'create'), " " . $lang->caselib->create, '', 'class="btn btn-secondary"');?> diff --git a/module/caselib/view/exporttemplet.html.php b/module/caselib/view/exporttemplate.html.php similarity index 95% rename from module/caselib/view/exporttemplet.html.php rename to module/caselib/view/exporttemplate.html.php index 40ad296270..370c4495c9 100644 --- a/module/caselib/view/exporttemplet.html.php +++ b/module/caselib/view/exporttemplate.html.php @@ -23,7 +23,7 @@ function closeWindow()
-

testcase->exportTemplet;?>

+

testcase->exportTemplate;?>

diff --git a/module/caselib/view/showimport.html.php b/module/caselib/view/showimport.html.php index 61561bae22..30b341937b 100644 --- a/module/caselib/view/showimport.html.php +++ b/module/caselib/view/showimport.html.php @@ -1,10 +1,32 @@ - - +getModuleRoot() . 'common/view/header.html.php';?> +requiredFields; +$allCount = $datas->allCount; +$allPager = $datas->allPager; +$pagerID = $datas->pagerID; +$isEndPage = $datas->isEndPage; +$maxImport = $datas->maxImport; +$dataInsert = $datas->dataInsert; +$fields = $datas->fields; +$suhosinInfo = $datas->suhosinInfo; +$model = $datas->model; +$datas = $datas->datas; +?> + +
$this->config->file->maxImport):?>
-

caselib->import;?>

+

port->import;?>

file->importSummary, $allCount, html::input('maxImport', $config->file->maxImport, "style='width:50px'"), ceil($allCount / $config->file->maxImport));?>

import, "id='import'", 'btn btn-primary');?>

@@ -16,125 +38,197 @@ $(function() { if(parseInt($('#maxImport').val())) $('#times').html(Math.ceil(parseInt($('#allCount').html()) / parseInt($('#maxImport').val()))); }); - $('#import').click(function(){location.href = createLink('caselib', 'showImport', "libID=&pageID=1&maxImport=" + $('#maxImport').val())}) + $('#import').click(function() + { + $.cookie('maxImport', $('#maxImport').val()); + location.href = createLink('caselib', 'showImport', "libID=&pageID=1&maxImport=" + $('#maxImport').val()) + }); });
-

caselib->import;?>

+

port->import;?>

- +
- - - - - - - - - + + $value):?> + + + + + + + + + + + show) continue; + + $width = ($field->width && $field->width != 'auto' ? $field->width . 'px' : 'auto'); + $required = strpos(",$field->rules,", ",$notEmptyRule->id,") !== false ? 'required' : ''; + echo ""; + } + } + ?> - - $case):?> - title)) continue;?> - id) and !isset($cases[$case->id])) $case->id = 0;?> - - - - - - - - - - - - - - - - + + $value):?> + + + + + + + + + + config->port->dateMatch;?> + $field)) $object->$field = ''; ?> + + + + + + + $field)?> + + + + + + + + + + + + + + loadModel('flow'); + foreach($appendFields as $field) + { + if(!$field->show) continue; + $value = $field->defaultValue ? $field->defaultValue : zget($datas, $field->field, ''); + echo ''; + } + } + ?> + + + + + +
testcase->id?> testcase->title?> testcase->module?> testcase->pri?> testcase->type?> testcase->stage?> testcase->keywords?>testcase->precondition?> + port->id?> - - + +
testcase->stepDesc?>testcase->stepExpect?>
$field->name
- id)) - { - echo $case->id . html::hidden("id[$key]", $case->id); - $insert = false; - } - else - { - echo $key . " {$lang->testcase->new}"; - } - echo html::hidden("lib[$key]", $libID); - ?> - title, "class='form-control' style='margin-top:2px'")?>module) ? $case->module : (!empty($case->id) ? $cases[$case->id]->module : ''), "class='form-control chosen'")?>testcase->priList, isset($case->pri) ? $case->pri : (!empty($case->id) ? $cases[$case->id]->pri : ''), "class='form-control chosen'")?>testcase->typeList, isset($case->type) ? $case->type : (!empty($case->id) ? $cases[$case->id]->type : ''), "class='form-control chosen'")?>testcase->stageList, !empty($case->stage) ? $case->stage : (!empty($case->id) ? $cases[$case->id]->stage : ''), "multiple='multiple' class='form-control chosen'")?>keywords) ? $case->keywords : "", "class='form-control'")?>precondition) ? htmlSpecialString($case->precondition) : "", "class='form-control'")?> - - - $desc):?> - - - - - - - -
- -
+ + $object):?> +
lang->save : $this->lang->file->saveAndNext; - if(!$insert and $dataInsert === '') + if(!empty($object->id)) { - echo ""; + echo $object->id . html::hidden("id[$key]", $object->id); + $insert = false; } else { - echo html::submitButton($submitText); - if($dataInsert !== '') echo html::hidden('insert', $dataInsert); + $sub = (strpos($object->title, '>') === 0) ? " {$lang->port->children}" : " {$lang->port->new}"; + echo $addID++ . $sub; + } + echo html::hidden("lib[$key]", $libID); + ?> + $field) ? $object->$field : '', "class='form-control chosen'")?>$field) ? $object->$field : '', "multiple class='form-control chosen'")?>$field) ? $object->$field : '', "class='form-control form-date autocomplete='off'")?>$field) ? $object->$field : '', "class='form-control form-datetime autocomplete='off'")?>$field, "class='form-control' cols='50' rows='1'")?> + + + + $desc):?> + + + + + + + + + + + + + + + +
+ + + + + + + +
+ +
$field) ? $object->$field : '', "class='form-control autocomplete='off'")?>' . $this->flow->buildControl($field, $value, "$field->field[$key]", true) . '
+ lang->save : $this->lang->file->saveAndNext; + $isStartPage = $pagerID == 1 ? true : false; + if(!$insert and $dataInsert === '') + { + echo ""; + } + else + { + echo html::submitButton($submitText); + if($dataInsert !== '') echo html::hidden('insert', $dataInsert); } echo html::hidden('isEndPage', $isEndPage ? 1 : 0); echo html::hidden('pagerID', $pagerID); - echo '   ' . html::a($this->createLink('caselib', 'browse', "libID=$libID"), $lang->goback, '', 'class="btn btn-wide"'); + echo '   ' . html::a("javascript:history.back(-1)", $lang->goback, '', "class='btn btn-back btn-wide'"); echo '   ' . sprintf($lang->file->importPager, $allCount, $pagerID, $allPager); ?>
- + getModuleRoot() . 'common/view/noticeimport.html.php';?>
- - - - +getModuleRoot() . 'common/view/footer.html.php';?> diff --git a/module/ci/control.php b/module/ci/control.php index 1118fef65f..5c5ea8fdc2 100644 --- a/module/ci/control.php +++ b/module/ci/control.php @@ -149,16 +149,18 @@ class ci extends control ->fetch(); $testtask = new stdclass(); - $testtask->product = $productID; - $testtask->name = !empty($post->name) ? $post->name : sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s')); - $testtask->owner = $this->app->user->account; - $testtask->project = $lastProject->project; - $testtask->execution = $lastProject->id; - $testtask->build = 'trunk'; - $testtask->auto = strtolower($testType); - $testtask->begin = date('Y-m-d'); - $testtask->end = date('Y-m-d', time() + 24 * 3600); - $testtask->status = 'done'; + $testtask->product = $productID; + $testtask->name = !empty($post->name) ? $post->name : sprintf($this->lang->testtask->titleOfAuto, date('Y-m-d H:i:s')); + $testtask->owner = $this->app->user->account; + $testtask->project = $lastProject->project; + $testtask->execution = $lastProject->id; + $testtask->build = 'trunk'; + $testtask->auto = strtolower($testType); + $testtask->begin = date('Y-m-d'); + $testtask->end = date('Y-m-d', time() + 24 * 3600); + $testtask->status = 'done'; + $testtask->createdBy = $this->app->user->account; + $testtask->createdDate = helper::now(); $this->dao->insert(TABLE_TESTTASK)->data($testtask)->exec(); $taskID = $this->dao->lastInsertId(); diff --git a/module/ci/model.php b/module/ci/model.php index 0d27513edc..472a3449a2 100644 --- a/module/ci/model.php +++ b/module/ci/model.php @@ -29,9 +29,11 @@ class ciModel extends model if($this->session->repoID) { $repo = $this->loadModel('repo')->getRepoByID($this->session->repoID); - if(!in_array(strtolower($repo->SCM), $this->config->repo->gitServiceList)) unset($this->lang->devops->menu->mr); + if(!empty($repo) and !in_array(strtolower($repo->SCM), $this->config->repo->gitServiceList)) unset($this->lang->devops->menu->mr); - $this->lang->switcherMenu = $this->loadModel('repo')->getSwitcher($this->session->repoID); + $tab = $this->app->tab; + $repos = $this->repo->getRepoPairs($tab); + if(count($repos) > 1) $this->lang->switcherMenu = $this->loadModel('repo')->getSwitcher($this->session->repoID); } } @@ -180,11 +182,12 @@ class ciModel extends model $data = new stdclass; $data->status = $pipeline->status; $data->updateDate = $now; + $data->logs = ''; foreach($jobs as $job) { if(empty($job->duration) or $job->duration == '') $job->duration = '-'; - $data->logs = ">>> Job: $job->name, Stage: $job->stage, Status: $job->status, Duration: $job->duration Sec\r\n "; + $data->logs .= ">>> Job: $job->name, Stage: $job->stage, Status: $job->status, Duration: $job->duration Sec\r\n "; $data->logs .= "Job URL: web_url\" target='_blank'>$job->web_url \r\n"; $data->logs .= $this->transformAnsiToHtml($this->gitlab->apiGetJobLog($compile->server, $compile->project, $job->id)); } diff --git a/module/common/lang/common.php b/module/common/lang/common.php index 43ad3a3234..a9b7bd71ee 100644 --- a/module/common/lang/common.php +++ b/module/common/lang/common.php @@ -14,6 +14,7 @@ $lang->waterfall = new stdclass(); $lang->execution = new stdclass(); $lang->kanban = new stdclass(); $lang->story = new stdclass(); +$lang->requirement = new stdclass(); $lang->release = new stdclass(); $lang->branch = new stdclass(); $lang->productplan = new stdclass(); diff --git a/module/common/lang/de.php b/module/common/lang/de.php index 1c6a3786c2..d2113a3e89 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -288,11 +288,12 @@ $lang->devops->rules = 'Rule'; $lang->devops->settings = 'Setting Merge Request'; $lang->devops->set = 'Set'; -$lang->admin->system = 'System'; -$lang->admin->entry = 'Application'; -$lang->admin->data = 'Data'; -$lang->admin->cron = 'Cron'; -$lang->admin->buildIndex = 'Full Text Search'; +$lang->admin->system = 'System'; +$lang->admin->entry = 'Application'; +$lang->admin->data = 'Data'; +$lang->admin->cron = 'Cron'; +$lang->admin->buildIndex = 'Full Text Search'; +$lang->admin->tableEngine = 'Table Engine'; $lang->convert->importJira = 'Import Jira'; @@ -431,6 +432,7 @@ $lang->colorPicker->errorTip = 'Not a valid color value'; $lang->downNotify = "Download Desktop Notification"; $lang->clientName = "Desktop"; $lang->downloadClient = "Download ZenTao Desktop"; +$lang->downloadMobile = "Download Mobile Terminal"; $lang->clientHelp = "Client Help"; $lang->clientHelpLink = "https://www.zentao.pm/book/zentaomanual/scrum-tool-im-integration-206.html"; $lang->website = "http://www.zentao.net"; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 44cd85fe22..d8390243ce 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -288,11 +288,12 @@ $lang->devops->rules = 'Rule'; $lang->devops->settings = 'Setting Merge Request'; $lang->devops->set = 'Set'; -$lang->admin->system = 'System'; -$lang->admin->entry = 'Application'; -$lang->admin->data = 'Data'; -$lang->admin->cron = 'Cron'; -$lang->admin->buildIndex = 'Full Text Search'; +$lang->admin->system = 'System'; +$lang->admin->entry = 'Application'; +$lang->admin->data = 'Data'; +$lang->admin->cron = 'Cron'; +$lang->admin->buildIndex = 'Full Text Search'; +$lang->admin->tableEngine = 'Table Engine'; $lang->convert->importJira = 'Import Jira'; @@ -431,6 +432,7 @@ $lang->colorPicker->errorTip = 'Not a valid color value'; $lang->downNotify = "Download Desktop Notification"; $lang->clientName = "Desktop"; $lang->downloadClient = "Download ZenTao Desktop"; +$lang->downloadMobile = "Download Mobile Terminal"; $lang->clientHelp = "Client Help"; $lang->clientHelpLink = "https://www.zentao.pm/book/zentaomanual/scrum-tool-im-integration-206.html"; $lang->website = "https://www.zentao.pm"; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index 35aef6f5fc..67caf6b5fd 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -288,11 +288,12 @@ $lang->devops->rules = 'Rule'; $lang->devops->settings = 'Setting Merge Request'; $lang->devops->set = 'Set'; -$lang->admin->system = 'System'; -$lang->admin->entry = 'Application'; -$lang->admin->data = 'Data'; -$lang->admin->cron = 'Cron'; -$lang->admin->buildIndex = 'Full Text Search'; +$lang->admin->system = 'System'; +$lang->admin->entry = 'Application'; +$lang->admin->data = 'Data'; +$lang->admin->cron = 'Cron'; +$lang->admin->buildIndex = 'Full Text Search'; +$lang->admin->tableEngine = 'Table Engine'; $lang->convert->importJira = 'Import Jira'; @@ -431,6 +432,7 @@ $lang->colorPicker->errorTip = "Ce n'est pas une valeur de couleur valide"; $lang->downNotify = "Télécharger la notification sur le bureau"; $lang->clientName = "Desktop"; $lang->downloadClient = "Télécharger ZenTao Desktop"; +$lang->downloadMobile = "Download Mobile Terminal"; $lang->clientHelp = "Aide Client"; $lang->clientHelpLink = "https://www.zentao.pm/book/zentaomanual/scrum-tool-im-integration-206.html"; $lang->website = "https://www.zentao.pm"; diff --git a/module/common/lang/menu.php b/module/common/lang/menu.php index a42770916b..856fe405a8 100644 --- a/module/common/lang/menu.php +++ b/module/common/lang/menu.php @@ -163,7 +163,7 @@ $lang->product->menu->release = array('link' => "{$lang->release->common}|relea $lang->product->menu->roadmap = array('link' => "{$lang->roadmap}|product|roadmap|productID=%s"); if($config->systemMode == 'new') $lang->product->menu->project = array('link' => "{$lang->project->common}|product|project|status=all&productID=%s"); if($config->systemMode == 'classic') $lang->product->menu->project = array('link' => "{$lang->execution->common}|product|project|status=all&productID=%s"); -$lang->product->menu->track = array('link' => "{$lang->track}|story|track|productID=%s"); +$lang->product->menu->track = array('link' => "{$lang->track}|product|track|productID=%s"); $lang->product->menu->doc = array('link' => "{$lang->doc->common}|doc|tableContents|type=product&objectID=%s", 'subModule' => 'doc'); $lang->product->menu->dynamic = array('link' => "{$lang->dynamic}|product|dynamic|productID=%s"); $lang->product->menu->settings = array('link' => "{$lang->settings}|product|view|productID=%s", 'subModule' => 'tree,branch', 'alias' => 'edit,whitelist,addwhitelist'); @@ -320,7 +320,10 @@ $lang->execution->menu->task = array('link' => "{$lang->task->common}|execut $lang->execution->menu->kanban = array('link' => "$lang->executionKanban|execution|taskkanban|executionID=%s"); $lang->execution->menu->burn = array('link' => "$lang->burn|execution|burn|executionID=%s"); $lang->execution->menu->view = array('link' => "$lang->view|execution|grouptask|executionID=%s", 'alias' => 'grouptask,tree,taskeffort,gantt,calendar,relation,maintainrelation'); -$lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'batchcreate,linkstory,storykanban'); + +if($config->edition != 'open') $lang->execution->menu->view = array('link' => "$lang->view|execution|gantt|executionID=%s", 'alias' => 'grouptask,tree,taskeffort,gantt,calendar,relation,maintainrelation'); + +$lang->execution->menu->story = array('link' => "$lang->SRCommon|execution|story|executionID=%s", 'subModule' => 'story', 'alias' => 'batchcreate,linkstory,storykanban,batchtotask'); $lang->execution->menu->qa = array('link' => "{$lang->qa->common}|execution|bug|executionID=%s", 'subModule' => 'bug,testcase,testtask,testreport', 'alias' => 'qa,bug,testcase,testtask,testreport'); $lang->execution->menu->devops = array('link' => "{$lang->repo->common}|repo|browse|repoID=0&branchID=&objectID=%s", 'subModule' => 'repo'); $lang->execution->menu->doc = array('link' => "{$lang->doc->common}|doc|tableContents|type=execution&objectID=%s", 'subModule' => 'doc'); @@ -511,7 +514,7 @@ if($config->edition == 'max') $lang->admin->menu->model['dropMenu']->scrum = arr if($config->systemMode == 'new') { - $lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting'); + $lang->admin->menu->model['dropMenu']->waterfall = array('link' => "{$lang->waterfallModel}|stage|setType|", 'subModule' => 'stage,auditcl,cmcl,process,activity,zoutput,classify,reviewcl,reviewsetting,design'); } $lang->admin->menu->allModel['subMenu'] = new stdclass(); @@ -569,6 +572,7 @@ $lang->admin->menu->system['subMenu']->safe = array('link' => "$lang->sec $lang->admin->menu->system['subMenu']->cron = array('link' => "{$lang->admin->cron}|cron|index", 'subModule' => 'cron'); $lang->admin->menu->system['subMenu']->timezone = array('link' => "$lang->timezone|custom|timezone"); $lang->admin->menu->system['subMenu']->buildIndex = array('link' => "{$lang->admin->buildIndex}|search|buildindex|"); +$lang->admin->menu->system['subMenu']->tableEngine = array('link' => "{$lang->admin->tableEngine}|admin|tableengine|"); if(version_compare(phpversion(), 5.6) > 0) $lang->admin->menu->system['subMenu']->convertJira = array('link' => "{$lang->convert->importJira}|convert|convertjira|", 'subModule' => 'convert'); $lang->admin->dividerMenu = ',company,message,system,'; @@ -603,6 +607,7 @@ $lang->navGroup->productplan = 'product'; $lang->navGroup->release = 'product'; $lang->navGroup->branch = 'product'; $lang->navGroup->story = 'product'; +$lang->navGroup->requirement = 'product'; $lang->navGroup->project = 'project'; $lang->navGroup->deploy = 'project'; diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php index e2e12d543c..b5e9712fd7 100644 --- a/module/common/lang/vi.php +++ b/module/common/lang/vi.php @@ -203,7 +203,7 @@ $lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse $lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release'); $lang->product->viewMenu->roadmap = 'Roadmap|product|roadmap|productID=%s'; $lang->product->viewMenu->project = "Project|product|project|status=all&productID=%s"; -$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s"); +$lang->product->viewMenu->track = array('link' => "Track|product|track|productID=%s"); $lang->product->viewMenu->doc = array('link' => 'Doc|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc'); $lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s'; $lang->product->viewMenu->set = array('link' => 'Setting|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit'); diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index b56b7e3fea..a27488d59e 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -288,11 +288,12 @@ $lang->devops->rules = '指令'; $lang->devops->settings = '合并请求设置'; $lang->devops->set = '设置'; -$lang->admin->system = '系统'; -$lang->admin->entry = '应用'; -$lang->admin->data = '数据'; -$lang->admin->cron = '定时'; -$lang->admin->buildIndex = '重建索引'; +$lang->admin->system = '系统'; +$lang->admin->entry = '应用'; +$lang->admin->data = '数据'; +$lang->admin->cron = '定时'; +$lang->admin->buildIndex = '重建索引'; +$lang->admin->tableEngine = '表引擎'; $lang->convert->importJira = '导入Jira数据'; @@ -431,6 +432,7 @@ $lang->colorPicker->errorTip = '不是有效的颜色值'; $lang->downNotify = "下载桌面提醒"; $lang->clientName = "客户端"; $lang->downloadClient = "下载客户端"; +$lang->downloadMobile = "下载移动端"; $lang->clientHelp = "客户端使用说明"; $lang->clientHelpLink = "http://www.zentao.net/book/zentaopmshelp/302.html#2"; $lang->website = "https://www.zentao.net"; diff --git a/module/common/model.php b/module/common/model.php index 4f68d398e7..bae5456a5c 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -66,7 +66,7 @@ class commonModel extends model if($rawModule == 'execution') { $executionID = $objectID; - $execution = $this->dao->select('id, project, grade, parent')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch(); + $execution = $this->dao->select('id, project, grade, parent, status, deleted')->from(TABLE_EXECUTION)->where('id')->eq($executionID)->fetch(); $this->syncExecutionByChild($execution); $project = $this->syncProjectStatus($execution); $this->syncProgramStatus($project); @@ -153,7 +153,7 @@ class commonModel extends model $today = helper::today(); $parentExecution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($parentExecutionID)->fetch(); - if($parentExecution->status == 'wait') + if($execution->deleted == '0' and $execution->status == 'doing' and in_array($parentExecution->status, array('wait', 'closed'))) { $this->dao->update(TABLE_EXECUTION) ->set('status')->eq('doing') @@ -163,6 +163,32 @@ class commonModel extends model $this->loadModel('action')->create('execution', $parentExecutionID, 'syncexecutionbychild'); } + if($parentExecution->type == 'stage') + { + $childExecutions = $this->dao->select('*')->from(TABLE_EXECUTION)->where('parent')->eq($parentExecutionID)->andWhere('deleted')->eq('0')->fetchAll('id'); + if($execution->deleted == '1' and count($childExecutions) > 0) + { + $childWait = true; + $childClosed = true; + foreach($childExecutions as $childExecution) + { + if($childExecution->status != 'wait') $childWait = false; + if($childExecution->status != 'closed') $childClosed = false; + } + + if($childWait and $parentExecution->status != 'wait') + { + $this->dao->update(TABLE_EXECUTION)->set('status')->eq('wait')->where('id')->eq($parentExecutionID)->exec(); + $this->loadModel('action')->create('execution', $parentExecutionID, 'waitbychilddelete'); + } + if($childClosed and $parentExecution->status != 'closed') + { + $this->dao->update(TABLE_EXECUTION)->set('status')->eq('closed')->where('id')->eq($parentExecutionID)->exec(); + $this->loadModel('action')->create('execution', $parentExecutionID, 'closebychilddelete'); + } + } + } + return $parentExecution; } @@ -185,6 +211,11 @@ class commonModel extends model { $this->dao->update(TABLE_EXECUTION)->set('status')->eq('doing')->set('realBegan')->eq($today)->where('id')->eq($execution->id)->exec(); $this->loadModel('action')->create('execution', $execution->id, 'syncexecution'); + if($execution->parent) + { + $execution = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($execution->id)->fetch(); // Get updated execution. + $this->syncExecutionByChild($execution); + } } return $execution; } @@ -1232,8 +1263,7 @@ class commonModel extends model /** * Print the module menu. * - * @param string $actveMenu - * @param string $methodName + * @param string $activeMenu * @static * @access public * @return void @@ -1305,28 +1335,31 @@ class commonModel extends model $label = $menuItem->text; $dropMenu = ''; + /* Print sub menus. */ if(isset($menuItem->dropMenu)) { - foreach($menuItem->dropMenu as $dropMenuItem) + foreach($menuItem->dropMenu as $dropMenuKey => $dropMenuItem) { - if($dropMenuItem->hidden) continue; + if(isset($dropMenuItem->hidden) and $dropMenuItem->hidden) continue; $subActive = ''; $subModule = ''; $subMethod = ''; $subParams = ''; - $subLabel = $dropMenuItem->text; - if(isset($dropMenuItem->link['module'])) $subModule = $dropMenuItem->link['module']; - if(isset($dropMenuItem->link['method'])) $subMethod = $dropMenuItem->link['method']; - if(isset($dropMenuItem->link['vars'])) $subParams = $dropMenuItem->link['vars']; + $subLabel = ''; + list($dropMenuName, $dropMenuModule, $dropMenuMethod, $dropMenuParams) = explode('|', $dropMenuItem['link']); + if(isset($dropMenuModule)) $subModule = $dropMenuModule; + if(isset($dropMenuMethod)) $subMethod = $dropMenuMethod; + if(isset($dropMenuParams)) $subParams = $dropMenuParams; + if(isset($dropMenuName)) $subLabel = $dropMenuName; $subLink = helper::createLink($subModule, $subMethod, $subParams); if($currentModule == strtolower($subModule) and $currentMethod == strtolower($subMethod)) $subActive = 'active'; $misc = (isset($lang->navGroup->$subModule) and $tab != $lang->navGroup->$subModule) ? "data-app='$tab'" : ''; - $dropMenu .= "
  • " . html::a($subLink, $subLabel, '', $misc) . '
  • '; + $dropMenu .= "
  • " . html::a($subLink, $subLabel, '', $misc) . '
  • '; } if(empty($dropMenu)) continue; @@ -1423,6 +1456,9 @@ class commonModel extends model echo "'; } @@ -1521,10 +1557,12 @@ class commonModel extends model public static function printLink($module, $method, $vars = '', $label = '', $target = '', $misc = '', $newline = true, $onlyBody = false, $object = null) { /* Add data-app attribute. */ - global $app; + global $app, $config; + $currentModule = strtolower($module); + $currentMethod = strtolower($method); if(strpos($misc, 'data-app') === false) $misc .= ' data-app="' . $app->tab . '"'; - if(!commonModel::hasPriv($module, $method, $object)) return false; + if(!commonModel::hasPriv($module, $method, $object) and !in_array("$currentModule.$currentMethod", $config->openMethods)) return false; echo html::a(helper::createLink($module, $method, $vars, '', $onlyBody), $label, $target, $misc, $newline); return true; } @@ -1642,7 +1680,8 @@ EOD; if(strtolower($module) == 'bug' and strtolower($method) == 'tostory') ($module = 'story') and ($method = 'create'); if(strtolower($module) == 'bug' and strtolower($method) == 'createcase') ($module = 'testcase') and ($method = 'create'); if($config->systemMode == 'classic' and strtolower($module) == 'project') $module = 'execution'; - if(!commonModel::hasPriv($module, $method, $object)) return false; + if(!commonModel::hasPriv($module, $method, $object, $vars)) return false; + $link = helper::createLink($module, $method, $vars, '', $onlyBody, $programID); /* Set the icon title, try search the $method defination in $module's lang or $common's lang. */ @@ -1892,8 +1931,9 @@ EOD; $title = isset($preAndNext->pre->title) ? $preAndNext->pre->title : $preAndNext->pre->name; $title = '#' . $preAndNext->pre->$id . ' ' . $title . ' ' . $lang->preShortcutKey; - $link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->pre->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->pre->$id}"); - $link .= '#app=' . $app->tab; + $params = $moduleName == 'story' ? "&version=0¶m=0&storyType={$preAndNext->pre->type}" : ''; + $link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->pre->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->pre->$id}" . $params); + $link .= '#app=' . $app->tab; if(isset($preAndNext->pre->objectType) and $preAndNext->pre->objectType == 'doc') { echo html::a('javascript:void(0)', '', '', "id='prevPage' class='btn' title='{$title}' data-url='{$link}'"); @@ -1908,7 +1948,8 @@ EOD; $id = (isset($_SESSION['testcaseOnlyCondition']) and !$_SESSION['testcaseOnlyCondition'] and $app->getModuleName() == 'testcase' and isset($preAndNext->next->case)) ? 'case' : 'id'; $title = isset($preAndNext->next->title) ? $preAndNext->next->title : $preAndNext->next->name; $title = '#' . $preAndNext->next->$id . ' ' . $title . ' ' . $lang->nextShortcutKey; - $link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->next->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->next->$id}"); + $params = $moduleName == 'story' ? "&version=0¶m=0&storyType={$preAndNext->next->type}" : ''; + $link = $linkTemplate ? sprintf($linkTemplate, $preAndNext->next->$id) : helper::createLink($moduleName, 'view', "ID={$preAndNext->next->$id}" . $params); $link .= '#app=' . $app->tab; if(isset($preAndNext->next->objectType) and $preAndNext->next->objectType == 'doc') { @@ -1966,7 +2007,7 @@ EOD; } } - $changes = array(); + $changes = array(); foreach($new as $key => $value) { if(is_object($value) or is_array($value)) continue; @@ -2073,9 +2114,12 @@ EOD; $table = $this->config->objectTables[$type]; $orderBy = $type . 'OrderBy'; $orderBy = $this->session->$orderBy; + $select = ''; if($this->session->$typeOnlyCondition) { - $sql = $this->dao->select('*')->from($table) + if(strpos($orderBy, 'priOrder') !== false) $select .= ", IF(`pri` = 0, {$this->config->maxPriValue}, `pri`) as priOrder"; + if(strpos($orderBy, 'severityOrder') !== false) $select .= ", IF(`severity` = 0, {$this->config->maxPriValue}, `severity`) as severityOrder"; + $sql = $this->dao->select("*$select")->from($table) ->where($queryCondition) ->beginIF($orderBy != false)->orderBy($orderBy)->fi() ->get(); @@ -2194,7 +2238,6 @@ EOD; $queryCondition = explode(' ORDER BY ', $sql); $queryCondition = $queryCondition[0]; } - $queryCondition = preg_replace('/((AND)|(OR)) *t2.\w+ * [^ ]+ [^ ]+/', '', $queryCondition); $queryCondition = trim($queryCondition); if(empty($queryCondition)) $queryCondition = "1=1"; @@ -2364,7 +2407,11 @@ EOD; if(in_array($module, $this->config->programPriv->waterfall) and $this->app->tab == 'project' and $method != 'browse') return true; $this->app->user = $this->session->user; - if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method); + if(!commonModel::hasPriv($module, $method)) + { + if($module == 'story' and !empty($this->app->params['storyType']) and strpos(",story,requirement,", ",{$this->app->params['storyType']},") !== false) $module = $this->app->params['storyType']; + $this->deny($module, $method); + } } else { @@ -2413,10 +2460,10 @@ EOD; $module == 'tutorial' or $module == 'install' or $module == 'upgrade' or + $module == 'sso' or ($module == 'user' and strpos('|login|deny|logout|reset|forgetpassword|resetpassword|', "|{$method}|") !== false) or ($module == 'my' and strpos('|changepassword|preference|', "|{$method}|") !== false) or ($module == 'file' and strpos('|read|download|uploadimages|ajaxwopifiles|', "|{$method}|") !== false) or - ($module == 'sso' and $method == 'login') or ($module == 'report' && $method == 'annualdata') or ($module == 'misc' && $method == 'captcha') or ($module == 'execution' and $method == 'printkanban') or @@ -2437,15 +2484,24 @@ EOD; * * @param string $module * @param string $method + * @param object $object + * @param string $vars * @static * @access public * @return bool */ - public static function hasPriv($module, $method, $object = null) + public static function hasPriv($module, $method, $object = null, $vars = '') { global $app, $lang; $module = strtolower($module); $method = strtolower($method); + parse_str($vars, $params); + + if(empty($params['storyType']) and $module == 'story' and !empty($app->params['storyType']) and strpos(",story,requirement,", ",{$app->params['storyType']},") !== false) $module = $app->params['storyType']; + if($module == 'story' and !empty($params['storyType']) and strpos(",story,requirement,", ",{$params['storyType']},") !== false) $module = $params['storyType']; + if($module == 'product' and $method == 'browse' and !empty($app->params['storyType']) and $app->params['storyType'] == 'requirement') $method = 'requirement'; + if($module == 'product' and $method == 'browse' and !empty($params['storyType']) and $params['storyType'] == 'requirement') $method = 'requirement'; + if($module == 'story' and $method == 'linkrequirements') $module = 'requirement'; /* If the user is doing a tutorial, have all tutorial privs. */ if(defined('TUTORIAL')) @@ -2484,7 +2540,7 @@ EOD; $acls = $app->user->rights['acls']; /* White list of import method. */ - if(in_array($module, array('user', 'task', 'story', 'bug', 'testcase')) and $method == 'showimport') + if(in_array($module, $app->config->importWhiteList) and $method == 'showimport') { if(isset($rights[$module]['import']) and commonModel::hasDBPriv($object, $module, 'import')) return true; } @@ -3373,6 +3429,45 @@ EOD; return $Parsedown->text($markdown); } + + /** + * Sort featureBar. + * + * @param string $module + * @param string $method + * @static + * @access public + * @return bool + */ + public static function sortFeatureMenu($module = '', $method = '') + { + global $lang, $config, $app; + + $module = $module ? $module : $app->rawModule; + $method = $method ? $method : $app->rawMethod; + + /* It will be sorted according to the workflow in the future */ + if(!empty($config->featureBarSort[$module][$method])) + { + $featureBar = array(); + if(empty($lang->$module->featureBar[$method])) return false; + foreach($lang->$module->featureBar[$method] as $key => $label) + { + foreach($config->featureBarSort[$module][$method] as $currentKey => $afterKey) + { + if($key == $currentKey) continue; + $featureBar[$method][$key] = $label; + if($key == $afterKey && !empty($lang->$module->featureBar[$method][$currentKey])) + { + $featureBar[$method][$currentKey] = $lang->$module->featureBar[$method][$currentKey]; + } + } + } + $lang->$module->featureBar = $featureBar; + } + + return true; + } } class common extends commonModel diff --git a/module/common/view/datatable.fix.html.php b/module/common/view/datatable.fix.html.php index 48a26082c2..1181adb8f6 100644 --- a/module/common/view/datatable.fix.html.php +++ b/module/common/view/datatable.fix.html.php @@ -99,7 +99,7 @@ $(function() - + moduleName == 'execution' and $app->methodName == 'task' and $this->config->vision != 'lite'):?> diff --git a/module/common/view/gantt.html.php b/module/common/view/gantt.html.php index 30ad65aa56..76ec9eca20 100644 --- a/module/common/view/gantt.html.php +++ b/module/common/view/gantt.html.php @@ -11,14 +11,19 @@ */ css::import($jsRoot . 'dhtmlxgantt/min.css'); js::import($jsRoot . 'dhtmlxgantt/min.js'); -js::import($jsRoot . 'dhtmlxgantt/ext/dhtmlxgantt_critical_path.js'); -js::import($jsRoot . 'dhtmlxgantt/ext/dhtmlxgantt_fullscreen.js'); -js::import($jsRoot . 'dhtmlxgantt/ext/dhtmlxgantt_smart_rendering.js'); -js::import($jsRoot . 'dhtmlxgantt/ext/dhtmlxgantt_marker.js'); -js::import($jsRoot . 'dhtmlxgantt/ext/dhtmlxgantt_tooltip.js'); $currentLang = $app->getClientLang(); if($currentLang != 'en') js::import($jsRoot . 'dhtmlxgantt/lang/' . $currentLang . '.js'); ?> + diff --git a/module/common/view/noticeimport.html.php b/module/common/view/noticeimport.html.php index 600fcbea00..5f87dd9b43 100644 --- a/module/common/view/noticeimport.html.php +++ b/module/common/view/noticeimport.html.php @@ -27,7 +27,5 @@ function submitForm(type) $('.modal-body #insert').val(type == 'insert' ? 1 : 0); $('#importNoticeModal .form-actions .btn').addClass('disabled'); $("button[data-target='#importNoticeModal']").closest('form').submit(); - - setTimeout(function(){$('#importNoticeModal .form-actions .btn').removeClass('disabled');}, 1000); } diff --git a/module/compile/control.php b/module/compile/control.php index c640359571..0eaa972775 100644 --- a/module/compile/control.php +++ b/module/compile/control.php @@ -47,6 +47,8 @@ class compile extends control $this->view->job = $job; } + $this->compile->syncCompile($repoID, $jobID); + $this->app->loadLang('job'); $this->loadModel('ci')->setMenu($repoID); @@ -77,7 +79,11 @@ class compile extends control $build = $this->compile->getByID($buildID); $job = $this->loadModel('job')->getByID($build->job); - $this->view->logs = str_replace("\r\n","
    ", $build->logs); + if(empty($build->logs) and !in_array($build->status, array('created', 'pending'))) $build->logs = $this->compile->getLogs($job, $build); + $logs = str_replace("\r\n", "
    ", $build->logs); + $logs = str_replace("\n", "
    ", $logs); + + $this->view->logs = $logs; $this->view->build = $build; $this->view->job = $job; @@ -87,5 +93,23 @@ class compile extends control $this->view->position[] = $this->lang->compile->logs; $this->display(); } + + /** + * Sync compiles. + * + * @access public + * @return bool + */ + public function syncCompile() + { + $this->compile->syncCompile(); + + if(dao::isError()) + { + echo json_encode(dao::getError()); + return true; + } + echo 'success'; + } } diff --git a/module/compile/lang/de.php b/module/compile/lang/de.php index dfd19b4832..6ca3125a19 100644 --- a/module/compile/lang/de.php +++ b/module/compile/lang/de.php @@ -1,7 +1,8 @@ compile->common = 'Compile'; -$lang->compile->browse = 'History'; -$lang->compile->logs = 'Logs'; +$lang->compile->common = 'Compile'; +$lang->compile->browse = 'History'; +$lang->compile->logs = 'Logs'; +$lang->compile->syncCompile = 'Interface: Sync Compiles.'; $lang->compile->id = 'ID'; $lang->compile->name = 'Name'; diff --git a/module/compile/lang/en.php b/module/compile/lang/en.php index 68e5655bbb..cb397946ca 100644 --- a/module/compile/lang/en.php +++ b/module/compile/lang/en.php @@ -1,7 +1,8 @@ compile->common = 'Compile'; -$lang->compile->browse = 'History'; -$lang->compile->logs = 'Log'; +$lang->compile->common = 'Compile'; +$lang->compile->browse = 'History'; +$lang->compile->logs = 'Log'; +$lang->compile->syncCompile = 'Interface: Sync Compiles.'; $lang->compile->id = 'ID'; $lang->compile->name = 'Name'; diff --git a/module/compile/lang/fr.php b/module/compile/lang/fr.php index b53d0e038c..6d8eccec72 100644 --- a/module/compile/lang/fr.php +++ b/module/compile/lang/fr.php @@ -1,7 +1,8 @@ compile->common = 'Build'; -$lang->compile->browse = 'Historique Builds'; -$lang->compile->logs = 'Logs des Builds'; +$lang->compile->common = 'Build'; +$lang->compile->browse = 'Historique Builds'; +$lang->compile->logs = 'Logs des Builds'; +$lang->compile->syncCompile = 'Interface: Sync Compiles.'; $lang->compile->id = 'ID'; $lang->compile->name = 'Nom'; diff --git a/module/compile/lang/vi.php b/module/compile/lang/vi.php index b5f3389644..05d762a745 100644 --- a/module/compile/lang/vi.php +++ b/module/compile/lang/vi.php @@ -1,7 +1,8 @@ compile->common = 'Compile'; -$lang->compile->browse = 'Lịch sử'; -$lang->compile->logs = 'Nhật ký'; +$lang->compile->common = 'Compile'; +$lang->compile->browse = 'Lịch sử'; +$lang->compile->logs = 'Nhật ký'; +$lang->compile->syncCompile = 'Interface: Sync Compiles.'; $lang->compile->id = 'ID'; $lang->compile->name = 'Tên'; diff --git a/module/compile/lang/zh-cn.php b/module/compile/lang/zh-cn.php index e4e328cf01..395474b4d6 100644 --- a/module/compile/lang/zh-cn.php +++ b/module/compile/lang/zh-cn.php @@ -1,7 +1,8 @@ compile->common = '构建'; -$lang->compile->browse = '构建历史'; -$lang->compile->logs = '构建日志'; +$lang->compile->common = '构建'; +$lang->compile->browse = '构建历史'; +$lang->compile->logs = '构建日志'; +$lang->compile->syncCompile = '接口:同步构建记录'; $lang->compile->id = 'ID'; $lang->compile->name = '构建名称'; diff --git a/module/compile/model.php b/module/compile/model.php index 44a1e37ee5..c46cb33c72 100644 --- a/module/compile/model.php +++ b/module/compile/model.php @@ -134,6 +134,59 @@ class compileModel extends model return $url; } + /** + * Get compile logs. + * + * @param object $job + * @param object $compile + * @access public + * @return string + */ + public function getLogs($job, $compile) + { + $logs = ''; + + if($job->engine == 'jenkins') + { + $jenkins = $this->loadModel('jenkins')->getByID($job->server); + $jenkinsUser = $jenkins->account; + $jenkinsPassword = $jenkins->token ? $jenkins->token : base64_decode($jenkins->password); + $userPWD = "$jenkinsUser:$jenkinsPassword"; + + $infoUrl = sprintf('%s/job/%s/api/xml?tree=builds[id,number,queueId]&xpath=//build[queueId=%s]', $jenkins->url, $job->pipeline, $compile->queue); + $response = common::http($infoUrl, '', array(CURLOPT_USERPWD => $userPWD)); + if($response) + { + $buildInfo = simplexml_load_string($response); + $buildNumber = $buildInfo->number; + if(empty($buildNumber)) return ''; + + $logUrl = sprintf('%s/job/%s/%s/consoleText', $jenkins->url, $job->pipeline, $buildNumber); + $logs = common::http($logUrl, '', array(CURLOPT_USERPWD => $userPWD)); + $this->dao->update(TABLE_COMPILE)->set('logs')->eq($logs)->where('id')->eq($compile->id)->exec(); + } + } + else + { + /* Get jobs by pipeline. */ + $pipeline = json_decode($job->pipeline); + $projectID = isset($pipeline->project) ? $pipeline->project : ''; + $jobs = $this->loadModel('gitlab')->apiGetJobs($job->server, $projectID, $compile->queue); + + $this->loadModel('ci'); + foreach($jobs as $gitlabJob) + { + if(empty($gitlabJob->duration) or $gitlabJob->duration == '') $gitlabJob->duration = '-'; + $logs .= ">>> Job: $gitlabJob->name, Stage: $gitlabJob->stage, Status: $gitlabJob->status, Duration: $gitlabJob->duration Sec\r\n "; + $logs .= "Job URL: web_url\" target='_blank'>$gitlabJob->web_url \r\n"; + $logs .= $this->ci->transformAnsiToHtml($this->gitlab->apiGetJobLog($job->server, $projectID, $gitlabJob->id)); + } + } + + if(!empty($logs)) $this->dao->update(TABLE_COMPILE)->set('logs')->eq($logs)->where('id')->eq($compile->id)->exec(); + return $logs; + } + /** * Save build by job * @@ -157,6 +210,137 @@ class compileModel extends model $this->dao->insert(TABLE_COMPILE)->data($build)->exec(); } + /** + * Sync compiles. + * + * @param int $repoID + * @param int $repoID + * @access public + * @return void + */ + public function syncCompile($repoID = 0, $jobID = 0) + { + if($jobID) + { + $jobList[$jobID] = $this->loadModel('job')->getByID($jobID); + } + else + { + $jobList = $this->loadModel('job')->getList($repoID); + } + + $jenkinsPairs = $this->loadModel('pipeline')->getList('jenkins'); + $gitlabPairs = $this->loadModel('pipeline')->getList('gitlab'); + + foreach($jobList as $job) + { + if($job->engine == 'jenkins') + { + $server = zget($jenkinsPairs, $job->server); + $this->syncJenkinsBuildList($server, $job); + } + else + { + $server = zget($gitlabPairs, $job->server); + $this->syncGitLabBuildList($server, $job); + } + } + } + + /** + * Sync jenkins build list. + * + * @param object $jenkins + * @param object $job + * @access public + * @return void + */ + public function syncJenkinsBuildList($jenkins, $job) + { + $jenkinsUser = $jenkins->account; + $jenkinsPassword = $jenkins->token ? $jenkins->token : base64_decode($jenkins->password); + + /* Get build list by API. */ + $url = sprintf('%s/job/%s/api/json?tree=builds[id,number,result,queueId,timestamp]', $jenkins->url, $job->pipeline); + $response = common::http($url, '', array(CURLOPT_USERPWD => "$jenkinsUser:$jenkinsPassword")); + if(!$response) return false; + + $compilePairs = $this->dao->select('queue,job')->from(TABLE_COMPILE)->where('job')->eq($job->id)->andWhere('queue')->gt(0)->fetchPairs(); + $jobInfo = json_decode($response); + foreach($jobInfo->builds as $build) + { + $lastSyncTime = strtotime($job->lastSyncDate); + if($build->timestamp < $lastSyncTime * 1000) break; + if(isset($compilePairs[$build->queueId])) continue; + + $data = new stdclass(); + $data->name = $job->name; + $data->job = $job->id; + $data->queue = $build->queueId; + $data->status = $build->result == 'SUCCESS' ? 'success' : 'failure'; + $data->createdBy = 'guest'; + $data->createdDate = date('Y-m-d H:i:s', $build->timestamp / 1000); + $data->updateDate = $data->createdDate; + + $this->dao->insert(TABLE_COMPILE)->data($data)->exec(); + } + + $now = helper::now(); + $this->dao->update(TABLE_JOB)->set('lastSyncDate')->eq($now)->where('id')->eq($job->id)->exec(); + } + + /** + * Sync gitlab build list. + * + * @param object $gitlab + * @param object $job + * @access public + * @return void + */ + public function syncGitlabBuildList($gitlab, $job) + { + $pipeline = json_decode($job->pipeline); + $projectID = isset($pipeline->project) ? $pipeline->project : ''; + $ref = isset($pipeline->reference) ? $pipeline->reference : ''; + $url = sprintf($this->loadModel('gitlab')->getApiRoot($gitlab->id, false), "/projects/{$projectID}/pipelines"); + + /* Get build list by API. */ + for($page = 1; true; $page++) + { + $param = $job->lastSyncDate ? '&updated_after=' . date('YYYY-MM-DDThh:mm:ssZ', strtotime($job->lastSyncDate)) : ''; + $builds = json_decode(commonModel::http($url . "&ref={$ref}&order_by=id&sort=asc&page={$page}&per_page=100" . $param)); + if(!is_array($builds)) break; + + if(!empty($builds)) + { + $queueIDList = array(); + foreach($builds as $build) $queueIDList[] = $build->id; + $compilePairs = $this->dao->select('queue,job')->from(TABLE_COMPILE)->where('job')->eq($job->id)->andWhere('queue')->in($queueIDList)->fetchPairs(); + + foreach($builds as $build) + { + if(isset($compilePairs[$build->id])) continue; + + $data = new stdclass(); + $data->name = $job->name; + $data->job = $job->id; + $data->queue = $build->id; + $data->status = $build->status; + $data->createdBy = 'guest'; + $data->createdDate = date('Y-m-d H:i:s', strtotime($build->created_at)); + $data->updateDate = date('Y-m-d H:i:s', strtotime($build->updated_at)); + + $this->dao->insert(TABLE_COMPILE)->data($data)->exec(); + } + } + + if(count($builds) < 100) break; + } + + $now = helper::now(); + $this->dao->update(TABLE_JOB)->set('lastSyncDate')->eq($now)->where('id')->eq($job->id)->exec(); + } + /** * Execute compile * diff --git a/module/convert/converter/redmine1.1.php b/module/convert/converter/redmine1.1.php index 6c2962f9b8..63b665daf5 100644 --- a/module/convert/converter/redmine1.1.php +++ b/module/convert/converter/redmine1.1.php @@ -385,7 +385,9 @@ class redmine11ConvertModel extends redmineConvertModel /* Insert into zentao */ foreach($productPlans as $id => $productPlan) { - $productPlan->product = $this->map['products'][$productPlan->execution_id]; + $productPlan->product = $this->map['products'][$productPlan->execution_id]; + $productPlan->createdBy = $this->app->user->account; + $productPlan->createdDate = helper::now(); unset($productPlan->id); unset($productPlan->execution_id); $this->dao->dbh($this->dbh)->insert(TABLE_PRODUCTPLAN)->data($productPlan)->exec(); @@ -395,7 +397,9 @@ class redmine11ConvertModel extends redmineConvertModel foreach($this->map['products'] as $productID) { $productPlan = $this->dao->dbh($this->dbh)->select("name as title, createdDate as begin")->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch(); - $productPlan->product = $productID; + $productPlan->product = $productID; + $productPlan->createdBy = $this->app->user->account; + $productPlan->createdDate = helper::now(); $this->dao->dbh($this->dbh)->insert(TABLE_PRODUCTPLAN)->data($productPlan)->exec(); $this->map['planOfProduct'][$productID] = $this->dao->lastinsertID(); } diff --git a/module/convert/model.php b/module/convert/model.php index 8ad71afe3d..dbb5055f98 100644 --- a/module/convert/model.php +++ b/module/convert/model.php @@ -947,11 +947,13 @@ class convertModel extends model $productID = $projectProduct[$projectID]; $build = new stdclass(); - $build->product = $productID; - $build->project = $projectID; - $build->name = $data->vname; - $build->date = substr($data->RELEASEDATE, 0, 10); - $build->builder = $this->app->user->account; + $build->product = $productID; + $build->project = $projectID; + $build->name = $data->vname; + $build->date = substr($data->RELEASEDATE, 0, 10); + $build->builder = $this->app->user->account; + $build->createdBy = $this->app->user->account; + $build->createdDate = helper::now(); $this->dao->dbh($this->dbh)->insert(TABLE_BUILD)->data($build)->exec(); $buildID = $this->dao->dbh($this->dbh)->lastInsertID(); @@ -989,12 +991,14 @@ class convertModel extends model if(empty($data->RELEASEDATE)) continue; $release = new stdclass(); - $release->product = $build->product; - $release->build = $buildID; - $release->name = $build->name; - $release->date = $build->date; - $release->desc = $data->DESCRIPTION; - $release->status = 'normal'; + $release->product = $build->product; + $release->build = $buildID; + $release->name = $build->name; + $release->date = $build->date; + $release->desc = $data->DESCRIPTION; + $release->status = 'normal'; + $release->createdBy = $this->app->user->account; + $release->createdDate = helper::now(); $this->dao->dbh($this->dbh)->insert(TABLE_RELEASE)->data($release)->exec(); $releaseID = $this->dao->dbh($this->dbh)->lastInsertID(); diff --git a/module/custom/control.php b/module/custom/control.php index 85b894cd41..a770c7b2e6 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -609,7 +609,7 @@ class custom extends control if($this->config->edition != 'max') $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint); $this->app->loadLang('common'); - $locate = $this->config->systemMode == 'new' ? 'parent' : 'top'; + $locate = $this->config->systemMode == 'new' ? inlink('flow') : 'top'; return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locate)); } diff --git a/module/custom/model.php b/module/custom/model.php index 93274c6418..ea8843e979 100644 --- a/module/custom/model.php +++ b/module/custom/model.php @@ -244,7 +244,9 @@ class customModel extends model { $link = explode('|', $link); list($label, $module, $method) = $link; - $hasPriv = commonModel::hasPriv($module, $method); + + $params = empty($link[3]) ? '' : $link[3]; + $hasPriv = commonModel::hasPriv($module, $method, null, $params); /* Fix bug #20464 */ if(isset($vars)) unset($vars); diff --git a/module/datatable/control.php b/module/datatable/control.php index 8c2b0c4886..65c14a6580 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -97,6 +97,7 @@ class datatable extends control unset($cols['taskCount']); unset($cols['bugCount']); unset($cols['caseCount']); + $cols['title']['title'] = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->title); } $this->view->cols = $cols; diff --git a/module/datatable/lang/de.php b/module/datatable/lang/de.php index 55aafa1a75..3034fb390d 100644 --- a/module/datatable/lang/de.php +++ b/module/datatable/lang/de.php @@ -23,7 +23,7 @@ $lang->datatable->displaySetting = 'Set list'; $lang->datatable->showModule = 'Anzeigen/Verstecken des Modul Names'; $lang->datatable->showBranch = 'Show branches in the list'; $lang->datatable->showAllModule = 'Show product modules'; -$lang->datatable->showModuleList[] = 'N/A'; +$lang->datatable->showModuleList['0'] = 'N/A'; $lang->datatable->showModuleList['base'] = 'Basisknoten'; $lang->datatable->showModuleList['end'] = 'Endknoten'; $lang->datatable->showAllModuleList[0] = 'Hide'; diff --git a/module/datatable/lang/en.php b/module/datatable/lang/en.php index e5ab3098df..9c4b86de8d 100644 --- a/module/datatable/lang/en.php +++ b/module/datatable/lang/en.php @@ -23,7 +23,7 @@ $lang->datatable->displaySetting = 'Set List'; $lang->datatable->showModule = 'Show modules in the list'; $lang->datatable->showBranch = 'Show branches in the list'; $lang->datatable->showAllModule = 'Show product modules'; -$lang->datatable->showModuleList[] = 'N/A'; +$lang->datatable->showModuleList['0'] = 'N/A'; $lang->datatable->showModuleList['base'] = 'Base Node'; $lang->datatable->showModuleList['end'] = 'End Node'; $lang->datatable->showAllModuleList[0] = 'Hide'; diff --git a/module/datatable/lang/fr.php b/module/datatable/lang/fr.php index 6ced0da225..33a98bd90a 100644 --- a/module/datatable/lang/fr.php +++ b/module/datatable/lang/fr.php @@ -23,7 +23,7 @@ $lang->datatable->displaySetting = 'Set list'; $lang->datatable->showModule = 'Montrer les noms des modules dans la page de listes'; $lang->datatable->showBranch = 'Show branches in the list'; $lang->datatable->showAllModule = 'Afficher les modules de produits'; -$lang->datatable->showModuleList[] = 'N/A'; +$lang->datatable->showModuleList['0'] = 'N/A'; $lang->datatable->showModuleList['base'] = 'Base Node'; $lang->datatable->showModuleList['end'] = 'End Node'; $lang->datatable->showAllModuleList[0] = 'Cacher'; diff --git a/module/datatable/lang/zh-cn.php b/module/datatable/lang/zh-cn.php index 8da7db89b1..b4d63aeb80 100644 --- a/module/datatable/lang/zh-cn.php +++ b/module/datatable/lang/zh-cn.php @@ -23,7 +23,7 @@ $lang->datatable->displaySetting = '显示设置'; $lang->datatable->showModule = '列表页是否显示模块名'; $lang->datatable->showBranch = '列表页是否显示%s名'; $lang->datatable->showAllModule = '是否显示完整产品模块'; -$lang->datatable->showModuleList[] = '不显示'; +$lang->datatable->showModuleList['0'] = '不显示'; $lang->datatable->showModuleList['base'] = '只显示一级模块'; $lang->datatable->showModuleList['end'] = '只显示最后一级模块'; $lang->datatable->showAllModuleList[0] = '不显示'; diff --git a/module/design/js/browse.js b/module/design/js/browse.js index 472e4d5704..9abbb03273 100644 --- a/module/design/js/browse.js +++ b/module/design/js/browse.js @@ -1,15 +1,28 @@ $(function() { - $('#subNavbar .nav li').removeClass('active'); + $('#subNavbar .nav li').removeClass('active'); $('#subNavbar .nav li[data-id=' + type + ']').addClass('active'); $('#subNavbar .nav li > a').each(function() { var type = $(this).parent().attr('data-id'); if(type == 'bysearch') return; + if(type == 'more') + { + $(this).attr('href', '###'); + return; + } - type = type == 'all' ? type : type.toUpperCase(); + type = type == 'all' ? type : type.toLowerCase(); var href = createLink('design', 'browse', 'projectID=' + projectID + '&productID=' + productID + '&type=' + type); $(this).attr('href', href); }); + + if($('#subNavbar .dropdown-menu li[data-id=' + type +']').hasClass('active')) + { + var typeName = $('#subNavbar li[data-id=' + type +'] > a').html(); + + $('#subNavbar').find(".dropdown-hover > a").html(typeName + ""); + $("#subNavbar li[data-id='more']").addClass('active'); + } }) diff --git a/module/design/lang/de.php b/module/design/lang/de.php index d78d2bc6ab..8dc1c11869 100644 --- a/module/design/lang/de.php +++ b/module/design/lang/de.php @@ -37,6 +37,7 @@ $lang->design->createdDate = 'CreatedDate'; $lang->design->basicInfo = 'Basic Information'; $lang->design->noAssigned = 'Unassigned'; $lang->design->comment = 'Comment'; +$lang->design->more = 'Mehr'; /* 动作列表. */ $lang->design->common = 'Design'; diff --git a/module/design/lang/en.php b/module/design/lang/en.php index 9a25dfdb79..f006c2c840 100644 --- a/module/design/lang/en.php +++ b/module/design/lang/en.php @@ -37,6 +37,7 @@ $lang->design->createdDate = 'CreatedDate'; $lang->design->basicInfo = 'Basic Information'; $lang->design->noAssigned = 'Unassigned'; $lang->design->comment = 'Comment'; +$lang->design->more = 'More'; /* 动作列表. */ $lang->design->common = 'Design'; diff --git a/module/design/lang/fr.php b/module/design/lang/fr.php index d78d2bc6ab..0e3e8da8a8 100644 --- a/module/design/lang/fr.php +++ b/module/design/lang/fr.php @@ -37,6 +37,7 @@ $lang->design->createdDate = 'CreatedDate'; $lang->design->basicInfo = 'Basic Information'; $lang->design->noAssigned = 'Unassigned'; $lang->design->comment = 'Comment'; +$lang->design->more = 'Suite'; /* 动作列表. */ $lang->design->common = 'Design'; diff --git a/module/design/lang/zh-cn.php b/module/design/lang/zh-cn.php index d96bd18f15..cab82e4748 100644 --- a/module/design/lang/zh-cn.php +++ b/module/design/lang/zh-cn.php @@ -37,6 +37,7 @@ $lang->design->createdDate = '创建时间'; $lang->design->basicInfo = '基本信息'; $lang->design->noAssigned = '未指派'; $lang->design->comment = '注释'; +$lang->design->more = '更多'; /* 动作列表. */ $lang->design->common = '设计'; diff --git a/module/design/model.php b/module/design/model.php index 05ecc5863f..25be18689e 100644 --- a/module/design/model.php +++ b/module/design/model.php @@ -403,7 +403,27 @@ class designModel extends model */ public function setMenu($projectID, $products, $productID = 0) { - if($this->app->rawMethod != 'browse') unset($this->lang->waterfall->menu->design['subMenu']->bysearch); + /* Show custom design types. */ + $this->lang->waterfall->menu->design['subMenu'] = new stdclass(); + $this->lang->waterfall->menu->design['subMenu']->all = array('link' => "{$this->lang->all}|design|browse|projectID=%s&productID=0&browseType=all"); + $count = 1; + foreach(array_filter($this->lang->design->typeList) as $key => $value) + { + $key = strtolower($key); + + if($count <= 4) $this->lang->waterfall->menu->design['subMenu']->$key = array('link' => "{$value}|design|browse|projectID=%s&productID=0&browseType={$key}"); + if($count == 5) + { + $this->lang->waterfall->menu->design['subMenu']->more = array('link' => "{$this->lang->design->more}|design|browse|projectID=%s&productID=0&browseType={$key}", 'class' => 'dropdown dropdown-hover'); + $this->lang->waterfall->menu->design['subMenu']->more['dropMenu'] = new stdclass(); + } + if($count >= 5) $this->lang->waterfall->menu->design['subMenu']->more['dropMenu']->$key = array('link' => "{$value}|design|browse|projectID=%s&productID=0&browseType={$key}"); + + $count ++; + } + + if($this->app->rawMethod == 'browse') $this->lang->waterfall->menu->design['subMenu']->bysearch = array('link' => ' ' . $this->lang->searchAB . ''); + if(empty($products) || !$productID) return ''; $currentProduct = $this->loadModel('product')->getById($productID); setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true); diff --git a/module/design/view/view.html.php b/module/design/view/view.html.php index 777eca48e3..38299bb95c 100644 --- a/module/design/view/view.html.php +++ b/module/design/view/view.html.php @@ -16,7 +16,7 @@ project);?> - config->doc->textTypes, $docType) !== false ? 'hidden' : '';?> - + - +
    datatable->showModule;?>datatable->showModuleList, isset($config->datatable->$datatableId->showModule) ? $config->datatable->$datatableId->showModule : '');?>datatable->showModuleList, isset($config->datatable->$datatableId->showModule) ? $config->datatable->$datatableId->showModule : '0');?>
    doc->keywords;?> doc->keywordsTips}'");?>
    doc->content;?>
    @@ -144,7 +143,9 @@ $("a[href^='###']").click(function() +doc->textTypes);?> + doc->noticeAcl['doc']);?> diff --git a/module/doc/view/createbasicinfo.html.php b/module/doc/view/createbasicinfo.html.php new file mode 100644 index 0000000000..165e6ce5b0 --- /dev/null +++ b/module/doc/view/createbasicinfo.html.php @@ -0,0 +1,101 @@ + + * @package doc + * @version $Id: createbasicinfo.html.php 2022-08-02 13:49:25Z $ + * @link http://www.zentao.net + */ +?> + +doc->placeholder);?> + +
    +
    +
    +

    doc->create;?>

    +
    + + ' . $lang->doc->createLib, '', 'class="iframe hidden createCustomLib"');?> + +
    + + + + + + + + + + + + + + + + + + + + + doc->types as $typeKey => $typeName) $typeKeyList[$typeKey] = $typeKey; + ?> + + + + + + + + + + + + + + + + + + +
    doc->lib;?>
    doc->module;?> + +
    doc->title;?>
    doc->keywords;?>doc->keywordsTips}'");?>
    doc->mailto;?> +
    + fetch('my', 'buildContactLists'); + ?> +
    +
    doclib->control;?> + acl == 'default' ? 'open' : $lib->acl;?> + type == 'project' and $acl == 'private') ? 'open' : $acl;?> + doc->aclList, $acl, "onchange='toggleAcl(this.value, \"doc\")'");?> + doc->noticeAcl['doc'][$acl];?> +
    + + doc->nextStep, "id='saveBtn'", "btn btn-wide btn-primary");?> +
    +
    +
    +
    + + + +doc->noticeAcl['doc']);?> + diff --git a/module/doc/view/createtexttype.html.php b/module/doc/view/createtexttype.html.php index 0f0c667773..f74ded32e3 100644 --- a/module/doc/view/createtexttype.html.php +++ b/module/doc/view/createtexttype.html.php @@ -35,10 +35,9 @@ .ke-toolbar {padding-left: 20px; width: 100%; height: 30px;} .ke-edit {border-top: 1px solid rgb(220, 220, 220)} .ke-edit, .CodeMirror {margin: 8px 200px 0 200px; background: #fff;} -.kindeditor-ph {padding-left: 20px !important;} +.kindeditor-ph {padding: 20px 20px 0 20px !important;} .editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 30px;} -.hide-sidebar .ke-edit {padding-right: 20px;} -.hide-sidebar .CodeMirror {padding-right: 50px;} +.CodeMirror {padding: 20px 20px 0 20px;} .CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;} .ke-statusbar {display: none;} .contentmarkdown {background: #efefef;} @@ -47,15 +46,9 @@ #noticeAcl {margin-left: 10px; vertical-align: middle;} -#moreList {display: inline-block; padding: 7px;} -#moreList .icon-more-circle {font-size: 20px;} -#moreList ul.dropdown-menu {left: -77px;} - -#backBtn {border: unset;} -#backBtn i {font-size: 20px;} +#basicInfoLink {border: unset;} .modal-title {font-size: 14px !important; font-weight: 700 !important;} -#modalBasicInfo .modal-dialog {width: 720px;} ' . $lang->doc->createLib, '', 'class="iframe hidden createCustomLib"');?> @@ -66,16 +59,11 @@ - + @@ -97,9 +85,6 @@ - +
    ", $backLink, 'self', "id='backBtn'");?> ' . $lang->goback, '', "class='btn btn-secondary' id='backBtn'");?> doc->titlePlaceholder}' class='form-control' required");?> - + " . $lang->settings, '', "data-toggle='modal' id='basicInfoLink' class='btn'");?>
    save, '', "class='btn btn-primary btn-wide'");?>doc->confirm, '', "class='btn btn-primary btn-wide'");?>
    @@ -173,23 +158,15 @@ $(function() { var contentHeight = $(document).height() - 120; - setTimeout(function(){$('.ke-edit-iframe, .ke-edit').height(contentHeight);}, 100); - setTimeout(function(){$('.CodeMirror').height(contentHeight);}, 100); - - //basicInfoContent = ''; - //$('#basicInfoLink').click(function() - //{ - // basicInfoContent = $('#basicInfoBox').html(); - //}); - - //$('#modalBasicInfo .modal-header .close').click(function() - //{ - // $('#basicInfoBox').html(basicInfoContent); - //}); + setTimeout(function(){$('.ke-edit-iframe, .ke-edit, .ke-edit-textarea, .CodeMirror').height(contentHeight);}, 100); $(document).on('click', '#modalBasicInfo tfoot .btn', function() {$('#modalBasicInfo').modal('hide');}); + + $('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px'); }) +doc->textTypes);?> + doc->noticeAcl['doc']);?> diff --git a/module/doc/view/edittexttype.html.php b/module/doc/view/edittexttype.html.php index ded396749b..f15cd256e0 100644 --- a/module/doc/view/edittexttype.html.php +++ b/module/doc/view/edittexttype.html.php @@ -39,10 +39,9 @@ .ke-toolbar {padding-left: 20px; width: 100%; height: 30px;} .ke-edit {border-top: 1px solid rgb(220, 220, 220)} .ke-edit, .CodeMirror {margin: 8px 200px 0 200px; background: #fff;} -.kindeditor-ph {padding-left: 20px !important;} +.kindeditor-ph {padding: 20px 20px 0 20px !important;} .editor-toolbar {background: #fff; padding-left: 20px; border-right: unset; border-top: unset; height: 30px;} -.hide-sidebar .ke-edit {padding-right: 20px;} -.hide-sidebar .CodeMirror {padding-right: 50px;} +.CodeMirror {padding: 20px 20px 0 20px;} .CodeMirror.CodeMirror-wrap {border-left: 0; border-right: 0; border-bottom: 0;} .ke-statusbar {display: none;} @@ -50,15 +49,9 @@ #noticeAcl {margin-left: 10px; vertical-align: middle;} -#moreList {display: inline-block; padding: 7px;} -#moreList .icon-more-circle {font-size: 20px;} -#moreList ul.dropdown-menu {left: -77px;} - -#backBtn {border: unset;} -#backBtn i {font-size: 20px;} +#basicInfoLink {border: unset;} .modal-title {font-size: 14px !important; font-weight: 700 !important;} -#modalBasicInfo .modal-dialog {width: 720px;} createLink('doc', 'objectlibs', "type=$type&objectID=$objectID&libID={$lib->id}&docID={$doc->id}");?>
    @@ -66,20 +59,11 @@ - - - - - + @@ -101,9 +85,6 @@ - +
    ", $backLink, 'self', "id='backBtn'");?>", "id='backBtn'", '');?> " . $lang->goback, "id='backBtn'", 'btn btn-secondary');?> title, "placeholder='{$lang->doc->titlePlaceholder}' class='form-control' required");?> - + " . $lang->settings, '', "data-toggle='modal' id='basicInfoLink' class='btn'");?>
    save, '', "class='btn btn-primary btn-wide'");?>doc->confirm, '', "class='btn btn-primary btn-wide'");?>
    @@ -174,21 +155,11 @@ $(function() { var contentHeight = $(document).height() - 100; - setTimeout(function(){$('.ke-edit-iframe, .ke-edit').height(contentHeight);}, 100); - setTimeout(function(){$('.CodeMirror').height(contentHeight);}, 100); - - //basicInfoContent = ''; - //$('#basicInfoLink').click(function() - //{ - // basicInfoContent = $('#basicInfoBox').html(); - //}); - - //$('#modalBasicInfo .modal-header .close').click(function() - //{ - // $('#basicInfoBox').html(basicInfoContent); - //}); + setTimeout(function(){$('.ke-edit-iframe, .ke-edit, .ke-edit-textarea, .CodeMirror').height(contentHeight);}, 100); $(document).on('click', '#modalBasicInfo tfoot .btn', function() {$('#modalBasicInfo').modal('hide');}); + + $('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px'); }) doc->noticeAcl['doc']);?> diff --git a/module/doc/view/selectlibtype.html.php b/module/doc/view/selectlibtype.html.php index 4f831ee8af..77e3ccb27b 100644 --- a/module/doc/view/selectlibtype.html.php +++ b/module/doc/view/selectlibtype.html.php @@ -36,7 +36,7 @@
    doc->types, 'text');?>
    confirm);?>doc->nextStep);?>
    diff --git a/module/doc/view/showfiles.html.php b/module/doc/view/showfiles.html.php index 1939c8f81b..9266493800 100644 --- a/module/doc/view/showfiles.html.php +++ b/module/doc/view/showfiles.html.php @@ -45,9 +45,20 @@ extension, '', $file->title);?> - objectType == 'requirement' ? $lang->URCommon : $lang->{$file->objectType}->common) . ' : ';?> - objectType), 'view', "objectID=$file->objectID", '', true);?>' class='iframe' data-width='90%'> - objectType][$file->objectID];?> + objectType == 'requirement') + { + $commonTitle = $lang->URCommon . ' : '; + } + else + { + if(!isset($lang->{$file->objectType}->common)) $app->loadLang($file->objectType); + $commonTitle = $lang->{$file->objectType}->common . ' : '; + } + echo $commonTitle; + ?> + objectType), 'view', "objectID=$file->objectID", '', true);?>' class='iframe' data-width='90%'> + objectType][$file->objectID])) echo $sourcePairs[$file->objectType][$file->objectID];?> extension;?> @@ -101,9 +112,20 @@
    title;?>
    diff --git a/module/doc/view/tablecontents.html.php b/module/doc/view/tablecontents.html.php index d28a2e42ff..6442f4f00a 100644 --- a/module/doc/view/tablecontents.html.php +++ b/module/doc/view/tablecontents.html.php @@ -93,11 +93,12 @@ if(empty($type)) $type = 'product'; $html .= "
    "; diff --git a/module/execution/config.php b/module/execution/config.php index f9b0af12cf..ae894c97ea 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -1,10 +1,11 @@ execution = new stdclass(); -$config->execution->defaultWorkhours = '7.0'; -$config->execution->orderBy = 'isDone,status,order_desc'; -$config->execution->maxBurnDay = '31'; -$config->execution->weekend = '2'; -$config->execution->ownerFields = array('PO', 'PM', 'QD', 'RD'); +$config->execution->defaultWorkhours = '7.0'; +$config->execution->orderBy = 'isDone,status,order_desc'; +$config->execution->maxBurnDay = '31'; +$config->execution->weekend = '2'; +$config->execution->ownerFields = array('PO', 'PM', 'QD', 'RD'); +$config->execution->defaultBurnPeriod = 30; $config->execution->list = new stdclass(); $config->execution->list->exportFields = 'id,name,projectName,code,PM,begin,end,status,totalEstimate,totalConsumed,totalLeft,progress'; @@ -119,6 +120,39 @@ $config->execution->search['params']['canceledDate'] = array('operator' => '=' $config->execution->search['params']['lastEditedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); $config->execution->search['params']['activatedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$app->loadLang('execution'); +$config->execution->all = new stdclass(); +$config->execution->all->search['module'] = 'execution'; +$config->execution->all->search['fields']['name'] = $lang->execution->execName; +$config->execution->all->search['fields']['id'] = $lang->execution->execId; +$config->execution->all->search['fields']['status'] = $lang->execution->execStatus; +if($config->systemMode == 'new') $config->execution->all->search['fields']['project'] = $lang->execution->project; +$config->execution->all->search['fields']['PM'] = $lang->execution->owner; +$config->execution->all->search['fields']['openedBy'] = $lang->execution->openedBy; +$config->execution->all->search['fields']['openedDate'] = $lang->execution->openedDate; +$config->execution->all->search['fields']['begin'] = $lang->execution->begin; +$config->execution->all->search['fields']['end'] = $lang->execution->end; +$config->execution->all->search['fields']['realBegan'] = $lang->execution->realBegan; +$config->execution->all->search['fields']['realEnd'] = $lang->execution->realEnd; +$config->execution->all->search['fields']['closedBy'] = $lang->execution->closedBy; +$config->execution->all->search['fields']['lastEditedDate'] = $lang->execution->lastEditedDate; +$config->execution->all->search['fields']['closedDate'] = $lang->execution->closedDate; + +$config->execution->all->search['params']['name'] = array('operator' => 'include', 'control' => 'input', 'values' => ''); +$config->execution->all->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => ''); +$config->execution->all->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => array('') + $lang->execution->statusList); +if($config->systemMode == 'new') $config->execution->all->search['params']['project'] = array('operator' => '=', 'control' => 'select', 'values' => ''); +$config->execution->all->search['params']['PM'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); +$config->execution->all->search['params']['openedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); +$config->execution->all->search['params']['openedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['begin'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['end'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['realBegan'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['realEnd'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['closedBy'] = array('operator' => '=', 'control' => 'select', 'values' => 'users'); +$config->execution->all->search['params']['lastEditedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); +$config->execution->all->search['params']['closedDate'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date'); + $config->printKanban = new stdClass(); $config->printKanban->col['story'] = 1; $config->printKanban->col['wait'] = 2; @@ -145,40 +179,47 @@ if(!isset($config->setCode) or $config->setCode == 1) { $config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); } -else +elseif($config->systemMode == 'new') { $config->execution->datatable->defaultField = array('id', 'name', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); } +else +{ + $config->execution->datatable->defaultField = array('id', 'name', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); +} $config->execution->datatable->fieldList['id']['title'] = 'idAB'; $config->execution->datatable->fieldList['id']['fixed'] = 'left'; $config->execution->datatable->fieldList['id']['width'] = '70'; $config->execution->datatable->fieldList['id']['required'] = 'yes'; -$config->execution->datatable->fieldList['name']['title'] = 'name'; +$config->execution->datatable->fieldList['name']['title'] = 'execName'; $config->execution->datatable->fieldList['name']['fixed'] = 'left'; $config->execution->datatable->fieldList['name']['width'] = 'auto'; $config->execution->datatable->fieldList['name']['required'] = 'yes'; if(!isset($config->setCode) or $config->setCode == 1) { - $config->execution->datatable->fieldList['code']['title'] = 'code'; + $config->execution->datatable->fieldList['code']['title'] = 'execCode'; $config->execution->datatable->fieldList['code']['fixed'] = 'no'; $config->execution->datatable->fieldList['code']['width'] = '95'; $config->execution->datatable->fieldList['code']['required'] = 'no'; } -$config->execution->datatable->fieldList['project']['title'] = 'project'; -$config->execution->datatable->fieldList['project']['fixed'] = 'no'; -$config->execution->datatable->fieldList['project']['width'] = '100'; -$config->execution->datatable->fieldList['project']['required'] = 'no'; +if($config->systemMode == 'new') +{ + $config->execution->datatable->fieldList['project']['title'] = 'project'; + $config->execution->datatable->fieldList['project']['fixed'] = 'no'; + $config->execution->datatable->fieldList['project']['width'] = '100'; + $config->execution->datatable->fieldList['project']['required'] = 'no'; +} $config->execution->datatable->fieldList['PM']['title'] = 'owner'; $config->execution->datatable->fieldList['PM']['fixed'] = 'no'; $config->execution->datatable->fieldList['PM']['width'] = '70'; $config->execution->datatable->fieldList['PM']['required'] = 'no'; -$config->execution->datatable->fieldList['status']['title'] = 'status'; +$config->execution->datatable->fieldList['status']['title'] = 'execStatus'; $config->execution->datatable->fieldList['status']['fixed'] = 'no'; $config->execution->datatable->fieldList['status']['width'] = '100'; $config->execution->datatable->fieldList['status']['required'] = 'no'; diff --git a/module/execution/control.php b/module/execution/control.php index 9a2d2eabee..dea8b3e57b 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -241,7 +241,7 @@ class execution extends control $this->view->moduleID = $moduleID; $this->view->moduleTree = $this->tree->getTaskTreeMenu($executionID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra); $this->view->memberPairs = $memberPairs; - $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty'); + $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products)); $this->view->setModule = true; $this->view->canBeChanged = common::canModify('execution', $execution); // Determines whether an object is editable. $this->view->showBranch = $showBranch; @@ -469,10 +469,13 @@ class execution extends control * * @param int $executionID * @param int $fromExecution + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return void */ - public function importTask($toExecution, $fromExecution = 0) + public function importTask($toExecution, $fromExecution = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1) { if(!empty($_POST)) { @@ -509,13 +512,20 @@ class execution extends control $tasks2Imported = zget($tasks, $fromExecution, array()); } + /* Pager. */ + $this->app->loadClass('pager', $static = true); + $recTotal = count($tasks2Imported); + $pager = new pager($recTotal, $recPerPage, $pageID); + $tasks2ImportedList = array_chunk($tasks2Imported, $pager->recPerPage, true); + /* Save session. */ $this->app->session->set('taskList', $this->app->getURI(true), 'execution'); $this->view->title = $execution->name . $this->lang->colon . $this->lang->execution->importTask; + $this->view->pager = $pager; $this->view->position[] = html::a(inlink('browse', "executionID=$toExecution"), $execution->name); $this->view->position[] = $this->lang->execution->importTask; - $this->view->tasks2Imported = $tasks2Imported; + $this->view->tasks2Imported = empty($tasks2ImportedList) ? $tasks2ImportedList : $tasks2ImportedList[$pageID - 1]; $this->view->executions = $executions; $this->view->executionID = $execution->id; $this->view->fromExecution = $fromExecution; @@ -632,7 +642,7 @@ class execution extends control $this->config->bug->search['params']['product']['values'] = array(''=>''); } $this->config->bug->search['params']['execution']['values'] = array(''=>'') + $executions + array('all'=>$this->lang->execution->aboveAllExecution); - $this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs(array_keys($products)); + $this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getPairs(array_keys($products)); $this->config->bug->search['module'] = 'importBug'; $this->config->bug->search['params']['confirmed']['values'] = array('' => '') + $this->lang->bug->confirmedList; @@ -773,6 +783,7 @@ class execution extends control /* Append id for secend sort. */ $sort = common::appendOrder($orderBy); + if(strpos($sort, 'pri_') !== false) $sort = str_replace('pri_', 'priOrder_', $sort); $queryID = ($type == 'bysearch') ? $param : 0; $execution = $this->commonAction($executionID); @@ -943,6 +954,7 @@ class execution extends control /* Save session. */ $this->session->set('bugList', $this->app->getURI(true), 'execution'); + $this->session->set('buildList', $this->app->getURI(true), 'execution'); $type = strtolower($type); $queryID = ($type == 'bysearch') ? (int)$param : 0; @@ -1057,7 +1069,7 @@ class execution extends control $this->view->builds = $this->build->getBuildPairs($productID); $this->view->branchOption = $branchOption; $this->view->branchTagOption = $branchTagOption; - $this->view->plans = $this->loadModel('productplan')->getPairs($productID); + $this->view->plans = $this->loadModel('productplan')->getPairs($productID ? $productID : array_keys($products)); $this->view->stories = $storyList; $this->view->tasks = $taskList; $this->view->projectPairs = $this->loadModel('project')->getPairsByProgram(); @@ -1383,19 +1395,37 @@ class execution extends control $this->loadModel('kanban'); $this->app->loadClass('date'); + $minDate = !helper::isZeroDate($execution->openedDate) ? date('Y-m-d', strtotime($execution->openedDate)) : date('Y-m-d', strtotime($execution->begin)); + $maxDate = !helper::isZeroDate($execution->closedDate) ? date('Y-m-d', strtotime($execution->closedDate)) : helper::today(); + if(!empty($_POST)) { $begin = htmlspecialchars($this->post->begin, ENT_QUOTES); $end = htmlspecialchars($this->post->end, ENT_QUOTES); - if(empty($begin)) return $this->sendError(sprintf($this->lang->error->notempty, $this->lang->execution->charts->cfd->begin)); - if(empty($end)) return $this->sendError(sprintf($this->lang->error->notempty, $this->lang->execution->charts->cfd->end)); + $dateError = array(); + + if(empty($begin)) $dateError[] = sprintf($this->lang->error->notempty, $this->lang->execution->charts->cfd->begin); + if(empty($end)) $dateError[] = sprintf($this->lang->error->notempty, $this->lang->execution->charts->cfd->end); + if(empty($dateError)) + { + if($begin < $minDate) $dateError[] = sprintf($this->lang->error->gt, $this->lang->execution->charts->cfd->begin, $minDate); + if($begin > $maxDate) $dateError[] = sprintf($this->lang->error->lt, $this->lang->execution->charts->cfd->begin, $maxDate); + if($end < $minDate) $dateError[] = sprintf($this->lang->error->gt, $this->lang->execution->charts->cfd->end, $minDate); + if($end > $maxDate) $dateError[] = sprintf($this->lang->error->lt, $this->lang->execution->charts->cfd->end, $maxDate); + } + if(!empty($dateError)) + { + foreach($dateError as $index => $error) $dateError[$index] = str_replace(array('。', '.'), array('', ''), $error) . '
    '; + return $this->sendError($dateError); + } + if($begin >= $end) return $this->sendError($this->lang->execution->charts->cfd->errorBegin); if(date("Y-m-d", strtotime("-3 months", strtotime($end))) > $begin) return $this->sendError($this->lang->execution->charts->cfd->errorDateRange); $this->execution->computeCFD($executionID); $this->execution->checkCFDData($executionID, $begin); - return print(js::locate($this->createLink('execution', 'cfd', "executionID=$executionID&type=$type&withWeekend=$withWeekend&begin=" . helper::safe64Encode(urlencode($begin)) . "&end=" . helper::safe64Encode(urlencode($end))), 'parent')); + return $this->send(array('result' => 'success', 'locate' => $this->createLink('execution', 'cfd', "executionID=$executionID&type=$type&withWeekend=$withWeekend&begin=" . helper::safe64Encode(urlencode($begin)) . "&end=" . helper::safe64Encode(urlencode($end))))); } if($begin and $end) @@ -1423,6 +1453,8 @@ class execution extends control $this->view->chartData = $chartData; $this->view->begin = $begin; $this->view->end = $end; + $this->view->minDate = $minDate; + $this->view->maxDate = $maxDate; $this->display(); } @@ -2158,15 +2190,9 @@ class execution extends control if(!empty($_POST)) { - $this->loadModel('action'); - $changes = $this->execution->activate($executionID); + $this->execution->activate($executionID); if(dao::isError()) return print(js::error(dao::getError())); - if($this->post->comment != '' or !empty($changes)) - { - $actionID = $this->action->create($this->objectType, $executionID, 'Activated', $this->post->comment); - $this->action->logHistory($actionID, $changes); - } $this->executeHooks($executionID); if(isonlybody() and $from == 'kanban') { @@ -2209,16 +2235,10 @@ class execution extends control if(!empty($_POST)) { - $this->loadModel('action'); $this->execution->computeBurn($executionID); - $changes = $this->execution->close($executionID); + $this->execution->close($executionID); if(dao::isError()) return print(js::error(dao::getError())); - if($this->post->comment != '' or !empty($changes)) - { - $actionID = $this->action->create($this->objectType, $executionID, 'Closed', $this->post->comment); - $this->action->logHistory($actionID, $changes); - } $this->executeHooks($executionID); if(isonlybody() and $from == 'kanban') { @@ -2289,9 +2309,7 @@ class execution extends control { $this->app->loadClass('date'); - $begin = date('Y-m-d', strtotime('-13 days')); - $begin = (helper::isZeroDate($execution->begin) or helper::diffDate($begin, $execution->begin) > 0) ? $begin : $execution->begin; - $end = helper::today(); + list($begin, $end) = $this->execution->getBeginEnd4CFD($execution); $dateList = date::getDateList($begin, $end, 'Y-m-d', 'noweekend'); $chartData = $this->execution->buildCFDData($executionID, $dateList, 'task'); if(isset($chartData['line'])) $chartData['line'] = array_reverse($chartData['line']); @@ -2473,7 +2491,7 @@ class execution extends control unset($this->lang->kanban->type['all']); } - if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'pri_asc'; + if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'id_asc'; $kanbanGroup = $this->kanban->getExecutionKanban($executionID, $browseType, $groupBy, '', $orderBy); if(empty($kanbanGroup)) { @@ -2533,7 +2551,7 @@ class execution extends control { $this->loadModel('project'); $projects = $this->project->getPairsByProgram('', 'noclosed'); - $executions = $this->project->getStats(0, 'all', 0, 0, 30, 'id_desc'); + $executions = $this->execution->getStatData(0, 'all', 0, 0, false, '', 'id_desc'); $teams = $this->dao->select('root,account')->from(TABLE_TEAM) ->where('root')->in($this->app->user->view->sprints) @@ -2871,6 +2889,7 @@ class execution extends control $this->dao->update(TABLE_EXECUTION)->set('deleted')->eq(1)->where('id')->eq($executionID)->exec(); $this->loadModel('action')->create('execution', $executionID, 'deleted', '', ACTIONMODEL::CAN_UNDELETED); $this->execution->updateUserView($executionID); + $this->loadModel('common')->syncPPEStatus($executionID); $this->session->set('execution', ''); $message = $this->executeHooks($executionID); @@ -3675,16 +3694,16 @@ class execution extends control * All execution. * * @param string $status - * @param int $projectID * @param string $orderBy * @param int $productID + * @param string $param * @param int $recTotal * @param int $recPerPage * @param int $pageID * @access public * @return void */ - public function all($status = 'undone', $projectID = 0, $orderBy = 'order_asc', $productID = 0, $recTotal = 0, $recPerPage = 100, $pageID = 1) + public function all($status = 'undone', $orderBy = 'order_asc', $productID = 0, $param = '', $recTotal = 0, $recPerPage = 100, $pageID = 1) { $this->app->loadLang('my'); $this->app->loadLang('product'); @@ -3697,27 +3716,22 @@ class execution extends control if($this->app->viewType == 'mhtml') { - if($this->app->rawModule == 'project' and $this->app->rawMethod == 'execution') - { - $projects = $this->project->getPairsByProgram(); - $projectID = $this->project->saveState($projectID, $projects); - $this->project->setMenu($projectID); - } - else - { - $executionID = $this->execution->saveState(0, $this->executions); - $this->execution->setMenu($executionID); - } + $executionID = $this->execution->saveState(0, $this->executions); + $this->execution->setMenu($executionID); } /* Load pager and get tasks. */ $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); + $queryID = ($status == 'bySearch') ? (int)$param : 0; + $actionURL = $this->createLink('execution', 'all', "status=bySearch&orderBy=$orderBy&productID=$productID¶m=myQueryID"); + $this->execution->buildSearchFrom($queryID, $actionURL); + $this->view->title = $this->lang->execution->allExecutions; $this->view->position[] = $this->lang->execution->allExecutions; - $executionStats = $this->project->getStats($projectID, $status, $productID, 0, 30, $orderBy, $pager); + $executionStats = $this->execution->getStatData(0, $status, $productID, 0, false, $queryID, $orderBy, $pager); $parentIdList = array(); foreach($executionStats as $execution) @@ -3728,20 +3742,20 @@ class execution extends control $parents = array(); if($parentIdList) $parents = $this->execution->getByIdList($parentIdList); - $allExecutionsNum = $this->project->getStats($projectID, 'all'); + $allExecutionsNum = $this->execution->getStatData(0, 'all'); $this->view->allExecutionsNum = count($allExecutionsNum); $this->view->executionStats = $executionStats; - $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID); + $this->view->productList = $this->loadModel('product')->getProductPairsByProject(0); $this->view->productID = $productID; - $this->view->projectID = $projectID; $this->view->parents = $parents; - $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->projects = array('') + $this->project->getPairsByProgram(); $this->view->status = $status; $this->view->from = $from; + $this->view->param = $param; $this->view->isStage = (isset($project->model) and $project->model == 'waterfall') ? true : false; $this->display(); @@ -3840,7 +3854,7 @@ class execution extends control } $project = $this->project->getByID($projectID); - $executionStats = $this->project->getStats($projectID, $status == 'byproduct' ? 'all' : $status, $productID, 0, 30, 'id_asc'); + $executionStats = $this->execution->getStatData($projectID, $status == 'byproduct' ? 'all' : $status, $productID, 0, false, '', 'id_asc'); if(isset($project->model) and $project->model == 'waterfall') { $stageList = array(); @@ -3984,7 +3998,7 @@ class execution extends control { foreach($planStory as $id => $story) { - if($story->status == 'draft') + if($story->status == 'draft' or $story->status == 'reviewing') { $count++; unset($planStory[$id]); diff --git a/module/execution/css/all.css b/module/execution/css/all.css index 36584c5c7a..872a6e1219 100644 --- a/module/execution/css/all.css +++ b/module/execution/css/all.css @@ -1,10 +1,9 @@ body {margin-bottom: 25px;} +.main-table tbody>tr>td {border-bottom: 0px solid #eee;} .table-responsive {overflow-y: hidden !important;} #product_chosen .chosen-single {width: 180px;} .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;} .table td.has-child > a:not(.plan-toggle) {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} .table td.has-child > .plan-toggle {color: #838a9d; position: relative; top: 1px;overflow: initial !important;} .table td.has-child > .plan-toggle:hover {color: #006af1; cursor: pointer;} @@ -14,7 +13,7 @@ body {margin-bottom: 25px;} .table th.hours {padding-right: 8px !important;} .main-table tbody > tr.table-children > td:first-child::before {width: 3px;} td.hours {text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -td.flex {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; margin-bottom: -1px;} +td.flex {display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; margin-bottom: 0px;} td.datatable-cell.flex {margin-bottom: -2px;} td.flex span.label-badge {margin-left: 5px; min-width: 50px;} td.flex span.label-badge.label-light {min-width: 22px;} @@ -29,9 +28,13 @@ td.flex span.project-type-label {min-width: 40px;} .has-child > span {margin-right: 5px;} .c-name > .text-ellipsis {text-overflow: clip;} .c-code, .c-project {overflow: hidden; white-space: nowrap;} +th.c-status, .c-begin, .c-end, .c-realBegan, .c-realEnd {text-align: center;} .c-project{text-overflow: unset !important;} canvas {height: 28px;} -.parent.has-child.c-name.flex, .table-child-bottom > .c-name.flex {border-bottom: 1px solid #cbd0db !important;} -.parent.has-child.c-name.flex {margin-bottom: -2px !important;} +.parent.has-child.c-name.flex, .table-child-bottom > .c-name.flex {border-bottom: 0px solid #cbd0db !important;} #tableCustomBtn {padding-bottom: 5px;} +#datatable-executionList .table-child-bottom > .c-name.flex {border-bottom: 1px solid #cbd0db !important;} +#datatable-executionList .table-child-bottom.table-child-top > .c-name.flex {border-bottom: 2px solid #cbd0db !important;} +#datatable-executionList .parent.has-child.c-name.flex {border-bottom: 1px solid #cbd0db !important;} +#datatable-executionList tr:last-child .c-name.flex {margin-top: 1px !important;} diff --git a/module/execution/css/common.css b/module/execution/css/common.css index 9bbba32bc3..4995381113 100644 --- a/module/execution/css/common.css +++ b/module/execution/css/common.css @@ -13,7 +13,7 @@ .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;} -.table td.has-child > a:not(.task-toggle) {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} +.table td.has-child > a:not(.task-toggle) {max-width: 90%; max-width: calc(100% - 30px); display: inline-block; overflow: hidden; white-space: nowrap;} .table td.has-child > .task-toggle {color: #838a9d; position: relative; top: 1px; line-height: 16px;} .table td.has-child > .task-toggle:hover {color: #006af1; cursor: pointer;} .table td.has-child > .task-toggle > .icon {font-size: 16px; display: inline-block; transition: transform .2s; -ms-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -o-transform: rotate(-90deg); -webkit-transform: rotate(-90deg); transform: rotate(-90deg);} diff --git a/module/execution/css/importtask.css b/module/execution/css/importtask.css index 75e75d9b5f..c9a7fb1bf5 100644 --- a/module/execution/css/importtask.css +++ b/module/execution/css/importtask.css @@ -1,3 +1,4 @@ #fromproject_chosen .chosen-single {width: 220px;} -.c-name {width: 200px;} +.c-name {min-width: 200px;} +.c-hour {width: 80px;} #importTaskForm {min-height: 350px;} diff --git a/module/execution/css/kanban.css b/module/execution/css/kanban.css index 7a47cf694f..e167b91aba 100644 --- a/module/execution/css/kanban.css +++ b/module/execution/css/kanban.css @@ -36,7 +36,9 @@ .region .kanban-header-col > .title {max-width: 80% !important;} .region .kanban-header-col > .title {margin: 0} .region .kanban-header-col > .title > span {display: inline-block; overflow: hidden; padding-right:2px; position: initial; max-width: 85px !important;} -.region .kanban-header-col > .title > span.storyColumn {max-width: 100% !important;} +.region .kanban-header-col > .title > .storyColumn {margin-right: 30px;} +.region .kanban-header-col > .title > .storyColumn .text {font-weight: 700; color:rgb(51, 51, 51);} +.region .kanban-header-col > .title > .storyColumn + .dropdown-menu {top: 45px; left: auto;} .region .kanban-header-col > .title > .text-grey {opacity: .5; font-weight: bold; color: #8b91a2;} .region .kanban-header-col > .title > .count {opacity: .5; font-weight: bold; color: #8b91a2;} .region .kanban-header-col > .title > .error {color: #333333; padding-left: 2px; font-size: 10px; padding-top: 1px; padding-right: 2px;} @@ -115,3 +117,7 @@ #rdKanbanSearchInput {width: 150px;} #rdSearchBox {display: none; width: 150px;} .btn-link.querybox-toggle {background-color: rgba(0,0,0,0);} + +#kanban .kanban-affixed .kanban-header-col .title.action-dbc {pointer-events: none;} +#kanban .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .text {color: #fff;} +#kanban .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .caret {display: none;} diff --git a/module/execution/css/story.css b/module/execution/css/story.css index 82615e05ac..5d0c443c1b 100644 --- a/module/execution/css/story.css +++ b/module/execution/css/story.css @@ -19,3 +19,4 @@ th.c-pri{width:50px;} .panel-actions {position: relative; padding: 0;} .switchBtn {background-color: #fff !important;} .switchBtn > i {padding-left: 7px;} +#main>.container {padding: 0 20px 20px 23px;} diff --git a/module/execution/css/task.css b/module/execution/css/task.css index df5a1d9368..42eda4f7e7 100644 --- a/module/execution/css/task.css +++ b/module/execution/css/task.css @@ -1,10 +1,10 @@ td.delayed {background: #e84e0f !important; color: white;} #int-dropdown {margin-left: -8px; border-radius: 4px; border: 1px solid #0c64eb;} #projectTaskForm table tbody tr td {overflow: hidden; text-overflow: ellipsis; white-space: nowrap;} -th.c-deadline {text-align: center;} .table td.c-estimate, .table td.c-consumed, .table td.c-left {padding-right: 12px;} .c-estimate {text-align: right;} .c-consumed {text-align: right;} +.c-deadline {text-align: center;} .c-left {text-align: right;} .table-footer {z-index: 1;} .btn-toolbar > .btn {margin-right: 5px !important;} diff --git a/module/execution/css/taskkanban.css b/module/execution/css/taskkanban.css index 74960863c8..09efcb06c9 100644 --- a/module/execution/css/taskkanban.css +++ b/module/execution/css/taskkanban.css @@ -29,7 +29,8 @@ .kanban-affixed .kanban-header-col > .title > .text, .kanban-affixed .kanban-header-col > .title > .count {color: #fff!important;} .kanban-header-col > .title > .text {max-width: 110px !important;} -.kanban-header-col > .title > .storyColumn.text {max-width: 100% !important;} +.kanban-header-col > .title > .storyColumn .text {font-weight: 700; color:rgb(51, 51, 51);} +.kanban-header-col > .title > .storyColumn + .dropdown-menu {top: 45px; left: auto;} #kanbanContainer {margin: 0;} #kanbanContainer > .panel-body {overflow: auto;} @@ -68,3 +69,7 @@ #teskKanbanSearchInput {width: 150px;} #searchBox {display: none; width: 150px;} .btn-link.querybox-toggle {background-color: rgba(0,0,0,0);} + +#kanbans .kanban-affixed .kanban-header-col .title.action-dbc {pointer-events: none;} +#kanbans .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .text {color: #fff;} +#kanbans .kanban-affixed .kanban-header-col .title.action-dbc .storyColumn .caret {display: none;} diff --git a/module/execution/js/all.js b/module/execution/js/all.js index a58da77738..7d52829c0b 100644 --- a/module/execution/js/all.js +++ b/module/execution/js/all.js @@ -11,7 +11,7 @@ $(function() if(isCNLang && nameWidth < 150 && !useDatatable) $('#executionsForm thead th.c-name').css('width', '150px'); if(!isCNLang && nameWidth < 200 && !useDatatable) $('#executionsForm thead th.c-name').css('width', '200px'); - toggleFold('#executionsForm', unfoldExecutions, projectID, 'execution'); + toggleFold('#executionsForm', unfoldExecutions, 0, 'execution'); $('.table td.has-child > .plan-toggle').each(function() { diff --git a/module/execution/js/bug.js b/module/execution/js/bug.js index ce07804c40..7a73ac2808 100644 --- a/module/execution/js/bug.js +++ b/module/execution/js/bug.js @@ -2,4 +2,27 @@ $(function() { if(browseType != 'bysearch') $('#module' + param).closest('li').addClass('active'); if($('#bugList thead th.c-title').width() < 150) $('#bugList thead th.c-title').width(150); + + $('#bugList').on('change', "[name='bugIDList[]']", checkClosed); }); + +/** + * Closed bugs are not assignable. + * + * @access public + * @return void + */ +function checkClosed() +{ + var disabledAssigned = $('#bugList tr.checked .c-assignedTo a').length > 0 ? true : false; + $('#bugList tr.checked .c-assignedTo a').each(function() + { + if(!$(this).hasClass('disabled')) + { + disabledAssigned = false; + return false; + } + }); + + $('#mulAssigned').prop('disabled', disabledAssigned); +} diff --git a/module/execution/js/cfd.js b/module/execution/js/cfd.js index a6b429fe3d..7317d41ca4 100644 --- a/module/execution/js/cfd.js +++ b/module/execution/js/cfd.js @@ -137,7 +137,7 @@ $(function() location.href = createLink('execution', 'cfd', 'executionID=' + executionID + '&type=' + type + '&withWeekend=' + withWeekend + '&begin=' + begin + '&end=' + end); }); - $("#end, #begin").datetimepicker('setEndDate', today); - $("#end, #begin").datetimepicker('setStartDate', executionBegin); + $("#end, #begin").datetimepicker('setEndDate', maxDate); + $("#end, #begin").datetimepicker('setStartDate', minDate); $('.datetimepicker-days table tfoot').append('' + dateRangeTip + ''); }); diff --git a/module/execution/js/common.js b/module/execution/js/common.js index 9d88292f43..70b25619db 100644 --- a/module/execution/js/common.js +++ b/module/execution/js/common.js @@ -141,9 +141,10 @@ function loadBranches(product) if($inputgroup.find('.chosen-container').size() >= 2) $inputgroup.find('.chosen-container:last').remove(); var projectID = (typeof(systemMode) != 'undefined' && systemMode == 'new') ? $('#project').val() : 0; + if(typeof(projectID) == 'undefined') projectID = 0; var index = $inputgroup.find('select:first').attr('id').replace('products' , ''); - $.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val() + "&oldBranch=¶m=active&projectID=" + projectID + "&withMainBranch="), function(data) + $.get(createLink('branch', 'ajaxGetBranches', "productID=" + $(product).val() + "&oldBranch=¶m=active&projectID=" + projectID + "&withMainBranch=true"), function(data) { if(data) { diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 1f36b660d7..f56f57160a 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -361,6 +361,7 @@ function hideKanbanAction() $('.contextmenu').removeClass('contextmenu-show'); $('.contextmenu .contextmenu-menu').removeClass('open').removeClass('in'); $('#moreTasks, #moreColumns').animate({right: -400}, 500); + $('.storyColumn').parent().removeClass('open'); } /** @@ -760,8 +761,15 @@ function renderCount($count, count, column) { if(groupBy == 'story' && column.type == 'story') { - $count.prev().addClass('storyColumn'); - $count.prev().parent().append(''); + var orderButton = '' + + "" + + '' + + ''; + + $count.parent().next().html(orderButton); + $count.parent().next().addClass('createButton'); $count.remove(); return; } @@ -1122,7 +1130,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car if(data) { data = $.parseJSON(data); - if(data.status == 'draft' || data.status == 'changed') + if(data.status == 'draft' || data.status == 'changing' || data.status == 'reviewing') { bootbox.alert(executionLang.storyDragError); } @@ -1477,6 +1485,8 @@ $(function() if($.cookie('isFullScreen') == 1) $.cookie('isFullScreen', 0); + changeOrder = false; + window.kanbanScaleSize = +$.zui.store.get('executionKanbanScaleSize', 1); $('#kanbanScaleSize').text(window.kanbanScaleSize); $('#kanbanScaleControl .btn[data-type="+"]').attr('disabled', window.kanbanScaleSize >= 4 ? 'disabled' : null); @@ -1590,11 +1600,10 @@ $(function() $('.color0 .cardcolor').css('border', '1px solid #fff'); }); - $(document).on('click', '#kanban span.caret.changeOrderBy', function(event) + document.addEventListener('scroll', function() { - orderBy = orderBy == 'pri_desc' ? 'pri_asc' : 'pri_desc'; - searchCards(rdSearchValue); - }) + hideKanbanAction(); + }, true); /* Init sortable */ var sortType = ''; @@ -1823,12 +1832,16 @@ function toggleRDSearchBox() * Search all cards. * * @param string $value + * @param string order + * * @access public * @return void */ -function searchCards(value) +function searchCards(value, order = '') { rdSearchValue = value; + orderBy = order == '' ? orderBy : order; + if(order != '') changeOrder = true; $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=RD&searchValue=' + rdSearchValue + '&orderBy=' + orderBy), function(data) { lastUpdateData = data; @@ -1848,7 +1861,7 @@ function searchCards(value) if(hideAll && rdSearchValue != '') { - if($('.table-empty-tip').length == 0) $('#kanban').append('

    ' + kanbanLang.empty + '

    '); + if($('.table-empty-tip').length == 0) $('#kanban').append('

    ' + kanbancardLang.empty + '

    '); } else { diff --git a/module/execution/js/story.js b/module/execution/js/story.js index a6dcb47577..0c84c72723 100644 --- a/module/execution/js/story.js +++ b/module/execution/js/story.js @@ -32,7 +32,7 @@ $(function() }) /* Get checked stories. */ - $('#batchToTaskButton').on('click', function() + $(document).on('click', '#batchToTaskButton', function() { storyIdList = ''; linedTaskIdList = ''; @@ -49,10 +49,34 @@ $(function() } storyIdList += $(this).val() + ','; }); + + $('#type').val('').trigger("chosen:updated"); + $('#hourPointValue').val(''); + $('input[name^=fields]').prop('checked', true); }); $('#submit').click(function() { + var taskType = $('#type').val(); + var hourPoint = $('#hourPointValue').val(); + if(taskType.length == 0) + { + alert(typeNotEmpty); + return false; + } + + if(hourPoint == 0) + { + alert(hourPointNotEmpty); + return false; + } + else if(typeof(hourPoint) != 'undefined' && (isNaN(hourPoint) || hourPoint < 0)) + { + alert(hourPointNotError); + return false; + } + hourPoint = typeof(hourPoint) == 'undefined' ? 0 : hourPoint; + if(linedTaskIdList) { confirmStoryToTask = confirmStoryToTask.replace('%s', linedTaskIdList); diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js index 8614e2e64f..dd817a899a 100644 --- a/module/execution/js/taskkanban.js +++ b/module/execution/js/taskkanban.js @@ -341,9 +341,16 @@ function renderColumnCount($count, count, col) { if(groupBy == 'story' && col.type == 'story') { - $count.prev().addClass('storyColumn'); - $count.prev().parent().append(''); - $count.remove(); + var orderButton = '' + + "" + + '' + + ''; + + $count.parent().next().html(orderButton); + $count.parent().next().addClass('createButton'); + $count.hide(); return; } @@ -803,7 +810,7 @@ function changeCardColType(cardID, fromColID, toColID, fromLaneID, toLaneID, car if(data) { data = $.parseJSON(data); - if(data.status == 'draft' || data.status == 'changed') + if(data.status == 'draft' || data.status == 'changing' || data.status == 'reviewing') { bootbox.alert(executionLang.storyDragError); } @@ -1220,6 +1227,7 @@ $(function() $('#kanbanScaleControl .btn[data-type="+"]').attr('disabled', window.kanbanScaleSize >= 4 ? 'disabled' : null); $('#kanbanScaleControl .btn[data-type="-"]').attr('disabled', window.kanbanScaleSize <= 1 ? 'disabled' : null); + changeOrder = false; /* Common options */  var commonOptions = { @@ -1274,12 +1282,6 @@ $(function() event.preventDefault(); }); - $(document).on('click', '#kanbans span.caret.changeOrderBy', function(event) - { - orderBy = orderBy == 'pri_desc' ? 'pri_asc' : 'pri_desc'; - searchCards(searchValue); - }) - /* Init contextmenu */ $('#kanbans').on('click', '[data-contextmenu]', function(event) { @@ -1332,6 +1334,11 @@ $(function() } }); + document.addEventListener('scroll', function() + { + $('.storyColumn').parent().removeClass('open'); + }, true); + $('#type_chosen .chosen-single span').prepend(''); $('#group_chosen .chosen-single span').prepend(kanbanLang.laneGroup + ': '); @@ -1339,7 +1346,7 @@ $(function() lastUpdateData = ''; setInterval(function() { - $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=" + entertime + "&browseType=" + browseType + "&groupBy=" + groupBy + '&from=execution&searchValue=' + searchValue + '&orderBy' + orderBy), function(data) + $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=" + entertime + "&browseType=" + browseType + "&groupBy=" + groupBy + '&from=execution&searchValue=' + searchValue + '&orderBy=' + orderBy), function(data) { if(lastUpdateData == '') lastUpdateData = data; if(data && lastUpdateData !== data) @@ -1469,12 +1476,16 @@ function toggleSearchBox() * Search kanban cards. * * @param string value + * @param string order + * * @access public * @return void */ -function searchCards(value) +function searchCards(value, order = '') { searchValue = value; + orderBy = order == '' ? orderBy : order; + if(order != '') changeOrder = true; $.get(createLink('execution', 'ajaxUpdateKanban', "executionID=" + executionID + "&entertime=0&browseType=" + browseType + "&groupBy=" + groupBy + '&from=execution&searchValue=' + value + '&orderBy=' + orderBy), function(data) { lastUpdateData = data; diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index 627fb63b7f..d7c4b8a112 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -137,6 +137,7 @@ $lang->execution->batchCreateTask = 'Batch create task'; $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon}"; $lang->execution->myTask = "My Task"; $lang->execution->list = "{$lang->executionCommon} List"; +$lang->execution->allProject = 'All'; /* Fields of zt_team. */ $lang->execution->root = 'Root'; @@ -153,6 +154,7 @@ $lang->execution->putoff = 'Zurückstellen'; $lang->execution->suspend = 'Aussetzen'; $lang->execution->close = 'Schließen'; $lang->execution->export = 'Export'; +$lang->execution->next = "Next"; $lang->execution->endList[7] = '1 Woche'; $lang->execution->endList[14] = '2 Wochen'; @@ -172,6 +174,7 @@ $lang->execution->cfdTypeList['bug'] = "View By bug"; $lang->team->account = 'Konto'; $lang->team->role = 'Rolle'; +$lang->team->roleAB = 'Meine Rolle'; $lang->team->join = 'Beigetreten'; $lang->team->hours = 'Stunde/Tag'; $lang->team->days = 'Arbeitstage'; @@ -408,10 +411,11 @@ $lang->execution->unresolvedBug = "[%s] unresolved bugs. "; $lang->execution->projectNotEmpty = 'Project cannot be empty.'; $lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; $lang->execution->ge = "『%s』should be >= actual begin『%s』."; -$lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review"; +$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; $lang->execution->countTip = ' (%s member)'; $lang->execution->pleaseInput = "Enter"; $lang->execution->week = 'week'; +$lang->execution->checkedExecutions = 'Seleted %s items'; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -512,6 +516,11 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = 'All'; +$lang->execution->featureBar['bug']['unresolved'] = 'Active'; + +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = 'Ich bin beteiligt.'; $lang->execution->doingProject = 'Laufende Projekte'; @@ -527,10 +536,19 @@ $lang->execution->treeLevel['task'] = 'Aufgabe anzeigen'; $lang->execution->treeLevel['story'] = 'Story anzeigen'; $lang->execution->action = new stdclass(); -$lang->execution->action->opened = '$date, created by $actor. $extra' . "\n"; -$lang->execution->action->managed = '$date, managed by $actor. $extra' . "\n"; -$lang->execution->action->edited = '$date, edited by $actor. $extra' . "\n"; -$lang->execution->action->extra = 'Linked products is %s.'; +$lang->execution->action->opened = '$date, created by $actor. $extra' . "\n"; +$lang->execution->action->managed = '$date, managed by $actor. $extra' . "\n"; +$lang->execution->action->edited = '$date, edited by $actor. $extra' . "\n"; +$lang->execution->action->extra = 'Linked products is %s.'; +$lang->execution->action->startbychildactivate = '$date, activating the sub stage sets the execution status as Ongoing.' . "\n"; +$lang->execution->action->waitbychilddelete = '$date, deleting the sub stage sets the execution status as waitting.' . "\n"; +$lang->execution->action->closebychilddelete = '$date, deleting the sub stage sets the execution status as closing.' . "\n"; +$lang->execution->action->closebychildclose = '$date, closing the sub stage sets the execution status as closing.' . "\n"; + +$lang->execution->startbychildactivate = 'activated'; +$lang->execution->waitbychilddelete = 'stop'; +$lang->execution->closebychilddelete = 'closed'; +$lang->execution->closebychildclose = 'closed'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; @@ -539,11 +557,37 @@ $lang->execution->statusColorList['suspended'] = '#fdc137'; $lang->execution->statusColorList['closed'] = '#838A9D'; if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass(); -$lang->execution->gantt->color[0] = 'bbb'; -$lang->execution->gantt->color[1] = 'ff5d5d'; -$lang->execution->gantt->color[2] = 'ff9800'; -$lang->execution->gantt->color[3] = '16a8f8'; -$lang->execution->gantt->color[4] = '00da88'; +$lang->execution->gantt->progressColor[0] = '#B7B7B7'; +$lang->execution->gantt->progressColor[1] = '#FF8287'; +$lang->execution->gantt->progressColor[2] = '#FFC73A'; +$lang->execution->gantt->progressColor[3] = '#6BD5F5'; +$lang->execution->gantt->progressColor[4] = '#9DE88A'; +$lang->execution->gantt->progressColor[5] = '#9BA8FF'; + +$lang->execution->gantt->color[0] = '#E7E7E7'; +$lang->execution->gantt->color[1] = '#FFDADB'; +$lang->execution->gantt->color[2] = '#FCECC1'; +$lang->execution->gantt->color[3] = '#D3F3FD'; +$lang->execution->gantt->color[4] = '#DFF5D9'; +$lang->execution->gantt->color[5] = '#EBDCF9'; + +$lang->execution->gantt->textColor[0] = '#2D2D2D'; +$lang->execution->gantt->textColor[1] = '#8D0308'; +$lang->execution->gantt->textColor[2] = '#9D4200'; +$lang->execution->gantt->textColor[3] = '#006D8E'; +$lang->execution->gantt->textColor[4] = '#1A8100'; +$lang->execution->gantt->textColor[5] = '#660ABC'; + +$lang->execution->gantt->stage = new stdclass(); +$lang->execution->gantt->stage->progressColor = '#70B8FE'; +$lang->execution->gantt->stage->color = '#D2E7FC'; +$lang->execution->gantt->stage->textColor = '#0050A7'; + +$lang->execution->gantt->defaultColor = '#EBDCF9'; +$lang->execution->gantt->defaultProgressColor = '#9BA8FF'; +$lang->execution->gantt->defaultTextColor = '#660ABC'; + +$lang->execution->gantt->bar_height = '24'; $lang->execution->gantt->exportImg = 'Export as Image'; $lang->execution->gantt->exportPDF = 'Export as PDF'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index b230ea3f39..f9adc1fed0 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -137,11 +137,12 @@ $lang->execution->batchCreateTask = 'Batch create task'; $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon}"; $lang->execution->myTask = "My Task"; $lang->execution->list = 'List'; +$lang->execution->allProject = 'All'; /* Fields of zt_team. */ $lang->execution->root = 'Root'; -$lang->execution->estimate = 'estimate'; -$lang->execution->consumed = 'consumed'; +$lang->execution->estimate = 'Estimate'; +$lang->execution->consumed = 'Consumed'; $lang->execution->left = 'Left'; if($this->config->systemMode == 'new') $lang->execution->copyTeamTip = "copy Project/{$lang->execution->common} team members"; @@ -153,6 +154,7 @@ $lang->execution->putoff = 'Delay'; $lang->execution->suspend = 'Suspend'; $lang->execution->close = 'Close'; $lang->execution->export = 'Export'; +$lang->execution->next = "Next"; $lang->execution->endList[7] = '1 Week'; $lang->execution->endList[14] = '2 Weeks'; @@ -172,6 +174,7 @@ $lang->execution->cfdTypeList['bug'] = "View By bug"; $lang->team->account = 'User'; $lang->team->role = 'Role'; +$lang->team->roleAB = 'My Role'; $lang->team->join = 'Joined'; $lang->team->hours = 'Hours/day'; $lang->team->days = 'Day'; @@ -408,10 +411,11 @@ $lang->execution->unresolvedBug = "[%s] unresolved bugs. "; $lang->execution->projectNotEmpty = 'Project cannot be empty.'; $lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; $lang->execution->ge = "『%s』should be >= actual begin『%s』."; -$lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review"; +$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; $lang->execution->countTip = ' (%s member)'; $lang->execution->pleaseInput = "Enter"; $lang->execution->week = 'week'; +$lang->execution->checkedExecutions = 'Seleted %s items'; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -512,6 +516,11 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = 'All'; +$lang->execution->featureBar['bug']['unresolved'] = 'Active'; + +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = 'Mine'; $lang->execution->doingProject = 'Ongoing Projects'; @@ -527,10 +536,19 @@ $lang->execution->treeLevel['task'] = 'Stories&Tasks'; $lang->execution->treeLevel['story'] = 'Only Stories'; $lang->execution->action = new stdclass(); -$lang->execution->action->opened = '$date, created by $actor. $extra' . "\n"; -$lang->execution->action->managed = '$date, managed by $actor. $extra' . "\n"; -$lang->execution->action->edited = '$date, edited by $actor. $extra' . "\n"; -$lang->execution->action->extra = 'Linked products is %s.'; +$lang->execution->action->opened = '$date, created by $actor. $extra' . "\n"; +$lang->execution->action->managed = '$date, managed by $actor. $extra' . "\n"; +$lang->execution->action->edited = '$date, edited by $actor. $extra' . "\n"; +$lang->execution->action->extra = 'Linked products is %s.'; +$lang->execution->action->startbychildactivate = '$date, activating the sub stage sets the execution status as Ongoing.' . "\n"; +$lang->execution->action->waitbychilddelete = '$date, deleting the sub stage sets the execution status as waitting.' . "\n"; +$lang->execution->action->closebychilddelete = '$date, deleting the sub stage sets the execution status as closing.' . "\n"; +$lang->execution->action->closebychildclose = '$date, closing the sub stage sets the execution status as closing.' . "\n"; + +$lang->execution->startbychildactivate = 'activated'; +$lang->execution->waitbychilddelete = 'stop'; +$lang->execution->closebychilddelete = 'closed'; +$lang->execution->closebychildclose = 'closed'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; @@ -539,11 +557,37 @@ $lang->execution->statusColorList['suspended'] = '#fdc137'; $lang->execution->statusColorList['closed'] = '#838A9D'; if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass(); -$lang->execution->gantt->color[0] = 'bbb'; -$lang->execution->gantt->color[1] = 'ff5d5d'; -$lang->execution->gantt->color[2] = 'ff9800'; -$lang->execution->gantt->color[3] = '16a8f8'; -$lang->execution->gantt->color[4] = '00da88'; +$lang->execution->gantt->progressColor[0] = '#B7B7B7'; +$lang->execution->gantt->progressColor[1] = '#FF8287'; +$lang->execution->gantt->progressColor[2] = '#FFC73A'; +$lang->execution->gantt->progressColor[3] = '#6BD5F5'; +$lang->execution->gantt->progressColor[4] = '#9DE88A'; +$lang->execution->gantt->progressColor[5] = '#9BA8FF'; + +$lang->execution->gantt->color[0] = '#E7E7E7'; +$lang->execution->gantt->color[1] = '#FFDADB'; +$lang->execution->gantt->color[2] = '#FCECC1'; +$lang->execution->gantt->color[3] = '#D3F3FD'; +$lang->execution->gantt->color[4] = '#DFF5D9'; +$lang->execution->gantt->color[5] = '#EBDCF9'; + +$lang->execution->gantt->textColor[0] = '#2D2D2D'; +$lang->execution->gantt->textColor[1] = '#8D0308'; +$lang->execution->gantt->textColor[2] = '#9D4200'; +$lang->execution->gantt->textColor[3] = '#006D8E'; +$lang->execution->gantt->textColor[4] = '#1A8100'; +$lang->execution->gantt->textColor[5] = '#660ABC'; + +$lang->execution->gantt->stage = new stdclass(); +$lang->execution->gantt->stage->progressColor = '#70B8FE'; +$lang->execution->gantt->stage->color = '#D2E7FC'; +$lang->execution->gantt->stage->textColor = '#0050A7'; + +$lang->execution->gantt->defaultColor = '#EBDCF9'; +$lang->execution->gantt->defaultProgressColor = '#9BA8FF'; +$lang->execution->gantt->defaultTextColor = '#660ABC'; + +$lang->execution->gantt->bar_height = '24'; $lang->execution->gantt->exportImg = 'Export as Image'; $lang->execution->gantt->exportPDF = 'Export as PDF'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index bb12d7782a..bae0166bcd 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -137,6 +137,7 @@ $lang->execution->batchCreateTask = 'Batch create task'; $lang->execution->kanbanNoLinkProduct = "Kanban not linked {$lang->productCommon}"; $lang->execution->myTask = "My Task"; $lang->execution->list = "{$lang->executionCommon} List"; +$lang->execution->allProject = 'Tous'; /* Fields of zt_team. */ $lang->execution->root = 'Root'; @@ -153,6 +154,7 @@ $lang->execution->putoff = 'Ajourner'; $lang->execution->suspend = 'Suspendre'; $lang->execution->close = 'Fermer'; $lang->execution->export = 'Exporter'; +$lang->execution->next = "Suivant"; $lang->execution->endList[7] = '1 Semaine'; $lang->execution->endList[14] = '2 Semaines'; @@ -172,6 +174,7 @@ $lang->execution->cfdTypeList['bug'] = "View By bug"; $lang->team->account = 'Utilisateur'; $lang->team->role = 'Rôle'; +$lang->team->roleAB = 'Mon Rôle'; $lang->team->join = 'Ajouté'; $lang->team->hours = 'Heure/jour'; $lang->team->days = 'Jour'; @@ -408,10 +411,11 @@ $lang->execution->unresolvedBug = "[%s] unresolved bugs. "; $lang->execution->projectNotEmpty = 'Project cannot be empty.'; $lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; $lang->execution->ge = "『%s』should be >= actual begin『%s』."; -$lang->execution->storyDragError = "The {$lang->SRCommon} is still a draft or has been changed, please drag it after the review"; +$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; $lang->execution->countTip = ' (%s member)'; $lang->execution->pleaseInput = "Enter"; $lang->execution->week = 'week'; +$lang->execution->checkedExecutions = "Pour s électionner l'élément%s"; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -512,6 +516,11 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = 'All'; +$lang->execution->featureBar['bug']['unresolved'] = 'Active'; + +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = "J'étais impliqué"; $lang->execution->doingProject = 'Projets en cours'; @@ -527,10 +536,19 @@ $lang->execution->treeLevel['task'] = 'Stories&Tâches'; $lang->execution->treeLevel['story'] = 'Seulement Stories'; $lang->execution->action = new stdclass(); -$lang->execution->action->opened = '$date, created by $actor. $extra' . "\n"; -$lang->execution->action->managed = '$date, managed by $actor. $extra' . "\n"; -$lang->execution->action->edited = '$date, edited by $actor. $extra' . "\n"; -$lang->execution->action->extra = 'Linked products is %s.'; +$lang->execution->action->opened = '$date, created by $actor. $extra' . "\n"; +$lang->execution->action->managed = '$date, managed by $actor. $extra' . "\n"; +$lang->execution->action->edited = '$date, edited by $actor. $extra' . "\n"; +$lang->execution->action->extra = 'Linked products is %s.'; +$lang->execution->action->startbychildactivate = '$date, activating the sub stage sets the execution status as Ongoing.' . "\n"; +$lang->execution->action->waitbychilddelete = '$date, deleting the sub stage sets the execution status as waitting.' . "\n"; +$lang->execution->action->closebychilddelete = '$date, deleting the sub stage sets the execution status as closing.' . "\n"; +$lang->execution->action->closebychildclose = '$date, closing the sub stage sets the execution status as closing.' . "\n"; + +$lang->execution->startbychildactivate = 'activated'; +$lang->execution->waitbychilddelete = 'stop'; +$lang->execution->closebychilddelete = 'closed'; +$lang->execution->closebychildclose = 'closed'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; @@ -539,11 +557,37 @@ $lang->execution->statusColorList['suspended'] = '#fdc137'; $lang->execution->statusColorList['closed'] = '#838A9D'; if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass(); -$lang->execution->gantt->color[0] = 'bbb'; -$lang->execution->gantt->color[1] = 'ff5d5d'; -$lang->execution->gantt->color[2] = 'ff9800'; -$lang->execution->gantt->color[3] = '16a8f8'; -$lang->execution->gantt->color[4] = '00da88'; +$lang->execution->gantt->progressColor[0] = '#B7B7B7'; +$lang->execution->gantt->progressColor[1] = '#FF8287'; +$lang->execution->gantt->progressColor[2] = '#FFC73A'; +$lang->execution->gantt->progressColor[3] = '#6BD5F5'; +$lang->execution->gantt->progressColor[4] = '#9DE88A'; +$lang->execution->gantt->progressColor[5] = '#9BA8FF'; + +$lang->execution->gantt->color[0] = '#E7E7E7'; +$lang->execution->gantt->color[1] = '#FFDADB'; +$lang->execution->gantt->color[2] = '#FCECC1'; +$lang->execution->gantt->color[3] = '#D3F3FD'; +$lang->execution->gantt->color[4] = '#DFF5D9'; +$lang->execution->gantt->color[5] = '#EBDCF9'; + +$lang->execution->gantt->textColor[0] = '#2D2D2D'; +$lang->execution->gantt->textColor[1] = '#8D0308'; +$lang->execution->gantt->textColor[2] = '#9D4200'; +$lang->execution->gantt->textColor[3] = '#006D8E'; +$lang->execution->gantt->textColor[4] = '#1A8100'; +$lang->execution->gantt->textColor[5] = '#660ABC'; + +$lang->execution->gantt->stage = new stdclass(); +$lang->execution->gantt->stage->progressColor = '#70B8FE'; +$lang->execution->gantt->stage->color = '#D2E7FC'; +$lang->execution->gantt->stage->textColor = '#0050A7'; + +$lang->execution->gantt->defaultColor = '#EBDCF9'; +$lang->execution->gantt->defaultProgressColor = '#9BA8FF'; +$lang->execution->gantt->defaultTextColor = '#660ABC'; + +$lang->execution->gantt->bar_height = '24'; $lang->execution->gantt->exportImg = 'Export as Image'; $lang->execution->gantt->exportPDF = 'Export as PDF'; diff --git a/module/execution/lang/vi.php b/module/execution/lang/vi.php index c1f02f6280..53bc0a0d74 100644 --- a/module/execution/lang/vi.php +++ b/module/execution/lang/vi.php @@ -127,6 +127,7 @@ $lang->execution->lifeTimeList['ops'] = "DevOps"; $lang->team = new stdclass(); $lang->team->account = 'Người dùng'; $lang->team->role = 'Vai trò'; +$lang->team->roleAB = 'Vai trò của tôi'; $lang->team->join = 'Đã tham gia'; $lang->team->hours = 'Giờ/ngày'; $lang->team->days = 'Ngày'; @@ -418,6 +419,11 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = 'All'; +$lang->execution->featureBar['bug']['unresolved'] = 'Active'; + +$lang->execution->featureBar['build']['all'] = 'Build List'; + $lang->execution->myExecutions = 'Tôi tham gia'; $lang->execution->doingProject = 'Hiện trường'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 12477116d0..9b308c85be 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -137,6 +137,7 @@ $lang->execution->batchCreateTask = '批量建任务'; $lang->execution->kanbanNoLinkProduct = "看板没有关联{$lang->productCommon}"; $lang->execution->myTask = "我的任务"; $lang->execution->list = '列表'; +$lang->execution->allProject = '全部项目'; /* Fields of zt_team. */ $lang->execution->root = '源ID'; @@ -153,6 +154,7 @@ $lang->execution->putoff = "延期"; $lang->execution->suspend = "挂起"; $lang->execution->close = "关闭"; $lang->execution->export = "导出"; +$lang->execution->next = "下一步"; $lang->execution->endList[7] = '一星期'; $lang->execution->endList[14] = '两星期'; @@ -172,6 +174,7 @@ $lang->execution->cfdTypeList['bug'] = "按Bug查看"; $lang->team->account = '用户'; $lang->team->role = '角色'; +$lang->team->roleAB = '我的角色'; $lang->team->join = '加盟日'; $lang->team->hours = '可用工时/天'; $lang->team->days = '可用工日'; @@ -408,10 +411,11 @@ $lang->execution->unresolvedBug = "[%s]个未解决的bug,"; $lang->execution->projectNotEmpty = '所属项目不能为空。'; $lang->execution->confirmStoryToTask = '%s' . $lang->SRCommon . '已经在当前' . $lang->execution->common . '中转了任务,请确认是否重复转任务。'; $lang->execution->ge = "『%s』应当不小于实际开始时间『%s』。"; -$lang->execution->storyDragError = "该{$lang->SRCommon}还是草稿或已变更状态,请评审通过后再拖动"; +$lang->execution->storyDragError = "该{$lang->SRCommon}不是激活状态,请激活后再拖动"; $lang->execution->countTip = '(%s人)'; $lang->execution->pleaseInput = "请输入"; $lang->execution->week = '周'; +$lang->execution->checkedExecutions = '已选择%s项'; /* 统计。*/ $lang->execution->charts = new stdclass(); @@ -512,6 +516,11 @@ $lang->execution->featureBar['all']['doing'] = $lang->execution->statusList[ $lang->execution->featureBar['all']['suspended'] = $lang->execution->statusList['suspended']; $lang->execution->featureBar['all']['closed'] = $lang->execution->statusList['closed']; +$lang->execution->featureBar['bug']['all'] = '所有'; +$lang->execution->featureBar['bug']['unresolved'] = '未解决'; + +$lang->execution->featureBar['build']['all'] = '所有版本'; + $lang->execution->myExecutions = '我参与的'; $lang->execution->doingProject = '进行中的项目'; @@ -527,10 +536,19 @@ $lang->execution->treeLevel['task'] = '全部显示'; $lang->execution->treeLevel['story'] = "只看{$lang->SRCommon}"; $lang->execution->action = new stdclass(); -$lang->execution->action->opened = '$date, 由 $actor 创建。$extra' . "\n"; -$lang->execution->action->managed = '$date, 由 $actor 维护。$extra' . "\n"; -$lang->execution->action->edited = '$date, 由 $actor 编辑。$extra' . "\n"; -$lang->execution->action->extra = '相关产品为 %s。'; +$lang->execution->action->opened = '$date, 由 $actor 创建。$extra' . "\n"; +$lang->execution->action->managed = '$date, 由 $actor 维护。$extra' . "\n"; +$lang->execution->action->edited = '$date, 由 $actor 编辑。$extra' . "\n"; +$lang->execution->action->extra = '相关产品为 %s。'; +$lang->execution->action->startbychildactivate = '$date, 系统判断由于子阶段激活,将' . $lang->executionCommon . '状态置为进行中。' . "\n"; +$lang->execution->action->waitbychilddelete = '$date, 系统判断由于子阶段删除,将' . $lang->executionCommon . '状态置为未开始。' . "\n"; +$lang->execution->action->closebychilddelete = '$date, 系统判断由于子阶段删除,将' . $lang->executionCommon . '状态置为已关闭。' . "\n"; +$lang->execution->action->closebychildclose = '$date, 系统判断由于子阶段关闭,将' . $lang->executionCommon . '状态置为已关闭。' . "\n"; + +$lang->execution->startbychildactivate = '激活了'; +$lang->execution->waitbychilddelete = '停止了'; +$lang->execution->closebychilddelete = '关闭了'; +$lang->execution->closebychildclose = '关闭了'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; @@ -539,11 +557,37 @@ $lang->execution->statusColorList['suspended'] = '#fdc137'; $lang->execution->statusColorList['closed'] = '#838A9D'; if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass(); -$lang->execution->gantt->color[0] = 'bbb'; -$lang->execution->gantt->color[1] = 'ff5d5d'; -$lang->execution->gantt->color[2] = 'ff9800'; -$lang->execution->gantt->color[3] = '16a8f8'; -$lang->execution->gantt->color[4] = '00da88'; +$lang->execution->gantt->progressColor[0] = '#B7B7B7'; +$lang->execution->gantt->progressColor[1] = '#FF8287'; +$lang->execution->gantt->progressColor[2] = '#FFC73A'; +$lang->execution->gantt->progressColor[3] = '#6BD5F5'; +$lang->execution->gantt->progressColor[4] = '#9DE88A'; +$lang->execution->gantt->progressColor[5] = '#9BA8FF'; + +$lang->execution->gantt->color[0] = '#E7E7E7'; +$lang->execution->gantt->color[1] = '#FFDADB'; +$lang->execution->gantt->color[2] = '#FCECC1'; +$lang->execution->gantt->color[3] = '#D3F3FD'; +$lang->execution->gantt->color[4] = '#DFF5D9'; +$lang->execution->gantt->color[5] = '#EBDCF9'; + +$lang->execution->gantt->textColor[0] = '#2D2D2D'; +$lang->execution->gantt->textColor[1] = '#8D0308'; +$lang->execution->gantt->textColor[2] = '#9D4200'; +$lang->execution->gantt->textColor[3] = '#006D8E'; +$lang->execution->gantt->textColor[4] = '#1A8100'; +$lang->execution->gantt->textColor[5] = '#660ABC'; + +$lang->execution->gantt->stage = new stdclass(); +$lang->execution->gantt->stage->progressColor = '#70B8FE'; +$lang->execution->gantt->stage->color = '#D2E7FC'; +$lang->execution->gantt->stage->textColor = '#0050A7'; + +$lang->execution->gantt->defaultColor = '#EBDCF9'; +$lang->execution->gantt->defaultProgressColor = '#9BA8FF'; +$lang->execution->gantt->defaultTextColor = '#660ABC'; + +$lang->execution->gantt->bar_height = '24'; $lang->execution->gantt->exportImg = '导出图片'; $lang->execution->gantt->exportPDF = '导出 PDF'; diff --git a/module/execution/model.php b/module/execution/model.php index 1ed5863619..591f8318fe 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -100,7 +100,7 @@ class executionModel extends model include $this->app->getModulePath('', 'execution') . 'lang/' . $this->app->getClientLang() . '.php'; } - if($execution->acl != 'private') unset($this->lang->execution->menu->settings['subMenu']->whitelist); + if(isset($execution->acl) and $execution->acl != 'private') unset($this->lang->execution->menu->settings['subMenu']->whitelist); if($execution and $execution->lifetime == 'ops') { @@ -396,7 +396,7 @@ class executionModel extends model $this->dao->insert(TABLE_EXECUTION)->data($sprint) ->autoCheck($skipFields = 'begin,end') ->batchcheck($this->config->execution->create->requiredFields, 'notempty') - ->checkIF((!empty($sprint->name) and $this->config->systemMode == 'new'), 'name', 'unique', "`type` in ('sprint','stage', 'kanban') and `project` = $sprintProject and `deleted` = '0'") + ->checkIF(!empty($sprint->name), 'name', 'unique', "`type` in ('sprint','stage', 'kanban') and `project` = $sprintProject and `deleted` = '0'") ->checkIF(!empty($sprint->code), 'code', 'unique', "`type` in ('sprint','stage', 'kanban') and `deleted` = '0'") ->checkIF($sprint->begin != '', 'begin', 'date') ->checkIF($sprint->end != '', 'end', 'date') @@ -420,6 +420,8 @@ class executionModel extends model /* Update the path. */ if($this->config->systemMode == 'new') $this->setTreePath($executionID); + $this->updateProducts($executionID); + /* Set team of execution. */ $members = isset($_POST['teamMembers']) ? $_POST['teamMembers'] : array(); array_push($members, $sprint->PO, $sprint->QD, $sprint->PM, $sprint->RD, $sprint->openedBy); @@ -499,8 +501,8 @@ class executionModel extends model ->setIF(helper::isZeroDate($this->post->begin), 'begin', '') ->setIF(helper::isZeroDate($this->post->end), 'end', '') ->setIF(!isset($_POST['whitelist']), 'whitelist', '') - ->setIF($this->post->status == 'closed', 'closedDate', helper::now()) - ->setIF($this->post->status == 'suspended', 'suspendedDate', helper::today()) + ->setIF($this->post->status == 'closed' and $oldExecution->status != 'closed', 'closedDate', helper::now()) + ->setIF($this->post->status == 'suspended' and $oldExecution->status != 'suspended', 'suspendedDate', helper::today()) ->setIF($oldExecution->type == 'stage', 'project', $oldExecution->project) ->setDefault('team', $this->post->name) ->join('whitelist', ',') @@ -549,7 +551,7 @@ class executionModel extends model ->checkIF($execution->begin != '', 'begin', 'date') ->checkIF($execution->end != '', 'end', 'date') ->checkIF($execution->end != '', 'end', 'ge', $execution->begin) - ->checkIF((!empty($execution->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `project` = $executionProject and `deleted` = '0'") + ->checkIF(!empty($execution->name), 'name', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `project` = $executionProject and `deleted` = '0'") ->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage', 'kanban') and `deleted` = '0'") ->checkFlow() ->where('id')->eq($executionID) @@ -670,6 +672,7 @@ class executionModel extends model } } + $this->lang->error->unique = $this->lang->error->repeat; $extendFields = $this->getFlowExtendFields(); foreach($data->executionIDList as $executionID) { @@ -697,8 +700,8 @@ class executionModel extends model if(isset($data->codes)) $executions[$executionID]->code = $executionCode; if(isset($data->projects)) $executions[$executionID]->project = zget($data->projects, $executionID, 0); if(isset($data->attributes)) $executions[$executionID]->attribute = zget($data->attributes, $executionID, ''); - if($executions[$executionID]->status == 'closed') $executions[$executionID]->closedDate = helper::now(); - if($executions[$executionID]->status == 'suspended') $executions[$executionID]->suspendedDate = helper::today(); + if($executions[$executionID]->status == 'closed' and $oldExecutions[$executionID]->status != 'closed') $executions[$executionID]->closedDate = helper::now(); + if($executions[$executionID]->status == 'suspended' and $oldExecutions[$executionID]->status != 'suspended') $executions[$executionID]->suspendedDate = helper::today(); /* Check unique code for edited executions. */ if($projectModel == 'scrum' and isset($executionCode) and empty($executionCode)) @@ -782,14 +785,26 @@ class executionModel extends model return false; } + /* Replace required language. */ + if($this->app->tab == 'project') + { + $this->lang->project->name = $this->lang->execution->name; + $this->lang->project->code = $this->lang->execution->code; + } + else + { + $this->lang->project->name = $this->lang->execution->execName; + $this->lang->project->code = $this->lang->execution->execCode; + } + $this->dao->update(TABLE_EXECUTION)->data($execution) ->autoCheck($skipFields = 'begin,end') ->batchcheck($this->config->execution->edit->requiredFields, 'notempty') ->checkIF($execution->begin != '', 'begin', 'date') ->checkIF($execution->end != '', 'end', 'date') ->checkIF($execution->end != '', 'end', 'ge', $execution->begin) - ->checkIF((!empty($execution->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $executionID and type in ('sprint','stage') and `project` = $projectID") - ->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage')") + ->checkIF((!empty($execution->name) and $this->config->systemMode == 'new'), 'name', 'unique', "id != $executionID and type in ('sprint','stage','kanban') and `project` = $projectID and `deleted` = '0'") + ->checkIF(!empty($execution->code), 'code', 'unique', "id != $executionID and type in ('sprint','stage','kanban') and `deleted` = '0'") ->checkFlow() ->where('id')->eq($executionID) ->limit(1) @@ -948,6 +963,8 @@ class executionModel extends model ->setDefault('status', 'doing') ->setDefault('lastEditedBy', $this->app->user->account) ->setDefault('lastEditedDate', $now) + ->setDefault('closedBy', '') + ->setDefault('closedDate', '') ->stripTags($this->config->execution->editor->activate['id'], $this->config->allowedTags) ->remove('comment,readjustTime,readjustTask') ->get(); @@ -1000,17 +1017,26 @@ class executionModel extends model } } + $changes = common::createChanges($oldExecution, $execution); + if($this->post->comment != '' or !empty($changes)) + { + $this->loadModel('action'); + $actionID = $this->action->create('execution', $executionID, 'Activated', $this->post->comment); + $this->action->logHistory($actionID, $changes); + } + /* Update the status of the parent stage. */ if($oldExecution->type == 'stage') { $parent = $this->getByID($oldExecution->parent); - if($parent->type == 'stage' and $parent->status == 'closed') + if($parent->type == 'stage' and in_array($parent->status, array('closed', 'wait'))) { $this->dao->update(TABLE_EXECUTION)->set('status')->eq('doing')->where('id')->eq($parent->id)->exec(); + $this->loadModel('action')->create('execution', $parent->id, 'startbychildactivate'); } } - if(!dao::isError()) return common::createChanges($oldExecution, $execution); + return $changes; } /** @@ -1053,6 +1079,15 @@ class executionModel extends model if(!dao::isError()) { + + $changes = common::createChanges($oldExecution, $execution); + if($this->post->comment != '' or !empty($changes)) + { + $this->loadModel('action'); + $actionID = $this->action->create('execution', $executionID, 'Closed', $this->post->comment); + $this->action->logHistory($actionID, $changes); + } + /* Update the status of the parent stage. */ if($oldExecution->type == 'stage') { @@ -1066,12 +1101,16 @@ class executionModel extends model if($childExecution->status != 'closed') $isClosed = false; } - if($isClosed) $this->dao->update(TABLE_EXECUTION)->set('status')->eq('closed')->where('id')->eq($parent->id)->exec(); + if($isClosed) + { + $this->dao->update(TABLE_EXECUTION)->set('status')->eq('closed')->where('id')->eq($parent->id)->exec(); + $this->loadModel('action')->create('execution', $parent->id, 'closebychildclose'); + } } } $this->loadModel('score')->create('execution', 'close', $oldExecution); - return common::createChanges($oldExecution, $execution); + return $changes; } } @@ -1276,12 +1315,16 @@ class executionModel extends model * Get execution by idList. * * @param array $executionIdList + * @param string $mode all * @access public * @return array */ - public function getByIdList($executionIdList = array()) + public function getByIdList($executionIdList = array(), $mode = '') { - return $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->in($executionIdList)->andWhere('deleted')->eq(0)->fetchAll('id'); + return $this->dao->select('*')->from(TABLE_EXECUTION) + ->where('id')->in($executionIdList) + ->beginIF($mode != 'all')->andWhere('deleted')->eq(0)->fi() + ->fetchAll('id'); } /** @@ -1404,6 +1447,129 @@ class executionModel extends model ->fetchPairs('id', 'id'); } + /** + * Get execution stat data. + + * @param int $projectID + * @param string $browseType all|undone|wait|doing|suspended|closed|involved|bySearch|review + * @param int $productID + * @param int $branch + * @param bool $withTasks + * @param string|int $param skipParent + * @param string $orderBy + * @param object $pager + * @access public + * @return array + */ + public function getStatData($projectID = 0, $browseType = 'undone', $productID = 0, $branch = 0, $withTasks = false, $param = '', $orderBy = 'id_asc', $pager = null) + { + /* Construct the query SQL at search executions. */ + $executionQuery = ''; + if($browseType == 'bySearch') + { + $queryID = (int)$param; + if($queryID) + { + $query = $this->loadModel('search')->getQuery($queryID); + if($query) + { + $this->session->set('executionQuery', $query->sql); + $this->session->set('executionForm', $query->form); + } + } + if($this->session->executionQuery == false) $this->session->set('executionQuery', ' 1 = 1'); + + $executionQuery = $this->session->executionQuery; + $allProject = "`project` = 'all'"; + + if(strpos($executionQuery, $allProject) !== false) $executionQuery = str_replace($allProject, '1', $executionQuery); + $executionQuery = preg_replace('/(`\w*`)/', 't1.$1',$executionQuery); + } + + /* Get involved executions. */ + $myExecutionIDList = array(); + if($browseType == 'involved') + { + $myExecutionIDList = $this->dao->select('root')->from(TABLE_TEAM) + ->where('account')->eq($this->app->user->account) + ->andWhere('type')->eq('execution') + ->fetchPairs(); + } + + $executions = $this->dao->select('t1.*,t2.name projectName, t2.model as projectModel')->from(TABLE_EXECUTION)->alias('t1') + ->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id') + ->beginIF($productID)->leftJoin(TABLE_PROJECTPRODUCT)->alias('t3')->on('t1.id=t3.project')->fi() + ->where('t1.type')->in('sprint,stage,kanban') + ->andWhere('t1.deleted')->eq('0') + ->andWhere('t1.vision')->eq($this->config->vision) + ->beginIF(!$this->app->user->admin)->andWhere('t1.id')->in($this->app->user->view->sprints)->fi() + ->beginIF(!empty($executionQuery))->andWhere($executionQuery)->fi() + ->beginIF($productID)->andWhere('t3.product')->eq($productID)->fi() + ->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi() + ->beginIF(!in_array($browseType, array('all', 'undone', 'involved', 'review', 'bySearch')))->andWhere('t1.status')->eq($browseType)->fi() + ->beginIF($browseType == 'undone')->andWhere('t1.status')->notIN('done,closed')->fi() + ->beginIF($browseType == 'review') + ->andWhere("FIND_IN_SET('{$this->app->user->account}', t1.reviewers)") + ->andWhere('t1.reviewStatus')->eq('doing') + ->fi() + ->orderBy($orderBy) + ->page($pager) + ->fetchAll('id'); + + $hours = $this->loadModel('project')->computerProgress($executions); + $burns = $this->getBurnData($executions); + + if($withTasks) $executionTasks = $this->getTaskGroupByExecution(array_keys($executions)); + + /* Process executions. */ + $this->app->loadConfig('task'); + + $emptyHour = array('totalEstimate' => 0, 'totalConsumed' => 0, 'totalLeft' => 0, 'progress' => 0); + $today = helper::today(); + foreach($executions as $key => $execution) + { + /* Process the end time. */ + $execution->end = date(DT_DATE1, strtotime($execution->end)); + + /* Judge whether the execution is delayed. */ + if($execution->status != 'done' and $execution->status != 'closed' and $execution->status != 'suspended') + { + $delay = helper::diffDate($today, $execution->end); + if($delay > 0) $execution->delay = $delay; + } + + /* Process the burns. */ + $execution->burns = array(); + $burnData = isset($burns[$execution->id]) ? $burns[$execution->id] : array(); + foreach($burnData as $data) $execution->burns[] = $data->value; + + /* Process the hours. */ + $execution->hours = isset($hours[$execution->id]) ? $hours[$execution->id] : (object)$emptyHour; + + if(isset($executionTasks) and isset($executionTasks[$execution->id])) + { + $tasks = array_chunk($executionTasks[$execution->id], $this->config->task->defaultLoadCount, true); + $execution->tasks = $tasks[0]; + } + + /* In the case of the waterfall model, calculate the sub-stage. */ + if($param == 'skipParent') + { + if($execution->parent < 0 and $execution->type == 'stage') unset($executions[$key]); + if($this->config->systemMode == 'new' and $execution->projectName) $execution->name = $execution->projectName . ' / ' . $execution->name; + } + else + { + if(isset($executions[$execution->parent]) and $execution->type == 'stage') + { + $executions[$execution->parent]->children[$key] = $execution; + unset($executions[$key]); + } + } + } + return array_values($executions); + } + /** * Get executions by project. * @@ -1411,10 +1577,11 @@ class executionModel extends model * @param string $status * @param int $limit * @param string $pairs + * @param int $appenedID * @access public * @return array */ - public function getByProject($projectID, $status = 'all', $limit = 0, $pairs = false, $devel = false) + public function getByProject($projectID, $status = 'all', $limit = 0, $pairs = false, $devel = false, $appendedID = 0) { if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getExecutionPairs(); @@ -1428,8 +1595,10 @@ class executionModel extends model ->beginIF($projectID)->andWhere('project')->eq((int)$projectID)->fi() ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() ->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi() - ->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->in($status)->fi() + ->beginIF($status != 'all' and $status != 'undone' and $status != 'noclosed')->andWhere('status')->in($status)->fi() + ->beginIF($status == 'noclosed')->andWhere('status')->ne('closed')->fi() ->beginIF($devel === true)->andWhere('attribute')->in('dev,qa,release')->fi() + ->beginIF($appendedID)->orWhere('id')->eq($appendedID)->fi() ->orderBy($orderBy) ->beginIF($limit)->limit($limit)->fi() ->fetchAll('id'); @@ -1795,6 +1964,38 @@ class executionModel extends model return $tasks; } + /** + * Get the task data group by execution id list. + * + * @param array $executionIdList + * @access public + * @return array + */ + public function getTaskGroupByExecution($executionIdList = array()) + { + if(empty($executionIdList)) return array(); + $executionTasks = $this->dao->select('*')->from(TABLE_TASK) + ->where('deleted')->eq(0) + ->andWhere('status')->notin('closed,cancel') + ->andWhere('execution')->in($executionIdList) + ->orderBy('id_asc') + ->fetchGroup('execution', 'id'); + + foreach($executionTasks as $executionID => $tasks) + { + foreach($tasks as $task) + { + if($task->parent > 0 and isset($executionTasks[$executionID][$task->parent])) + { + $executionTasks[$executionID][$task->parent]->children[$task->id] = $task; + unset($executionTasks[$executionID][$task->id]); + } + } + } + + return $executionTasks; + } + /** * Get the execution by ID. * @@ -2505,7 +2706,7 @@ class executionModel extends model parse_str($extra, $output); foreach($stories as $key => $storyID) { - $notAllowedStatus = $this->app->rawMethod == 'batchcreate' ? 'closed' : 'draft,closed'; + $notAllowedStatus = $this->app->rawMethod == 'batchcreate' ? 'closed' : 'draft,reviewing,closed'; if(strpos($notAllowedStatus, $storyList[$storyID]->status) !== false) continue; if(isset($linkedStories[$storyID])) continue; @@ -2529,7 +2730,7 @@ class executionModel extends model $this->story->setStage($storyID); $this->linkCases($executionID, (int)$products[$storyID], $storyID); - $action = $executionID == $this->session->project ? 'linked2project' : 'linked2execution'; + $action = $execution->type == 'project' ? 'linked2project' : 'linked2execution'; if($action == 'linked2execution' and $execution->type == 'kanban') $action = 'linked2kanban'; $this->action->create('story', $storyID, $action, '', $executionID); } @@ -2600,7 +2801,7 @@ class executionModel extends model { foreach($planStory as $id => $story) { - if($story->status == 'draft') + if($story->status == 'draft' or $story->status == 'reviewing') { unset($planStory[$id]); continue; @@ -3176,24 +3377,8 @@ class executionModel extends model */ public function getBeginEnd4CFD($execution) { - $begin = $execution->begin; - $end = $execution->end; - if(helper::today() < $execution->begin) - { - $begin = helper::today(); - $end = helper::today(); - } - elseif((helper::today() >= $execution->begin) and (helper::today() <= $execution->end)) - { - $begin = (date('Y-m-d', strtotime('-13 days')) < $execution->begin) ? $execution->begin : date('Y-m-d', strtotime('-13 days')); - $end = helper::today(); - } - elseif((helper::today() > $execution->end)) - { - $begin = date('Y-m-d', strtotime('-13 days', strtotime($execution->end))) > $execution->begin ? date('Y-m-d', strtotime('-13 days', strtotime($execution->end))) : $execution->begin; - $end = $execution->end; - } - + $end = (!helper::isZeroDate($execution->closedDate) and date('Y-m-d', strtotime($execution->closedDate)) < helper::today()) ? date('Y-m-d', strtotime($execution->closedDate)) : helper::today(); + $begin = (!helper::isZeroDate($execution->openedDate) and date('Y-m-d', strtotime($execution->openedDate)) > date('Y-m-d', strtotime('-13 days', strtotime($end)))) ? date('Y-m-d', strtotime($execution->openedDate)) : date('Y-m-d', strtotime('-13 days', strtotime($end))); return array($begin, $end); } @@ -3247,6 +3432,47 @@ class executionModel extends model return $burnData; } + /** + * Get execution burn data. + * + * @param array $executions + * @access public + * @return array + */ + public function getBurnData($executions) + { + if(empty($executions)) return array(); + + /* Get burndown charts datas. */ + $burns = $this->dao->select('execution, date AS name, `left` AS value') + ->from(TABLE_BURN) + ->where('execution')->in(array_keys($executions)) + ->andWhere('task')->eq(0) + ->orderBy('date desc') + ->fetchGroup('execution', 'name'); + + foreach($burns as $executionID => $executionBurns) + { + /* If executionBurns > $itemCounts, split it, else call processBurnData() to pad burns. */ + $begin = $executions[$executionID]->begin; + $end = $executions[$executionID]->end; + if(helper::isZeroDate($begin)) $begin = $executions[$executionID]->openedDate; + $executionBurns = $this->processBurnData($executionBurns, $this->config->execution->defaultBurnPeriod, $begin, $end); + + /* Shorter names. */ + foreach($executionBurns as $executionBurn) + { + $executionBurn->name = substr($executionBurn->name, 5); + unset($executionBurn->execution); + } + + ksort($executionBurns); + $burns[$executionID] = $executionBurns; + } + + return $burns; + } + /** * Process burndown datas when the sets is smaller than the itemCounts. * @@ -3428,7 +3654,8 @@ class executionModel extends model ->page($pager) ->fetchAll('id'); - $tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName') + $orderBy = str_replace('pri_', 'priOrder_', $orderBy); + $tasks = $this->dao->select('t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName, IF(t1.`pri` = 0, 999, t1.`pri`) as priOrder') ->from(TABLE_TASK)->alias('t1') ->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id') ->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account') @@ -4358,6 +4585,8 @@ class executionModel extends model $this->loadModel('execution'); $this->loadModel('programplan'); + $today = helper::today(); + if(!$isChild) { $trClass = 'is-top-level table-nest-child-hide'; @@ -4378,12 +4607,33 @@ class executionModel extends model $spanClass = $execution->type == 'stage' ? 'label-warning' : 'label-info'; echo "{$this->lang->execution->typeList[$execution->type]} "; } - echo empty($execution->children) ? html::a(helper::createLink('execution', 'view', "executionID=$execution->id"), $execution->name) : $execution->name; + if(empty($execution->children)) + { + echo html::a(helper::createLink('execution', 'view', "executionID=$execution->id"), $execution->name); + if(!helper::isZeroDate($execution->end)) + { + if($execution->status != 'closed') + { + echo strtotime($today) > strtotime($execution->end) ? '' . $this->lang->execution->delayed . '' : ''; + } + } + } + else + { + echo $execution->name; + if(!helper::isZeroDate($execution->end)) + { + if($execution->status != 'closed') + { + echo strtotime($today) > strtotime($execution->end) ? '' . $this->lang->execution->delayed . '' : ''; + } + } + } echo '' . zget($users, $execution->PM) . ''; - echo "" . zget($this->lang->project->statusList, $execution->status) . ''; + echo "" . zget($this->lang->project->statusList, $execution->status) . ''; echo '' . html::ring($execution->hours->progress) . ''; - echo '' . $execution->begin . ''; - echo '' . $execution->end . ''; + echo helper::isZeroDate($execution->begin) ? '' : '' . $execution->begin . ''; + echo helper::isZeroDate($execution->end) ? '' : '' . $execution->end . ''; echo "" . $execution->hours->totalEstimate . $this->lang->execution->workHourUnit . ''; echo "" . $execution->hours->totalConsumed . $this->lang->execution->workHourUnit . ''; echo "" . $execution->hours->totalLeft . $this->lang->execution->workHourUnit . ''; @@ -4721,4 +4971,23 @@ class executionModel extends model echo ''; } } + + /* + * Build search form + * + * @param int $queryID + * @param string $actionURL + * @return void + * */ + public function buildSearchFrom($queryID, $actionURL) + { + $this->config->execution->all->search['queryID'] = $queryID; + $this->config->execution->all->search['actionURL'] = $actionURL; + + $projectPairs = array(0 => ''); + $projectPairs += $this->loadModel('project')->getPairsByProgram(); + $this->config->execution->all->search['params']['project']['values'] = $projectPairs + array('all' => $this->lang->execution->allProject); + + $this->loadModel('search')->setSearchParams($this->config->execution->all->search); + } } diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 2cca80f2ba..715cf14aae 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -16,14 +16,11 @@ $datatableId = $this->moduleName . ucfirst($this->methodName); $useDatatable = (isset($config->datatable->$datatableId->mode) and $config->datatable->$datatableId->mode == 'datatable'); ?> + - execution->all->unfoldExecutions) ? json_decode($config->execution->all->unfoldExecutions, true) : array(); -$unfoldExecutions = zget($unfoldExecutions, $projectID, array()); -js::set('unfoldExecutions', $unfoldExecutions); js::set('unfoldAll', $lang->execution->treeLevel['all']); js::set('foldAll', $lang->execution->treeLevel['root']); js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) @@ -38,48 +35,38 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()) " . html::a($this->createLink('project', 'execution', "status=$status&projectID=$projectID&orderby=$orderBy"), $lang->product->allProduct) . ""; + echo "
  • " . html::a($this->createLink('project', 'execution', "status=$status&orderby=$orderBy"), $lang->product->allProduct) . "
  • "; foreach($productList as $key => $product) { $class = $productID == $key ? 'class="active"' : ''; - echo "
  • " . html::a($this->createLink('project', 'execution', "status=$status&projectID=$projectID&orderby=$orderBy&productID=$key"), $product) . "
  • "; + echo "
  • " . html::a($this->createLink('project', 'execution', "status=$status&orderby=$orderBy&productID=$key"), $product) . "
  • "; } ?>
    + execution->featureBar['all'] as $key => $label):?> $label";?> {$pager->recTotal}";?> - createLink($this->app->rawModule, $this->app->rawMethod, "status=$key&projectID=$projectID&orderBy=$orderBy&productID=$productID"), $label, '', "class='btn btn-link' id='{$key}Tab' data-app='$from'");?> + createLink($this->app->rawModule, $this->app->rawMethod, "status=$key&orderBy=$orderBy&productID=$productID"), $label, '', "class='btn btn-link' id='{$key}Tab' data-app='$from'");?> - config->systemMode == 'new'):?> -
    - execution->selectProject}'");?> -
    - + execution->byQuery;?>
    " . $lang->export, '', "class='btn btn-link export'")?> - - createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), " " . $lang->programplan->create, '', "class='btn btn-primary'");?> - - createLink('execution', 'create', "projectID=$projectID"), " " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary create-execution-btn' data-app='execution' onclick='$(this).removeAttr(\"data-toggle\")'");?> - + createLink('execution', 'create'), " " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-primary create-execution-btn' data-app='execution' onclick='$(this).removeAttr(\"data-toggle\")'");?>
    +

    execution->noExecutions : $lang->execution->noExecution;?> - - createLink('programplan', 'create', "projectID=$projectID&productID=$productID"), " " . $lang->programplan->create, '', "class='btn btn-info'");?> - - - createLink('execution', 'create', "projectID=$projectID"), " " . (($from == 'execution' and $config->systemMode == 'new') ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-info' data-app='execution'");?> - + + createLink('execution', 'create'), " " . (($from == 'execution' and $config->systemMode == 'new') ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-info' data-app='execution'");?>

    @@ -91,7 +78,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN())
    recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; + $vars = "status=$status&orderBy=%s&productID=$productID¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; if($useDatatable) include '../../common/view/datatable.html.php'; else include '../../common/view/tablesorter.html.php'; @@ -164,12 +151,6 @@ $(document).on('click', '.plan-toggle', function(e) e.stopPropagation(); e.preventDefault(); }); - -$('#project').change(function() -{ - var projectID = $('#project').val(); - location.href = createLink('execution', 'all', 'status=' + status + '&projectID=' + projectID); -}); diff --git a/module/execution/view/batchedit.html.php b/module/execution/view/batchedit.html.php index a37f4b3145..b132bc9fbe 100755 --- a/module/execution/view/batchedit.html.php +++ b/module/execution/view/batchedit.html.php @@ -49,7 +49,7 @@ idAB;?> systemMode == 'new' and isset($project) and $project->model == 'scrum'):?> - execution->projectName;?> + execution->projectName;?> execution->$name;?> setCode) or $config->setCode == 1):?> diff --git a/module/execution/view/bug.html.php b/module/execution/view/bug.html.php index 31459d2b9a..606c7aee68 100644 --- a/module/execution/view/bug.html.php +++ b/module/execution/view/bug.html.php @@ -31,12 +31,17 @@
    - Build:{$build->name}" : ''; - $module = $type != 'bysearch' ? "¶m=$param" : ''; - echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type=all$module"), "{$lang->bug->allBugs}" . ($type == 'all' ? " {$pager->recTotal}$buildName" : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'"); - echo html::a($this->inlink('bug', "executionID={$execution->id}&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type=unresolved$module"), "{$lang->bug->unResolved}" . ($type == 'unresolved' ? " {$pager->recTotal}$buildName" : ''), '', "id='unresolvedTab' class='btn btn-link" . ('unresolved' == $type ? ' btn-active-text' : '') . "'"); - ?> + + execution->featureBar['bug'] as $featureType => $label):?> + + $label";?> + + {$pager->recTotal}";?> + Build:{$build->name}" : '';?> + + + id&productID={$productID}&branch={$branchID}&orderBy=status,id_desc&build=$buildID&type={$featureType}$module"), $label, '', "class='btn btn-link $active' id='{$featureType}Tab'");?> + bug->search;?>
    @@ -157,7 +162,7 @@
    - + 10; $actionLink = $this->createLink('bug', 'batchAssignTo', "executionID={$execution->id}&type=execution"); diff --git a/module/execution/view/build.html.php b/module/execution/view/build.html.php index b8287370df..3f2e90bc4b 100644 --- a/module/execution/view/build.html.php +++ b/module/execution/view/build.html.php @@ -16,14 +16,14 @@
    - - + +
    diff --git a/module/file/view/edit.html.php b/module/file/view/edit.html.php deleted file mode 100644 index 1329925822..0000000000 --- a/module/file/view/edit.html.php +++ /dev/null @@ -1,62 +0,0 @@ - - * @package file - * @version $Id$ - * @link http://www.zentao.net - */ -?> - - - -
    -
    -
    -
    -

    file->inputFileName;?>

    -
    - title, '.') !== false) - { - /* Fix the file name exe.exe */ - $title = explode('.', $file->title); - $extension = end($title); - if($file->extension == 'txt' && $extension != $file->extension) $file->extension = $extension; - array_pop($title); - $file->title = join('.', $title); - } - ?> - - - - - - -
    -
    - title, "class='form-control' size='40'");?> - - .extension;?> -
    -
    - -
    -
    -
    - diff --git a/module/file/view/printfiles.html.php b/module/file/view/printfiles.html.php index ee78a6ecc0..2c621c7413 100644 --- a/module/file/view/printfiles.html.php +++ b/module/file/view/printfiles.html.php @@ -92,7 +92,7 @@ if(common::hasPriv($objectType, 'edit', $object)) { echo "  "; - common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='fileAction btn btn-link edit iframe text-primary' title='{$lang->file->edit}'"); + if($method != 'storyChange') common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='fileAction btn btn-link edit iframe text-primary' title='{$lang->file->edit}'"); if(common::hasPriv('file', 'delete')) echo html::a('###', $lang->delete, '', "class='fileAction btn btn-link text-primary' onclick='deleteFile($file->id)' title='$lang->delete'"); echo ''; } diff --git a/module/file/view/viewfiles.html.php b/module/file/view/viewfiles.html.php index 15990a8c8e..164f7e7dbe 100644 --- a/module/file/view/viewfiles.html.php +++ b/module/file/view/viewfiles.html.php @@ -5,129 +5,248 @@
    file->common;?>
    - - + var url = createLink('file', 'download', 'fileID=' + fileID + '&mouse=left'); + url += url.indexOf('?') >= 0 ? '&' : '?'; + url += ''; + + if(fileTypes.indexOf(extension) >= 0 && checkExtension && config.onlybody != 'yes') + { + $('').modalTrigger({url: url, type: 'iframe', width: width}).trigger('click'); + } + else + { + url = url.replace('?onlybody=yes&', '?'); + url = url.replace('?onlybody=yes', '?'); + url = url.replace('&onlybody=yes', ''); + + window.open(url, '_blank'); + } + return false; +} + +/* Show edit box for editing file name. */ +/** + * Show edit box for editing file name. + * + * @param int $fileID + * @access public + * @return void + */ +function showRenameBox(fileID) +{ + $('#renameFile' + fileID).closest('li').addClass('hidden'); + $('#renameBox' + fileID).removeClass('hidden'); +} + +/** + * Show File. + * + * @param int $fileID + * @access public + * @return void + */ +function showFile(fileID) +{ + $('#renameBox' + fileID).addClass('hidden'); + $('#renameFile' + fileID).closest('li').removeClass('hidden'); +} + +/** + * Smooth refresh file name. + * + * @param int $fileID + * @access public + * @return void + */ +function setFileName(fileID) +{ + var fileName = $('#fileName' + fileID).val(); + var extension = $('#extension' + fileID).val(); + var postData = {'fileName' : fileName, 'extension' : extension}; + $('#renameBox' + fileID ).addClass('hidden'); + $.ajax( + { + url:createLink('file', 'edit', 'fileID=' + fileID), + dataType: 'json', + method: 'post', + data: postData, + success: function(data) + { + $('#fileTitle' + fileID).html("  " + data['title']); + $('#renameFile' + fileID).closest('li').removeClass('hidden'); + $('#renameBox' + fileID).addClass('hidden'); + } + }) +} +
      - + + file->uploadDate . substr($file->addedDate, 0, 10); + $fileTitle = "  " . $file->title; + if(strpos($file->title, ".{$file->extension}") === false && $file->extension != 'txt') $fileTitle .= ".{$file->extension}"; + $imageWidth = 0; + if(stripos('jpg|jpeg|gif|png|bmp', $file->extension) !== false) { - $uploadDate = $lang->file->uploadDate . substr($file->addedDate, 0, 10); - $fileTitle = "  " . $file->title; - if(strpos($file->title, ".{$file->extension}") === false && $file->extension != 'txt') $fileTitle .= ".{$file->extension}"; - $imageWidth = 0; - if(stripos('jpg|jpeg|gif|png|bmp', $file->extension) !== false) - { - $imageSize = $this->file->getImageSize($file); - $imageWidth = $imageSize ? $imageSize[0] : 0; - } - - $fileSize = 0; - /* Show size info. */ - if($file->size < 1024) - { - $fileSize = $file->size . 'B'; - } - elseif($file->size < 1024 * 1024) - { - $file->size = round($file->size / 1024, 2); - $fileSize = $file->size . 'K'; - } - elseif($file->size < 1024 * 1024 * 1024) - { - $file->size = round($file->size / (1024 * 1024), 2); - $fileSize = $file->size . 'M'; - } - else - { - $file->size = round($file->size / (1024 * 1024 * 1024), 2); - $fileSize = $file->size . 'G'; - } - - $downloadLink = $this->createLink('file', 'download', "fileID=$file->id"); - $downloadLink .= strpos($downloadLink, '?') === false ? '?' : '&'; - $downloadLink .= $sessionString; - echo "
    • " . html::a($downloadLink, $fileTitle . " ({$fileSize})", '_blank', "onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\""); - - $objectType = zget($this->config->file->objectType, $file->objectType); - if(common::hasPriv($objectType, 'edit', $object)) - { - echo "  "; - - /* Determines whether the file supports preview. */ - if($file->extension == 'txt') - { - $extension = 'txt'; - if(($postion = strrpos($file->title, '.')) !== false) $extension = substr($file->title, $postion + 1); - if($extension != 'txt') $mode = 'down'; - $file->extension = $extension; - } - - /* For the open source version of the file judgment. */ - if(stripos('txt|jpg|jpeg|gif|png|bmp', $file->extension) !== false) - { - echo html::a($downloadLink, $lang->file->preview, '_blank', "class='fileAction btn btn-link text-primary' onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\""); - } - - /* For the max version of the file judgment. */ - if(isset($this->config->file->libreOfficeTurnon) and $this->config->file->libreOfficeTurnon == 1) - { - $officeTypes = 'doc|docx|xls|xlsx|ppt|pptx|pdf'; - if(stripos($officeTypes, $file->extension) !== false) - { - echo html::a($downloadLink, $lang->file->preview, '_blank', "class='fileAction btn btn-link text-primary' onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\""); - } - } - - common::printLink('file', 'download', "fileID=$file->id", $lang->file->downloadFile, '_blank', "class='fileAction btn btn-link text-primary' title='{$lang->file->downloadFile}'"); - common::printLink('file', 'edit', "fileID=$file->id", $lang->file->edit, '', "data-width='400' class='fileAction btn btn-link edit iframe text-primary' title='{$lang->file->edit}'"); - if(common::hasPriv('file', 'delete')) echo html::a('###', $lang->delete, '', "class='fileAction btn btn-link text-primary' onclick='deleteFile($file->id)' title='$lang->delete'"); - echo ''; - } - echo '
    • '; + $imageSize = $this->file->getImageSize($file); + $imageWidth = $imageSize ? $imageSize[0] : 0; } - } - ?> + + $fileSize = 0; + /* Show size info. */ + if($file->size < 1024) + { + $fileSize = $file->size . 'B'; + } + elseif($file->size < 1024 * 1024) + { + $file->size = round($file->size / 1024, 2); + $fileSize = $file->size . 'K'; + } + elseif($file->size < 1024 * 1024 * 1024) + { + $file->size = round($file->size / (1024 * 1024), 2); + $fileSize = $file->size . 'M'; + } + else + { + $file->size = round($file->size / (1024 * 1024 * 1024), 2); + $fileSize = $file->size . 'G'; + } + + $downloadLink = $this->createLink('file', 'download', "fileID=$file->id"); + $downloadLink .= strpos($downloadLink, '?') === false ? '?' : '&'; + $downloadLink .= $sessionString; + echo "
    • " . html::a($downloadLink, $fileTitle . " ({$fileSize})", '_blank', "id='fileTitle$file->id' onclick=\"return downloadFile($file->id, '$file->extension', $imageWidth, '$file->title')\""); + + $objectType = zget($this->config->file->objectType, $file->objectType); + if(common::hasPriv($objectType, 'edit', $object)) + { + echo "'; + } + echo '
    • ';?> + +
    • +
      + title, '.') !== false) + { + /* Fix the file name exe.exe */ + $title = explode('.', $file->title); + $extension = end($title); + if($file->extension == 'txt' && $extension != $file->extension) $file->extension = $extension; + array_pop($title); + $file->title = join('.', $title); + } + ?> + +
      +
    • + + +
    diff --git a/module/git/control.php b/module/git/control.php index 3858b35fcb..102621c7b0 100644 --- a/module/git/control.php +++ b/module/git/control.php @@ -34,24 +34,30 @@ class git extends control { if(isset($_GET['repoUrl'])) $path = $this->get->repoUrl; - $path = helper::safe64Decode($path); - if(common::hasPriv('repo', 'diff')) + $path = helper::safe64Decode($path); + $repos = $this->loadModel('repo')->getListBySCM('Git,Gitlab,Gogs,Gitea', 'haspriv'); + $currentRepo = null; + foreach($repos as $repo) { - $repos = $this->loadModel('repo')->getListBySCM('Git,Gitlab', 'haspriv'); - foreach($repos as $repo) - { - if(strpos($path, $repo->path) === 0) - { - $entry = $this->repo->encodePath(str_replace($repo->path, '', $path)); - $oldRevision = "$revision^"; - $this->locate($this->repo->createLink('diff', "repoID=$repo->id&objectID=0&entry=$entry&oldRevision=$oldRevision&revision=$revision", 'html', 'true')); - } - } + if(!empty($repo->path) and strpos($path, $repo->path) === 0) $currentRepo = $repo; + } + + if($currentRepo and common::hasPriv('repo', 'diff')) + { + $entry = $this->repo->encodePath(str_replace($currentRepo->path, '', $path)); + $oldRevision = "$revision^"; + return $this->locate($this->repo->createLink('diff', "repoID=$currentRepo->id&objectID=0&entry=$entry&oldRevision=$oldRevision&revision=$revision", 'html', 'true')); + } + + if($currentRepo) + { + $scm = $this->app->loadClass('scm'); + $scm->setEngine($currentRepo); } $this->view->path = $path; $this->view->revision = $revision; - $this->view->diff = $this->git->diff($path, $revision); + $this->view->diff = $currentRepo ? $scm->diff($path, $revision) : ''; $this->display(); } @@ -68,23 +74,28 @@ class git extends control { if(isset($_GET['repoUrl'])) $path = $this->get->repoUrl; - $path = helper::safe64Decode($path); - if(common::hasPriv('repo', 'view')) + $path = helper::safe64Decode($path); + $repos = $this->loadModel('repo')->getListBySCM('Git,Gitlab,Gogs,Gitea', 'haspriv'); + $currentRepo = null; + foreach($repos as $repo) { - $repos = $this->loadModel('repo')->getListBySCM('Git,Gitlab', 'haspriv'); - foreach($repos as $repo) - { - if(strpos($path, $repo->path) === 0) - { - $entry = $this->repo->encodePath(str_replace($repo->path, '', $path)); - $this->locate($this->repo->createLink('view', "repoID=$repo->id&objectID=0&entry=$entry&revision=$revision", 'html', true)); - } - } + if(!empty($repo->path) and strpos($path, $repo->path) === 0) $currentRepo = $repo; } + if($currentRepo and common::hasPriv('repo', 'view')) + { + $entry = $this->repo->encodePath(str_replace($currentRepo->path, '', $path)); + return $this->locate($this->repo->createLink('view', "repoID=$currentRepo->id&objectID=0&entry=$entry&revision=$revision", 'html', true)); + } + + if($currentRepo) + { + $scm = $this->app->loadClass('scm'); + $scm->setEngine($currentRepo); + } $this->view->path = $path; $this->view->revision = $revision; - $this->view->code = $this->git->cat($path, $revision); + $this->view->code = $currentRepo ? $scm->cat($path, $revision) : ''; $this->display(); } diff --git a/module/git/model.php b/module/git/model.php index 20d9bbfeb5..28797cae14 100644 --- a/module/git/model.php +++ b/module/git/model.php @@ -178,7 +178,10 @@ class gitModel extends model if($printLog) $this->printLog("parsing log {$log->revision}"); if($printLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------"); - $objects = $this->repo->parseComment($log->msg); + $objects = $this->repo->parseComment($log->msg); + $lastVersion = $version; + $version = $this->repo->saveOneCommit($repo->id, $log, $version, $branch); + if($objects) { if($printLog) $this->printLog('extract' . @@ -186,7 +189,7 @@ class gitModel extends model ' task:' . join(' ', $objects['tasks']) . ' bug:' . join(',', $objects['bugs'])); - $this->repo->saveAction2PMS($objects, $log, $this->repoRoot, $repo->encoding, 'git', $accountPairs); + if($lastVersion != $version) $this->repo->saveAction2PMS($objects, $log, $this->repoRoot, $repo->encoding, 'git', $accountPairs); } else { @@ -202,7 +205,6 @@ class gitModel extends model if(strpos($log->msg, $comment) !== false) $this->loadModel('compile')->createByJob($job->id); } } - $version = $this->repo->saveOneCommit($repo->id, $log, $version, $branch); $commits += count($logs); } } diff --git a/module/gitea/control.php b/module/gitea/control.php index cd18b89de5..7d7f851726 100644 --- a/module/gitea/control.php +++ b/module/gitea/control.php @@ -141,9 +141,9 @@ class gitea extends control { if($confirm != 'yes') return print(js::confirm($this->lang->gitea->confirmDelete, inlink('delete', "id=$giteaID&confirm=yes"))); - $oldGitea = $this->loadModel('pipeline')->getByID($giteaID); $actionID = $this->pipeline->delete($giteaID, 'gitea'); + if(!$actionID) return print(js::error($this->lang->pipeline->delError)); $gitea = $this->pipeline->getByID($giteaID); $changes = common::createChanges($oldGitea, $gitea); diff --git a/module/gitlab/control.php b/module/gitlab/control.php index 6cd8195de4..279d7db0a6 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -228,11 +228,10 @@ class gitlab extends control { if($confirm != 'yes') return print(js::confirm($this->lang->gitlab->confirmDelete, inlink('delete', "id=$id&confirm=yes"))); - $oldGitLab = $this->gitlab->getByID($id); - $this->loadModel('action'); - $this->gitlab->delete(TABLE_PIPELINE, $id); + $oldGitLab = $this->loadModel('pipeline')->getByID($id); + $actionID = $this->pipeline->delete($id, 'gitlab'); + if(!$actionID) return print(js::error($this->lang->pipeline->delError)); - $actionID = $this->dao->lastInsertID(); $gitLab = $this->gitlab->getByID($id); $changes = common::createChanges($oldGitLab, $gitLab); $this->action->logHistory($actionID, $changes); @@ -722,7 +721,7 @@ class gitlab extends control $gitlab = $this->gitlab->getByID($gitlabID); $repos = $this->loadModel('repo')->getRepoListByClient($gitlabID); $repoPairs = array(); - foreach($repos as $repo) $repoPairs[$repo->path] = $repo->id; + foreach($repos as $repo) $repoPairs[$repo->serviceProject] = $repo->id; $this->view->gitlab = $gitlab; $this->view->keyword = urldecode(urldecode($keyword)); @@ -966,17 +965,13 @@ class gitlab extends control /** * Import gitlab issue to zentaopms. * - * @param int $repoID + * @param int $gitlabID + * @param int $projectID * @access public * @return void */ - public function importIssue($repoID) + public function importIssue($gitlabID, $projectID) { - $repo = $this->loadModel('repo')->getRepoByID($repoID); - $productIDList = explode(',', $repo->product); - $gitlabID = $repo->gitService; - $projectID = $repo->project; - $gitlab = $this->gitlab->getByID($gitlabID); if($gitlab) $user = $this->gitlab->apiGetCurrentUser($gitlab->url, $gitlab->token); if(empty($user->is_admin)) return print(js::alert($this->lang->gitlab->tokenLimit) . js::locate($this->createLink('gitlab', 'edit', array('gitlabID' => $gitlabID)))); @@ -1053,13 +1048,11 @@ class gitlab extends control } } - $products = array('' => ''); - $this->loadModel("product"); - foreach($productIDList as $productID) $products[$productID] = $this->product->getByID($productID)->name; + $products = $this->loadModel("product")->getPairs(); $this->view->title = $this->lang->gitlab->common . $this->lang->colon . $this->lang->gitlab->importIssue; $this->view->importable = empty($gitlabIssues) ? false : true; - $this->view->products = $products; + $this->view->products = array('' => '') + $products; $this->view->gitlabID = $gitlabID; $this->view->gitlabProjectID = $projectID; $this->view->objectTypes = $this->config->gitlab->objectTypes; diff --git a/module/gitlab/model.php b/module/gitlab/model.php index d5f9487aa2..d5ab4d0eb6 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -2671,7 +2671,10 @@ class gitlabModel extends model $priv->name = $name; $priv->create_access_level = $createLevels[$key]; $response = $this->apiCreateTagPriv($gitlabID, $projectID, $priv); - if(isset($response->message) and substr($response->message, 0, 2) != '20') $failure[] = $name; + if(isset($response->message)) + { + if(is_array($response->message) or (is_string($response->message) and substr($response->message, 0, 2) != '20')) $failure[] = $name; + } } return array_unique($failure); } @@ -2876,4 +2879,20 @@ class gitlabModel extends model $html .= '
    '; return $html; } + + /** + * Get pipeline with api. + * + * @param int $gitlabID + * @param int $projectID + * @param string $branch + * @access public + * @return object|array + */ + public function apiGetPipeline($gitlabID, $projectID, $branch) + { + $apiRoot = $this->getApiRoot($gitlabID); + $url = sprintf($apiRoot, "/projects/$projectID/pipelines") . "&ref=$branch"; + return json_decode(commonModel::http($url)); + } } diff --git a/module/gitlab/view/binduser.html.php b/module/gitlab/view/binduser.html.php index 714b43a683..4f551b24d7 100644 --- a/module/gitlab/view/binduser.html.php +++ b/module/gitlab/view/binduser.html.php @@ -56,7 +56,7 @@ email;?> id]", $userPairs, $gitlabUser->zentaoAccount, "class='form-control select chosen'" );?> - zentaoAccount])):?> + id, $bindedUsers)):?> zentaoAccount, '');?> gitlab->binded;?> diff --git a/module/gitlab/view/browseproject.html.php b/module/gitlab/view/browseproject.html.php index 5dd1948d3f..95c299ad62 100644 --- a/module/gitlab/view/browseproject.html.php +++ b/module/gitlab/view/browseproject.html.php @@ -60,15 +60,19 @@ last_activity_at, 0, 10);?> id", '', 'list', 'treemap', '', '', false, '', $this->lang->gitlab->browseBranch, 0, $gitlabProject->default_branch); - echo common::buildIconButton('gitlab', 'browseTag', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'tag', '', '', false, '', $this->lang->gitlab->browseTag, 0, $gitlabProject->default_branch); - echo common::buildIconButton('gitlab', 'manageBranchPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'branch-lock', '', '', false, '', $this->lang->gitlab->browseBranchPriv, 0, ($gitlabProject->isMaintainer and $gitlabProject->default_branch)); - echo common::buildIconButton('gitlab', 'manageTagPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'tag-lock', '', '', false, '', $this->lang->gitlab->browseTagPriv, 0, ($gitlabProject->isMaintainer and $gitlabProject->default_branch)); - echo common::buildIconButton('gitlab', 'manageProjectMembers', 'repoID=' . zget($repoPairs, $gitlabProject->id), '', 'list', 'team', '', '', false, '', '', 0, isset($repoPairs[$gitlabProject->id])); - echo common::buildIconButton('gitlab', 'createWebhook', 'repoID=' . zget($repoPairs, $gitlabProject->id), '', 'list', 'change', 'hiddenwin', '', false, '', '', 0, isset($repoPairs[$gitlabProject->id])); - echo common::buildIconButton('gitlab', 'importIssue', 'repoID=' . zget($repoPairs, $gitlabProject->id), '', 'list', 'link', '', '', false, '', '', 0, isset($repoPairs[$gitlabProject->id])); - echo common::buildIconButton('gitlab', 'editProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'edit', '', '', false, '', '', 0, $gitlabProject->adminer); - echo common::buildIconButton('gitlab', 'deleteProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'trash', 'hiddenwin', '', false, '', '', 0, $gitlabProject->adminer); + $hasRepoClass = isset($repoPairs[$gitlabProject->id]) ? '' : 'disabled'; + $adminerClass = $gitlabProject->adminer ? '' : 'disabled'; + $maintainerClass = $gitlabProject->isMaintainer ? '' : 'disabled'; + $defaultBranchClass = $gitlabProject->adminer ? '' : 'disabled'; + echo common::printIcon('gitlab', 'browseBranch', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'treemap', '', $defaultBranchClass, false, '', $this->lang->gitlab->browseBranch); + echo common::printIcon('gitlab', 'browseTag', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'tag', '', $defaultBranchClass, false, '', $this->lang->gitlab->browseTag); + echo common::printIcon('gitlab', 'manageBranchPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'branch-lock', '', $defaultBranchClass . ' ' . $maintainerClass, false, '', $this->lang->gitlab->browseBranchPriv); + echo common::printIcon('gitlab', 'manageTagPriv', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'tag-lock', '', $defaultBranchClass . ' ' . $maintainerClass, false, '', $this->lang->gitlab->browseTagPriv); + echo common::printIcon('gitlab', 'manageProjectMembers', 'repoID=' . zget($repoPairs, $gitlabProject->id), '', 'list', 'team', '', $hasRepoClass); + echo common::printIcon('gitlab', 'createWebhook', 'repoID=' . zget($repoPairs, $gitlabProject->id), '', 'list', 'change', 'hiddenwin', $hasRepoClass); + echo common::printIcon('gitlab', 'importIssue', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'link'); + echo common::printIcon('gitlab', 'editProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'edit', '', $adminerClass); + echo common::printIcon('gitlab', 'deleteProject', "gitlabID=$gitlabID&projectID=$gitlabProject->id", '', 'list', 'trash', 'hiddenwin', $adminerClass); ?> diff --git a/module/gogs/control.php b/module/gogs/control.php index 50121cd32a..8944cc130e 100644 --- a/module/gogs/control.php +++ b/module/gogs/control.php @@ -141,9 +141,9 @@ class gogs extends control { if($confirm != 'yes') return print(js::confirm($this->lang->gogs->confirmDelete, inlink('delete', "id=$gogsID&confirm=yes"))); - $oldGogs = $this->loadModel('pipeline')->getByID($gogsID); $actionID = $this->pipeline->delete($gogsID, 'gogs'); + if(!$actionID) return print(js::error($this->lang->pipeline->delError)); $gogs = $this->pipeline->getByID($gogsID); $changes = common::createChanges($oldGogs, $gogs); diff --git a/module/gogs/model.php b/module/gogs/model.php index 75774c17ae..52d17580cb 100644 --- a/module/gogs/model.php +++ b/module/gogs/model.php @@ -410,10 +410,9 @@ class gogsModel extends model for($page = 1; true; $page++) { - $url = sprintf($apiRoot, "/users/search") . "&page={$page}&limit=50"; + $url = sprintf($apiRoot, "/admin/users") . "&page={$page}&limit=20"; $result = json_decode(commonModel::http($url)); if(empty($result->data)) break; - $response = array_merge($response, $result->data); $page += 1; } @@ -436,7 +435,7 @@ class gogsModel extends model $user->email = zget($gogsUser, 'email', ''); $user->avatar = $gogsUser->avatar_url; $user->createdAt = zget($gogsUser, 'created', ''); - $user->lastActivityOn = zget($gogsUser, 'last_login', ''); + $user->lastActivityOn = zget($gogsUser, 'login', ''); $users[] = $user; } @@ -517,4 +516,68 @@ class gogsModel extends model ->andWhere('providerID')->eq($gogsID) ->fetchPairs(); } + + /** + * Get single branch by API. + * + * @param int $gogsID + * @param string $project + * @param string $branchName + * @access public + * @return object + */ + public function apiGetSingleBranch($gogsID, $project, $branchName) + { + $url = sprintf($this->getApiRoot($gogsID), "/repos/$project/branches/$branchName"); + $branch = json_decode(commonModel::http($url)); + if($branch) + { + $gogs = $this->getByID($gogsID); + $branch->web_url = "{$gogs->url}/$project/src/$branchName"; + } + + return $branch; + } + + /** + * Get protect branches of one project. + * + * @param int $gogsID + * @param string $project + * @param string $keyword + * @access public + * @return array + */ + public function apiGetBranchPrivs($gogsID, $project, $keyword = '') + { + $keyword = urlencode($keyword); + $url = sprintf($this->getApiRoot($gogsID), "/repos/$project/branch_protections"); + $branches = json_decode(commonModel::http($url)); + + if(!is_array($branches)) return array(); + + $newBranches = array(); + foreach($branches as $branch) + { + $branch->name = $branch->Name; + if(empty($keyword) || stristr($branch->name, $keyword)) $newBranches[] = $branch; + } + + return $newBranches; + } + + /** + * Api delete branch. + * + * @param int $gogsID + * @param string $project + * @param string $branch + * @access public + * @return void + */ + public function apiDeleteBranch($gogsID, $project, $branch) + { + $url = sprintf($this->getApiRoot($gogsID), "/repos/$project/branches/$branch"); + return json_decode(commonModel::http($url, null, array(CURLOPT_CUSTOMREQUEST => 'DELETE'))); + } } diff --git a/module/gogs/view/browse.html.php b/module/gogs/view/browse.html.php index 3916bd8fcf..d925058381 100644 --- a/module/gogs/view/browse.html.php +++ b/module/gogs/view/browse.html.php @@ -56,6 +56,7 @@ isBindUser); common::printIcon('gogs', 'delete', "gogsID=$id", '', 'list', 'trash', 'hiddenwin'); ?> diff --git a/module/group/css/managemember.css b/module/group/css/managemember.css index c77de018bd..6676b72702 100644 --- a/module/group/css/managemember.css +++ b/module/group/css/managemember.css @@ -1,4 +1,5 @@ .group-item {display: block; width: 100px; float: left; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default;} -.group-item .checkbox-primary>input {cursor: pointer;} +.group-item .checkbox-primary > input {cursor: pointer;} +.group-item .checkbox-primary > label {width: 100px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;} .table th {vertical-align: top;} -.main-table tbody>tr>td {border-bottom: 0px;} +.main-table tbody > tr > td {border-bottom: 0px;} diff --git a/module/group/lang/changelog.php b/module/group/lang/changelog.php index 1578651e93..17c8eb6b6b 100644 --- a/module/group/lang/changelog.php +++ b/module/group/lang/changelog.php @@ -137,7 +137,7 @@ $lang->changelog['4.3.beta'][] = 'productplan-linkBug'; $lang->changelog['4.3.beta'][] = 'productplan-unlinkBug'; $lang->changelog['4.3.beta'][] = 'productplan-batchUnlinkBug'; $lang->changelog['4.3.beta'][] = 'bug-batchCreate'; -$lang->changelog['4.3.beta'][] = 'testcase-exportTemplet'; +$lang->changelog['4.3.beta'][] = 'testcase-exportTemplate'; $lang->changelog['4.3.beta'][] = 'testcase-import'; $lang->changelog['4.3.beta'][] = 'testcase-showImport'; $lang->changelog['4.3.beta'][] = 'testcase-confirmChange'; @@ -289,7 +289,7 @@ $lang->changelog['9.2'][] = 'custom-working'; $lang->changelog['9.2'][] = 'doc-sort'; $lang->changelog['9.2'][] = 'product-build'; $lang->changelog['9.2'][] = 'testsuite-batchCreateCase'; -$lang->changelog['9.2'][] = 'testsuite-exportTemplet'; +$lang->changelog['9.2'][] = 'testsuite-exportTemplate'; $lang->changelog['9.2'][] = 'testsuite-import'; $lang->changelog['9.2'][] = 'testsuite-showImport'; $lang->changelog['9.5'][] = 'bug-batchActivate'; diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index de24679028..a0ff9f225b 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -19,6 +19,7 @@ $lang->moduleOrder[15] = 'program'; $lang->moduleOrder[20] = 'personnel'; $lang->moduleOrder[25] = 'product'; $lang->moduleOrder[30] = 'story'; +$lang->moduleOrder[31] = 'requirement'; $lang->moduleOrder[35] = 'productplan'; $lang->moduleOrder[40] = 'release'; @@ -265,7 +266,6 @@ if($config->systemMode == 'new') $lang->resource->project->testreport = 'testreport'; $lang->resource->project->execution = 'execution'; $lang->resource->project->export = 'export'; - $lang->resource->project->createGuide = 'createGuide'; $lang->resource->project->updateOrder = 'updateOrder'; $lang->resource->project->team = 'teamAction'; $lang->resource->project->unlinkMember = 'unlinkMember'; @@ -305,10 +305,9 @@ if($config->systemMode == 'new') $lang->project->methodOrder[160] = 'testreport'; $lang->project->methodOrder[165] = 'execution'; $lang->project->methodOrder[170] = 'export'; - $lang->project->methodOrder[175] = 'createGuide'; - $lang->project->methodOrder[180] = 'updateOrder'; - $lang->project->methodOrder[185] = 'team'; - $lang->project->methodOrder[190] = 'unlinkMember'; + $lang->project->methodOrder[175] = 'updateOrder'; + $lang->project->methodOrder[180] = 'team'; + $lang->project->methodOrder[185] = 'unlinkMember'; $lang->resource->projectbuild = new stdclass(); $lang->resource->projectbuild->browse = 'browse'; @@ -419,49 +418,53 @@ if($config->systemMode == 'new') /* Product. */ $lang->resource->product = new stdclass(); -$lang->resource->product->index = 'indexAction'; -$lang->resource->product->browse = 'browse'; -$lang->resource->product->create = 'create'; -$lang->resource->product->view = 'view'; -$lang->resource->product->edit = 'edit'; -$lang->resource->product->batchEdit = 'batchEdit'; -$lang->resource->product->delete = 'delete'; -$lang->resource->product->roadmap = 'roadmap'; -$lang->resource->product->dynamic = 'dynamic'; -$lang->resource->product->project = 'project'; -$lang->resource->product->dashboard = 'dashboard'; -$lang->resource->product->close = 'closeAction'; -$lang->resource->product->updateOrder = 'orderAction'; -$lang->resource->product->all = 'list'; -$lang->resource->product->kanban = 'kanban'; -$lang->resource->product->manageLine = 'manageLine'; -$lang->resource->product->build = 'build'; -$lang->resource->product->export = 'exportAction'; -$lang->resource->product->whitelist = 'whitelist'; -$lang->resource->product->addWhitelist = 'addWhitelist'; +$lang->resource->product->index = 'indexAction'; +$lang->resource->product->browse = 'browse'; +if($config->URAndSR) $lang->resource->product->requirement = 'requirement'; +$lang->resource->product->create = 'create'; +$lang->resource->product->view = 'view'; +$lang->resource->product->edit = 'edit'; +$lang->resource->product->batchEdit = 'batchEdit'; +$lang->resource->product->delete = 'delete'; +$lang->resource->product->roadmap = 'roadmap'; +$lang->resource->product->track = 'track'; +$lang->resource->product->dynamic = 'dynamic'; +$lang->resource->product->project = 'project'; +$lang->resource->product->dashboard = 'dashboard'; +$lang->resource->product->close = 'closeAction'; +$lang->resource->product->updateOrder = 'orderAction'; +$lang->resource->product->all = 'list'; +$lang->resource->product->kanban = 'kanban'; +$lang->resource->product->manageLine = 'manageLine'; +$lang->resource->product->build = 'build'; +$lang->resource->product->export = 'exportAction'; +$lang->resource->product->whitelist = 'whitelist'; +$lang->resource->product->addWhitelist = 'addWhitelist'; $lang->resource->product->unbindWhitelist = 'unbindWhitelist'; $lang->product->methodOrder[0] = 'index'; $lang->product->methodOrder[5] = 'browse'; +if($config->URAndSR) $lang->product->methodOrder[6] = 'requirement'; $lang->product->methodOrder[10] = 'create'; $lang->product->methodOrder[15] = 'view'; $lang->product->methodOrder[20] = 'edit'; $lang->product->methodOrder[25] = 'batchEdit'; $lang->product->methodOrder[35] = 'delete'; $lang->product->methodOrder[40] = 'roadmap'; -$lang->product->methodOrder[45] = 'dynamic'; -$lang->product->methodOrder[50] = 'project'; -$lang->product->methodOrder[55] = 'dashboard'; -$lang->product->methodOrder[60] = 'close'; -$lang->product->methodOrder[65] = 'updateOrder'; -$lang->product->methodOrder[70] = 'all'; -$lang->product->methodOrder[75] = 'kanban'; -$lang->product->methodOrder[80] = 'manageLine'; -$lang->product->methodOrder[85] = 'build'; -$lang->product->methodOrder[90] = 'export'; -$lang->product->methodOrder[95] = 'whitelist'; -$lang->product->methodOrder[100] = 'addWhitelist'; -$lang->product->methodOrder[105] = 'unbindWhitelist'; +$lang->product->methodOrder[45] = 'track'; +$lang->product->methodOrder[50] = 'dynamic'; +$lang->product->methodOrder[55] = 'project'; +$lang->product->methodOrder[60] = 'dashboard'; +$lang->product->methodOrder[65] = 'close'; +$lang->product->methodOrder[70] = 'updateOrder'; +$lang->product->methodOrder[75] = 'all'; +$lang->product->methodOrder[80] = 'kanban'; +$lang->product->methodOrder[85] = 'manageLine'; +$lang->product->methodOrder[90] = 'build'; +$lang->product->methodOrder[95] = 'export'; +$lang->product->methodOrder[100] = 'whitelist'; +$lang->product->methodOrder[105] = 'addWhitelist'; +$lang->product->methodOrder[110] = 'unbindWhitelist'; /* Branch. */ $lang->resource->branch = new stdclass(); @@ -488,15 +491,16 @@ $lang->resource->story = new stdclass(); $lang->resource->story->create = 'create'; $lang->resource->story->batchCreate = 'batchCreate'; $lang->resource->story->edit = 'editAction'; -$lang->resource->story->linkStory = 'linkStory'; +if($config->URAndSR) $lang->resource->story->linkStory = 'linkStory'; $lang->resource->story->batchEdit = 'batchEdit'; $lang->resource->story->export = 'exportAction'; $lang->resource->story->delete = 'deleteAction'; $lang->resource->story->view = 'view'; $lang->resource->story->change = 'changeAction'; $lang->resource->story->review = 'reviewAction'; +$lang->resource->story->submitReview = 'submitReview'; $lang->resource->story->batchReview = 'batchReview'; -$lang->resource->story->recall = 'recall'; +$lang->resource->story->recall = 'recallAction'; $lang->resource->story->assignTo = 'assignAction'; $lang->resource->story->close = 'closeAction'; $lang->resource->story->batchClose = 'batchClose'; @@ -504,7 +508,6 @@ $lang->resource->story->activate = 'activateAction'; $lang->resource->story->tasks = 'tasks'; $lang->resource->story->bugs = 'bugs'; $lang->resource->story->cases = 'cases'; -$lang->resource->story->zeroCase = 'zeroCase'; $lang->resource->story->report = 'reportAction'; $lang->resource->story->batchChangePlan = 'batchChangePlan'; $lang->resource->story->batchChangeBranch = 'batchChangeBranch'; @@ -512,8 +515,8 @@ $lang->resource->story->batchChangeStage = 'batchChangeStage'; $lang->resource->story->batchAssignTo = 'batchAssignTo'; $lang->resource->story->batchChangeModule = 'batchChangeModule'; $lang->resource->story->batchToTask = 'batchToTask'; -$lang->resource->story->track = 'trackAB'; $lang->resource->story->processStoryChange = 'processStoryChange'; +$lang->resource->story->linkStories = 'linkStoriesAB'; $lang->story->methodOrder[5] = 'create'; $lang->story->methodOrder[10] = 'batchCreate'; @@ -523,6 +526,7 @@ $lang->story->methodOrder[25] = 'delete'; $lang->story->methodOrder[30] = 'view'; $lang->story->methodOrder[35] = 'change'; $lang->story->methodOrder[40] = 'review'; +$lang->story->methodOrder[44] = 'submitReview'; $lang->story->methodOrder[45] = 'batchReview'; $lang->story->methodOrder[50] = 'recall'; $lang->story->methodOrder[55] = 'close'; @@ -535,14 +539,63 @@ $lang->story->methodOrder[85] = 'activate'; $lang->story->methodOrder[90] = 'tasks'; $lang->story->methodOrder[95] = 'bugs'; $lang->story->methodOrder[100] = 'cases'; -$lang->story->methodOrder[105] = 'zeroCase'; -$lang->story->methodOrder[110] = 'report'; -$lang->story->methodOrder[115] = 'linkStory'; -$lang->story->methodOrder[120] = 'batchChangeBranch'; -$lang->story->methodOrder[125] = 'batchChangeModule'; -$lang->story->methodOrder[130] = 'batchToTask'; -$lang->story->methodOrder[135] = 'track'; -$lang->story->methodOrder[140] = 'processStoryChange'; +$lang->story->methodOrder[105] = 'report'; +if($config->URAndSR) $lang->story->methodOrder[110] = 'linkStory'; +$lang->story->methodOrder[115] = 'batchChangeBranch'; +$lang->story->methodOrder[120] = 'batchChangeModule'; +$lang->story->methodOrder[125] = 'batchToTask'; +$lang->story->methodOrder[130] = 'processStoryChange'; +$lang->story->methodOrder[135] = 'linkStories'; + +if($config->URAndSR) +{ + /* Requirement. */ + $lang->resource->requirement = new stdclass(); + $lang->resource->requirement->create = 'create'; + $lang->resource->requirement->batchCreate = 'batchCreate'; + $lang->resource->requirement->edit = 'editAction'; + $lang->resource->requirement->linkStory = 'linkStory'; + $lang->resource->requirement->batchEdit = 'batchEdit'; + $lang->resource->requirement->export = 'exportAction'; + $lang->resource->requirement->delete = 'deleteAction'; + $lang->resource->requirement->view = 'view'; + $lang->resource->requirement->change = 'changeAction'; + $lang->resource->requirement->review = 'reviewAction'; + $lang->resource->requirement->submitReview = 'submitReview'; + $lang->resource->requirement->batchReview = 'batchReview'; + $lang->resource->requirement->recall = 'recall'; + $lang->resource->requirement->assignTo = 'assignAction'; + $lang->resource->requirement->close = 'closeAction'; + $lang->resource->requirement->batchClose = 'batchClose'; + $lang->resource->requirement->activate = 'activateAction'; + $lang->resource->requirement->report = 'reportAction'; + $lang->resource->requirement->batchChangeBranch = 'batchChangeBranch'; + $lang->resource->requirement->batchAssignTo = 'batchAssignTo'; + $lang->resource->requirement->batchChangeModule = 'batchChangeModule'; + $lang->resource->requirement->linkRequirements = 'linkRequirementsAB'; + + $lang->requirement->methodOrder[5] = 'create'; + $lang->requirement->methodOrder[10] = 'batchCreate'; + $lang->requirement->methodOrder[15] = 'edit'; + $lang->requirement->methodOrder[20] = 'export'; + $lang->requirement->methodOrder[25] = 'delete'; + $lang->requirement->methodOrder[30] = 'view'; + $lang->requirement->methodOrder[35] = 'change'; + $lang->requirement->methodOrder[40] = 'review'; + $lang->requirement->methodOrder[44] = 'submitReview'; + $lang->requirement->methodOrder[45] = 'batchReview'; + $lang->requirement->methodOrder[50] = 'recall'; + $lang->requirement->methodOrder[55] = 'close'; + $lang->requirement->methodOrder[60] = 'batchClose'; + $lang->requirement->methodOrder[65] = 'assignTo'; + $lang->requirement->methodOrder[70] = 'batchAssignTo'; + $lang->requirement->methodOrder[75] = 'activate'; + $lang->requirement->methodOrder[80] = 'report'; + $lang->requirement->methodOrder[85] = 'linkStory'; + $lang->requirement->methodOrder[90] = 'batchChangeBranch'; + $lang->requirement->methodOrder[95] = 'batchChangeModule'; + $lang->requirement->methodOrder[100] = 'linkRequirements'; +} /* Product plan. */ $lang->resource->productplan = new stdclass(); @@ -625,6 +678,7 @@ $lang->resource->kanban->activateSpace = 'activateSpace'; $lang->resource->kanban->sortSpace = 'sortSpace'; $lang->resource->kanban->create = 'create'; $lang->resource->kanban->edit = 'edit'; +$lang->resource->kanban->setting = 'setting'; $lang->resource->kanban->view = 'view'; $lang->resource->kanban->activate = 'activate'; $lang->resource->kanban->close = 'close'; @@ -966,6 +1020,7 @@ $lang->bug->methodOrder[110] = 'batchChangeBranch'; $lang->resource->testcase = new stdclass(); $lang->resource->testcase->browse = 'browse'; $lang->resource->testcase->groupCase = 'groupCase'; +$lang->resource->testcase->zeroCase = 'zeroCase'; $lang->resource->testcase->create = 'create'; $lang->resource->testcase->batchCreate = 'batchCreate'; $lang->resource->testcase->createBug = 'createBug'; @@ -977,7 +1032,7 @@ $lang->resource->testcase->batchEdit = 'batchEdit'; $lang->resource->testcase->delete = 'deleteAction'; $lang->resource->testcase->batchDelete = 'batchDelete'; $lang->resource->testcase->export = 'exportAction'; -$lang->resource->testcase->exportTemplet = 'exportTemplet'; +$lang->resource->testcase->exportTemplate = 'exportTemplate'; $lang->resource->testcase->import = 'importAction'; $lang->resource->testcase->showImport = 'showImport'; $lang->resource->testcase->confirmChange = 'confirmChange'; @@ -997,31 +1052,32 @@ $lang->resource->testcase->importToLib = 'importToLib'; $lang->testcase->methodOrder[0] = 'index'; $lang->testcase->methodOrder[5] = 'browse'; $lang->testcase->methodOrder[10] = 'groupCase'; -$lang->testcase->methodOrder[15] = 'create'; -$lang->testcase->methodOrder[20] = 'batchCreate'; -$lang->testcase->methodOrder[25] = 'createBug'; -$lang->testcase->methodOrder[30] = 'view'; -$lang->testcase->methodOrder[35] = 'edit'; -$lang->testcase->methodOrder[40] = 'delete'; -$lang->testcase->methodOrder[45] = 'export'; -$lang->testcase->methodOrder[50] = 'confirmChange'; -$lang->testcase->methodOrder[55] = 'confirmStoryChange'; -$lang->testcase->methodOrder[60] = 'batchEdit'; -$lang->testcase->methodOrder[65] = 'batchDelete'; -$lang->testcase->methodOrder[70] = 'batchChangeModule'; -$lang->testcase->methodOrder[75] = 'batchChangeBranch'; -$lang->testcase->methodOrder[80] = 'linkCases'; -$lang->testcase->methodOrder[82] = 'linkBugs'; +$lang->testcase->methodOrder[15] = 'zeroCase'; +$lang->testcase->methodOrder[20] = 'create'; +$lang->testcase->methodOrder[25] = 'batchCreate'; +$lang->testcase->methodOrder[30] = 'createBug'; +$lang->testcase->methodOrder[35] = 'view'; +$lang->testcase->methodOrder[40] = 'edit'; +$lang->testcase->methodOrder[45] = 'delete'; +$lang->testcase->methodOrder[50] = 'export'; +$lang->testcase->methodOrder[55] = 'confirmChange'; +$lang->testcase->methodOrder[60] = 'confirmStoryChange'; +$lang->testcase->methodOrder[65] = 'batchEdit'; +$lang->testcase->methodOrder[70] = 'batchDelete'; +$lang->testcase->methodOrder[75] = 'batchChangeModule'; +$lang->testcase->methodOrder[80] = 'batchChangeBranch'; +$lang->testcase->methodOrder[85] = 'linkCases'; +$lang->testcase->methodOrder[87] = 'linkBugs'; $lang->testcase->methodOrder[90] = 'bugs'; $lang->testcase->methodOrder[95] = 'review'; $lang->testcase->methodOrder[100] = 'batchReview'; -$lang->testcase->methodOrder[105] = 'batchConfirmStoryChange'; -$lang->testcase->methodOrder[110] = 'importFromLib'; -$lang->testcase->methodOrder[115] = 'batchCaseTypeChange'; -$lang->testcase->methodOrder[120] = 'confirmLibcaseChange'; -$lang->testcase->methodOrder[125] = 'ignoreLibcaseChange'; -$lang->testcase->methodOrder[130] = 'batchConfirmStoryChange'; -$lang->testcase->methodOrder[135] = 'importToLib'; +$lang->testcase->methodOrder[110] = 'batchConfirmStoryChange'; +$lang->testcase->methodOrder[115] = 'importFromLib'; +$lang->testcase->methodOrder[120] = 'batchCaseTypeChange'; +$lang->testcase->methodOrder[125] = 'confirmLibcaseChange'; +$lang->testcase->methodOrder[130] = 'ignoreLibcaseChange'; +$lang->testcase->methodOrder[135] = 'batchConfirmStoryChange'; +$lang->testcase->methodOrder[140] = 'importToLib'; /* Test task. */ $lang->resource->testtask = new stdclass(); @@ -1114,7 +1170,7 @@ $lang->resource->caselib->delete = 'deleteAction'; $lang->resource->caselib->view = 'view'; $lang->resource->caselib->createCase = 'createCase'; $lang->resource->caselib->batchCreateCase = 'batchCreateCase'; -$lang->resource->caselib->exportTemplet = 'exportTemplet'; +$lang->resource->caselib->exportTemplate = 'exportTemplate'; $lang->resource->caselib->import = 'importAction'; $lang->resource->caselib->showImport = 'showImport'; @@ -1126,7 +1182,7 @@ $lang->caselib->methodOrder[20] = 'delete'; $lang->caselib->methodOrder[25] = 'view'; $lang->caselib->methodOrder[30] = 'createCase'; $lang->caselib->methodOrder[35] = 'batchCreateCase'; -$lang->caselib->methodOrder[40] = 'exportTemplet'; +$lang->caselib->methodOrder[40] = 'exportTemplate'; $lang->caselib->methodOrder[45] = 'import'; $lang->caselib->methodOrder[50] = 'showImport'; @@ -1176,11 +1232,13 @@ $lang->ci->methodOrder[5] = 'commitResult'; $lang->ci->methodOrder[10] = 'checkCompileStatus'; $lang->resource->compile = new stdclass(); -$lang->resource->compile->browse = 'browse'; -$lang->resource->compile->logs = 'logs'; +$lang->resource->compile->browse = 'browse'; +$lang->resource->compile->logs = 'logs'; +$lang->resource->compile->syncCompile = 'syncCompile'; $lang->compile->methodOrder[5] = 'browse'; $lang->compile->methodOrder[10] = 'logs'; +$lang->compile->methodOrder[15] = 'syncCompile'; $lang->resource->jenkins = new stdclass(); $lang->resource->jenkins->browse = 'browseAction'; @@ -1644,6 +1702,7 @@ $lang->resource->admin->sso = 'ssoAction'; $lang->resource->admin->register = 'register'; $lang->resource->admin->ztCompany = 'ztCompany'; $lang->resource->admin->resetPWDSetting = 'resetPWDSetting'; +$lang->resource->admin->tableEngine = 'tableEngine'; $lang->admin->methodOrder[0] = 'index'; $lang->admin->methodOrder[5] = 'checkDB'; @@ -1653,6 +1712,7 @@ $lang->admin->methodOrder[20] = 'sso'; $lang->admin->methodOrder[25] = 'register'; $lang->admin->methodOrder[30] = 'ztCompany'; $lang->admin->methodOrder[35] = 'resetPWDSetting'; +$lang->admin->methodOrder[40] = 'tableEngine'; /* Extension. */ $lang->resource->extension = new stdclass(); diff --git a/module/index/js/index.js b/module/index/js/index.js index d1a2c7a9b3..9354e04071 100644 --- a/module/index/js/index.js +++ b/module/index/js/index.js @@ -122,7 +122,7 @@ } } if(moduleName === 'story' && vision === 'lite') return 'project' - if(moduleName === 'story' && methodLowerCase === 'zerocase') + if(moduleName === 'testcase' && methodLowerCase === 'zerocase') { return link.params.from == 'project' ? 'project' : 'qa'; } @@ -464,7 +464,6 @@ if(!notTriggerEvent) app.$app.trigger('reloadapp', app); - if(url) $(iframe.contentWindow.document.body).hide(); // Code for task #59703. if(!isSameUrl) app.$app.addClass('loading'); if(app._loadTimer) clearTimeout(app._loadTimer); app._loadTimer = setTimeout(function() @@ -754,8 +753,8 @@ $.extend( var searchModule = types[0]; var searchMethod = typeof(types[1]) == 'undefined' ? 'view' : types[1]; var searchLink = createLink(searchModule, searchMethod, "id=" + objectValue); - var assetType = 'story,issue,risk,opportunity,doc'; - if(assetType.indexOf(searchModule) > -1) + var assetType = ',story,issue,risk,opportunity,doc,'; + if(assetType.indexOf(',' + searchModule + ',') > -1) { var link = createLink('index', 'ajaxGetViewMethod' , 'objectID=' + objectValue + '&objectType=' + searchModule); $.get(link, function(data) diff --git a/module/install/lang/de.php b/module/install/lang/de.php index 5c7d739bf6..ac375fa988 100644 --- a/module/install/lang/de.php +++ b/module/install/lang/de.php @@ -162,7 +162,7 @@ $lang->install->account = 'Admin Konto'; $lang->install->password = 'Admin Passwort'; $lang->install->placeholder = new stdclass(); -$lang->install->placeholder->password = 'Combination of letters, numbers and special symbols, at least 6 characters'; +$lang->install->placeholder->password = 'The Password should be ≥ 6 characters, combination of uppercase, lowercase letters and numbers.'; $lang->install->errorEmpty['company'] = "{$lang->install->company} should not be blank."; $lang->install->errorEmpty['account'] = "{$lang->install->account} should not be blank."; diff --git a/module/install/lang/en.php b/module/install/lang/en.php index cfba4afa3c..ae67f6612d 100644 --- a/module/install/lang/en.php +++ b/module/install/lang/en.php @@ -162,7 +162,7 @@ $lang->install->account = 'Admin Account'; $lang->install->password = 'Admin Password'; $lang->install->placeholder = new stdclass(); -$lang->install->placeholder->password = 'Combination of letters, numbers and special symbols, at least 6 characters'; +$lang->install->placeholder->password = 'The Password should be ≥ 6 characters, combination of uppercase, lowercase letters and numbers.'; $lang->install->errorEmpty['company'] = "{$lang->install->company} should not be blank."; $lang->install->errorEmpty['account'] = "{$lang->install->account} should not be blank."; diff --git a/module/install/lang/fr.php b/module/install/lang/fr.php index c5d7bfad74..ffa59af709 100644 --- a/module/install/lang/fr.php +++ b/module/install/lang/fr.php @@ -162,7 +162,7 @@ $lang->install->account = 'Compte Admin'; $lang->install->password = 'Mot de Passe Admin'; $lang->install->placeholder = new stdclass(); -$lang->install->placeholder->password = 'Combination of letters, numbers and special symbols, at least 6 characters'; +$lang->install->placeholder->password = 'Le mot de passe doit ≥ 6 caractères, combinaison de lettres majuscules, minuscules et de chiffres.'; $lang->install->errorEmpty['company'] = "{$lang->install->company} should not be blank."; $lang->install->errorEmpty['account'] = "{$lang->install->account} should not be blank."; diff --git a/module/install/lang/zh-cn.php b/module/install/lang/zh-cn.php index 0b4042c8b7..14dd84cb04 100644 --- a/module/install/lang/zh-cn.php +++ b/module/install/lang/zh-cn.php @@ -162,7 +162,7 @@ $lang->install->account = '管理员帐号'; $lang->install->password = '管理员密码'; $lang->install->placeholder = new stdclass(); -$lang->install->placeholder->password = '六位及以上,包含数字、字母和特殊字符'; +$lang->install->placeholder->password = '6位及以上,包含大小写字母,数字。'; $lang->install->errorEmpty['company'] = "{$lang->install->company}不能为空"; $lang->install->errorEmpty['account'] = "{$lang->install->account}不能为空"; diff --git a/module/install/model.php b/module/install/model.php index 8d4b8d65c3..4d4d302c96 100644 --- a/module/install/model.php +++ b/module/install/model.php @@ -516,14 +516,13 @@ class installModel extends model } } + $this->loadModel('user'); + $this->app->loadConfig('admin'); /* Check password. */ if(!validater::checkReg($this->post->password, '|(.){6,}|')) dao::$errors['password'][] = $this->lang->error->passwordrule; - if(isset($this->config->safe->mode) and (strlen($this->post->password) < $this->config->safe->mode)) dao::$errors['password'][] = $this->lang->user->weakPassword; - if(!empty($this->config->safe->changeWeak)) - { - if(!isset($this->config->safe->weak)) $this->app->loadConfig('admin'); - if(strpos(",{$this->config->safe->weak},", ",{$this->post->password},") !== false) dao::$errors['password'][] = sprintf($this->lang->user->errorWeak, $this->config->safe->weak); - } + if($this->user->computePasswordStrength($this->post->password) < 1) dao::$errors['password'][] = $this->lang->user->placeholder->passwordStrengthCheck[1]; + if(!isset($this->config->safe->weak)) $this->app->loadConfig('admin'); + if(strpos(",{$this->config->safe->weak},", ",{$this->post->password},") !== false) dao::$errors['password'] = sprintf($this->lang->user->errorWeak, $this->config->safe->weak); if(dao::isError()) return false; /* Insert a company. */ diff --git a/module/jenkins/config.php b/module/jenkins/config.php index 874d71aea1..f86ffd1b7c 100644 --- a/module/jenkins/config.php +++ b/module/jenkins/config.php @@ -1,5 +1,5 @@ jenkins->create = new stdclass(); $config->jenkins->edit = new stdclass(); -$config->jenkins->create->requiredFields = 'name,url'; -$config->jenkins->edit->requiredFields = 'name,url'; +$config->jenkins->create->requiredFields = 'name,url,account'; +$config->jenkins->edit->requiredFields = 'name,url,account'; diff --git a/module/job/control.php b/module/job/control.php index f6440f3af3..3a2b28a1e1 100644 --- a/module/job/control.php +++ b/module/job/control.php @@ -49,12 +49,24 @@ class job extends control $pager = new pager($recTotal, $recPerPage, $pageID); $this->app->loadLang('compile'); - $this->view->jobList = $this->job->getList($repoID, $orderBy, $pager); + $jobList = $this->job->getList($repoID, $orderBy, $pager); + $this->loadModel('gitlab'); + foreach($jobList as $job) + { + $job->canExec = true; + if($job->engine == 'gitlab') + { + $pipeline = json_decode($job->pipeline); + $branch = $this->gitlab->apiGetSingleBranch($job->server, $pipeline->project, $pipeline->reference); + if($branch and isset($branch->can_push) and !$branch->can_push) $job->canExec = false; + } + } $this->view->title = $this->lang->ci->job . $this->lang->colon . $this->lang->job->browse; $this->view->position[] = $this->lang->ci->job; $this->view->position[] = $this->lang->job->browse; $this->view->repoID = $repoID; + $this->view->jobList = $jobList; $this->view->orderBy = $orderBy; $this->view->pager = $pager; diff --git a/module/job/css/create.css b/module/job/css/create.css index a70ae4bc4d..188dd0855c 100644 --- a/module/job/css/create.css +++ b/module/job/css/create.css @@ -5,6 +5,6 @@ #server_chosen .chosen-single {border-right: 0px;} #pipelineBox {width: 385px;} #svnDirBox .input-group {width: unset !important;} -#paramDiv .input-group {padding: 3px;} +#jenkinsServerTR .input-group-addon {border-left-width: 0 !important;} .chosen-container .chosen-drop{z-index: 1100;} /* from c20b7e7a5 */ diff --git a/module/job/css/edit.css b/module/job/css/edit.css index 2eaabdfeb4..57c8a09567 100644 --- a/module/job/css/edit.css +++ b/module/job/css/edit.css @@ -5,4 +5,4 @@ #server_chosen .chosen-single {border-right: 0px;} #pipelineBox {width: 385px;} #svnDirBox .input-group {width: unset !important;} -#paramDiv .input-group {padding: 3px;} +#jenkinsServerTR .input-group-addon {border-left-width: 0 !important;} diff --git a/module/job/model.php b/module/job/model.php index c3d53774e7..7bae1cf900 100644 --- a/module/job/model.php +++ b/module/job/model.php @@ -181,6 +181,15 @@ class jobModel extends model { $repo = $this->loadModel('repo')->getRepoByID($job->repo); $project = zget($repo, 'project'); + if(!empty($repo)) + { + $pipeline = $this->loadModel('gitlab')->apiGetPipeline($repo->serviceHost, $repo->serviceProject, $this->post->reference); + if(!is_array($pipeline) or empty($pipeline)) + { + dao::$errors['repo'] = $this->lang->job->engineTips->error; + return false; + } + } $job->server = (int)zget($repo, 'serviceHost', 0); $job->pipeline = json_encode(array('project' => $project, 'reference' => $this->post->reference)); @@ -298,6 +307,15 @@ class jobModel extends model { $repo = $this->loadModel('repo')->getRepoByID($job->gitlabRepo); $project = zget($repo, 'project'); + if(!empty($repo)) + { + $pipeline = $this->loadModel('gitlab')->apiGetPipeline($repo->serviceHost, $repo->serviceProject, $this->post->reference); + if(!is_array($pipeline) or empty($pipeline)) + { + dao::$errors['repo'] = $this->lang->job->engineTips->error; + return false; + } + } $job->repo = $job->gitlabRepo; $job->server = (int)zget($repo, 'serviceHost', 0); diff --git a/module/job/view/browse.html.php b/module/job/view/browse.html.php index 0a1e92e209..34daa1d6bc 100644 --- a/module/job/view/browse.html.php +++ b/module/job/view/browse.html.php @@ -74,7 +74,7 @@ repo}&jobID=$id", '', 'list', 'history'); common::printIcon('job', 'edit', "jobID=$id", '', 'list', 'edit'); - common::printIcon('job', 'exec', "jobID=$id", '', 'list', 'play'); + common::printIcon('job', 'exec', "jobID=$id", '', 'list', 'play', '', $job->canExec ? '' : 'disabled'); if(common::hasPriv('job', 'delete')) echo html::a($this->createLink('job', 'delete', "jobID=$id"), '', 'hiddenwin', "title='{$lang->job->delete}' class='btn'"); ?> diff --git a/module/job/view/create.html.php b/module/job/view/create.html.php index fddeb4505b..5bdd794655 100644 --- a/module/job/view/create.html.php +++ b/module/job/view/create.html.php @@ -62,7 +62,7 @@ job->triggerType; ?> - job->triggerTypeList, '', "class='form-control'");?> + job->triggerTypeList, '', "class='form-control chosen'");?> @@ -122,9 +122,9 @@ job->customParam;?>
    - job->paramName; ?> + '>job->paramName; ?> - job->paramValue; ?> + '>job->paramValue; ?> job->paramValueList, '', "class='form-control' onchange='setParamName(this)'"); ?> diff --git a/module/job/view/edit.html.php b/module/job/view/edit.html.php index 15bd823043..82398bcdd7 100644 --- a/module/job/view/edit.html.php +++ b/module/job/view/edit.html.php @@ -63,7 +63,7 @@ job->triggerType;?> job->triggerTypeList['tag'] = $lang->job->dirChange;?> - job->triggerTypeList, $job->triggerType, "class='form-control'");?> + job->triggerTypeList, $job->triggerType, "class='form-control chosen'");?> @@ -170,9 +170,9 @@
    - job->paramName;?> + '>job->paramName; ?> - job->paramValue;?> + '>job->paramValue; ?> job->paramValueList, '', "class='form-control' onchange='setParamName(this)'");?> diff --git a/module/kanban/config.php b/module/kanban/config.php index 27373d5b3f..a7aa8de832 100644 --- a/module/kanban/config.php +++ b/module/kanban/config.php @@ -36,6 +36,10 @@ $config->kanban->splitcolumn->requiredFields = 'name,limit'; $config->kanban->editor = new stdclass(); $config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools'); $config->kanban->editor->activatespace = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools'); $config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools'); $config->kanban->editor->activate = array('id' => 'comment', 'tools' => 'simpleTools'); $config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools'); diff --git a/module/kanban/control.php b/module/kanban/control.php index 3b4ac85967..e58bca853b 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -90,7 +90,6 @@ class kanban extends control } $space = $this->kanban->getSpaceById($spaceID); - $space->desc = strip_tags(htmlspecialchars_decode($space->desc)); $typeList = $this->lang->kanbanspace->typeList; if($space->type == 'cooperation' or $space->type == 'public') unset($typeList['private']); @@ -221,8 +220,8 @@ class kanban extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); } - $enableImport = 'off'; - $importObjects = array(); + $enableImport = 'on'; + $importObjects = array_keys($this->lang->kanban->importObjectList); if($copyKanbanID) { $copyKanban = $this->kanban->getByID($copyKanbanID); @@ -277,8 +276,7 @@ class kanban extends control return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); } - $kanban = $this->kanban->getByID($kanbanID); - $kanban->desc = strip_tags(htmlspecialchars_decode($kanban->desc)); + $kanban = $this->kanban->getByID($kanbanID); $space = $this->kanban->getSpaceById($kanban->space); $spaceUsers = trim($space->owner) . ',' . trim($space->team); @@ -291,6 +289,33 @@ class kanban extends control $this->view->kanban = $kanban; $this->view->type = $space->type; + $this->display(); + } + + /** + * Setting kanban. + * + * @param int $kanbanID + * @access public + * @return void + */ + public function setting($kanbanID = 0) + { + if(!empty($_POST)) + { + $changes = $this->kanban->setting($kanbanID); + + if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); + + $actionID = $this->loadModel('action')->create('kanban', $kanbanID, 'edited'); + $this->action->logHistory($actionID, $changes); + + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); + } + + $kanban = $this->kanban->getByID($kanbanID); + + $this->view->kanban = $kanban; $this->view->laneCount = $this->kanban->getLaneCount($kanbanID); $this->view->heightType = $kanban->displayCards > 2 ? 'custom' : 'auto'; $this->view->displayCards = $kanban->displayCards ? $kanban->displayCards : ''; @@ -1328,7 +1353,7 @@ class kanban extends control $this->view->projects = array($this->lang->kanban->allProjects) + $this->project->getPairsByProgram(); $this->view->selectedProjectID = $selectedProjectID; $this->view->lanePairs = $this->kanban->getLanePairsByGroup($groupID); - $this->view->executions2Imported = $this->project->getStats($selectedProjectID, 'undone', 0, 0, 30, 'id_asc', $pager); + $this->view->executions2Imported = $this->execution->getStatData($selectedProjectID, 'undone', 0, 0, false, '', 'id_asc', $pager); $this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted'); $this->view->pager = $pager; $this->view->kanbanID = $kanbanID; diff --git a/module/kanban/css/edit.css b/module/kanban/css/edit.css index 0c6f74a6be..bef119443d 100644 --- a/module/kanban/css/edit.css +++ b/module/kanban/css/edit.css @@ -1,13 +1,6 @@ #mainContent .table-form>tbody>tr>th {width: 105px;} #mainContent {padding-left: 0px;} #mainContent .laneHeightBox .radio-inline+.radio-inline, #mainContent .importBox .radio-inline+.radio-inline {margin-left: 20px;} -#mainContent .objectBox {padding-top: 2px;} -#mainContent .objectBox .checkbox-primary {display: inline-block;} -#mainContent .objectBox .checkbox-primary:not(:first-child) {margin-left: 10px;} -#mainContent .objectBox .checkbox-primary>label:not(:first-child) {padding-left: 20px;} -#mainContent .laneHeightBox .tip {color: #999;} -#mainContent .objectBox .checkbox-primary>label:before {top: 2px; left: 0px;} -#mainContent .objectBox .checkbox-primary>label:after {width: 14px; height: 14px;} [lang^='en'] .columnWidth {width: 120px;} [lang^='zh-cn'] .columnWidth {width: 80px;} #team ~ #contactListMenu_chosen {vertical-align: top;} diff --git a/module/kanban/css/setting.css b/module/kanban/css/setting.css new file mode 100644 index 0000000000..13f732de59 --- /dev/null +++ b/module/kanban/css/setting.css @@ -0,0 +1,10 @@ +#mainContent {padding-left: 0px;} +#mainContent .objectBox {padding-top: 2px;} +#mainContent .objectBox .checkbox-primary {display: inline-block;} +#mainContent .objectBox .checkbox-primary:not(:first-child) {margin-left: 10px;} +#mainContent .objectBox .checkbox-primary>label:not(:first-child) {padding-left: 20px;} +#mainContent .laneHeightBox .tip {color: #999;} +#mainContent .objectBox .checkbox-primary>label:before {top: 2px; left: 0px;} +#mainContent .objectBox .checkbox-primary>label:after {width: 14px; height: 14px;} +#mainContent table > tbody th {width: 110px !important;} +[lang^=en] .laneHeightBox > label, [lang^=de] .laneHeightBox > label, [lang^=fr] .laneHeightBox > label, [lang^=en] .importBox > label, [lang^=de] .importBox > label, [lang^=fr] .importBox > label {margin-left: 0px;} diff --git a/module/kanban/css/space.css b/module/kanban/css/space.css index fafa03aaa0..1b58d9edcc 100644 --- a/module/kanban/css/space.css +++ b/module/kanban/css/space.css @@ -18,14 +18,14 @@ .kanbans .panel {margin: 0 0; border: 1px solid #DCDCDC; border-radius: 4px; box-shadow: none; cursor: pointer; height: 160px; margin-bottom: 5px;} .kanbans .panel:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,100,.25);} .kanbans .panel-heading {padding: 4px 2px 10px 16px;} -.kanbans .kanban-name {overflow: hidden; white-space:nowrap; width: 78%; float: left; padding-top: 8px;} +.kanbans .kanban-name {overflow: hidden; white-space:nowrap; width: 90%; float: left; padding-top: 8px;} .kanbans .panel .label-closed {background: #AAA !important; color: #FFF; margin-top:-1px !important;} .kanbans .kanban-actions {float: right; visibility: hidden;} .kanbans .kanban-actions .dropdown-menu.pull-right {top:31px; right: -84px; left: auto;} .kanbans .kanban-actions .dropdown-menu.pull-left {top:31px; right:-1px; left: auto;} .kanbans .panel .label-closed {background: #AAA !important; color: #FFF; margin-top:-6px;} .kanbans .panel-body {padding: 0 16px 16px;} -.kanbans .kanban-desc {color: #838a9d; word-break:break-all; height: 70px; overflow: hidden; display: -webkit-box; float:left;} +.kanbans .kanban-desc {color: #838a9d; word-break:break-all; height: 70px; overflow: hidden; float:left;} .kanbans .kanban-footer {position: absolute; bottom: 10px; right: 10px; left: 15px;} .kanbans .kanban-members {float: left; height: 24px; line-height: 24px;} .kanbans .kanban-members > div {display: inline-block; height: 24px;} diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index c5f5935b86..d024f92111 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -155,3 +155,4 @@ .region .kanban-board .kanban-header-parent-col > .kanban-header-col > .title {max-width: 100% !important;} .region .kanban-board .kanban-header-sub-cols .kanban-header-col > .title > span {max-width: calc(100% - 165px) !important;} .region .kanban-board .kanban-header-sub-cols .kanban-header-col.left > .title > span {max-width: calc(100% - 120px) !important;} +.executionName .delayed {margin-right: 10px;} diff --git a/module/kanban/js/create.js b/module/kanban/js/create.js index 8101e62b2a..8fdb06b4bd 100644 --- a/module/kanban/js/create.js +++ b/module/kanban/js/create.js @@ -1,6 +1,10 @@ $(function() { - if(enableImport == 'off') $("input[name^='importObjectList']").attr('disabled', 'disabled'); + if(enableImport == 'off') + { + $("input[name^='importObjectList']").attr('disabled', 'disabled'); + $('td.objectBox').hide(); + } $("input[id='copyContentbasicInfo']").click(function(){return false;}) copyRegion = $("input[id='copyContentregion']").prop('checked'); @@ -15,10 +19,12 @@ $(function() if($(this).val() == 'off') { $("input[name^='importObjectList']").attr('disabled', 'disabled'); + $('td.objectBox').hide(); } else { $("input[name^='importObjectList']").removeAttr('disabled'); + $('td.objectBox').show(); } }) diff --git a/module/kanban/js/edit.js b/module/kanban/js/setting.js similarity index 84% rename from module/kanban/js/edit.js rename to module/kanban/js/setting.js index 0d11945872..79edfa6b24 100644 --- a/module/kanban/js/edit.js +++ b/module/kanban/js/setting.js @@ -3,17 +3,23 @@ $(function() var heightType = $("[name='heightType']:checked").val(); setCardCount(heightType); - if(enableImport == 'off') $("input[name^='importObjectList']").attr('disabled', 'disabled'); + if(enableImport == 'off') + { + $("input[name^='importObjectList']").attr('disabled', 'disabled'); + $('td.objectBox').hide(); + } $("input[name='import']").change(function() { if($(this).val() == 'off') { $("input[name^='importObjectList']").attr('disabled', 'disabled'); + $('td.objectBox').hide(); } else { $("input[name^='importObjectList']").removeAttr('disabled'); + $('td.objectBox').show(); } }) diff --git a/module/kanban/js/space.js b/module/kanban/js/space.js index 260931a56f..4f39482177 100644 --- a/module/kanban/js/space.js +++ b/module/kanban/js/space.js @@ -30,3 +30,39 @@ $(function() window.location.reload(); }); }); + +(function() +{ + /* Expand or collapse text */ + function limitText() + { + var fullText; + var limitText; + var $text = $(this); + var options = $.extend({limitSize: 40, suffix: '…'}, $text.data()); + var text = $text.text(); + if(text.length > options.limitSize) + { + fullText = $text.html(); + limitText = text.substring(0, options.limitSize) + options.suffix; + $text.text(limitText).addClass('limit-text-on'); + + var $toggleBtn = options.toggleBtn ? $(options.toggleBtn) : $text.next('.text-limit-toggle'); + $toggleBtn.text($toggleBtn.data('textExpand')); + $toggleBtn.on('click', function() + { + var isLimitOn = $text.toggleClass('limit-text-on').hasClass('limit-text-on'); + if(isLimitOn) $text.text(limitText); + else $text.html(fullText); + $toggleBtn.text($toggleBtn.data(isLimitOn ? 'textExpand' : 'textCollapse')); + }); + } + else + { + (options.toggleBtn ? $(options.toggleBtn) : $text.next('.text-limit-toggle')).hide(); + } + $text.removeClass('hidden'); + }; + $.fn.textLimit = function(){return this.each(limitText);}; + $(function(){$('.text-limit').textLimit();}); +})(); diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index 7e39e60137..5bec4a50a1 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -407,7 +407,7 @@ function renderKanbanItem(item, $item) $user.html(renderUsersAvatar(assignedTo, item.id)).attr('title', title); } - if(kanban.performable == 1) + if(kanban.performable == 1 && (item.fromType == '' || item.fromType == 'execution')) { var $progress = $item.children('.progress-box'); if(!$progress.length) $progress = $('
    ' + item.progress + '%
    ').appendTo($item); @@ -1189,7 +1189,7 @@ function createCardMenu(options) var items = []; if(privs.includes('editCard') && card.fromType == '') items.push({label: kanbanLang.editCard, icon: 'edit', url: createLink('kanban', 'editCard', 'cardID=' + card.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(privs.includes('deleteCard')) items.push({label: card.fromType == '' ? kanbanLang.deleteCard : kanbanLang.removeCard, icon: card.fromType == '' ? 'trash' : 'unlink', url: createLink('kanban', 'deleteCard', 'cardID=' + card.id), attrs: {'target': 'hiddenwin'}}); - if(kanban.performable == 1) + if(kanban.performable == 1 && card.fromType == '') { if(card.status == 'done') { diff --git a/module/kanban/lang/de.php b/module/kanban/lang/de.php index 01aefc72bc..ddf3f1c317 100644 --- a/module/kanban/lang/de.php +++ b/module/kanban/lang/de.php @@ -48,6 +48,7 @@ $lang->kanban->removeCard = 'Remove Card'; $lang->kanban->assigntoCard = 'Assign'; $lang->kanban->setting = 'Setting'; $lang->kanban->settingSpace = 'Setting Space'; +$lang->kanban->settingKanban = 'Setting Kanban'; $lang->kanban->activateSpace = 'Activate Space'; $lang->kanban->closeSpace = 'Close Space'; $lang->kanban->deleteSpace = 'Delete Space'; @@ -133,11 +134,11 @@ $lang->kanban->aclGroup['extend'] = 'Extend'; $lang->kanban->aclList['extend'] = 'Extend (Accessible with space view permissions)'; $lang->kanban->aclList['private'] = 'Private (For the kanban team, whitelist members and space owner only)'; -$lang->kanban->archiveList['0'] = 'Disable'; $lang->kanban->archiveList['1'] = 'Enable'; +$lang->kanban->archiveList['0'] = 'Disable'; -$lang->kanban->enableList['0'] = 'Disable'; $lang->kanban->enableList['1'] = 'Enable'; +$lang->kanban->enableList['0'] = 'Disable'; $lang->kanban->alignmentList['center'] = 'Center'; $lang->kanban->alignmentList['left'] = 'Left'; @@ -200,7 +201,6 @@ $lang->kanban->moreAction = 'More Action'; $lang->kanban->noGroup = 'None'; $lang->kanban->limitExceeded = 'Limit Exceeded'; $lang->kanban->fullScreen = 'Full Screen'; -$lang->kanban->setting = 'Setting'; $lang->kanban->my = 'My'; $lang->kanban->other = 'Other'; $lang->kanban->showWIP = 'Show WIP'; @@ -216,12 +216,17 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.'; -$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; -$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['id_asc'] = 'Story ID Ascending'; +$lang->kanban->orderList['id_desc'] = 'Story ID Descending'; +$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; +$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['stage_asc'] = 'Story Stage Ascending'; +$lang->kanban->orderList['stage_desc'] = 'Story Stage Descending'; +$lang->kanban->orderList['assignedTo_desc'] = 'Assigned To'; $lang->kanban->importList = array(); -$lang->kanban->importList['off'] = 'Import is not enabled'; $lang->kanban->importList['on'] = 'Enable the import function, you can only import content that you have permission to view.'; +$lang->kanban->importList['off'] = 'Import is not enabled'; $lang->kanban->importObjectList = array(); $lang->kanban->importObjectList['plans'] = 'Product Plan'; diff --git a/module/kanban/lang/en.php b/module/kanban/lang/en.php index 33b350d8f6..44ef17286f 100644 --- a/module/kanban/lang/en.php +++ b/module/kanban/lang/en.php @@ -48,6 +48,7 @@ $lang->kanban->removeCard = 'Remove Card'; $lang->kanban->assigntoCard = 'Assign'; $lang->kanban->setting = 'Setting'; $lang->kanban->settingSpace = 'Setting Space'; +$lang->kanban->settingKanban = 'Setting Kanban'; $lang->kanban->activateSpace = 'Activate Space'; $lang->kanban->closeSpace = 'Close Space'; $lang->kanban->deleteSpace = 'Delete Space'; @@ -133,11 +134,11 @@ $lang->kanban->aclGroup['extend'] = 'Extend'; $lang->kanban->aclList['extend'] = 'Extend (Accessible with space view permissions)'; $lang->kanban->aclList['private'] = 'Private (For the kanban team, whitelist members and space owner only)'; -$lang->kanban->archiveList['0'] = 'Disable'; $lang->kanban->archiveList['1'] = 'Enable'; +$lang->kanban->archiveList['0'] = 'Disable'; -$lang->kanban->enableList['0'] = 'Disable'; $lang->kanban->enableList['1'] = 'Enable'; +$lang->kanban->enableList['0'] = 'Disable'; $lang->kanban->alignmentList['center'] = 'Center'; $lang->kanban->alignmentList['left'] = 'Left'; @@ -200,7 +201,6 @@ $lang->kanban->moreAction = 'More Action'; $lang->kanban->noGroup = 'None'; $lang->kanban->limitExceeded = 'Limit Exceeded'; $lang->kanban->fullScreen = 'Full Screen'; -$lang->kanban->setting = 'Setting'; $lang->kanban->my = 'My'; $lang->kanban->other = 'Other'; $lang->kanban->showWIP = 'Show WIP'; @@ -216,12 +216,17 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.'; -$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; -$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['id_asc'] = 'Story ID Ascending'; +$lang->kanban->orderList['id_desc'] = 'Story ID Descending'; +$lang->kanban->orderList['pri_asc'] = 'Story Priority Ascending'; +$lang->kanban->orderList['pri_desc'] = 'Story Priority Descending'; +$lang->kanban->orderList['stage_asc'] = 'Story Stage Ascending'; +$lang->kanban->orderList['stage_desc'] = 'Story Stage Descending'; +$lang->kanban->orderList['assignedTo_desc'] = 'Assigned To'; $lang->kanban->importList = array(); -$lang->kanban->importList['off'] = 'Import is not enabled'; $lang->kanban->importList['on'] = 'Enable import function (You can import content that you have permission to view as cards.)'; +$lang->kanban->importList['off'] = 'Import is not enabled'; $lang->kanban->importObjectList = array(); $lang->kanban->importObjectList['plans'] = 'Product Plan'; diff --git a/module/kanban/lang/fr.php b/module/kanban/lang/fr.php index 98068f4554..f350920013 100644 --- a/module/kanban/lang/fr.php +++ b/module/kanban/lang/fr.php @@ -48,6 +48,7 @@ $lang->kanban->removeCard = 'Remove Card'; $lang->kanban->assigntoCard = 'Assign'; $lang->kanban->setting = 'Setting'; $lang->kanban->settingSpace = 'Setting Space'; +$lang->kanban->settingKanban = 'Setting Kanban'; $lang->kanban->activateSpace = 'Activate Space'; $lang->kanban->closeSpace = 'Close Space'; $lang->kanban->deleteSpace = 'Delete Space'; @@ -133,11 +134,11 @@ $lang->kanban->aclGroup['extend'] = 'Extend'; $lang->kanban->aclList['extend'] = 'Extend (Accessible with space view permissions)'; $lang->kanban->aclList['private'] = 'Private (For the kanban team, whitelist members and space owner only)'; -$lang->kanban->archiveList['0'] = 'Disable'; $lang->kanban->archiveList['1'] = 'Enable'; +$lang->kanban->archiveList['0'] = 'Disable'; -$lang->kanban->enableList['0'] = 'Disable'; $lang->kanban->enableList['1'] = 'Enable'; +$lang->kanban->enableList['0'] = 'Disable'; $lang->kanban->alignmentList['center'] = 'Center'; $lang->kanban->alignmentList['left'] = 'Left'; @@ -200,7 +201,6 @@ $lang->kanban->moreAction = 'More Action'; $lang->kanban->noGroup = 'None'; $lang->kanban->limitExceeded = 'Limit Exceeded'; $lang->kanban->fullScreen = 'Full Screen'; -$lang->kanban->setting = 'Setting'; $lang->kanban->my = 'My'; $lang->kanban->other = 'Other'; $lang->kanban->showWIP = 'Show WIP'; @@ -216,12 +216,17 @@ $lang->kanban->error->childLimitNote = 'The sum of products in the child colu $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->error->childLimitEmpty = 'Please set the WIP quantity of the sub column before operation.'; -$lang->kanban->orderList['pri_asc'] = 'Story Priorité Ascendante'; -$lang->kanban->orderList['pri_desc'] = 'Story Priorité Descendante'; +$lang->kanban->orderList['id_asc'] = 'Story ID Ascendante'; +$lang->kanban->orderList['id_desc'] = 'Story ID Descendante'; +$lang->kanban->orderList['pri_asc'] = 'Story Priorité Ascendante'; +$lang->kanban->orderList['pri_desc'] = 'Story Priorité Descendante'; +$lang->kanban->orderList['stage_asc'] = 'Story Phase Ascendante'; +$lang->kanban->orderList['stage_desc'] = 'Story Phase Descendante'; +$lang->kanban->orderList['assignedTo_desc'] = 'Assigné à'; $lang->kanban->importList = array(); -$lang->kanban->importList['off'] = 'Import is not enabled'; $lang->kanban->importList['on'] = 'Enable the import function, you can only import content that you have permission to view.'; +$lang->kanban->importList['off'] = 'Import is not enabled'; $lang->kanban->importObjectList = array(); $lang->kanban->importObjectList['plans'] = 'Product Plan'; diff --git a/module/kanban/lang/zh-cn.php b/module/kanban/lang/zh-cn.php index 199330b009..d0a83afc89 100644 --- a/module/kanban/lang/zh-cn.php +++ b/module/kanban/lang/zh-cn.php @@ -48,6 +48,7 @@ $lang->kanban->removeCard = '移除卡片'; $lang->kanban->assigntoCard = '指派'; $lang->kanban->setting = '设置'; $lang->kanban->settingSpace = '设置空间'; +$lang->kanban->settingKanban = '设置看板'; $lang->kanban->activateSpace = '激活空间'; $lang->kanban->closeSpace = '关闭空间'; $lang->kanban->deleteSpace = '删除空间'; @@ -86,7 +87,7 @@ $lang->kanban->allKanban = '所有看板'; $lang->kanban->allProjects = '所有' . ($this->config->systemMode == 'classic' ? $lang->executionCommon : '项目'); $lang->kanban->allProducts = '所有产品'; $lang->kanban->mine = '我负责'; -$lang->kanban->alignment = '对齐方式'; +$lang->kanban->alignment = '列标题对齐方式'; $lang->kanban->allUsers = '加载所有用户'; /* Fields. */ @@ -133,11 +134,11 @@ $lang->kanban->aclGroup['extend'] = '继承空间'; $lang->kanban->aclList['extend'] = '继承空间访问权限(能访问当前空间,即可访问)'; $lang->kanban->aclList['private'] = '私有(看板团队成员、白名单、空间负责人可访问)'; -$lang->kanban->archiveList['0'] = '不启用'; $lang->kanban->archiveList['1'] = '启用'; +$lang->kanban->archiveList['0'] = '不启用'; -$lang->kanban->enableList['0'] = '不启用'; $lang->kanban->enableList['1'] = '启用'; +$lang->kanban->enableList['0'] = '不启用'; $lang->kanban->alignmentList['center'] = '居中'; $lang->kanban->alignmentList['left'] = '居左'; @@ -200,7 +201,6 @@ $lang->kanban->moreAction = '更多操作'; $lang->kanban->noGroup = '无'; $lang->kanban->limitExceeded = '超出在制品限制'; $lang->kanban->fullScreen = '全屏'; -$lang->kanban->setting = '设置'; $lang->kanban->my = '我的看板'; $lang->kanban->other = '其他'; $lang->kanban->showWIP = '显示在制品限制'; @@ -216,12 +216,17 @@ $lang->kanban->error->childLimitNote = '子列在制品数量之和不能大 $lang->kanban->error->importObjNotEmpty = '请至少选择一个导入对象'; $lang->kanban->error->childLimitEmpty = '请先设置子列的在制品数量后再操作'; -$lang->kanban->orderList['pri_asc'] = '需求优先级正序排序'; -$lang->kanban->orderList['pri_desc'] = '需求优先级倒序排序'; +$lang->kanban->orderList['id_asc'] = '需求ID正序'; +$lang->kanban->orderList['id_desc'] = '需求ID倒序'; +$lang->kanban->orderList['pri_asc'] = '需求优先级正序'; +$lang->kanban->orderList['pri_desc'] = '需求优先级倒序'; +$lang->kanban->orderList['stage_asc'] = '需求阶段正序'; +$lang->kanban->orderList['stage_desc'] = '需求阶段倒序'; +$lang->kanban->orderList['assignedTo_desc'] = '指派给'; $lang->kanban->importList = array(); -$lang->kanban->importList['off'] = '不启用导入功能'; $lang->kanban->importList['on'] = '启用导入功能(可以导入自己有权查看的内容作为卡片)'; +$lang->kanban->importList['off'] = '不启用导入功能'; $lang->kanban->importObjectList = array(); $lang->kanban->importObjectList['plans'] = '计划'; diff --git a/module/kanban/model.php b/module/kanban/model.php old mode 100644 new mode 100755 index 7dff2257ac..50bca7f45d --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1207,6 +1207,10 @@ class kanbanModel extends model ->andWhere('action')->eq('opened') ->fetchPairs(); } + elseif($fromType == 'execution') + { + $executionProgress = $this->loadModel('project')->computerProgress($objects); + } /* Data for constructing the card. */ foreach($objectCards as $objectID => $cardsInfo) @@ -1231,6 +1235,7 @@ class kanbanModel extends model if($delay > 0) $objectCard->delay = $delay; } $objectCard->execType = $object->type; + $objectCard->progress = isset($executionProgress[$objectID]->progress) ? $executionProgress[$objectID]->progress : 0; } $objectCard->desc = strip_tags(htmlspecialchars_decode($object->desc)); @@ -1393,7 +1398,7 @@ class kanbanModel extends model * @access public * @return array */ - public function getExecutionKanban($executionID, $browseType = 'all', $groupBy = 'default', $searchValue = '', $orderBy = 'pri_asc') + public function getExecutionKanban($executionID, $browseType = 'all', $groupBy = 'default', $searchValue = '', $orderBy = 'id_asc') { if($groupBy != 'default') return $this->getKanban4Group($executionID, $browseType, $groupBy, $searchValue, $orderBy); @@ -1521,7 +1526,7 @@ class kanbanModel extends model * @access public * @return array */ - public function getKanban4Group($executionID, $browseType, $groupBy, $searchValue = '', $orderBy = 'pri_asc') + public function getKanban4Group($executionID, $browseType, $groupBy, $searchValue = '', $orderBy = 'id_asc') { /* Get card data. */ $cardList = array(); @@ -1547,7 +1552,7 @@ class kanbanModel extends model if($browseType == 'bug') $bugCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'bug'); if($browseType == 'task') $taskCardMenu = $this->getKanbanCardMenu($executionID, $cardList, 'task'); - if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'pri_asc'; + if($groupBy == 'story' and $browseType == 'task' and !isset($this->lang->kanban->orderList[$orderBy])) $orderBy = 'id_asc'; $lanes = $this->getLanes4Group($executionID, $browseType, $groupBy, $cardList, $orderBy); if(empty($lanes)) return array(); @@ -1600,7 +1605,7 @@ class kanbanModel extends model { $columnData[0]['id'] = 0; $columnData[0]['type'] = 'story'; - $columnData[0]['name'] = zget($this->lang->kanban->orderList, $orderBy, ''); + $columnData[0]['name'] = $this->lang->SRCommon; $columnData[0]['color'] = '#333'; $columnData[0]['limit'] = '-1'; $columnData[0]['laneType'] = $browseType; @@ -1659,6 +1664,7 @@ class kanbanModel extends model if(in_array($groupBy, array('type', 'category', 'source')) and $object->$groupBy !== $laneID) continue; if($groupBy == 'assignedTo') { + $laneID = (string)$laneID; if(empty($object->team) and $object->$groupBy !== $laneID) continue; if(!empty($object->team) and !in_array($laneID, array_keys($object->team), true)) continue; @@ -1720,7 +1726,7 @@ class kanbanModel extends model * * @return array */ - public function getLanes4Group($executionID, $browseType, $groupBy, $cardList, $orderBy = 'pri_asc') + public function getLanes4Group($executionID, $browseType, $groupBy, $cardList, $orderBy = 'id_asc') { $lanes = array(); $groupByList = array(); @@ -1938,6 +1944,7 @@ class kanbanModel extends model ->join('whitelist', ',') ->join('team', ',') ->trim('name') + ->stripTags($this->config->kanban->editor->createspace['id'], $this->config->allowedTags) ->remove('uid,contactListMenu') ->get(); @@ -1981,6 +1988,7 @@ class kanbanModel extends model ->join('whitelist', ',') ->join('team', ',') ->trim('name') + ->stripTags($this->config->kanban->editor->editspace['id'], $this->config->allowedTags) ->remove('uid,contactListMenu') ->get(); @@ -2193,7 +2201,8 @@ class kanbanModel extends model ->join('whitelist', ',') ->join('team', ',') ->trim('name') - ->remove('contactListMenu,type,import,importObjectList,copyKanbanID,copyRegion') + ->stripTags($this->config->kanban->editor->create['id'], $this->config->allowedTags) + ->remove('contactListMenu,type,import,importObjectList,uid,copyKanbanID,copyRegion') ->get(); if($this->post->import == 'on') $kanban->object = implode(',', $this->post->importObjectList); @@ -2238,7 +2247,7 @@ class kanbanModel extends model if(isset($_POST['team']) or isset($_POST['whitelist'])) { $type = isset($_POST['team']) ? 'team' : 'whitelist'; - $kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type}); + $kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type}); $this->addSpaceMembers($kanban->space, $type, $kanbanMembers); } @@ -2261,15 +2270,56 @@ class kanbanModel extends model $kanban = fixer::input('post') ->setDefault('lastEditedBy', $account) ->setDefault('lastEditedDate', helper::now()) - ->setDefault('displayCards', 0) ->setDefault('whitelist', '') ->setDefault('team', '') - ->setIF($this->post->import == 'off', 'object', '') - ->setIF($this->post->heightType == 'auto', 'displayCards', 0) ->join('whitelist', ',') ->join('team', ',') ->trim('name') - ->remove('uid,contactListMenu,import,importObjectList,heightType') + ->stripTags($this->config->kanban->editor->edit['id'], $this->config->allowedTags) + ->remove('uid,contactListMenu') + ->get(); + + $this->dao->update(TABLE_KANBAN)->data($kanban) + ->autoCheck() + ->batchCheck($this->config->kanban->edit->requiredFields, 'notempty') + ->where('id')->eq($kanbanID) + ->exec(); + + if(!dao::isError()) + { + $this->loadModel('file')->saveUpload('kanban', $kanbanID); + $this->file->updateObjectID($this->post->uid, $kanbanID, 'kanban'); + + if(isset($_POST['team']) or isset($_POST['whitelist'])) + { + $type = isset($_POST['team']) ? 'team' : 'whitelist'; + $kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type}); + $this->addSpaceMembers($kanban->space, $type, $kanbanMembers); + } + + return common::createChanges($oldKanban, $kanban); + } + } + + /** + * Setting kanban. + * + * @param int $kanbanID + * @access public + * @return void + */ + public function setting($kanbanID) + { + $kanbanID = (int)$kanbanID; + $account = $this->app->user->account; + $oldKanban = $this->getByID($kanbanID); + $kanban = fixer::input('post') + ->setDefault('lastEditedBy', $account) + ->setDefault('lastEditedDate', helper::now()) + ->setDefault('displayCards', 0) + ->setIF($this->post->import == 'off', 'object', '') + ->setIF($this->post->heightType == 'auto', 'displayCards', 0) + ->remove('import,importObjectList,heightType') ->get(); if($this->post->import == 'on') $kanban->object = implode(',', $this->post->importObjectList); @@ -2287,18 +2337,10 @@ class kanbanModel extends model if(!dao::isError()) { - $this->loadModel('file')->saveUpload('kanban', $kanbanID); - $this->file->updateObjectID($this->post->uid, $kanbanID, 'kanban'); - - if(isset($_POST['team']) or isset($_POST['whitelist'])) - { - $type = isset($_POST['team']) ? 'team' : 'whitelist'; - $kanbanMembers = empty($kanban->{$type}) ? array() : explode(',', $kanban->{$type}); - $this->addSpaceMembers($kanban->space, $type, $kanbanMembers); - } - return common::createChanges($oldKanban, $kanban); } + + return false; } /** @@ -2595,7 +2637,7 @@ class kanbanModel extends model { $addMembers = implode(',', $addMembers); $members .= ',' . trim($addMembers, ','); - $this->dao->update(TABLE_KANBANSPACE)->set($type)->eq($members)->where('id')->eq($spaceID)->exec(); + $this->dao->update(TABLE_KANBANSPACE)->set($type)->eq($members)->where('id')->eq($spaceID)->exec(); } } @@ -3197,20 +3239,18 @@ class kanbanModel extends model $actions .= "
    {$this->lang->kanban->fullScreen}"; $CRKanban = !(isset($this->config->CRKanban) and $this->config->CRKanban == '0' and $kanban->status == 'closed'); - $printRegionBtn = ($CRKanban and (common::hasPriv('kanban', 'createRegion'))); $printKanbanBtn = (common::hasPriv('kanban', 'edit') or ($kanban->status == 'active' and common::hasPriv('kanban', 'close')) or common::hasPriv('kanban', 'delete') or ($kanban->status == 'closed' and common::hasPriv('kanban', 'activate'))); - if($printRegionBtn or $printKanbanBtn) + if($printKanbanBtn) { - $actions .= "" . ' ' . $this->lang->kanban->setting . ''; + $actions .= "" . ' ' . $this->lang->edit . ''; $actions .= ""; } + if(common::hasPriv('kanban', 'setting')) $actions .= html::a(helper::createLink('kanban', 'setting', "kanbanID=$kanban->id", '', true), ' ' . $this->lang->kanban->setting, '', "class='iframe btn btn-link' data-width='60%'"); + $actions .= "
    "; $this->lang->headerActions = $actions; @@ -3303,7 +3345,7 @@ class kanbanModel extends model { $groupBy = ($this->session->execGroupBy and ($this->app->tab == 'execution' or $this->config->vision == 'lite')) ? $this->session->execGroupBy : ''; - $fromCell = $this->dao->select('cards, lane')->from(TABLE_KANBANCELL) + $fromCell = $this->dao->select('id,cards,lane')->from(TABLE_KANBANCELL) ->where('`column`')->eq($fromColID) ->beginIF(!$groupBy or $groupBy == 'default')->andWhere('lane')->eq($fromLaneID)->fi() ->beginIF($groupBy and $groupBy != 'default') @@ -3313,20 +3355,36 @@ class kanbanModel extends model ->fetch(); if($groupBy and $groupBy != 'default') $fromLaneID = $toLaneID = $fromCell->lane; + $fromCells[$fromCell->id] = $fromCell; - $fromCellCards = $fromCell->cards; - $toCell = $this->dao->select('*')->from(TABLE_KANBANCELL)->where('lane')->eq($toLaneID)->andWhere('`column`')->eq($toColID)->fetch(); - $toCellCards = $this->dao->select('cards')->from(TABLE_KANBANCELL)->where('lane')->eq($toLaneID)->andWhere('`column`')->eq($toColID)->fetch('cards'); + /* Remove all cells with cardID in fromCell. */ + $fromLane = $this->getLaneById($fromLaneID); + $fromCells += $this->dao->select('t1.id as id,t1.cards,t1.lane')->from(TABLE_KANBANCELL)->alias('t1') + ->leftJoin(TABLE_KANBANLANE)->alias('t2')->on('t1.lane=t2.id') + ->where('t1.type')->eq($fromLane->type) + ->andWhere('t1.id')->ne($fromCell->id) + ->andWhere('t2.region')->eq($fromLane->region) + ->andWhere('t1.cards')->like("%,$cardID,%") + ->fetchAll('id'); - $kanbanID = $kanbanID == 0 ? $toCell->kanban : $kanbanID; + foreach($fromCells as $fromCell) + { + $fromCellCards = explode(',', $fromCell->cards); + $fromCellCards = array_unique($fromCellCards); + $fromCellCards = array_filter($fromCellCards); + $fromCellCards = implode(',', $fromCellCards); + $fromCardList = str_replace(",$cardID,", ',', ",$fromCellCards,"); + if($fromCardList == ',') $fromCardList = ''; + $this->dao->update(TABLE_KANBANCELL)->set('cards')->eq($fromCardList)->where('id')->eq($fromCell->id)->exec(); + } + /* Add cardID to toCell. */ + $toCell = $this->dao->select('*')->from(TABLE_KANBANCELL)->where('lane')->eq($toLaneID)->andWhere('`column`')->eq($toColID)->fetch(); + $toCellCards = $this->dao->select('cards')->from(TABLE_KANBANCELL)->where('lane')->eq($toLaneID)->andWhere('`column`')->eq($toColID)->fetch('cards'); + $kanbanID = $kanbanID == 0 ? $toCell->kanban : $kanbanID; if(!$toCell) $this->addKanbanCell($kanbanID, $toLaneID, $toColID, 'common'); - $fromCardList = str_replace(",$cardID,", ',', $fromCellCards); - $toCardList = rtrim($toCellCards, ',') . ",$cardID,"; - - if($fromCardList == ',') $fromCardList = ''; - $this->dao->update(TABLE_KANBANCELL)->set('cards')->eq($fromCardList)->where('`column`')->eq($fromColID)->andWhere('lane')->eq($fromLaneID)->exec(); + $toCardList = rtrim($toCellCards, ',') . ",$cardID,"; $this->dao->update(TABLE_KANBANCELL)->set('cards')->eq($toCardList)->where('`column`')->eq($toColID)->andWhere('lane')->eq($toLaneID)->exec(); } @@ -3810,7 +3868,7 @@ class kanbanModel extends model { $menu = array(); - $toTaskPriv = strpos('draft,closed', $story->status) !== false ? false : true; + $toTaskPriv = strpos('draft,reviewing,closed', $story->status) !== false ? false : true; if(common::hasPriv('story', 'edit') and $this->story->isClickable($story, 'edit')) $menu[] = array('label' => $this->lang->story->edit, 'icon' => 'edit', 'url' => helper::createLink('story', 'edit', "storyID=$story->id", '', true), 'size' => '95%'); if(common::hasPriv('story', 'change') and $this->story->isClickable($story, 'change')) $menu[] = array('label' => $this->lang->story->change, 'icon' => 'alter', 'url' => helper::createLink('story', 'change', "storyID=$story->id", '', true), 'size' => '95%'); if(common::hasPriv('story', 'review') and $this->story->isClickable($story, 'review')) $menu[] = array('label' => $this->lang->story->review, 'icon' => 'search', 'url' => helper::createLink('story', 'review', "storyID=$story->id", '', true), 'size' => '95%'); diff --git a/module/kanban/view/create.html.php b/module/kanban/view/create.html.php index 0c9c7f716a..d48bf1a673 100644 --- a/module/kanban/view/create.html.php +++ b/module/kanban/view/create.html.php @@ -78,11 +78,11 @@ kanban->error->importObjNotEmpty;?> kanban->archive;?> - kanban->archiveList, isset($copyKanban->archived) ? $copyKanban->archived : '0'));?> + kanban->archiveList, isset($copyKanban->archived) ? $copyKanban->archived : '1'));?> kanban->manageProgress;?> - kanban->enableList, isset($copyKanban->performable) ? $copyKanban->performable : '0'));?> + kanban->enableList, isset($copyKanban->performable) ? $copyKanban->performable : '1'));?> kanban->alignment;?> diff --git a/module/kanban/view/edit.html.php b/module/kanban/view/edit.html.php index 03098f0379..823ec82911 100644 --- a/module/kanban/view/edit.html.php +++ b/module/kanban/view/edit.html.php @@ -12,7 +12,6 @@ ?> - config->vision);?>
    @@ -24,11 +23,6 @@ kanban->space;?> space, "class='form-control chosen' onchange='loadOwners(this.value)'");?> - - kanban->WIPCount;?> - kanban->showWIPList, $kanban->showWIP);?> - - kanban->name;?> name, "class='form-control'");?> @@ -53,40 +47,6 @@ - - kanban->columnWidth;?> - kanbancolumn->fluidBoardList, $kanban->fluidBoard));?> - - 1):?> - - kanban->laneHeight;?> - kanbanlane->heightTypeList, $heightType, "onclick='setCardCount(this.value);'"));?> - - - kanban->cardCount;?> - kanban->cardCountTip}' autocomplete='off'");?> - - - - kanban->import?> - kanban->importList, $enableImport));?> - - - kanban->importObjectList, $importObjects);?> - - kanban->error->importObjNotEmpty;?> - - kanban->archive;?> - kanban->archiveList, $kanban->archived));?> - - - kanban->manageProgress;?> - kanban->enableList, $kanban->performable));?> - - - kanban->alignment;?> - kanban->alignmentList, $kanban->alignment));?> - kanban->desc;?> diff --git a/module/kanban/view/setting.html.php b/module/kanban/view/setting.html.php new file mode 100644 index 0000000000..7b9c461300 --- /dev/null +++ b/module/kanban/view/setting.html.php @@ -0,0 +1,70 @@ + + * @package kanban + * @version $Id: edit.html.php 935 2021-12-09 16:15:24Z $ + * @link https://www.zentao.net + */ +?> + + + +config->vision);?> +
    +
    +

    kanban->settingKanban;?>

    +
    +
    + + + + + + + + + + + 1):?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    kanban->WIPCount;?>kanban->showWIPList, $kanban->showWIP);?>
    kanban->columnWidth;?>kanbancolumn->fluidBoardList, $kanban->fluidBoard));?>
    kanban->laneHeight;?>kanbanlane->heightTypeList, $heightType, "onclick='setCardCount(this.value);'"));?>
    kanban->import?>kanban->importList, $enableImport));?>
    kanban->importObjectList, $importObjects);?>
    kanban->archive;?>kanban->archiveList, $kanban->archived));?>
    kanban->manageProgress;?>kanban->enableList, $kanban->performable));?>
    kanban->alignment;?>kanban->alignmentList, $kanban->alignment));?>
    + +
    +
    +
    + diff --git a/module/kanban/view/space.html.php b/module/kanban/view/space.html.php index 5ff85b27bf..be3ae116f3 100644 --- a/module/kanban/view/space.html.php +++ b/module/kanban/view/space.html.php @@ -47,8 +47,10 @@ name;?>

    - desc = empty($space->desc) ? $lang->kanban->emptyDesc : strip_tags(htmlspecialchars_decode($space->desc));?> -

    desc;?>

    + desc) ? $lang->kanban->emptyDesc : str_replace("\n", '', strip_tags($space->desc));?> + ]*>|]*>/';?> + desc) ? $lang->kanban->emptyDesc : preg_replace($pattern, '', $space->desc);?> +

    status == 'closed' ? 'disabled' : '';?> @@ -126,7 +128,9 @@
    -
    desc));?>
    + desc));?> + desc));?> +