diff --git a/Makefile b/Makefile index 0a0bb955f5..2435ae32e8 100644 --- a/Makefile +++ b/Makefile @@ -131,6 +131,8 @@ zentaoxx: sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/control.php sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/model/conference.php sed -i 's/xxb_/zt_/g' zentaoxx/db/*.sql + sed -i "s#\$this->app->getModuleRoot() . 'im/apischeme.json'#\$this->app->getExtensionRoot() . 'xuan/im/apischeme.json'#g" zentaoxx/extension/xuan/im/model.php + sed -i "/getModuleExtPath(/ r tools/fixxuan" zentaoxx/framework/xuanxuan.class.php echo "ALTER TABLE \`zt_user\` ADD \`pinyin\` varchar(255) NOT NULL DEFAULT '' AFTER \`realname\`;" >> zentaoxx/db/xuanxuan.sql mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php cp tools/en2de.php zentaoxx/tools; cd zentaoxx/tools; php en2de.php ../ @@ -242,12 +244,10 @@ ci: make package zip -rq -9 ZenTaoPMS.$(VERSION).zip zentaopms - #make deb; make rpm; make en rm -fr zentaopms zentaoxx zentaoxx.*.zip make en rm -fr zentaopms zentaoxx zentaoxx.*.zip php tools/mergezentaopms.php $(VERSION) - rm zentaobiz*.zip zentaomax*.zip + rm -f zentaobiz*.zip zentaomax*.zip $(BUILD_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH) - rm -f $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm mv *.zip *.deb *.rpm $(RELEASE_PATH) diff --git a/VERSION b/VERSION index e20da793b8..0c7b82c8ce 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -16.5 +16.5.beta1 diff --git a/api/v1/entries/tasks.php b/api/v1/entries/tasks.php index f999c356df..26905efb41 100644 --- a/api/v1/entries/tasks.php +++ b/api/v1/entries/tasks.php @@ -66,6 +66,7 @@ class tasksEntry extends entry $assignedTo = $this->request('assignedTo'); if($assignedTo and !is_array($assignedTo)) $this->setPost('assignedTo', array($assignedTo)); + $this->setPost('execution', $executionID); $control = $this->loadController('task', 'create'); $this->requireFields('name,assignedTo,type,estStarted,deadline'); diff --git a/api/v1/entries/testcases.php b/api/v1/entries/testcases.php index e979bc4394..fef888623b 100644 --- a/api/v1/entries/testcases.php +++ b/api/v1/entries/testcases.php @@ -23,8 +23,17 @@ class testcasesEntry extends entry if(empty($productID)) $productID = $this->param('product', 0); if(empty($productID)) return $this->sendError(400, 'Need product id.'); + $type = 'all'; + $param = 0; + $moduleID = $this->param('module', 0); + if($moduleID) + { + $type = 'byModule'; + $param = $moduleID; + } + $control = $this->loadController('testcase', 'browse'); - $control->browse($productID, $this->param('branch', ''), $this->param('status', 'all'), 0, $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1)); + $control->browse($productID, $this->param('branch', ''), $type, $param, $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1)); $data = $this->getData(); diff --git a/api/v1/entries/testresults.php b/api/v1/entries/testresults.php new file mode 100644 index 0000000000..a169f5e1ea --- /dev/null +++ b/api/v1/entries/testresults.php @@ -0,0 +1,88 @@ + + * @package entries + * @version 1 + * @link http://www.zentao.net + */ +class testresultsEntry extends entry +{ + /** + * GET method. + * + * @param int $productID + * @access public + * @return void + */ + public function get($caseID = 0) + { + if(!$caseID) return $this->sendError(400, 'Need case id.'); + $version = $this->param('version', 0); + $runID = $this->param('runID', 0); + + $control = $this->loadController('testtask', 'results'); + $control->results($runID, $caseID, $version); + + $data = $this->getData(); + + if(isset($data->status) and $data->status == 'success') + { + $results = array(); + foreach($data->data->results as $result) + { + $result->stepResults = array_values((array)$result->stepResults); + $results[] = $result; + } + + return $this->send(200, array('results' => $results)); + } + + if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); + return $this->sendError(400, 'error'); + } + + /** + * POST method. + * + * @param int $caseID + * @access public + * @return void + */ + public function post($caseID = 0) + { + if(!$caseID) $caseID = $this->param('case'); + if(!$caseID) return $this->sendError(400, 'Need case id.'); + + $case = $this->loadModel('testcase')->getByID($caseID); + $runID = $this->param('runID', 0); + $version = $this->param('version', $case->version); + + $this->setPost('case', $caseID); + + /* Set steps and expects. */ + if(isset($this->requestBody->steps)) + { + $results = array(); + $reals = array(); + foreach($this->requestBody->steps as $step) + { + $results[] = $step->result; + $reals[] = $step->real; + } + $this->setPost('steps', $results); + $this->setPost('reals', $reals); + } + + $control = $this->loadController('testtask', 'runCase'); + $control->runCase($runID, $caseID, $version); + + $data = $this->getData(); + if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message); + + $this->send(200, array()); + } +} diff --git a/api/v1/entries/testsuite.php b/api/v1/entries/testsuite.php new file mode 100644 index 0000000000..4ac05ec019 --- /dev/null +++ b/api/v1/entries/testsuite.php @@ -0,0 +1,58 @@ + + * @package entries + * @version 1 + * @link http://www.zentao.net + */ +class testsuiteEntry extends entry +{ + /** + * GET method. + * + * @param int $testsuiteID + * @access public + * @return void + */ + public function get($testsuiteID) + { + $control = $this->loadController('testsuite', 'view'); + $control->view($testsuiteID, $this->param('version', 0)); + + $data = $this->getData(); + if(!$data or (isset($data->message) and $data->message == '404 Not found')) return $this->send404(); + if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); + if(!isset($data->data->suite)) $this->sendError(400, 'error'); + + $suite = $this->format($data->data->suite, 'addedBy:user,addedDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool'); + $suite->cases = array(); + + foreach($data->data->cases as $case) + { + $suite->cases[] = $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,deleted:bool'); + } + + $this->send(200, $suite); + } + + /** + * DELETE method. + * + * @param int $testsuiteID + * @access public + * @return void + */ + public function delete($testsuiteID) + { + $control = $this->loadController('testsuite', 'delete'); + $control->delete($testsuiteID, 'yes'); + + $this->getData(); + + $this->sendSuccess(200, 'success'); + } +} diff --git a/api/v1/entries/testsuites.php b/api/v1/entries/testsuites.php new file mode 100644 index 0000000000..53ff546a33 --- /dev/null +++ b/api/v1/entries/testsuites.php @@ -0,0 +1,79 @@ + + * @package entries + * @version 1 + * @link http://www.zentao.net + */ +class testsuitesEntry extends entry +{ + /** + * GET method. + * + * @param int $productID + * @access public + * @return void + */ + public function get($productID = 0) + { + if(empty($productID)) $productID = $this->param('product', 0); + if(empty($productID)) return $this->sendError(400, 'Need product id.'); + + $control = $this->loadController('testsuite', 'browse'); + $control->browse($productID, $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1)); + + $data = $this->getData(); + if(isset($data->status) and $data->status == 'success') + { + $suites = $data->data->suites; + $pager = $data->data->pager; + $result = array(); + foreach($suites as $suite) + { + $result[] = $this->format($suite, 'addedBy:user,addedDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool'); + } + + return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'testsuites' => $result)); + } + + if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); + return $this->sendError(400, 'error'); + } + + /** + * POST method. + * + * @param int $productID + * @access public + * @return void + */ + public function post($productID = 0) + { + if(!$productID) $productID = $this->param('product'); + if(!$productID and isset($this->requestBody->product)) $productID = $this->requestBody->product; + if(!$productID) return $this->sendError(400, 'Need product id.'); + + $fields = 'name,type'; + $this->batchSetPost($fields); + $this->setPost('product', $productID); + $this->setPost('desc', $this->request('desc', '')); + $this->setPost('type', $this->request('type', 'private')); + + $control = $this->loadController('testsuite', 'create'); + $this->requireFields('name'); + + $control->create($productID); + + $data = $this->getData(); + if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message); + if(isset($data->result) and !isset($data->id)) return $this->sendError(400, $data->message); + + $suite = $this->loadModel('testsuite')->getByID($data->id); + + $this->send(200, $this->format($suite, 'addedBy:user,addedDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool')); + } +} diff --git a/api/v1/entries/testtask.php b/api/v1/entries/testtask.php index 81a7d6f0dc..50a3236333 100644 --- a/api/v1/entries/testtask.php +++ b/api/v1/entries/testtask.php @@ -20,14 +20,19 @@ class testtaskEntry extends entry */ public function get($testtaskID) { - $control = $this->loadController('testtask', 'view'); - $control->view($testtaskID); + $control = $this->loadController('testtask', 'cases'); + $control->cases($testtaskID, 'all', 0, $this->param('order', 'id_desc'), $this->param('total', 0), $this->param('limit', 20), $this->param('page', 1)); $data = $this->getData(); if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message); if(!isset($data->data->task)) $this->sendError(400, 'error'); $testtask = $data->data->task; + $testtask->testcases = array(); + foreach($data->data->runs as $run) + { + $testtask->testcases[] = $this->format($run, 'openedBy:user,openedDate:time,reviewedBy:user,reviewedDate:date,lastEditedBy:user,lastEditedDate:time'); + } $this->send(200, $this->format($testtask, 'begin:date,end:date,mailto:userList,owner:user,realFinishedDate:time')); } diff --git a/bin/init.bat b/bin/init.bat index 19fc718fbf..33132fbd89 100644 --- a/bin/init.bat +++ b/bin/init.bat @@ -12,23 +12,23 @@ SET pmsRoot=%2 IF "%phpcli%"=="" SET /P phpcli="Please input your php path:(example: c:\windows\php.exe)" if "%phpcli%"=="" ( echo php path is error - goto input_php + goto input_php ) if not exist %phpcli% ( echo php path is error - goto input_php + goto input_php ) :input_url IF "%pmsRoot%"=="" SET /P pmsRoot="Please input zentao url:(example: http://localhost or http://127.0.0.1:88)" IF "%pmsRoot%"=="" ( echo zentao url is error - goto input_url + goto input_url ) :: get pmsRoot if "%pmsRoot:~-1%" == "/" SET pmsRoot=%pmsRoot:~0,-1% :: get requestType -SET requestType= 'PATH_INFO' +SET requestType= 'PATH_INFO' for /f "tokens=3" %%f in ('find /c "'PATH_INFO'" "%baseDir%..\config\my.php"') do set count=%%f if not defined count set count=1 if %count% == 0 SET requestType='GET' @@ -58,18 +58,18 @@ echo dailyreminder.bat ok :: create computeburn.bat if %requestType% == 'PATH_INFO' ( - SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/project-computeburn" + SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/execution-computeburn" )else ( - SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=project&f=computeburn" + SET computeburn= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=execution&f=computeburn" ) echo %computeburn% > %baseDir%computeburn.bat echo computeburn.bat ok :: create computetaskeffort.bat if %requestType% == 'PATH_INFO' ( - SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/project-computetaskeffort" + SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/execution-computetaskeffort" )else ( - SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=project&f=computetaskeffort" + SET computetaskeffort= %phpcli% %baseDir%ztcli "%pmsRoot%/index.php?m=execution&f=computetaskeffort" ) echo %computetaskeffort% > %baseDir%computetaskeffort.bat echo computetaskeffort.bat ok diff --git a/bin/init.sh b/bin/init.sh index ae18cd6aa9..6af39a58a0 100755 --- a/bin/init.sh +++ b/bin/init.sh @@ -7,25 +7,25 @@ basePath=$(cd "$(dirname "$0")"; pwd) if [ ! -n "$1" ]; then while :; do echo "Please input your php path:(example: /usr/bin/php)" - read phpcli - if [ ! -f $phpcli ]; then + read phpcli + if [ ! -f $phpcli ]; then echo "php path is error"; elif [ "$phpcli"x != ""x ]; then break; fi done -fi +fi if [ ! -n "$2" ]; then while :; do echo "Please input zentao url:(example: http://localhost:88/zentao or http://localhost)" - read pmsRoot + read pmsRoot if [ -z "$pmsRoot" ]; then - echo "zentao url is error"; + echo "zentao url is error"; else break; fi done -fi +fi pmsRoot=`echo "$pmsRoot" | sed 's/[/]$//g'` cat $basePath/../config/my.php |awk '$1!~/^\/\//&& $1~/\$config\->requestType/{requestType = $0} END{print requestType}'| grep -c 'PATH_INFO' > ./init.tmp @@ -52,18 +52,18 @@ echo "backup.sh ok" # computeburn if [ $requestType == 'PATH_INFO' ]; then - computeburn="$phpcli $basePath/ztcli '$pmsRoot/project-computeburn'"; + computeburn="$phpcli $basePath/ztcli '$pmsRoot/execution-computeburn'"; else - computeburn="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=project&f=computeburn'"; + computeburn="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=execution&f=computeburn'"; fi echo $computeburn > $basePath/computeburn.sh echo "computeburn.sh ok" # compute task effort. if [ $requestType == 'PATH_INFO' ]; then - computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/project-computetaskeffort'"; + computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/execution-computetaskeffort'"; else - computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=project&f=computetaskeffort'"; + computetaskeffort="$phpcli $basePath/ztcli '$pmsRoot/index.php?m=execution&f=computetaskeffort'"; fi echo $computetaskeffort > $basePath/computetaskeffort.sh echo "computetaskeffort.sh ok" diff --git a/build/debian/DEBIAN/control b/build/debian/DEBIAN/control index 22238f9369..aaa0cb03a1 100644 --- a/build/debian/DEBIAN/control +++ b/build/debian/DEBIAN/control @@ -3,7 +3,7 @@ Version: 6.1 Section: utils Priority: optional Architecture: all -Depends: apache2, libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php, php-cli, php-common, php-mysql, php-json, php-ldap, mysql-server +Depends: apache2, libapache2-mod-php | libapache2-mod-phpfilter | php-cgi | php-fpm | php, php-cli, php-common, php-mysql, php-json, mysql-server Recommends: php-gd Installed-Size: 512 Maintainer: [url=www.zentao.net] diff --git a/build/rpm/zentaopms.spec b/build/rpm/zentaopms.spec index a6573c7549..f85ca245ed 100644 --- a/build/rpm/zentaopms.spec +++ b/build/rpm/zentaopms.spec @@ -1,7 +1,7 @@ Name:zentaopms Version:7.1.stable Release:1 -Summary:This is ZenTao PMS software. +Summary:This is ZenTao PMS software. Group:utils License:ZPL @@ -9,7 +9,7 @@ URL:http://www.zentao.net Source0:%{name}-%{version}.tar.gz BuildRoot:%{_tmppath}/%{name}-%{version}-root BuildArch:noarch -Requires:httpd, php-cli, php, php-common, php-pdo, php-json, php-ldap, mysql +Requires:httpd, php-cli, php, php-common, php-pdo, php-json, mysql Requires:/usr/lib64/php/modules/pdo_mysql.so %description @@ -26,7 +26,7 @@ chmod 777 %{_builddir}/%{name}-%{version}/opt/zentao/module chmod 777 %{_builddir}/%{name}-%{version}/opt/zentao/www chmod a+rx %{_builddir}/%{name}-%{version}/opt/zentao/bin/* find %{_builddir}/%{name}-%{version}/opt/zentao/ -name ext |xargs chmod -R 777 -cp -a %{_builddir}/%{name}-%{version}/* $RPM_BUILD_ROOT +cp -a %{_builddir}/%{name}-%{version}/* $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT diff --git a/config/config.php b/config/config.php index b6b562c975..5671329eeb 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 = '16.5'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. +$config->version = '16.5.beta1'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it. $config->liteVersion = '1.0'; // 迅捷版版本。 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 7cf1e28852..7a2fcc15b8 100644 --- a/config/filter.php +++ b/config/filter.php @@ -130,6 +130,7 @@ $filter->svn->cat = new stdclass(); $filter->svn->diff = new stdclass(); $filter->task->create = new stdclass(); $filter->task->export = new stdclass(); +$filter->execution->default = new stdclass(); $filter->execution->story = new stdclass(); $filter->testcase->default = new stdclass(); $filter->testcase->create = new stdclass(); @@ -246,6 +247,7 @@ $filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code'; $filter->project->default->cookie['lastProject'] = 'int'; $filter->project->default->cookie['lastPRJ'] = 'int'; $filter->project->default->cookie['projectMode'] = 'code'; +$filter->project->default->cookie['kanbanview'] = 'code'; $filter->project->browse->cookie['involved'] = 'code'; $filter->project->browse->cookie['projectType'] = 'code'; $filter->project->story->cookie['storyModuleParam'] = 'int'; @@ -278,6 +280,7 @@ $filter->productplan->browse->cookie['viewType'] = 'code'; $filter->task->create->cookie['lastTaskModule'] = 'int'; $filter->task->export->cookie['checkedItem'] = 'reg::checked'; +$filter->execution->default->cookie['kanbanview'] = 'code'; $filter->execution->story->cookie['storyPreExecutionID'] = 'int'; $filter->execution->story->cookie['storyModuleParam'] = 'int'; $filter->execution->story->cookie['storyProductParam'] = 'int'; diff --git a/config/routes.php b/config/routes.php index 37c0a8cf4d..cc0742a556 100644 --- a/config/routes.php +++ b/config/routes.php @@ -110,6 +110,11 @@ $routes['/executions/:id/testcases'] = 'executionCases'; $routes['/executions/:id/members'] = 'executionMembers'; $routes['/testcases'] = 'testcases'; $routes['/testcases/:id'] = 'testcase'; +$routes['/testcases/:id/results'] = 'testresults'; + +$routes['/products/:id/testsuites'] = 'testsuites'; +$routes['/testsuites'] = 'testsuites'; +$routes['/testsuites/:id'] = 'testsuite'; $routes['/projects/:projectID/testtasks'] = 'testtasks'; $routes['/testtasks'] = 'testtasks'; diff --git a/config/zentaopms.php b/config/zentaopms.php index 04b1f89ca2..77b25e0359 100644 --- a/config/zentaopms.php +++ b/config/zentaopms.php @@ -367,7 +367,7 @@ $config->objectTables['sonarqube'] = TABLE_PIPELINE; $config->objectTables['gitlab'] = TABLE_PIPELINE; $config->objectTables['jebkins'] = TABLE_PIPELINE; -$config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme'); +$config->newFeatures = array('introduction', 'tutorial', 'youngBlueTheme', 'visions'); /* Program privs.*/ $config->programPriv = new stdclass(); diff --git a/db/standard/zentao16.5.beta1.sql b/db/standard/zentao16.5.beta1.sql new file mode 100644 index 0000000000..bf8f62cff0 --- /dev/null +++ b/db/standard/zentao16.5.beta1.sql @@ -0,0 +1,3792 @@ +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=MyISAM 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=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_action` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `objectType` varchar(30) NOT NULL DEFAULT '', + `objectID` mediumint(8) unsigned NOT NULL DEFAULT '0', + `product` varchar(255) 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=MyISAM 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` 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, + `order` mediumint(8) DEFAULT '0', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM 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` text, + `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=MyISAM 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=MyISAM 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` text, + `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=MyISAM 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` text 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=MyISAM 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=MyISAM AUTO_INCREMENT=3 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=MyISAM 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` 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_baseimagebrowser` ( + `vmBackingID` int(10) NOT NULL, + `browserID` int(10) NOT NULL, + PRIMARY KEY (`vmBackingID`,`browserID`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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` text 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` varchar(255) 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=MyISAM 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` text NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `execution` (`execution`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text NOT NULL, + `version` smallint(6) NOT NULL, + `type` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_designspec` ( + `design` mediumint(8) NOT NULL, + `version` smallint(6) NOT NULL, + `name` varchar(255) NOT NULL, + `desc` text NOT NULL, + `files` varchar(255) NOT NULL, + UNIQUE KEY `design` (`design`,`version`) +) ENGINE=MyISAM 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` date 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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=MyISAM 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=MyISAM 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` varchar(255) 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=MyISAM 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` text 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_file` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `pathname` char(100) NOT NULL, + `title` char(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=MyISAM 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` text 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=MyISAM 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=MyISAM 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=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_history` ( + `id` mediumint(8) 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=MyISAM 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` text 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=MyISAM 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=MyISAM 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', + `lastActiveTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `lastMessage` int(11) unsigned NOT NULL DEFAULT '0', + `dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `pinnedMessages` text NOT NULL, + PRIMARY KEY (`id`), + KEY `gid` (`gid`), + KEY `name` (`name`), + KEY `type` (`type`), + KEY `public` (`public`), + KEY `createdBy` (`createdBy`), + KEY `editedBy` (`editedBy`) +) ENGINE=MyISAM 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, + `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`) +) ENGINE=MyISAM 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', + PRIMARY KEY (`id`), + UNIQUE KEY `chatuser` (`cgid`,`user`), + KEY `cgid` (`cgid`), + KEY `user` (`user`), + KEY `order` (`order`), + KEY `star` (`star`), + KEY `hide` (`hide`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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', + `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=MyISAM 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', + `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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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=MyISAM 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` text 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', + `fluidBoard` enum('0','1') NOT NULL DEFAULT '0', + `object` varchar(255) NOT NULL, + `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, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM 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` text 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text NOT NULL, + `createdBy` char(30) NOT NULL, + `createdDate` date NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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, + `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=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_mr` ( + `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, + `gitlabID` mediumint(8) unsigned NOT NULL, + `sourceProject` int(10) unsigned NOT NULL, + `sourceBranch` varchar(100) NOT NULL, + `targetProject` int(10) unsigned 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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` text 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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` text 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=MyISAM 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` text NOT NULL, + `begin` date NOT NULL, + `end` date NOT NULL, + `order` text NOT NULL, + `closedReason` varchar(20) NOT NULL, + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `end` (`end`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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=MyISAM 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` mediumint(8) unsigned NOT NULL, + PRIMARY KEY (`project`,`product`,`branch`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text NOT NULL, + `mailto` text, + `notify` varchar(255) DEFAULT NULL, + `status` varchar(20) NOT NULL DEFAULT 'normal', + `subStatus` varchar(30) NOT NULL DEFAULT '', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `build` (`build`) +) ENGINE=MyISAM 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, + `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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text NOT NULL, + `schedule` 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=MyISAM 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` text 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=MyISAM 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, + `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=MyISAM 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=MyISAM 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, + `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=MyISAM 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=MyISAM 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=MyISAM 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` text NOT NULL, + `remedy` text 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` text 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=MyISAM 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=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_searchdict` ( + `key` smallint(5) unsigned NOT NULL, + `value` char(3) NOT NULL, + PRIMARY KEY (`key`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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` text, + `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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +CREATE TABLE `zt_stakeholder` ( + `id` mediumint(8) NOT NULL AUTO_INCREMENT, + `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, + PRIMARY KEY (`id`) +) ENGINE=MyISAM 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, + `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, + `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=MyISAM 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=MyISAM 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=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_storyspec` ( + `story` mediumint(9) NOT NULL, + `version` smallint(6) NOT NULL, + `title` varchar(255) NOT NULL, + `spec` text NOT NULL, + `verify` text NOT NULL, + UNIQUE KEY `story` (`story`,`version`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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', + `feedback` mediumint(8) unsigned NOT NULL, + `name` varchar(255) NOT NULL, + `type` varchar(20) 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` text 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, + `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`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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` text 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 '', + `deleted` enum('0','1') NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `product` (`product`), + KEY `build` (`build`) +) ENGINE=MyISAM 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` text 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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` text 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=MyISAM 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=MyISAM 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=MyISAM 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', + `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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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 '', + `status` varchar(50) NOT NULL DEFAULT '', + `destroyAt` datetime DEFAULT NULL, + `ip` varchar(200) NOT NULL DEFAULT '', + `agentPort` varchar(255) NOT NULL DEFAULT '', + `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, + `vnc` varchar(255) NOT NULL DEFAULT '', + `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=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `zt_vmtemplate` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `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 '', + `status` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`) +) ENGINE=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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', + `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=MyISAM 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, + `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=MyISAM 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=MyISAM 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, + `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=MyISAM 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, + `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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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=MyISAM 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` text 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=MyISAM 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/update11.7.sql b/db/update11.7.sql index f177f5c124..fbf0f9b24f 100644 --- a/db/update11.7.sql +++ b/db/update11.7.sql @@ -68,3 +68,4 @@ ALTER TABLE `zt_bug` ADD `entry` varchar(255) COLLATE 'utf8_general_ci' NOT NULL ALTER TABLE `zt_repobranch` ADD INDEX `revision` (`revision`); DELETE FROM `zt_grouppriv` WHERE `module` = 'api' AND `method` = 'sql'; +REPLACE INTO `zt_config` set `owner` = 'system', `module` = 'common', `section` = 'global', `key` = 'showAnnual', `value` = '1'; diff --git a/db/update12.5.3.sql b/db/update12.5.3.sql index 68f393fde4..ddf17ef270 100644 --- a/db/update12.5.3.sql +++ b/db/update12.5.3.sql @@ -23,6 +23,9 @@ ALTER TABLE `zt_project` ADD `output` text NOT NULL AFTER `milestone`; ALTER TABLE `zt_project` ADD `lastEditedBy` varchar(30) NOT NULL DEFAULT '' AFTER `openedVersion`; ALTER TABLE `zt_project` ADD `lastEditedDate` datetime NOT NULL AFTER `lastEditedBy`; +ALTER TABLE `zt_case` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; +ALTER TABLE `zt_case` ADD `execution` mediumint(8) unsigned NOT NULL AFTER `project`; + ALTER TABLE `zt_action` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_bug` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_build` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; @@ -30,7 +33,6 @@ ALTER TABLE `zt_burn` CHANGE `project` `execution` mediumint(8) unsigned NOT NUL ALTER TABLE `zt_doc` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_relation` CHANGE `program` `project` mediumint(8) unsigned NOT NULL; -ALTER TABLE `zt_case` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_doclib` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_task` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; ALTER TABLE `zt_testreport` CHANGE `project` `execution` mediumint(8) unsigned NOT NULL; @@ -43,7 +45,6 @@ ALTER TABLE `zt_doclib` ADD `project` mediumint(8) unsigned NOT NULL AFTER `prod ALTER TABLE `zt_doc` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_story` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_bug` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; -ALTER TABLE `zt_case` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_testtask` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_testreport` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; ALTER TABLE `zt_testsuite` ADD `project` mediumint(8) unsigned NOT NULL AFTER `id`; diff --git a/db/update16.4.sql b/db/update16.4.sql index d87b04cf5d..e6ac4d5f6e 100644 --- a/db/update16.4.sql +++ b/db/update16.4.sql @@ -22,10 +22,41 @@ ALTER TABLE `zt_story` ADD `vision` varchar(10) NOT NULL DEFAULT 'rnd' AFTER `id ALTER TABLE `zt_story` ADD `activatedDate` datetime NOT NULL AFTER `closedReason`; ALTER TABLE `zt_task` MODIFY `activatedDate` datetime NOT NULL AFTER `lastEditedDate`; -ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL AFTER `visits`; +ALTER TABLE `zt_kanbancard` ADD `progress` float unsigned NOT NULL DEFAULT '0' AFTER `estimate`; + +ALTER TABLE `zt_user` ADD `visions` varchar(20) NOT NULL DEFAULT 'rnd,lite' AFTER `visits`; UPDATE `zt_user` SET `visions`='rnd,lite'; INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES -('lite', '迅捷版用户分组', 'liteUser', '迅捷版用户分组'); +('lite', '管理员', 'liteAdmin', '迅捷版用户分组'); + +INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES +('lite', '项目管理', 'liteProject', '迅捷版用户分组'); + +INSERT INTO `zt_group` (`vision`, `name`, `role`, `desc`) VALUES +('lite', '团队成员', 'liteTeam', '迅捷版用户分组'); + +REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) +SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `role` = 'liteAdmin' and `vision` = 'lite') from `zt_grouppriv` where `group` = 1; + +REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) +SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `role` = 'liteProject' and `vision` = 'lite') from `zt_grouppriv` where `group` = 4; + +REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) +SELECT `module`, `method`,(SELECT `id` FROM zt_group WHERE `role` = 'liteTeam' and `vision` = 'lite') from `zt_grouppriv` where `group` = 9; ALTER TABLE `zt_productplan` ADD `closedReason` varchar(20) NOT NULL AFTER `order`; + +update zt_config set `value` = concat(`value`, ',visions') where module = 'user' and `key` = 'requiredFields' and section in ('create', 'edit'); + +ALTER TABLE `zt_kanban` CHANGE `order` `order` mediumint NOT NULL DEFAULT '0' AFTER `status`; +ALTER TABLE `zt_kanbancolumn` CHANGE `group` `group` mediumint NOT NULL DEFAULT '0' AFTER `region`; +ALTER TABLE `zt_kanbancard` CHANGE `order` `order` mediumint NOT NULL DEFAULT '0' AFTER `whitelist`; +ALTER TABLE `zt_kanbanregion` CHANGE `order` `order` mediumint NOT NULL DEFAULT '0' AFTER `name`; +ALTER TABLE `zt_kanbanspace` CHANGE `order` `order` mediumint NOT NULL DEFAULT '0' AFTER `status`; +ALTER TABLE `zt_projectstory` CHANGE `branch` `branch` mediumint unsigned NOT NULL AFTER `product`; + +INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`) VALUES ('lite','system', 'project', '', 'unitList', 'CNY,USD'); +INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`) VALUES ('lite','system', 'project', '', 'defaultCurrency', 'CNY'); + +ALTER TABLE `zt_apistruct` CHANGE `desc` `desc` text COLLATE 'utf8_general_ci' NOT NULL DEFAULT '' AFTER `type`; diff --git a/db/updatebizinstall.sql b/db/updatebizinstall.sql index 61a5b69f7d..a62e3f7b05 100644 --- a/db/updatebizinstall.sql +++ b/db/updatebizinstall.sql @@ -1583,8 +1583,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES -- DROP TABLE IF EXISTS `zt_workflow`; CREATE TABLE IF NOT EXISTS `zt_workflow` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `parent` varchar(30) NOT NULL, - `child` varchar(30) NOT NULL, + `parent` varchar(30) NOT NULL, + `child` varchar(30) NOT NULL, `type` varchar(10) NOT NULL DEFAULT 'flow', `app` varchar(20) NOT NULL, `position` varchar(30) NOT NULL, @@ -1658,7 +1658,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowdatasource` ( `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, + `datasource` text NOT NULL, `view` varchar(20) NOT NULL, `keyField` varchar(50) NOT NULL, `valueField` varchar(50) NOT NULL, @@ -1686,7 +1686,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowfield` ( `rules` varchar(255) NOT NULL, `placeholder` varchar(100) NOT NULL, `order` smallint(5) unsigned NOT NULL, - `searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0', + `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', @@ -1759,7 +1759,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlinkdata` ( -- DROP TABLE IF EXISTS `zt_workflowrelation`; CREATE TABLE IF NOT EXISTS `zt_workflowrelation` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `prev` varchar(30) NOT NULL, + `prev` varchar(30) NOT NULL, `next` varchar(30) NOT NULL, `field` varchar(50) NOT NULL, `actions` varchar(20) NOT NULL, @@ -1791,7 +1791,7 @@ CREATE TABLE IF NOT EXISTS `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, + `rule` text NOT NULL, `createdBy` char(30) NOT NULL, `createdDate` datetime NOT NULL, `editedBy` char(30) NOT NULL, @@ -2024,18 +2024,3 @@ CREATE VIEW `view_datasource_11` AS select `id`,`name` from `zt_module` where `d CREATE VIEW `view_datasource_12` AS select `id`,`title` from `zt_productplan` where `deleted` = '0'; CREATE VIEW `view_datasource_41` AS select `id`,`title` from `zt_case` where `deleted` = '0'; CREATE VIEW `view_datasource_46` AS select `id`,`name` from `zt_task` where `deleted` = '0' and vision = 'lite'; - -INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision`, `datasource`, `view`, `keyField`, `valueField`) VALUES -('system', '项目', 'liteprojects', '1', 'lite', '{\"app\":\"system\",\"module\":\"project\",\"method\":\"getPairsByModel\",\"methodDesc\":\"Get project pairs by model and project.\",\"params\":[{\"name\":\"model\",\"type\":\"string\",\"desc\":\"all|scrum|waterfall\",\"value\":\"all\"},{\"name\":\"programID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"param\",\"type\":\"\",\"desc\":\"\",\"value\":\"\"}]}', '', '', ''), -('sql', '任务', 'litetasks', '1', 'lite', 'select id,name from zt_task where deleted=\"0\" and vision=\"lite\"', 'view_datasource_46', 'id', 'name'), -('system', '权限分组', 'litegroups', '1', 'lite', '{\"app\":\"system\",\"module\":\"group\",\"method\":\"getPairs\",\"methodDesc\":\"\",\"params\":[]}', '', '', ''), -('system', '用户', 'liteusers', '1', 'lite', '{\"app\":\"system\",\"module\":\"user\",\"method\":\"getPairs\",\"methodDesc\":\"\",\"params\":[{\"name\":\"params\",\"type\":\"\",\"desc\":\"\",\"value\":\"noclosed|noletter\"},{\"name\":\"usersToAppended\",\"type\":\"\",\"desc\":\"\",\"value\":\"\"}]}', '', '', ''), -('sql', '模块', 'litemodules', '1', 'lite', 'select id,name from zt_module where deleted=\"0\"', 'view_datasource_11', 'id', 'name'), -('lang', '项目类型', 'liteprojectType', '1', 'lite', 'projectType', '', '', ''), -('lang', '项目状态', 'liteprojectStatus', '1', 'lite', 'projectStatus', '', '', ''), -('lang', '项目访问控制', 'liteprojectAcl', '1', 'lite', 'projectAcl', '', '', ''), -('lang', '任务类型', 'litetaskType', '1', 'lite', 'taskType', '', '', ''), -('lang', '任务优先级', 'litetaskPri', '1', 'lite', 'taskPri', '', '', ''), -('lang', '任务状态', 'litetaskStatus', '1', 'lite', 'taskStatus', '', '', ''), -('lang', '反馈状态', 'litefeedbackStatus', '1', 'lite', 'feedbackStatus', '', '', ''), -('system', '反馈分支', 'litefeedbackModules', '1', 'lite', '{\"app\":\"system\",\"module\":\"tree\",\"method\":\"getOptionMenu\",\"methodDesc\":\"Create an option menu in html.\",\"params\":[{\"name\":\"rootID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"type\",\"type\":\"string\",\"desc\":\"\",\"value\":\"feedback\"},{\"name\":\"startModule\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"branch\",\"type\":\"\",\"desc\":\"\",\"value\":\"0\"}]}', '', '', ''); diff --git a/db/updatemaxinstall.sql b/db/updatemaxinstall.sql index c60896bd00..8d40c498a0 100644 --- a/db/updatemaxinstall.sql +++ b/db/updatemaxinstall.sql @@ -801,7 +801,6 @@ CREATE TABLE IF NOT EXISTS `zt_trainplan` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -ALTER TABLE `zt_todo` CHANGE `type` `type` char(15) NOT NULL AFTER `feedback`; -- DROP TABLE IF EXISTS `zt_gapanalysis`; CREATE TABLE IF NOT EXISTS `zt_gapanalysis` ( diff --git a/db/zentao.sql b/db/zentao.sql index ef4fea5d45..62b10d5cf7 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -98,7 +98,7 @@ CREATE TABLE `zt_apistruct` ( `lib` int UNSIGNED NOT NULL DEFAULT 0, `name` varchar(30) NOT NULL DEFAULT '', `type` varchar(50) NOT NULL DEFAULT '', - `desc` varchar(255) NOT NULL DEFAULT '', + `desc` text NOT NULL DEFAULT '', `version` smallint unsigned NOT NULL DEFAULT 0, `attribute` text NULL, `addedBy` varchar(30) NOT NULL DEFAULT 0, @@ -724,13 +724,14 @@ CREATE TABLE `zt_kanbancard` ( `fromID` mediumint(8) unsigned NOT NULL, `fromType` varchar(30) NOT NULL, `name` varchar(255) NOT NULL, - `status` varchar(30) NOT NULL, + `status` varchar(30) NOT NULL DEFAULT 'doing', `pri` mediumint(8) unsigned NOT NULL, `assignedTo` text NOT NULL, `desc` text 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, @@ -785,7 +786,6 @@ CREATE TABLE IF NOT EXISTS `zt_kanbanlane` ( -- DROP TABLE IF EXISTS `zt_kanbancolumn`; CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` ( `id` int(8) NOT NULL AUTO_INCREMENT, - `lane` mediumint(8) NOT NULL DEFAULT '0', `parent` mediumint(8) NOT NULL DEFAULT '0', `type` char(30) NOT NULL, `region` mediumint(8) unsigned NOT NULL, @@ -794,7 +794,6 @@ CREATE TABLE IF NOT EXISTS `zt_kanbancolumn` ( `color` char(30) NOT NULL, `limit` smallint(6) NOT NULL DEFAULT '-1', `order` mediumint(8) NOT NULL DEFAULT '0', - `cards` text NULL, `archived` enum('0', '1') NOT NULL DEFAULT '0', `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) @@ -1751,7 +1750,13 @@ INSERT INTO `zt_group` (`id`, `name`, `role`, `desc`) VALUES (13, 'PROJECTADMIN', 'projectAdmin', 'Project Admins manage project privileges'); INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES -(14, 'lite', '迅捷版用户分组', 'liteUser', '迅捷版用户分组'); +(14, 'lite', '管理员', 'liteUser', '迅捷版用户分组'); + +INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES +(15, 'lite', '项目管理', 'liteUser', '迅捷版用户分组'); + +INSERT INTO `zt_group` (`id`, `vision`, `name`, `role`, `desc`) VALUES +(16, 'lite', '团队成员', 'liteUser', '迅捷版用户分组'); INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'action','comment'), @@ -1919,8 +1924,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'execution','importtask'), (1,'execution','index'), (1,'execution','kanban'), -(1,'execution','kanbanColsColor'), -(1,'execution','kanbanHideCols'), (1,'execution','linkStory'), (1,'execution','manageMembers'), (1,'execution','manageProducts'), @@ -3123,8 +3126,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (4,'execution','importtask'), (4,'execution','index'), (4,'execution','kanban'), -(4,'execution','kanbanColsColor'), -(4,'execution','kanbanHideCols'), (4,'execution','linkStory'), (4,'execution','manageMembers'), (4,'execution','manageProducts'), @@ -3621,8 +3622,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (5,'execution','importtask'), (5,'execution','index'), (5,'execution','kanban'), -(5,'execution','kanbanColsColor'), -(5,'execution','kanbanHideCols'), (5,'execution','linkStory'), (5,'execution','manageMembers'), (5,'execution','manageProducts'), @@ -4072,8 +4071,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (6,'execution','importtask'), (6,'execution','index'), (6,'execution','kanban'), -(6,'execution','kanbanColsColor'), -(6,'execution','kanbanHideCols'), (6,'execution','linkStory'), (6,'execution','manageMembers'), (6,'execution','manageProducts'), @@ -5980,232 +5977,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (11,'user','view'), (12,'my','limited'); -INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES -(14,'action','comment'), -(14,'action','editComment'), -(14,'action','trash'), -(14,'action','undelete'), -(14,'admin','checkWeak'), -(14,'admin','index'), -(14,'admin','safe'), -(14,'api','debug'), -(14,'company','browse'), -(14,'company','dynamic'), -(14,'company','edit'), -(14,'company','index'), -(14,'company','view'), -(14,'custom','execution'), -(14,'custom','flow'), -(14,'custom','index'), -(14,'custom','product'), -(14,'custom','restore'), -(14,'custom','set'), -(14,'custom','setPublic'), -(14,'datatable','setGlobal'), -(14,'dept','browse'), -(14,'dept','delete'), -(14,'dept','edit'), -(14,'dept','manageChild'), -(14,'dept','updateOrder'), -(14,'dev','api'), -(14,'dev','db'), -(14,'dev','editor'), -(14,'doc','allLibs'), -(14,'doc','browse'), -(14,'doc','collect'), -(14,'doc','create'), -(14,'doc','createLib'), -(14,'doc','delete'), -(14,'doc','deleteFile'), -(14,'doc','deleteLib'), -(14,'doc','edit'), -(14,'doc','editLib'), -(14,'doc','index'), -(14,'doc','objectLibs'), -(14,'doc','showFiles'), -(14,'doc','tableContents'), -(14,'doc','view'), -(14,'execution','all'), -(14,'execution','browse'), -(14,'execution','bug'), -(14,'execution','build'), -(14,'execution','burn'), -(14,'execution','burnData'), -(14,'execution','computeBurn'), -(14,'execution','doc'), -(14,'execution','dynamic'), -(14,'execution','executionkanban'), -(14,'execution','fixFirst'), -(14,'execution','grouptask'), -(14,'execution','kanban'), -(14,'execution','manageMembers'), -(14,'execution','printKanban'), -(14,'execution','story'), -(14,'execution','storyEstimate'), -(14,'execution','storyKanban'), -(14,'execution','task'), -(14,'execution','team'), -(14,'execution','tree'), -(14,'execution','treeStory'), -(14,'execution','treeTask'), -(14,'execution','view'), -(14,'execution','whitelist'), -(14,'file','delete'), -(14,'file','download'), -(14,'file','edit'), -(14,'file','setPublic'), -(14,'file','uploadImages'), -(14,'group','browse'), -(14,'index','index'), -(14,'message','browser'), -(14,'message','index'), -(14,'message','setting'), -(14,'misc','ping'), -(14,'my','bug'), -(14,'my','calendar'), -(14,'my','changePassword'), -(14,'my','contribute'), -(14,'my','deleteContacts'), -(14,'my','doc'), -(14,'my','dynamic'), -(14,'my','editProfile'), -(14,'my','execution'), -(14,'my','index'), -(14,'my','manageContacts'), -(14,'my','preference'), -(14,'my','profile'), -(14,'my','project'), -(14,'my','score'), -(14,'my','story'), -(14,'my','task'), -(14,'my','team'), -(14,'my','todo'), -(14,'my','uploadAvatar'), -(14,'my','work'), -(14,'personnel','accessible'), -(14,'personnel','invest'), -(14,'personnel','whitelist'), -(14,'product','all'), -(14,'product','browse'), -(14,'product','build'), -(14,'product','dashboard'), -(14,'product','dynamic'), -(14,'product','index'), -(14,'product','kanban'), -(14,'product','project'), -(14,'product','roadmap'), -(14,'product','view'), -(14,'product','whitelist'), -(14,'productplan','browse'), -(14,'productplan','view'), -(14,'program','browse'), -(14,'program','kanban'), -(14,'program','product'), -(14,'program','project'), -(14,'program','stakeholder'), -(14,'program','view'), -(14,'project','browse'), -(14,'project','bug'), -(14,'project','build'), -(14,'project','create'), -(14,'project','dynamic'), -(14,'project','edit'), -(14,'project','execution'), -(14,'project','index'), -(14,'project','kanban'), -(14,'project','manageMembers'), -(14,'project','programTitle'), -(14,'project','qa'), -(14,'project','team'), -(14,'project','testcase'), -(14,'project','testreport'), -(14,'project','testtask'), -(14,'project','view'), -(14,'project','whitelist'), -(14,'projectbuild','browse'), -(14,'projectrelease','browse'), -(14,'projectrelease','view'), -(14,'projectstory','story'), -(14,'projectstory','track'), -(14,'projectstory','view'), -(14,'report','bugAssign'), -(14,'report','bugCreate'), -(14,'report','index'), -(14,'report','productSummary'), -(14,'report','projectDeviation'), -(14,'report','workload'), -(14,'search','buildForm'), -(14,'search','buildIndex'), -(14,'search','buildQuery'), -(14,'search','deleteQuery'), -(14,'search','index'), -(14,'search','saveQuery'), -(14,'search','select'), -(14,'story','bugs'), -(14,'story','cases'), -(14,'story','report'), -(14,'story','tasks'), -(14,'story','track'), -(14,'story','view'), -(14,'task','activate'), -(14,'task','assignTo'), -(14,'task','batchAssignTo'), -(14,'task','batchCancel'), -(14,'task','batchChangeModule'), -(14,'task','batchClose'), -(14,'task','batchCreate'), -(14,'task','batchEdit'), -(14,'task','cancel'), -(14,'task','close'), -(14,'task','confirmStoryChange'), -(14,'task','create'), -(14,'task','delete'), -(14,'task','deleteEstimate'), -(14,'task','edit'), -(14,'task','editEstimate'), -(14,'task','export'), -(14,'task','finish'), -(14,'task','pause'), -(14,'task','recordEstimate'), -(14,'task','report'), -(14,'task','restart'), -(14,'task','start'), -(14,'task','view'), -(14,'todo','activate'), -(14,'todo','assignTo'), -(14,'todo','batchClose'), -(14,'todo','batchCreate'), -(14,'todo','batchEdit'), -(14,'todo','batchFinish'), -(14,'todo','close'), -(14,'todo','create'), -(14,'todo','createcycle'), -(14,'todo','delete'), -(14,'todo','edit'), -(14,'todo','export'), -(14,'todo','finish'), -(14,'todo','import2Today'), -(14,'todo','start'), -(14,'todo','view'), -(14,'tree','browse'), -(14,'tree','browseTask'), -(14,'tree','delete'), -(14,'tree','edit'), -(14,'tree','fix'), -(14,'tree','manageChild'), -(14,'tree','updateOrder'), -(14,'user','batchEdit'), -(14,'user','cropAvatar'), -(14,'user','dynamic'), -(14,'user','execution'), -(14,'user','issue'), -(14,'user','profile'), -(14,'user','risk'), -(14,'user','story'), -(14,'user','task'), -(14,'user','todo'), -(14,'user','view'); - REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES ('zh-cn', 'custom', 'URSRList', '1', '{\"SRName\":\"\\u8f6f\\u4ef6\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'),('zh-cn', 'custom', 'URSRList', '2', '{\"SRName\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'), ('zh-cn', 'custom', 'URSRList', '3', '{\"SRName\":\"\\u8f6f\\u9700\",\"URName\":\"\\u7528\\u9700\"}', '1'),('zh-cn', 'custom', 'URSRList', '4', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u53f2\\u8bd7\"}', '1'), @@ -6236,6 +6007,8 @@ INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES (' INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'unitList', 'CNY,USD'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'defaultCurrency', 'CNY'); INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'story', '', 'reviewRules', 'allpass'); +INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`) VALUES ('lite','system', 'project', '', 'unitList', 'CNY,USD'); +INSERT INTO `zt_config` (`vision`,`owner`, `module`, `section`, `key`, `value`) VALUES ('lite','system', 'project', '', 'defaultCurrency', 'CNY'); -- DROP TABLE IF EXISTS `zt_im_chat`; CREATE TABLE IF NOT EXISTS `zt_im_chat` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, @@ -7040,8 +6813,6 @@ ALTER TABLE `zt_story` ADD `feedback` mediumint(8) unsigned NOT NULL DEFAULT '0' ALTER TABLE `zt_user` ADD `feedback` enum('0', '1') NOT NULL DEFAULT '0' AFTER `locked`; ALTER TABLE `zt_group` ADD `developer` enum('0', '1') NOT NULL DEFAULT '1' AFTER `acl`; -INSERT INTO `zt_group` (`name`, `role`, `desc`, `acl`, `developer`) VALUES ('FEEDBACK', 'feedback', 'Feedback', '', '0'); - -- DROP TABLE IF EXISTS `zt_feedbackproduct`; CREATE TABLE IF NOT EXISTS `zt_feedbackview` ( `account` char(30) NOT NULL, @@ -7586,7 +7357,7 @@ CREATE VIEW `view_datasource_5` AS select `id`,`name` from `zt_task` where `del DROP VIEW IF EXISTS `view_datasource_46`; CREATE VIEW `view_datasource_46` AS select `id`,`name` from `zt_task` where `deleted` = '0' and vision = 'lite'; -UPDATE `zt_user` SET `visions` = 'lite' WHERE `feedback` = '1'; +UPDATE `zt_user` SET `visions` = 'lite', `feedback` = '0' WHERE `feedback` = '1'; REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (1,'account','browse'), @@ -8584,8 +8355,8 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES -- DROP TABLE IF EXISTS `zt_workflow`; CREATE TABLE IF NOT EXISTS `zt_workflow` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `parent` varchar(30) NOT NULL, - `child` varchar(30) NOT NULL, + `parent` varchar(30) NOT NULL, + `child` varchar(30) NOT NULL, `type` varchar(10) NOT NULL DEFAULT 'flow', `app` varchar(20) NOT NULL, `position` varchar(30) NOT NULL, @@ -8659,7 +8430,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowdatasource` ( `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, + `datasource` text NOT NULL, `view` varchar(20) NOT NULL, `keyField` varchar(50) NOT NULL, `valueField` varchar(50) NOT NULL, @@ -8687,7 +8458,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowfield` ( `rules` varchar(255) NOT NULL, `placeholder` varchar(100) NOT NULL, `order` smallint(5) unsigned NOT NULL, - `searchOrder` smallint(5) unsigned NOT NULL DEFAULT '0', + `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', @@ -8760,7 +8531,7 @@ CREATE TABLE IF NOT EXISTS `zt_workflowlinkdata` ( -- DROP TABLE IF EXISTS `zt_workflowrelation`; CREATE TABLE IF NOT EXISTS `zt_workflowrelation` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, - `prev` varchar(30) NOT NULL, + `prev` varchar(30) NOT NULL, `next` varchar(30) NOT NULL, `field` varchar(50) NOT NULL, `actions` varchar(20) NOT NULL, @@ -8792,7 +8563,7 @@ CREATE TABLE IF NOT EXISTS `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, + `rule` text NOT NULL, `createdBy` char(30) NOT NULL, `createdDate` datetime NOT NULL, `editedBy` char(30) NOT NULL, @@ -9026,20 +8797,6 @@ CREATE VIEW `view_datasource_12` AS select `id`,`title` from `zt_productplan` wh CREATE VIEW `view_datasource_41` AS select `id`,`title` from `zt_case` where `deleted` = '0'; CREATE VIEW `view_datasource_46` AS select `id`,`name` from `zt_task` where `deleted` = '0' and vision = 'lite'; -INSERT INTO `zt_workflowdatasource` (`type`, `name`, `code`, `buildin`, `vision`, `datasource`, `view`, `keyField`, `valueField`) VALUES -('system', '项目', 'liteprojects', '1', 'lite', '{\"app\":\"system\",\"module\":\"project\",\"method\":\"getPairsByModel\",\"methodDesc\":\"Get project pairs by model and project.\",\"params\":[{\"name\":\"model\",\"type\":\"string\",\"desc\":\"all|scrum|waterfall\",\"value\":\"all\"},{\"name\":\"programID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"param\",\"type\":\"\",\"desc\":\"\",\"value\":\"\"}]}', '', '', ''), -('sql', '任务', 'litetasks', '1', 'lite', 'select id,name from zt_task where deleted=\"0\" and vision=\"lite\"', 'view_datasource_46', 'id', 'name'), -('system', '权限分组', 'litegroups', '1', 'lite', '{\"app\":\"system\",\"module\":\"group\",\"method\":\"getPairs\",\"methodDesc\":\"\",\"params\":[]}', '', '', ''), -('system', '用户', 'liteusers', '1', 'lite', '{\"app\":\"system\",\"module\":\"user\",\"method\":\"getPairs\",\"methodDesc\":\"\",\"params\":[{\"name\":\"params\",\"type\":\"\",\"desc\":\"\",\"value\":\"noclosed|noletter\"},{\"name\":\"usersToAppended\",\"type\":\"\",\"desc\":\"\",\"value\":\"\"}]}', '', '', ''), -('sql', '模块', 'litemodules', '1', 'lite', 'select id,name from zt_module where deleted=\"0\"', 'view_datasource_11', 'id', 'name'), -('lang', '项目类型', 'liteprojectType', '1', 'lite', 'projectType', '', '', ''), -('lang', '项目状态', 'liteprojectStatus', '1', 'lite', 'projectStatus', '', '', ''), -('lang', '项目访问控制', 'liteprojectAcl', '1', 'lite', 'projectAcl', '', '', ''), -('lang', '任务类型', 'litetaskType', '1', 'lite', 'taskType', '', '', ''), -('lang', '任务优先级', 'litetaskPri', '1', 'lite', 'taskPri', '', '', ''), -('lang', '任务状态', 'litetaskStatus', '1', 'lite', 'taskStatus', '', '', ''), -('lang', '反馈状态', 'litefeedbackStatus', '1', 'lite', 'feedbackStatus', '', '', ''), -('system', '反馈分支', 'litefeedbackModules', '1', 'lite', '{\"app\":\"system\",\"module\":\"tree\",\"method\":\"getOptionMenu\",\"methodDesc\":\"Create an option menu in html.\",\"params\":[{\"name\":\"rootID\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"type\",\"type\":\"string\",\"desc\":\"\",\"value\":\"feedback\"},{\"name\":\"startModule\",\"type\":\"int\",\"desc\":\"\",\"value\":\"0\"},{\"name\":\"branch\",\"type\":\"\",\"desc\":\"\",\"value\":\"0\"}]}', '', '', ''); ALTER TABLE `zt_doc` ADD `template` varchar(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `lib`; ALTER TABLE `zt_doc` ADD `templateType` varchar(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `template`; ALTER TABLE `zt_doc` ADD `chapterType` varchar(30) COLLATE 'utf8_general_ci' NOT NULL AFTER `templateType`; @@ -9553,6 +9310,7 @@ CREATE TABLE IF NOT EXISTS `zt_review` ( `title` varchar(255) NOT NULL, `object` mediumint(8) NOT NULL, `template` mediumint(8) NOT NULL, + `doc` mediumint(8) DEFAULT NULL, `status` char(30) NOT NULL, `reviewedBy` varchar(255) NOT NULL, `auditedBy` varchar(255) NOT NULL, @@ -9843,7 +9601,6 @@ CREATE TABLE IF NOT EXISTS `zt_trainplan` ( `deleted` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -ALTER TABLE `zt_todo` CHANGE `type` `type` char(15) NOT NULL AFTER `feedback`; -- DROP TABLE IF EXISTS `zt_gapanalysis`; CREATE TABLE IF NOT EXISTS `zt_gapanalysis` ( @@ -13119,6 +12876,15 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (11,'workloadbudget','unlink'), (11,'workloadbudget','view'); +REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) +SELECT `module`, `method`, 14 from `zt_grouppriv` where `group` = 1; + +REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) +SELECT `module`, `method`, 15 from `zt_grouppriv` where `group` = 4; + +REPLACE INTO `zt_grouppriv`(`module`, `method`,`group`) +SELECT `module`, `method`, 16 from `zt_grouppriv` where `group` = 9; + REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES ('all', 'process', 'classify', 'support', '支持过程', '1'), ('all', 'process', 'classify', 'engineering', '工程支持', '1'), @@ -13412,3 +13178,442 @@ CREATE TABLE IF NOT EXISTS `zt_sqlview` ( `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; +SET global log_bin_trust_function_creators = 1; +SET global sql_mode = ''; +USE `__TABLE__`; + +DROP FUNCTION IF EXISTS `get_monday`; +CREATE FUNCTION `get_monday`(day date) RETURNS date + begin if date_format(day, '%w') = 0 then return subdate(day, date_format(day, '%w') - 6)__DELIMITER__ + else return subdate(day, date_format(day, '%w') -1)__DELIMITER__ + end if__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `get_sunday`; +CREATE FUNCTION `get_sunday`(day date) RETURNS date +begin + if date_format(day, '%w') = 0 then return day__DELIMITER__ + else return subdate(day, date_format(day, '%w') - 7)__DELIMITER__ + end if__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_cminited`; +CREATE FUNCTION qc_cminited($project int, $category varchar(30)) returns int +begin + declare products int default 0__DELIMITER__ + declare objects int default 0__DELIMITER__ + select count(*) from zt_projectproduct where project = $project into products__DELIMITER__ + select count(distinct product) from zt_object where project = $project and category = $category and type = 'taged' and product in (select product from zt_projectproduct where project = $project) into objects__DELIMITER__ + IF products = objects THEN + return 1__DELIMITER__ + ELSEIF products != objects THEN + return 0__DELIMITER__ + END IF__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_initscale`; +CREATE FUNCTION qc_initscale($project int, $category varchar(30), $estimateType varchar(30)) RETURNS float(10,2) +BEGIN + declare $estimate int default 0__DELIMITER__ + declare $storyEst varchar(30) default 'storyEst'__DELIMITER__ + declare $requestEst varchar(30) default 'requestEst'__DELIMITER__ + if($estimateType = $storyEst) THEN SELECT sum(storyEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = $category and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + end if__DELIMITER__ + if($estimateType = $requestEst) THEN SELECT sum(requestEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = $category and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + end if__DELIMITER__ + RETURN @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmplanscale`; +CREATE FUNCTION `qc_pgmplanscale`($project int) RETURNS float(10,2) +BEGIN + declare programScale float (10,2) default 0__DELIMITER__ + select `scale` from zt_workestimation where project = $project into @programScale__DELIMITER__ + return @programScale__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmsrinitscale`; +CREATE FUNCTION `qc_pgmsrinitscale`($project int) RETURNS float(10,2) +begin + declare scale int default 0__DELIMITER__ + declare inited int default 0__DELIMITER__ + select qc_cminited($project, 'SRS') into inited__DELIMITER__ + IF inited = 1 THEN + select qc_initscale($project, 'SRS', 'storyEst') into scale __DELIMITER__ + return scale __DELIMITER__ + ELSE + return 0__DELIMITER__ + END IF__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmsrrealscale`; +CREATE FUNCTION `qc_pgmsrrealscale`($project int) RETURNS float(10,2) +BEGIN + declare totalEstimate float(10,2) default 0__DELIMITER__ + select CAST(sum(estimate) as DECIMAL(10,2)) as estimate from zt_story where id in (select story from zt_projectstory where project=$project) and type='story' and deleted='0' and closedReason not in ('subdivided', 'duplicate', 'willnotdo', 'cancel', 'bydesign') into totalEstimate__DELIMITER__ + return totalEstimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmurinitscale`; +CREATE FUNCTION `qc_pgmurinitscale`($project int) RETURNS float(10,2) +begin + declare scale int default 0__DELIMITER__ + declare inited int default 0__DELIMITER__ + select qc_cminited($project, 'URS') into inited__DELIMITER__ + IF inited = 1 THEN + select qc_initscale($project, 'URS', 'requestEst') into scale__DELIMITER__ + return scale__DELIMITER__ + ELSE + return 0__DELIMITER__ + END IF__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmurrealscale`; +CREATE FUNCTION `qc_pgmurrealscale`($project int) RETURNS float(10,2) +BEGIN + declare totalEstimate float(10,2) default 0__DELIMITER__ + select CAST(sum(estimate) as DECIMAL(10,2)) as estimate from zt_story where project=$project and type='requirement' and deleted='0' and closedReason not in ('subdivided', 'duplicate', 'willnotdo', 'cancel', 'bydesign') into totalEstimate__DELIMITER__ + return totalEstimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmallrequirementstage`; +CREATE FUNCTION `qc_pgmallrequirementstage`($project int) RETURNS int(1) +BEGIN + -- 获取项目产品总数 + select count(*) as products from zt_projectproduct where project = $project into @totalproduct__DELIMITER__ + -- 获取已经设置需求阶段的产品总数 + select count(*) as product from (select product from zt_projectproduct where project in (select id from zt_project where project = $project and type = 'stage' and attribute = 'request' and deleted = '0') GROUP BY product) as product into @product__DELIMITER__ + -- 让项目产品总数和已设置需求阶段产品总数比较,都设置返回1,否则返回0 + if @totalproduct = @product then return 1__DELIMITER__ + end if__DELIMITER__ + RETURN 0__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmdesigntplandays`; +CREATE FUNCTION `qc_pgmdesigntplandays`($project int) RETURNS int(10) +BEGIN + select qc_pgmspecifiedtypeplanneddays($project,'design') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmdesigntrealdays`; +CREATE FUNCTION `qc_pgmdesigntrealdays`($project int) RETURNS int(10) +BEGIN + select qc_pgmspecifiedtypeactualdays($project,'design') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmdevelplandays`; +CREATE FUNCTION `qc_pgmdevelplandays`($project int) RETURNS int(10) +BEGIN + select qc_pgmspecifiedtypeplanneddays($project,'dev') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmdevelrealdays`; +CREATE FUNCTION `qc_pgmdevelrealdays`($project int) RETURNS int(10) +BEGIN + select qc_pgmspecifiedtypeactualdays($project,'dev') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmrequestplandays`; +CREATE FUNCTION `qc_pgmrequestplandays`($project int) RETURNS int(10) +BEGIN + select qc_pgmspecifiedtypeplanneddays($project,'request') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmrequestrealdays`; +CREATE FUNCTION `qc_pgmrequestrealdays`($project int) RETURNS int(10) +BEGIN + select qc_pgmspecifiedtypeactualdays($project,'request') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmspecifiedtypeactualdays`; +CREATE FUNCTION `qc_pgmspecifiedtypeactualdays`($project int,$attribute varchar(50)) RETURNS int(10) +BEGIN + -- 查询某类型的阶段总数 + select count(*) from zt_project where project = $project and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where project = $project and attribute = $attribute and grade = 2 group by parent) into @totalstory__DELIMITER__ + -- 查询某类型已设置实际工期的阶段总数 + select count(*) from zt_project where project = $project and attribute = $attribute and deleted = '0' and realDuration > 0 and id not in (select parent from zt_project where project = $project and attribute = $attribute and grade = 2 group by parent) into @setstory__DELIMITER__ + -- 查询项目下某类型阶段实际工期总数 + select sum(realDuration) as realDuration from zt_project where project = $project and attribute = $attribute and deleted = '0' and realDuration > 0 and id not in (select parent from zt_project where project = $project and attribute = $attribute and grade = 2 group by parent) into @days__DELIMITER__ + -- 判断项目下某类型的阶段是否都已设置实际工期 + if @totalstory != @setstory then + set @days = 0__DELIMITER__ + end if__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmspecifiedtypeplanneddays`; +CREATE FUNCTION `qc_pgmspecifiedtypeplanneddays`($project int,$attribute varchar(50)) RETURNS int(10) +BEGIN + select sum(planDuration) as planDuration from zt_project where project = $project and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where project = $project and attribute = $attribute and grade = 2 group by parent) into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmstageactualduration`; +CREATE FUNCTION `qc_pgmstageactualduration`($product int, $attribute varchar(50)) RETURNS int(10) +BEGIN + -- 查找某类型的阶段总数 + select count(*) as totalduration from zt_project where id in (select project from zt_projectproduct where product = $product) and type = 'stage' and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and grade = 2 group by parent) into @totalduration__DELIMITER__ + -- 查某类型阶段已设置实际工期的总数 + select count(*) as setduration from zt_project where id in (select project from zt_projectproduct where product = $product) and type = 'stage' and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and grade = 2 group by parent) and realDuration > 0 into @setduration__DELIMITER__ + -- 指定产品下某类型的阶段实际工期总和 + select sum(realDuration) as duration from zt_project where id in (select project from zt_projectproduct where product = $product) and type = 'stage' and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and grade = 2 group by parent) and realDuration > 0 into @duration__DELIMITER__ + -- 需要判断该类型阶段都已设置实际工期,否则不统计 + if @totalduration != @setduration then + set @duration = 0__DELIMITER__ + end if__DELIMITER__ + return @duration__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmstageplannedduration`; +CREATE FUNCTION `qc_pgmstageplannedduration`($product int, $attribute varchar(50)) RETURNS int(10) +BEGIN + -- 查找某产品对应阶段 + select sum(planDuration) as duration from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and deleted = '0' and id not in (select parent from zt_project where id in (select project from zt_projectproduct where product = $product) and attribute = $attribute and grade = 2 group by parent) and planDuration > 0 into @duration__DELIMITER__ + RETURN @duration__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmtestplandays`; +CREATE FUNCTION `qc_pgmtestplandays`($project int) RETURNS int(10) +BEGIN + select qc_pgmspecifiedtypeplanneddays($project,'qa') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmtestrealdays`; +CREATE FUNCTION `qc_pgmtestrealdays`($project int) RETURNS int(10) +BEGIN + select qc_pgmspecifiedtypeactualdays($project,'qa') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_prddesigntplandays`; +CREATE FUNCTION `qc_prddesigntplandays`($project int, $product int) RETURNS int(10) +BEGIN + select qc_pgmstageplannedduration($project, $product, 'design') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_prddesigntrealdays`; +CREATE FUNCTION `qc_prddesigntrealdays`($project int, $product int) RETURNS int(10) +BEGIN + select qc_pgmstageactualduration($project, $product, 'design') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_prddevelplandays`; +CREATE FUNCTION `qc_prddevelplandays`($project int, $product int) RETURNS int(10) +BEGIN + select qc_pgmstageplannedduration($project, $product, 'dev') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_prddevelrealdays`; +CREATE FUNCTION `qc_prddevelrealdays`($project int, $product int) RETURNS int(10) +BEGIN + select qc_pgmstageactualduration($project, $product, 'dev') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_prdrequestplandays`; +CREATE FUNCTION `qc_prdrequestplandays`($project int, $product int) RETURNS int(10) +BEGIN + select qc_pgmstageplannedduration($project, $product, 'request') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_prdrequestrealdays`; +CREATE FUNCTION `qc_prdrequestrealdays`($project int, $product int) RETURNS int(10) +BEGIN + select qc_pgmstageactualduration($project, $product, 'request') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_prdtestplandays`; +CREATE FUNCTION `qc_prdtestplandays`($project int, $product int) RETURNS int(10) +BEGIN + select qc_pgmstageplannedduration($project, $product, 'qa') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_prdtestrealdays`; +CREATE FUNCTION `qc_prdtestrealdays`($project int, $product int) RETURNS int(10) +BEGIN + select qc_pgmstageactualduration($project, $product, 'qa') as days into @days__DELIMITER__ + return @days__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmdesgignrealesthours`; +CREATE FUNCTION `qc_pgmdesgignrealesthours`($project int) RETURNS float(10,2) +BEGIN +return qc_pgmesthoursbytype($project, 'design')__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmdesignrealhours`; +CREATE FUNCTION `qc_pgmdesignrealhours`($project int) RETURNS float(10,2) +BEGIN +return qc_pgmrealhoursbytype($project, 'design')__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmdevelrealesthours`; +CREATE FUNCTION `qc_pgmdevelrealesthours`($project int) RETURNS float(10,2) +BEGIN +return qc_pgmesthoursbytype($project, 'devel')__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmdevelrealhours`; +CREATE FUNCTION `qc_pgmdevelrealhours`($project int) RETURNS float(10,2) +BEGIN +return qc_pgmrealhoursbytype($project, 'devel')__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmrealesthours`; +CREATE FUNCTION `qc_pgmrealesthours`($project int) RETURNS float(10,2) +BEGIN + select CAST(sum(estimate) as DECIMAL(10,2)) as estimate from zt_task where project=$project and parent >= 0 and status != 'cancel' and deleted = '0' into @estimate__DELIMITER__ + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmesthoursbytype`; +CREATE FUNCTION `qc_pgmesthoursbytype`($project int, $type char(30)) RETURNS float(10,2) +BEGIN + select CAST(sum(estimate) as DECIMAL(10,2)) as estimate from zt_task where project=$project and type = $type and parent >= 0 and status != 'cancel' and deleted = '0' into @estimate__DELIMITER__ + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmrealhours`; +CREATE FUNCTION `qc_pgmrealhours`($project int) RETURNS float(10,2) +BEGIN + select CAST(sum(consumed) as DECIMAL(10,2)) as consumed from zt_task where project=$project and parent >= 0 and status != 'cancel' and deleted = '0' into @consumed__DELIMITER__ + return @consumed__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmrealhoursbytype`; +CREATE FUNCTION `qc_pgmrealhoursbytype`($project int, $type char(30)) RETURNS float(10,2) +BEGIN + select CAST(sum(consumed) as DECIMAL(10,2)) as consumed from zt_task where project=$project and type = $type and parent >= 0 and status != 'cancel' and deleted = '0' into @consumed__DELIMITER__ + return @consumed__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmrequestrealesthours`; +CREATE FUNCTION `qc_pgmrequestrealesthours`($project int) RETURNS float(10,2) +BEGIN +return qc_pgmesthoursbytype($project, 'request')__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmrequestrealhours`; +CREATE FUNCTION `qc_pgmrequestrealhours`($project int) RETURNS float(10,2) +BEGIN +return qc_pgmrealhoursbytype($project, 'request')__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmtestrealesthours`; +CREATE FUNCTION `qc_pgmtestrealesthours`($project int) RETURNS float(10,2) +BEGIN +return qc_pgmesthoursbytype($project, 'test')__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmtestrealhours`; +CREATE FUNCTION `qc_pgmtestrealhours`($project int) RETURNS float(10,2) +BEGIN +return qc_pgmrealhoursbytype($project, 'test')__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_getdevelfirstesthours`; +CREATE FUNCTION `qc_getdevelfirstesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(devEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_getdesignfirstesthours`; +CREATE FUNCTION `qc_getdesignfirstesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(designEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_getstoryfirstesthours`; +CREATE FUNCTION `qc_getstoryfirstesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(requestEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_gettestfirstesthours`; +CREATE FUNCTION `qc_gettestfirstesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(testEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_getfirstesthours`; +CREATE FUNCTION `qc_getfirstesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(taskEst) as estimate FROM zt_object WHERE id in(SELECT MIN(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_getdevlastesthours`; +CREATE FUNCTION `qc_getdevlastesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(devEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_getrequestlastesthours`; +CREATE FUNCTION `qc_getrequestlastesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(requestEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_gettestlastesthours`; +CREATE FUNCTION `qc_gettestlastesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(testEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_getdesignlastesthours`; +CREATE FUNCTION `qc_getdesignlastesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(designEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_getlastesthours`; +CREATE FUNCTION `qc_getlastesthours`($project int) RETURNS float(10,2) +BEGIN + SELECT sum(taskEst) as estimate FROM zt_object WHERE id in(SELECT MAX(id) FROM zt_object WHERE project = $project and category = 'PP' and type = 'taged' and product in (select product from zt_projectproduct where project = $project) group by `product`) into @estimate__DELIMITER__ + + return @estimate__DELIMITER__ +END; + +DROP FUNCTION IF EXISTS `qc_pgmlastesthours`; +CREATE FUNCTION `qc_pgmlastesthours`($project int) RETURNS float(10,2) +BEGIN + declare estimate float(10,2) default 0__DELIMITER__ + declare inited int default 0__DELIMITER__ + select qc_cminited($project,'PP') into inited__DELIMITER__ + IF inited = 1 THEN + select qc_getlastesthours($project) into estimate__DELIMITER__ + return estimate__DELIMITER__ + ELSE + return 0__DELIMITER__ + END IF__DELIMITER__ +END; diff --git a/doc/LICENSE.LITE.CN b/doc/LICENSE.LITE.CN new file mode 100644 index 0000000000..69a638d19d --- /dev/null +++ b/doc/LICENSE.LITE.CN @@ -0,0 +1,102 @@ +Z PUBLIC LICENSE 1.2 + +许可 + +Z PUBLIC LICENSE 由青岛易软天创网络科技有限公司(www.easycorp.cn)起草,简称ZPL协议。 +任何人均可使用该协议来发布开源软件,并可对下面协议正文中以下划线标注的空白部分做相应修改, +除此之外的任何内容不得做任何修改。青岛易软天创网络科技有限公司拥有对该协议条款的最终解释权。 + +前言: + +禅道迅捷版软件(以下简称该软件)由 青岛易软天创网络科技有限公司(www.easycorp.cn)开发(以下简称我)。我依法拥有该软件的所有版权。 +本着共享开放的角度,我以开放源代码的形式发布该软件。您可以在遵守该协议的前提下使用该软件。 +自您安装该软件开始,您和我之间的合同关系自动成立。除非您停止使用该软件或与我有签署额外合同, +您须认真遵循该授权协议约定的每一条款。 + +我的联系方式: +联系人:徐先生 +电话: 4006-8899-23 +Email: co@zentao.net +QQ: 1492153927 +地址: 青岛开发区长江路232号国贸中心C座2单元2902室 + +约定: + +下述条款中所指该软件的标志包括如下方面: + + 该软件源代码及文档中关于该软件的版权提示、文字、图片和链接。 + 该软件运行时界面上呈现出来的有关该软件的文字、图片和链接。 + +不包括如下方面: + + 该软件提供的演示数据中关于该软件的文字、图片和链接。 + +一、免责 + +该软件是以开放源代码的方式发行,您使用该软件无需任何费用,因此在使用该软件前,您须知晓: + +1.1 我没有对该软件提供任何技术支持的义务,您可联系我购买商业的技术支持。 +1.2 我对因使用该软件而产生直接或间接的任何问题不负任何责任。 +1.3 开源不等于免费,开源不等于无版权,开源软件的发展需要您我共同的努力。 + +二、自用该软件 + +2.1 您个人或您就职的公司(组织)可自由使用该软件,我不对您或您就职公司(组织)的性质做任何限制。 +2.2 您可以在您个人或您就职公司(组织)任意数量的电脑上运行该软件,我不对电脑的数量做任何限制。 +2.3 您可以对该软件源代码进行修改以适应您个人或您所在公司(组织)使用的要求,您做的改动无需对外发布。 +2.4 您个人或您就职公司(组织)使用该软件时,必须保留该软件的所有标志,不得以任何方式隐藏或遮掩任一标志。 + +三、为用户定制 + +3.1 您可以使用该软件为您的用户部署各种形式的应用,我不对应用的性质做任何限制。 +3.2 您可以使用该软件为您的用户部署任意数量的应用,我不对应用的数量做任何限制。 +3.3 您可以对该软件源代码进行修改以适应您的用户的要求,您做的改动无需对外发布。 +3.4 您对该软件源代码所做的修改可以源代码或二进制的方式提供给您的用户。 +3.5 您使用该软件为您的任一用户部署的任一应用都必须保留该软件所有的标志。 +3.6 您使用该软件为您的任一用户部署的任一应用都不得以任何方式隐藏或遮掩该软件任一标志。 + +四、提供在线服务 + +4.1 您可以使用该软件搭建在线服务,为您的用户提供服务,我不对该服务及该服务用户的性质做任何限制。 +4.2 您可以使用该软件搭建在线服务,为您的用户提供服务,我不对该服务的用户数量做任何限制。 +4.3 您可以对该软件源代码进行修改以适应在线服务的要求,您做的改动无需对外发布。 +4.4 您使用该软件搭建在线服务时,必须以明确的方式告知您的用户该服务是基于该软件搭建的。 +4.5 您使用该软件搭建在线服务为您的任一用户部署的任一应用必须保留该软件所有的标志。 +4.6 您使用该软件搭建在线服务为您的任一用户部署的任一应用不得以任何方式隐藏或遮掩该软件任一标志。 +4.7 您使用该软件搭建在线服务时,不得为您的用户提供去除、隐藏或遮掩该软件任一标志的功能。 + +五、无改动发布或集成该软件 + +5.1 我欢迎并感谢您将该软件发布在您的个人网站、企业官网或者其他的第三方网站。 +5.2 我欢迎并感谢您将该软件集成在其他系统中一起发布,比如云服务镜像、操作系统发行版等。 +5.3 您在发布或者集成该软件的时候,不得对该软件源码做任何改动。 +5.4 您在发布或者集成该软件的时候,须保留该软件的所有标志。 + +六、发布基于该软件的衍生作品 + +6.1 我欢迎并感谢您为该软件开发衍生作品。 +6.2 您开发的衍生作品中涉及到对该软件源代码改动的地方,须遵循如下条款: + + 6.2.1 如修改了该软件的源代码,须依据本协议发布修改后的源代码。 + 6.2.2 如修改了该软件的源代码,须保留代码里面该软件原有的所有标志。 + 6.2.3 您可以在代码中追加您自己的标志。 + 6.2.4 您可以对您开发的衍生作品进行收费。 + 6.2.5 第三方的用户可在遵循6.2所有条款下可继续在您开发的衍生作品基础上进行修改并发布。 + +6.3 您开发的衍生作品中独立于本软件开发的代码,可以源代码或二进制的方式进行发布,可免费或收费发布。 +6.4 您开发的衍生作品不得以任何方式去除、隐藏或遮掩该软件的任一标志。 + +七、发布基于该软件API的应用 + +7.1 我欢迎并感谢您为该软件开发基于API的各种应用,比如客户端软件等。 +7.2 您基于该软件API机制开发的应用,可以源代码或者二进制的方式进行发布,我对此没有任何限制。 +7.3 您基于该软件API机制开发的应用,授权协议可以自行约定,我对此没有任何限制。 +7.4 您基于该软件API机制开发的应用,可以免费或者收费发布,我对此没有任何限制。 + +八、授权例外 + +如果上述条款无法满足您使用该软件的要求,可联系我签署额外的合同以获得更灵活的授权许可。 + +九、合同约束 + +9.1 如果您违反了该协议的任一条款,该授权协议将自动终止,我保留通过法律手段追究责任的权利。 diff --git a/doc/LICENSE.LITE.EN b/doc/LICENSE.LITE.EN new file mode 100644 index 0000000000..0f5d8d8e26 --- /dev/null +++ b/doc/LICENSE.LITE.EN @@ -0,0 +1,99 @@ +Z PUBLIC LICENSE 1.2 + +Authorization + +Z PUBLIC LICENSE, also known as ZPL Agreement, is drafted by EasyCorp(www.easycorp.ltd). +Anyone can use the agreement to publish open source software, and modify the blank in the following text of the agreement accordingly. +No other text of the agreement shall be changed. EasyCorp has the final interpretation of the terms in the agreement. + +Preface + +ZenTao LITE (Hereinafter referred to as "the software") developed by EasyCorp (www.easycorp.ltd) (hereinafter referred to I). I'm entitled to all copyright of the software. +The software is released as open source software. You are authorized to use the software as long as you are in compliance with this agreement. +By installation of the software, you agree that a contractual relationship between you and me is automatically established. +You are obliged to fully comply with all the terms of this agreement unless you choose to stop using the software or you have signed additional agreement with me. + +My Contact: +Email: renee@easysoft.ltd +Site: https://www.zentao.pm + +We agree: + +Indications of the software include: + + Notes, texts, pictures and links showing copyright attribution of the software in the source code and related documentation. + and texts, picture and links on the interface of the software when running. + +Excluding + + texts, picture and links on the interface of the demo versions of the software. + +1. Disclaimer + +The software is an open-source software, so you are authorized to use the software without paying a fee. Before you start to use it, please note: + +1.1 I do not have any obligation to provide technical support for the software. You can contact me to purchase technical support service. +1.2 I'm not responsible for any liability caused by your using the software directly or indirectly. +1.3 Open source software does not mean it's free of charge, neither does it mean the software does not enjoy copyright. + +2. For personal use + +2.1 You or your company/organization are authorized to use the software for your internal use for both commercial and non-commercial purposes.. +2.2 You or your company/organization are authorized to run the software on any number of computers. +2.3 You or your company/organization are authorized to modify the source code of the software to meet your requirements. You do not need to release the modified codes. +2.4 You or your company/organization must keep all the indications of the software when using it. None of the indications can be removed, hidden or obscured in any way. + +3. For customized software + +3.1 You are authorized to use the software to deploy various forms of application for your users in any way you like. +3.2 You are authorized to use the software to deploy any number of applications for your users. +3.3 You are authorized to modify the source code to meet your user's requirements without releasing the modified codes. +3.4 You are authorized to provide the modified codes to your users in either source code form or binary. +3.5 You must keep all the indications of the software when providing applications to your users. +3.6 None of the indications of the software may be removed, hidden or obscured in any way when you provide applications to your users. + +4. Online service + +4.1 You are authorized to use the software to build your online service for your users in any way you like. +4.2 You are authorized to use the software to build your online service for any number of your users. +4.3 You are authorized to modify the source codes of the software to meet your user's requirements on online service without releasing the modified codes. +4.4 You must notify your users clearly that your service is based on the software when you use it to build your online service. +4.5 You must keep all the indications of the software when providing online service to your users. +4.6 You must keep all the indications of the software in any application you make for your users. None of the indications can be hidden or obscured in any way. +4.7 You are forbidden from assisting your users by providing tools for your users to remove, hide or obscure any indication of the software when you use the software to build your online service. + +5. Publish or integrate the software without modification + +5.1 You are authorized to publish the software on your personal sites, corporate official website or other third-party sites. +5.2 You are authorized to integrate the software with other systems, such as cloud virtual machine images, operating system images and so on. +5.3 Do not modify the source code of the software when you publish or integrate it. +5.4 All indications of the software must be kept the same when you publish or integrate the software. + +6. Publish derived work based on the software + +6.1 You are authorized to develop derived work based on the software. +6.2 The modified codes of the software in your derived work must follow the following terms: + + 6.2.1 The source codes must be released if you make any modification to the software. + 6.2.2 All indications of the software must be kept the same. + 6.2.3 You are entitled to add your indications to the modified codes. + 6.2.4 You are entitled to charge fees for the derived work you developed based on the software. + 6.2.5 You agree to authorize third party users to modify and release the derived work in compliance with 6.2. + +6.3 If the codes of the work are independently developed by yourself, You are authorized to release the work in either source code form or binary. You are entitled to charge your users or make it free. +6.4 None of the indications of the software can be removed, hidden or obscured in any way in the derived work you developed. + +7. Publish applications based on API of the software + +7.1 You are authorized to develop your applications based on the API of the software, for example, client software. +7.2 You are authorized to publish applications you developed based on the API in either source code form or binary. +7.3 You are authorized to use your own license to release applications you developed based on the API. +7.4 You are entitled to release applications you developed based on the API either free or with a charge. + +8. Exceptions + +If the terms above do not meet your requirements when using the software, please contact me for a more flexible license. + +9. Termination + +9.1 Violation of any of the terms of the agreement will result in immediate termination of this license. I reserve all rights to take legal actions in case of dispute. diff --git a/extension/lite/attend/ext/view/detail.oa.html.hook.php b/extension/lite/attend/ext/view/detail.oa.html.hook.php new file mode 100644 index 0000000000..e3466bb752 --- /dev/null +++ b/extension/lite/attend/ext/view/detail.oa.html.hook.php @@ -0,0 +1,9 @@ + + + diff --git a/extension/lite/attend/ext/view/personal.html.php b/extension/lite/attend/ext/view/personal.html.php new file mode 100644 index 0000000000..784ba54c82 --- /dev/null +++ b/extension/lite/attend/ext/view/personal.html.php @@ -0,0 +1,211 @@ + + * @package attend + * @version $Id$ + * @link http://www.zentao.net + */ +?> +getModuleRoot() . 'common/view/header.html.php';?> + +
+ +
+ +
+
+
+
+
    + +
  • '> + +
      + +
    • '> + +
    • + +
    +
  • + +
+
+
+
+
+
+ config->attend->workingDays > 7) + { + $startDate = strtotime("$currentYear-$currentMonth-01"); + $startDate = date('w', $startDate) == 0 ? $startDate : strtotime("last Sunday", $startDate); + $endDate = strtotime("next month -1 day $currentYear-$currentMonth-01"); + $endDate = date('w', $endDate) == 6 ? $endDate : strtotime("next Saturday", $endDate); + $firstDayIndex = 0; + $lastDayIndex = 6; + } + else + { + $startDate = strtotime("$currentYear-$currentMonth-01"); + $startDate = date('w', $startDate) == 1 ? $startDate : strtotime("last Monday", $startDate); + $endDate = strtotime("next month -1 day $currentYear-$currentMonth-01"); + $endDate = date('w', $endDate) == 0 ? $endDate : strtotime("next Sunday", $endDate); + $firstDayIndex = 1; + $lastDayIndex = 0; + } + ?> + + + +
+
+
+ + + + + + + + + + + + + + + status;?> + reason;?> + + reviewStatus) ? $attend->reviewStatus : '';?> + + + + + + + + + + + + + + + + + +
attend->weeks[$weekIndex];?>attend->dayName;?>attend->signIn;?>attend->signOut;?>actions . '/' . $lang->attend->status;?>
datepicker->abbrDayNames[$dayIndex]?> + signOut, 0, 5);?> + attend->statusList[$status];?> + attend->statusList['early'];?> + + + attend->edited : $lang->attend->edit; + $leave = $reason == 'leave' ? $lang->attend->leaved : $lang->attend->leave; + $makeup = $reason == 'makeup' ? $lang->attend->makeuped : $lang->attend->makeup; + $overtime = $reason == 'overtime' ? $lang->attend->overtimed : $lang->attend->overtime; + $lieu = $reason == 'lieu' ? $lang->attend->lieud : $lang->attend->lieu; + $trip = $reason == 'trip' ? $lang->attend->triped : $lang->attend->trip; + $egress = $reason == 'egress' ? $lang->attend->egress : $lang->attend->egress; + ?> + hoursList):?> + hoursList as $status => $hours) + { + if($index > 1) $statusLabel .= '
'; + $statusLabel .= $lang->attend->statusList[$status] . $hours . 'h'; + $index++; + } + ?> + + + + + + + + + + + + createLink('attend', 'edit', "date=" . $date), $edit, "data-toggle='modal' data-width='500px'");?> + + + + + + attend->overtime, "data-toggle='modal' data-width='700px'");?> + + + attend->statusList[$status];?> + +
datepicker->abbrDayNames[$dayIndex]?>
+
+
+ +
+ + + +
+
+
+ +getModuleRoot() . 'common/view/footer.html.php';?> diff --git a/extension/lite/attend/ext/view/personalsettings.oa.html.hook.php b/extension/lite/attend/ext/view/personalsettings.oa.html.hook.php new file mode 100644 index 0000000000..6468f2deb5 --- /dev/null +++ b/extension/lite/attend/ext/view/personalsettings.oa.html.hook.php @@ -0,0 +1,6 @@ + diff --git a/extension/lite/attend/ext/view/setmanager.oa.html.hook.php b/extension/lite/attend/ext/view/setmanager.oa.html.hook.php new file mode 100644 index 0000000000..cc6165d5c1 --- /dev/null +++ b/extension/lite/attend/ext/view/setmanager.oa.html.hook.php @@ -0,0 +1,7 @@ + diff --git a/extension/lite/attend/ext/view/settings.oa.html.hook.php b/extension/lite/attend/ext/view/settings.oa.html.hook.php new file mode 100644 index 0000000000..2051e2ba60 --- /dev/null +++ b/extension/lite/attend/ext/view/settings.oa.html.hook.php @@ -0,0 +1,6 @@ + diff --git a/extension/lite/block/ext/lang/en/lite.php b/extension/lite/block/ext/lang/en/lite.php index fbefe01a6d..2b2566c658 100644 --- a/extension/lite/block/ext/lang/en/lite.php +++ b/extension/lite/block/ext/lang/en/lite.php @@ -19,7 +19,9 @@ $lang->block->story = 'Target'; $lang->block->storyCount = 'Target Count'; +/* unset contribute and projectteam. */ unset($lang->block->default['full']['my']['9']); +unset($lang->block->default['full']['my']['6']); $lang->block->default['full']['my']['5']['title'] = 'Kanban List'; $lang->block->default['full']['my']['5']['block'] = 'scrumlist'; diff --git a/extension/lite/block/ext/lang/zh-cn/lite.php b/extension/lite/block/ext/lang/zh-cn/lite.php index 9bd80e60a2..4c60831543 100644 --- a/extension/lite/block/ext/lang/zh-cn/lite.php +++ b/extension/lite/block/ext/lang/zh-cn/lite.php @@ -19,7 +19,9 @@ $lang->block->story = '目标'; $lang->block->storyCount = '目标数'; +/* unset contribute and projectteam. */ unset($lang->block->default['full']['my']['9']); +unset($lang->block->default['full']['my']['6']); $lang->block->default['full']['my']['5']['title'] = '看板列表'; $lang->block->default['full']['my']['5']['block'] = 'scrumlist'; diff --git a/extension/lite/block/ext/view/welcome.html.php b/extension/lite/block/ext/view/welcome.html.php index 5ae959a074..ebad8c75c6 100644 --- a/extension/lite/block/ext/view/welcome.html.php +++ b/extension/lite/block/ext/view/welcome.html.php @@ -30,15 +30,15 @@
block->undone?>
-
createLink('my', 'work', 'mode=task'), (int)$data['undone']);?>
+
createLink('my', 'contribute', 'mode=task&type=assignedTo'), (int)$data['undone']);?>
block->delaying?>
-
createLink('my', 'work', 'mode=task'), (int)$data['delaying']);?>
+
createLink('my', 'contribute', 'mode=task&type=assignedTo'), (int)$data['delaying']);?>
block->delayed?>
-
createLink('my', 'work', 'mode=task'), (int)$data['delayed']);?>
+
createLink('my', 'contribute', 'mode=task&type=assignedTo'), (int)$data['delayed']);?>
diff --git a/extension/lite/common/ext/lang/en/lite.php b/extension/lite/common/ext/lang/en/lite.php index feec557208..1bceb9a274 100644 --- a/extension/lite/common/ext/lang/en/lite.php +++ b/extension/lite/common/ext/lang/en/lite.php @@ -58,6 +58,7 @@ $lang->my->menu->index = array('link' => "$lang->dashboard|my|index"); $lang->my->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo'); $lang->my->menu->task = array('link' => "{$lang->task->common}|my|contribute|mode=task&type=assignedTo", 'subModule' => 'task'); $lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|"); +if($config->systemScore) $lang->my->menu->score = array('link' => "{$lang->score->shortCommon}|my|score|", 'subModule' => 'score'); global $config; if($config->edition != 'open') $lang->my->menu->effort = array('link' => 'Effort|effort|calendar|', 'exclude' => 'my-todo'); @@ -68,6 +69,7 @@ $lang->my->menuOrder[5] = 'index'; $lang->my->menuOrder[10] = 'calendar'; if($config->edition != 'open') $lang->my->menuOrder[11] = 'effort'; $lang->my->menuOrder[20] = 'task'; +$lang->my->menuOrder[25] = 'contacts'; $lang->my->dividerMenu = ',calendar,'; @@ -159,7 +161,7 @@ $lang->admin->menuOrder[30] = 'dev'; $lang->admin->menuOrder[35] = 'system'; $lang->admin->menu->message['subMenu'] = new stdclass(); -$lang->admin->menu->message['subMenu']->message = new stdclass(); +$lang->admin->menu->message['subMenu']->message = array(); $lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail'); $lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook'); diff --git a/extension/lite/common/ext/lang/zh-cn/lite.php b/extension/lite/common/ext/lang/zh-cn/lite.php index 9012c1b61f..337aa5b160 100644 --- a/extension/lite/common/ext/lang/zh-cn/lite.php +++ b/extension/lite/common/ext/lang/zh-cn/lite.php @@ -58,6 +58,7 @@ $lang->my->menu->index = array('link' => "$lang->dashboard|my|index"); $lang->my->menu->calendar = array('link' => "$lang->calendar|my|calendar|", 'subModule' => 'todo', 'alias' => 'todo'); $lang->my->menu->task = array('link' => "{$lang->task->common}|my|contribute|mode=task&type=assignedTo", 'subModule' => 'task'); $lang->my->menu->contacts = array('link' => "$lang->contact|my|managecontacts|"); +if($config->systemScore) $lang->my->menu->score = array('link' => "{$lang->score->shortCommon}|my|score|", 'subModule' => 'score'); global $config; if($config->edition != 'open') $lang->my->menu->effort = array('link' => '日志|effort|calendar|', 'exclude' => 'my-todo'); @@ -68,6 +69,7 @@ $lang->my->menuOrder[5] = 'index'; $lang->my->menuOrder[10] = 'calendar'; if($config->edition != 'open') $lang->my->menuOrder[11] = 'effort'; $lang->my->menuOrder[20] = 'task'; +$lang->my->menuOrder[25] = 'contacts'; $lang->my->dividerMenu = ',calendar,'; @@ -159,7 +161,7 @@ $lang->admin->menuOrder[30] = 'dev'; $lang->admin->menuOrder[35] = 'system'; $lang->admin->menu->message['subMenu'] = new stdclass(); -$lang->admin->menu->message['subMenu']->message = new stdclass(); +$lang->admin->menu->message['subMenu']->message = array(); $lang->admin->menu->message['subMenu']->mail = array('link' => "{$lang->mail->common}|mail|index", 'subModule' => 'mail'); $lang->admin->menu->message['subMenu']->webhook = array('link' => "Webhook|webhook|browse", 'subModule' => 'webhook'); diff --git a/extension/lite/custom/ext/lang/zh-cn/lite.php b/extension/lite/custom/ext/lang/zh-cn/lite.php index 9d1feed8cd..a1b67f9dae 100644 --- a/extension/lite/custom/ext/lang/zh-cn/lite.php +++ b/extension/lite/custom/ext/lang/zh-cn/lite.php @@ -15,7 +15,8 @@ $lang->custom->object['user'] = '用户'; $lang->custom->object['block'] = '区块'; $lang->custom->task = new stdClass(); -$lang->custom->task->fields['priList'] = '优先级'; +$lang->custom->task->fields['priList'] = '优先级'; +$lang->custom->task->fields['typeList'] = '类型'; $lang->custom->story = new stdClass(); $lang->custom->story->fields['priList'] = '优先级'; diff --git a/extension/lite/effort/ext/config/lite.php b/extension/lite/effort/ext/config/lite.php new file mode 100644 index 0000000000..663a777296 --- /dev/null +++ b/extension/lite/effort/ext/config/lite.php @@ -0,0 +1,5 @@ +effort->list->exportFields = 'id,date,dept,account,work,consumed,left,objectType,execution'; +$config->effort->list->defaultFields = 'id,date,account,work,consumed,left,objectType,execution'; + +$config->effort->datatable->defaultField = array('id', 'date', 'account', 'work', 'consumed', 'left', 'objectType', 'execution'); diff --git a/extension/lite/effort/ext/view/edit.lite.html.hook.php b/extension/lite/effort/ext/view/edit.lite.html.hook.php new file mode 100644 index 0000000000..a6c7e77c5b --- /dev/null +++ b/extension/lite/effort/ext/view/edit.lite.html.hook.php @@ -0,0 +1,6 @@ + diff --git a/extension/lite/execution/ext/control/kanban.php b/extension/lite/execution/ext/control/kanban.php index 69571b03f5..5a0560abf5 100644 --- a/extension/lite/execution/ext/control/kanban.php +++ b/extension/lite/execution/ext/control/kanban.php @@ -12,11 +12,14 @@ class myExecution extends execution $this->loadModel('project')->setMenu($execution->project); $this->lang->kanban->menu->execution['subMenu'] = new stdClass(); + $this->session->set('kanbanview', $currentMethod); + setcookie('kanbanview', $currentMethod, $this->config->cookieLife, $this->config->webRoot, '', false, true); + /* change subMenu to sub select menu */ $TRActions = $this->execution->getTRActions($currentMethod); $TRActions .= ""; - if(in_array($this->app->rawMethod, array('task', 'calendar', 'gantt', 'tree', 'grouptask'))) $this->lang->TRActions = $this->getTRActions($this->app->rawMethod); - if(in_array($this->app->rawMethod, array('relation', 'maintainrelation'))) $this->lang->TRActions = $this->getTRActions('gantt'); + $lowerModule = strtolower($this->app->rawModule); + $lowerMethod = strtolower($this->app->rawMethod); + + if($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") !== false) + { + $this->session->set('kanbanview', $lowerMethod); + setcookie('kanbanview', $lowerMethod, $this->config->cookieLife, $this->config->webRoot, '', false, true); + } + + if(strpos('|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions($lowerMethod); + if(strpos('|relation|maintainrelation|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions('gantt'); + if($lowerModule == 'task' or ($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") === false)) + { + if($this->session->kanbanview) + { + $this->lang->TRActions = $this->getTRActions($this->session->kanbanview); + } + elseif($this->cookie->kanbanview) + { + $this->lang->TRActions = $this->getTRActions($this->cookie->kanbanview); + } + } $this->lang->modulePageNav = $modulePageNav; } @@ -94,12 +127,13 @@ public function getTRActions($currentMethod) } $TRActions = ''; - $TRActions .= " @@ -462,9 +439,6 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : ''; - - story->importToLib, '', 'class="btn" data-toggle="modal" id="importToLib"');?> -
show('right', 'pagerjs');?> diff --git a/extension/lite/project/ext/lang/en/lite.php b/extension/lite/project/ext/lang/en/lite.php index a07fb88f91..cd8e094b83 100644 --- a/extension/lite/project/ext/lang/en/lite.php +++ b/extension/lite/project/ext/lang/en/lite.php @@ -1,5 +1,7 @@ project->leftStories = 'Left Target'; $lang->project->doingExecutions = 'Doing Kanban'; +$lang->project->select = "Select {$lang->project->common}"; +$lang->project->noProject = "No {$lang->project->common} yet. "; $lang->project->aclList['private'] = "Private (Accessible to project leaders and team members)"; diff --git a/extension/lite/project/ext/lang/zh-cn/lite.php b/extension/lite/project/ext/lang/zh-cn/lite.php index a7db7de1f1..4f6daf40dd 100644 --- a/extension/lite/project/ext/lang/zh-cn/lite.php +++ b/extension/lite/project/ext/lang/zh-cn/lite.php @@ -1,5 +1,7 @@ project->leftStories = '剩余目标'; $lang->project->doingExecutions = '进行中的看板'; +$lang->project->select = "请选择{$lang->project->common}"; +$lang->project->noProject = "暂时没有{$lang->project->common}。"; $lang->project->aclList['private'] = "私有 (只有项目负责人、团队成员可访问)"; diff --git a/extension/lite/project/ext/view/execution.html.php b/extension/lite/project/ext/view/execution.html.php index 55afe463e1..3040070ec9 100644 --- a/extension/lite/project/ext/view/execution.html.php +++ b/extension/lite/project/ext/view/execution.html.php @@ -38,7 +38,7 @@
$kanban):?> -
id");?>'> +
cookie->kanbanview ? $this->cookie->kanbanview : 'kanban', "kanbanID=$kanban->id");?>'>
execution->statusList, $kanban->status);?> diff --git a/extension/lite/story/ext/view/batchedit.html.php b/extension/lite/story/ext/view/batchedit.html.php index 930f4e2b97..2a87557ee3 100644 --- a/extension/lite/story/ext/view/batchedit.html.php +++ b/extension/lite/story/ext/view/batchedit.html.php @@ -36,7 +36,6 @@ priAB;?> story->assignedTo;?> story->status;?> - story->stageAB;?> story->closedBy;?> story->closedReason;?> story->keywords;?> @@ -51,7 +50,7 @@ - product][$story->branch]) ? $modules[$story->product][$story->branch] : array('0' => '/'), $story->module, "class='form-control chosen'");?> + id]) ? $moduleList[$story->id] : array('0' => '/'), $story->module, "class='form-control chosen'");?>
@@ -74,7 +73,6 @@ pri, 'class=form-control');?> assignedTo, "class='form-control chosen'");?> processStatus('story', $story);?> - stage, 'class="form-control"' . ($story->status == 'draft' ? ' disabled="disabled"' : ''));?> closedBy, "class='form-control" . ($story->status == 'closed' ? " chosen'" : "' disabled='disabled'"));?> status == 'closed'):?> @@ -103,7 +101,7 @@ - + app->tab == 'product' ? html::a($this->session->storyList, $lang->goback, '', "class='btn btn-back btn-wide'") : html::backButton();?> diff --git a/extension/lite/task/ext/view/create.html.php b/extension/lite/task/ext/view/create.html.php index 6583ef2260..ff6885c62c 100644 --- a/extension/lite/task/ext/view/create.html.php +++ b/extension/lite/task/ext/view/create.html.php @@ -15,6 +15,9 @@ app->getModuleRoot() . '/common/view/sortable.html.php';?> id));?> +config->vision);?> + + @@ -95,7 +98,7 @@ task->story;?> - task->noticeLinkStory, html::a($this->createLink('execution', 'linkStory', "executionID=$execution->id"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?> + task->noticeLinkStory, html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID=0&storyID=0&projectID=$projectID&bugID=0&planID=0&todoID=0&extra=&type=story"), $lang->execution->linkStory, '_blank', 'class="text-primary"'), html::a("javascript:loadStories($execution->id)", $lang->refresh, '', 'class="text-primary"'));?>
story => empty($stories) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?> preview;?> diff --git a/extension/lite/todo/ext/lang/en/lite.php b/extension/lite/todo/ext/lang/en/lite.php index 43a7402c0c..d27984e77d 100644 --- a/extension/lite/todo/ext/lang/en/lite.php +++ b/extension/lite/todo/ext/lang/en/lite.php @@ -3,3 +3,8 @@ $lang->todo->typeList['task'] = 'Task'; unset($lang->todo->typeList['bug']); unset($lang->todo->typeList['testtask']); +unset($lang->todo->typeList['review']); +unset($lang->todo->typeList['issue']); +unset($lang->todo->typeList['risk']); +unset($lang->todo->typeList['opportunity']); +unset($lang->todo->typeList['meeting']); diff --git a/extension/lite/todo/ext/lang/zh-cn/lite.php b/extension/lite/todo/ext/lang/zh-cn/lite.php index 7b162f90ef..c3f4110cde 100644 --- a/extension/lite/todo/ext/lang/zh-cn/lite.php +++ b/extension/lite/todo/ext/lang/zh-cn/lite.php @@ -3,3 +3,8 @@ $lang->todo->typeList['task'] = '任务'; unset($lang->todo->typeList['bug']); unset($lang->todo->typeList['testtask']); +unset($lang->todo->typeList['review']); +unset($lang->todo->typeList['issue']); +unset($lang->todo->typeList['risk']); +unset($lang->todo->typeList['opportunity']); +unset($lang->todo->typeList['meeting']); diff --git a/extension/lite/todo/ext/view/batchcreate.lite.html.hook.php b/extension/lite/todo/ext/view/batchcreate.lite.html.hook.php index f9ced5a133..93373fe779 100644 --- a/extension/lite/todo/ext/view/batchcreate.lite.html.hook.php +++ b/extension/lite/todo/ext/view/batchcreate.lite.html.hook.php @@ -1,8 +1,6 @@ -
';?> diff --git a/extension/lite/todo/ext/view/view.lite.html.hook.php b/extension/lite/todo/ext/view/view.lite.html.hook.php new file mode 100644 index 0000000000..fad3ee2b75 --- /dev/null +++ b/extension/lite/todo/ext/view/view.lite.html.hook.php @@ -0,0 +1,78 @@ + + + \ No newline at end of file diff --git a/extension/lite/user/ext/view/execution.html.php b/extension/lite/user/ext/view/execution.html.php index 6b6c8d08f8..fca1be387c 100644 --- a/extension/lite/user/ext/view/execution.html.php +++ b/extension/lite/user/ext/view/execution.html.php @@ -36,9 +36,6 @@ id);?> - maxVersion)):?> - user->executionTypeList, $execution->type);?> - name);?> delay)):?> diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 09d2ec232c..3756752e26 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -1393,30 +1393,30 @@ class baseRouter if($this->checkModuleName($moduleName)) { - /* 1. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */ - $modulePath = $this->getModuleRoot($appName) . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; + /* 1. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */ + $modulePath = $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; - /* 2. 尝试查找喧喧是否有此模块。 Try to find the module in xuan. */ - $modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; + /* 2. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */ + if($this->config->vision != 'rnd') + { + $modulePath = $this->getExtensionRoot() . $this->config->vision . DS . $moduleName . DS; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; + } /* 3. 尝试查找商业版本是否有此模块。 Try to find the module in other editon. */ if($this->config->edition != 'open') { $modulePath = $this->getExtensionRoot() . $this->config->edition . DS . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; } - /* 4. 如果设置过vision,尝试在vision中查找。 If vision is set, try to find the module in the vision. */ - if($this->config->vision != 'rnd') - { - $modulePath = $this->getExtensionRoot() . $this->config->vision . DS . $moduleName . DS; - if(is_dir($modulePath)) return $modulePath; - } + /* 4. 尝试查找喧喧是否有此模块。 Try to find the module in xuan. */ + $modulePath = $this->getExtensionRoot() . 'xuan' . DS . $moduleName . DS; + if(is_dir($modulePath) and (file_exists($modulePath . 'control.php') or file_exists($modulePath . 'model.php'))) return $modulePath; - /* 5. 最后尝试在定制开发中寻找。 Finally, try to find the module in the custom dir. */ - return $this->getExtensionRoot() . 'custom' . DS . $moduleName . DS; + /* 5. 如果通用版本里有此模块,优先使用。 If module is in the open edition, use it. */ + return $this->getModuleRoot($appName) . $moduleName . DS; } } diff --git a/framework/control.class.php b/framework/control.class.php index 76f24e658e..9d36e0bc4f 100644 --- a/framework/control.class.php +++ b/framework/control.class.php @@ -35,11 +35,7 @@ class control extends baseControl $this->app->setOpenApp(); - if(defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE != 'api')) - { - $this->setPreference(); - $this->forceUpgrade(); - } + if(defined('IN_USE') or (defined('RUN_MODE') and RUN_MODE != 'api')) $this->setPreference(); if(!isset($this->config->bizVersion)) return false; @@ -127,39 +123,6 @@ class control extends baseControl } } - /** - * If change the edition, trigger the upgrade process. - * - * @access public - * @return void - */ - public function forceUpgrade() - { - $installedVersion = $this->loadModel('setting')->getVersion(); - - /* Means open source upgrade to biz or max. */ - if(is_numeric($installedVersion[0]) and $this->config->edition != 'open') - { - $this->loadModel('setting')->setItem('system.common.global.version', $this->config->version); - $this->loadModel('effort')->convertEstToEffort(); - $this->loadModel('upgrade')->importBuildinModules(); - $this->upgrade->addSubStatus(); - } - - /* Max only has new system mode. */ - if($installedVersion[0] != 'm' and $this->config->edition == 'max') - { - $this->loadModel('setting')->setItem('system.common.global.version', $this->config->version); - if($this->config->systemMode == 'classic' and $this->app->getModuleName() != 'upgrade') - { - $this->loadModel('setting')->setItem('system.common.global.mode', 'new'); - $this->locate(helper::createLink('upgrade', 'mergeTips')); - } - } - - return true; - } - /** * 企业版部分功能是从然之合并过来的。然之代码中调用loadModel方法时传递了一个非空的appName,在禅道中会导致错误。 * 调用父类的loadModel方法来避免这个错误。 diff --git a/lib/base/pager/pager.class.php b/lib/base/pager/pager.class.php index 262b00539c..0a1b5d0d7d 100644 --- a/lib/base/pager/pager.class.php +++ b/lib/base/pager/pager.class.php @@ -5,7 +5,7 @@ * * The author disclaims copyright to this source code. In place of * a legal notice, here is a blessing: - * + * * May you do good and not evil. * May you find forgiveness for yourself and forgive others. * May you share freely, never taking more than you give. @@ -13,7 +13,7 @@ /** * pager类. * Pager class. - * + * * @package framework */ class basePager @@ -29,7 +29,7 @@ class basePager /** * 总个数。 * The total counts. - * + * * @var int * @access public */ @@ -38,7 +38,7 @@ class basePager /** * 每页的记录数。 * Record count per page. - * + * * @var int * @access public */ @@ -46,7 +46,7 @@ class basePager /** * The cookie name of recPerPage. - * + * * @var string * @access public */ @@ -55,7 +55,7 @@ class basePager /** * 总页面数。 * Page count. - * + * * @var string * @access public */ @@ -64,7 +64,7 @@ class basePager /** * 当前页码。 * Current page id. - * + * * @var string * @access public */ @@ -73,7 +73,7 @@ class basePager /** * 全局变量$app。 * The global $app. - * + * * @var object * @access public */ @@ -82,7 +82,7 @@ class basePager /** * 全局变量$lang。 * The global $lang. - * + * * @var object * @access public */ @@ -91,7 +91,7 @@ class basePager /** * 当前的模块名。 * Current module name. - * + * * @var string * @access public */ @@ -100,7 +100,7 @@ class basePager /** * 当前的方法名。 * Current method. - * + * * @var string * @access public */ @@ -117,10 +117,10 @@ class basePager /** * 构造方法。 * The construct function. - * - * @param int $recTotal - * @param int $recPerPage - * @param int $pageID + * + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return void */ @@ -140,10 +140,10 @@ class basePager /** * 构造方法。 * The factory function. - * - * @param int $recTotal - * @param int $recPerPage - * @param int $pageID + * + * @param int $recTotal + * @param int $recPerPage + * @param int $pageID * @access public * @return object */ @@ -155,8 +155,8 @@ class basePager /** * 设置总记录数。 * Set the recTotal property. - * - * @param int $recTotal + * + * @param int $recTotal * @access public * @return void */ @@ -168,8 +168,8 @@ class basePager /** * 设置每页记录数。 * Set the recPerPage property. - * - * @param int $recPerPage + * + * @param int $recPerPage * @access public * @return void */ @@ -185,7 +185,7 @@ class basePager /** * 设置总页数。 * Set the pageTotal property. - * + * * @access public * @return void */ @@ -197,8 +197,8 @@ class basePager /** * 设置页码。 * Set the page id. - * - * @param int $pageID + * + * @param int $pageID * @access public * @return void */ @@ -217,7 +217,7 @@ class basePager /** * 设置全局变量$app。 * Set the $app property; - * + * * @access public * @return void */ @@ -230,7 +230,7 @@ class basePager /** * 设置全局变量$lang。 * Set the $lang property. - * + * * @access public * @return void */ @@ -243,7 +243,7 @@ class basePager /** * 设置模块名。 * Set the $moduleName property. - * + * * @access public * @return void */ @@ -255,7 +255,7 @@ class basePager /** * 设置方法名。 * Set the $methodName property. - * + * * @access public * @return void */ @@ -267,7 +267,7 @@ class basePager /** * 从请求网址中获取记录总数、每页记录数、页码。 * Get recTotal, recPerpage, pageID from the request params, and add them to params. - * + * * @access public * @return void */ @@ -295,7 +295,7 @@ class basePager /** * 创建limit语句。 * Create the limit string. - * + * * @access public * @return string */ @@ -307,11 +307,11 @@ class basePager } /** - * 向页面显示分页信息。 + * 向页面显示分页信息。 * Print the pager's html. - * - * @param string $align - * @param string $type + * + * @param string $align + * @param string $type * @access public * @return void */ @@ -330,7 +330,7 @@ class basePager /** * 获取优化后的分页。 * Get the justify pager html string - * + * * @access public * @return [type] [description] */ @@ -370,7 +370,7 @@ class basePager { /* 如果记录个数为0,返回没有记录。 */ /* If the RecTotal is zero, return with no record. */ - if($this->recTotal == 0) return $type == 'mobile' ? '' : "
{$this->lang->pager->noRecord}
"; + if($this->recTotal == 0) return $type == 'mobile' ? '' : "
{$this->lang->pager->noRecord}
"; /* Set the params. */ $this->setParams(); @@ -411,7 +411,7 @@ class basePager /** * 生成分页摘要信息。 * Create the digest code. - * + * * @access public * @return string */ @@ -423,7 +423,7 @@ class basePager /** * 创建首页链接。 * Create the first page. - * + * * @access public * @return string */ @@ -437,8 +437,8 @@ class basePager /** * 创建前一页链接。 * Create the pre page html. - * - * @param string $type + * + * @param string $type * @access public * @return string */ @@ -456,13 +456,13 @@ class basePager $this->params['pageID'] = $this->pageID - 1; return $this->createLink($this->lang->pager->pre); } - } + } /** * 创建下一页链接。 * Create the next page html. - * - * @param string $type + * + * @param string $type * @access public * @return string */ @@ -484,8 +484,8 @@ class basePager /** * 创建最后一页链接。 - * Create the last page - * + * Create the last page + * * @access public * @return string */ @@ -494,18 +494,18 @@ class basePager if($this->pageID == $this->pageTotal) return $this->lang->pager->last . ' '; $this->params['pageID'] = $this->pageTotal; return $this->createLink($this->lang->pager->last); - } + } /** * 创建每页显示记录数的select标签。 * Create the select object of record perpage. - * + * * @access public * @return string */ public function createRecPerPageJS() { - /* + /* * 替换recTotal, recPerPage, pageID为特殊的字符串,然后用js代码替换掉。 * Replace the recTotal, recPerPage, pageID to special string, and then replace them with values by JS. **/ @@ -554,8 +554,8 @@ EOT; /** * 生成每页显示记录数的select列表。 - * Create the select list of RecPerPage. - * + * Create the select list of RecPerPage. + * * @access public * @return string */ @@ -579,7 +579,7 @@ EOT; /** * 生成跳转到指定页码的部分。 * Create the goto part html. - * + * * @access public * @return string */ @@ -590,13 +590,13 @@ EOT; $goToHtml .= " \n"; $goToHtml .= ""; return $goToHtml; - } + } /** * 创建链接。 * Create link. - * - * @param string $title + * + * @param string $title * @access public * @return string */ diff --git a/lib/scm/gitlab.class.php b/lib/scm/gitlab.class.php index e5645e816c..1d702b267b 100644 --- a/lib/scm/gitlab.class.php +++ b/lib/scm/gitlab.class.php @@ -646,7 +646,7 @@ class gitlab $param = new stdclass(); $param->path = urldecode($path); - $param->ref_name = $fromRevision ? $fromRevision : $this->branch; + $param->ref_name = ($toRevision != 'HEAD' and $toRevision) ? $toRevision : $this->branch; $fromDate = $this->getCommittedDate($fromRevision); $toDate = $this->getCommittedDate($toRevision); diff --git a/module/action/model.php b/module/action/model.php index 8930772423..338dcc9ecf 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -877,6 +877,17 @@ class actionModel extends model $actionCondition = $this->getActionCondition(); if(!$actionCondition and !$this->app->user->admin and isset($this->app->user->rights['acls']['actions'])) return array(); + /* Restrict query data in this year when no limit for big data. */ + $beginDate = ''; + if($period == 'all') + { + $year = date('Y'); + $beginDate = $year . '-01-01'; + + /* When query all dynamic then query the data of the last two years at most. */ + if($this->app->getMethodName() == 'dynamic') $beginDate = $year - 1 . '-01-01'; + } + /* Get actions. */ $actions = $this->dao->select('*')->from(TABLE_ACTION) ->where('objectType')->notIN('kanbanregion,kanbanlane,kanbancolumn') @@ -885,6 +896,7 @@ class actionModel extends model ->beginIF($period != 'all')->andWhere('date')->lt($end)->fi() ->beginIF($date)->andWhere('date' . ($direction == 'next' ? '<' : '>') . "'{$date}'")->fi() ->beginIF($account != 'all')->andWhere('actor')->eq($account)->fi() + ->beginIF($beginDate)->andWhere('date')->ge($beginDate)->fi() ->beginIF(is_numeric($productID))->andWhere('product')->like("%,$productID,%")->fi() ->andWhere() ->markLeft(1) diff --git a/module/block/control.php b/module/block/control.php index c5275638eb..d8a6a8e4e1 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -1528,7 +1528,7 @@ class block extends control count(assignedTo = '{$this->app->user->account}' or null) as assignedToMe, count(status != 'closed' or null) as unclosed, count((status != 'closed' and status != 'resolved') or null) as unresolved, - count(confirmed = '0' or null) as unconfirmed, + count((confirmed = '0' and toStory = '0') or null) as unconfirmed, count((resolvedDate >= '$yesterday' and resolvedDate < '$today') or null) as yesterdayResolved, count((closedDate >= '$yesterday' and closedDate < '$today') or null) as yesterdayClosed") ->from(TABLE_BUG) diff --git a/module/block/model.php b/module/block/model.php index 9531a3a361..85712f25a8 100644 --- a/module/block/model.php +++ b/module/block/model.php @@ -176,6 +176,9 @@ class blockModel extends model ->markRight(1) ->andWhere('t1.deleted')->eq('0') ->andWhere('t3.deleted')->eq('0') + ->beginIF(!$this->app->user->admin)->andWhere('t1.execution')->in($this->app->user->view->sprints)->fi() + ->beginIF($this->config->vision)->andWhere('t1.vision')->eq($this->config->vision)->fi() + ->beginIF($this->config->vision)->andWhere('t2.vision')->eq($this->config->vision)->fi() ->fetchAll('id'); $data['tasks'] = isset($tasks) ? count($tasks) : 0; $data['doneTasks'] = (int)$this->dao->select('count(*) AS count')->from(TABLE_TASK)->where('assignedTo')->eq($this->app->user->account)->andWhere('deleted')->eq(0)->andWhere('status')->eq('done')->fetch('count'); diff --git a/module/block/view/recentprojectblock.html.php b/module/block/view/recentprojectblock.html.php index d55e356c80..3868039d0a 100644 --- a/module/block/view/recentprojectblock.html.php +++ b/module/block/view/recentprojectblock.html.php @@ -11,7 +11,7 @@ #cards .panel-heading {padding: 12px 24px 10px 16px;} #cards .panel-body {padding: 0 16px 16px;} #cards .panel-actions {padding: 7px 0; z-index: 0} -#cards .project-type-label {padding: 1px 2px;} +#cards .project-type-label {padding: 2px 2px; margin-bottom: 3px;} #cards .project-name {font-size: 16px; font-weight: normal; display: inline-block; max-width: 75%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;} #cards .project-infos {font-size: 12px; padding: 0 15px;} #cards .project-infos > span {display: inline-block; line-height: 12px;} @@ -44,11 +44,10 @@
- model === 'waterfall'): ?> - project->waterfall; ?> - - project->scrum; ?> - + systemMode == 'new'):?> + model == 'waterfall' ? 'label-warning' : 'label-info';?> + project->{$project->model};?> + name);?>
'; + $this->lang->TRActions .= '
'; + } + else + { + if(common::hasPriv('design', 'create')) $this->lang->TRActions .= html::a(inlink('create', "projectID=$projectID&productID=$productID&type=$type"), " {$this->lang->design->create}", '', "class='btn btn-primary'"); + if(common::hasPriv('design', 'batchCreate')) $this->lang->TRActions .= html::a(inlink('batchCreate', "projectID=$projectID&productID=$productID&type=$type"), " {$this->lang->design->batchCreate}", '', "class='btn btn-primary'"); + } /* Init pager and get designs. */ $this->app->loadClass('pager', $static = true); diff --git a/module/design/view/browse.html.php b/module/design/view/browse.html.php index 5fb8fc535d..d080b42d5c 100644 --- a/module/design/view/browse.html.php +++ b/module/design/view/browse.html.php @@ -44,7 +44,7 @@ id);?> design->typeList, $design->type);?> - createLink('design', 'view', "id={$design->id}"), $design->name);?> + createLink('design', 'view', "id={$design->id}"), $design->name) : $design->name;?> createdBy);?> createdDate, 0, 11);?> design->printAssignedHtml($design, $users);?> diff --git a/module/doc/lang/en.php b/module/doc/lang/en.php index 4665996e50..1f5c138078 100644 --- a/module/doc/lang/en.php +++ b/module/doc/lang/en.php @@ -89,6 +89,7 @@ $lang->doc->diffAction = 'Diff Document'; $lang->doc->sort = 'Rank Document'; $lang->doc->manageType = 'Manage Category'; $lang->doc->editType = 'Edit'; +$lang->doc->editChildType = 'Edit'; $lang->doc->deleteType = 'Delete'; $lang->doc->addType = 'Add'; $lang->doc->childType = 'Directory'; @@ -202,6 +203,7 @@ $lang->doc->noCollectedDoc = 'You have not favorited any documents.'; $lang->doc->errorEmptyLib = 'No data in document library.'; $lang->doc->confirmUpdateContent = 'You have a document that is not saved from last time. Do you want to continue editing it?'; $lang->doc->selectLibType = 'Please select a type of doc library.'; +$lang->doc->noLibreOffice = 'You does not have access to office conversion settings!'; $lang->doc->noticeAcl['lib']['product']['default'] = 'Users who can access the selected product can access it.'; $lang->doc->noticeAcl['lib']['product']['custom'] = 'Users who can access the selected product or users in the whiltelist can access it.'; diff --git a/module/doc/lang/zh-cn.php b/module/doc/lang/zh-cn.php index d620c0dcc1..f929a40d98 100644 --- a/module/doc/lang/zh-cn.php +++ b/module/doc/lang/zh-cn.php @@ -89,6 +89,7 @@ $lang->doc->diffAction = '对比文档'; $lang->doc->sort = '文档排序'; $lang->doc->manageType = '维护目录'; $lang->doc->editType = '编辑目录'; +$lang->doc->editChildType = '编辑子目录'; $lang->doc->deleteType = '删除目录'; $lang->doc->addType = '增加目录'; $lang->doc->childType = '子目录'; @@ -202,6 +203,7 @@ $lang->doc->noCollectedDoc = '您还没有收藏任何文档。'; $lang->doc->errorEmptyLib = '文档库暂无数据。'; $lang->doc->confirmUpdateContent = '检查到您有未保存的文档内容,是否继续编辑?'; $lang->doc->selectLibType = '请选择文档库类型'; +$lang->doc->noLibreOffice = '您还没有office转换设置访问权限!'; $lang->doc->noticeAcl['lib']['product']['default'] = '有所选产品访问权限的用户可以访问。'; $lang->doc->noticeAcl['lib']['product']['custom'] = '有所选产品访问权限或白名单里的用户可以访问。'; diff --git a/module/doc/model.php b/module/doc/model.php index 0467144b01..4bd060690e 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -501,7 +501,11 @@ class docModel extends model */ public function getById($docID, $version = 0, $setImgSize = false) { - $doc = $this->dao->select('*')->from(TABLE_DOC)->where('id')->eq((int)$docID)->fetch(); + $doc = $this->dao->select('*')->from(TABLE_DOC) + ->where('id')->eq((int)$docID) + ->andWhere('vision')->eq($this->config->vision) + ->fetch(); + if(!$doc) return false; if(!$this->checkPrivDoc($doc)) { @@ -1265,7 +1269,7 @@ class docModel extends model ->beginIF($type == 'book')->orderBy('id_desc')->fi() ->fetchAll('id'); } - else if($type != 'product' and $type != 'project' and $type != 'execution') + elseif($type != 'product' and $type != 'project' and $type != 'execution') { return false; } @@ -1389,6 +1393,7 @@ class docModel extends model $executions = $this->dao->select('*')->from(TABLE_EXECUTION) ->where('deleted')->eq(0) ->andWhere('type')->in('sprint,stage,kanban') + ->andWhere('vision')->eq($this->config->vision) ->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi() ->orderBy('order_asc') ->fetchAll('id'); @@ -2470,7 +2475,7 @@ EOT; { $li .= "
"; if(common::hasPriv('tree', 'edit')) $li .= html::a(helper::createLink('tree', 'edit', "module=$module->id&type=doc"), "", '', "data-toggle='modal' title={$this->lang->doc->editType}"); - if(common::hasPriv('tree', 'browse')) $li .= html::a(helper::createLink('tree', 'browse', "rootID=$libID&type=doc&module=$module->id", '', 1), "", '', "class='iframe' title={$this->lang->doc->editType}"); + if(common::hasPriv('tree', 'browse')) $li .= html::a(helper::createLink('tree', 'browse', "rootID=$libID&type=doc&module=$module->id", '', 1), "", '', "class='iframe' title={$this->lang->doc->editChildType}"); $li .= '
'; } $li .= '
'; diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index 7db9fbd853..83f3ec807b 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -19,22 +19,19 @@
config->edition != 'open'):?>
- doc->notSetOffice, zget($lang->doc->typeList, $docType), $this->createLink('custom', 'libreoffice', 'onlybody=yes')); - } - else - { - printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), '###'); echo $lang->doc->accessDenied; - } - ?> + doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice', '', '', true) : '###');?>
doc->cannotCreateOffice, zget($lang->doc->typeList, $docType));?>
+ diff --git a/module/execution/control.php b/module/execution/control.php index fb1ee720b3..b32ca62eb3 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -1961,7 +1961,8 @@ class execution extends control { $executionID = $this->execution->saveState((int)$executionID, $this->executions); $execution = $this->execution->getById($executionID, true); - if(empty($execution) || strpos('stage,sprint', $execution->type) === false and defined('RUN_MODE') and RUN_MODE != 'api') return print(js::error($this->lang->notFound) . js::locate('back')); + $type = $this->config->vision == 'lite' ? 'kanban' : 'stage,sprint,kanban'; + if(empty($execution) || strpos($type, $execution->type) === false) return print(js::error($this->lang->notFound) . js::locate('back')); $this->app->loadLang('program'); @@ -2718,6 +2719,16 @@ class execution extends control $this->loadModel('story'); $this->loadModel('product'); + /* Init objectID */ + $originObjectID = $objectID; + + /* Transfer object id when version lite */ + if($this->config->vision == 'lite') + { + $kanban = $this->project->getByID($objectID, 'kanban'); + $objectID = $kanban->project; + } + /* Get projects, executions and products. */ $object = $this->project->getByID($objectID, $this->app->tab == 'project' ? 'project' : 'sprint,stage,kanban'); $products = $this->product->getProducts($objectID); @@ -2825,10 +2836,10 @@ class execution extends control $allStories = array_chunk($allStories, $pager->recPerPage); /* Assign. */ - $this->view->title = $object->name . $this->lang->colon . $this->lang->execution->linkStory; - $this->view->position[] = html::a($browseLink, $object->name); - $this->view->position[] = $this->lang->execution->linkStory; - + $this->view->title = $object->name . $this->lang->colon . $this->lang->execution->linkStory; + $this->view->position[] = html::a($browseLink, $object->name); + $this->view->position[] = $this->lang->execution->linkStory; + $this->view->objectID = $originObjectID; $this->view->object = $object; $this->view->products = $products; $this->view->allStories = empty($allStories) ? $allStories : $allStories[$pageID - 1]; @@ -2946,7 +2957,6 @@ class execution extends control /* Append id for secend sort. */ $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; - $sort = common::appendOrder($orderBy); /* Set the menu. If the executionID = 0, use the indexMenu instead. */ $this->execution->setMenu($executionID); @@ -2964,7 +2974,7 @@ class execution extends control } $period = $type == 'account' ? 'all' : $type; $date = empty($date) ? '' : date('Y-m-d', $date); - $actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, 'all', 'all', $executionID, $date, $direction); + $actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager, 'all', 'all', $executionID, $date, $direction); /* The header and position. */ $execution = $this->execution->getByID($executionID); diff --git a/module/execution/css/all.css b/module/execution/css/all.css index ead807410e..0da2a313bc 100644 --- a/module/execution/css/all.css +++ b/module/execution/css/all.css @@ -23,3 +23,4 @@ td.flex span.project-type-label {margin-left: 5px; min-width: 36px;} .c-percent, .c-realBegan, .c-end, .c-begin, .c-realEnd{width: 100px;} .c-action {text-align: center;} .c-name > span {margin-right: 2px;} +td.flex span.project-type-label {min-width: 40px;} diff --git a/module/execution/css/all.en.css b/module/execution/css/all.en.css index 1eb9de2ae7..885a0e066f 100644 --- a/module/execution/css/all.en.css +++ b/module/execution/css/all.en.css @@ -1 +1,2 @@ .thWidth {width: 130px !important;} +td.flex span.project-type-label {min-width: 60px;} diff --git a/module/execution/js/kanban.js b/module/execution/js/kanban.js index 31a8769e4d..9350f13cd2 100644 --- a/module/execution/js/kanban.js +++ b/module/execution/js/kanban.js @@ -792,6 +792,7 @@ function handleDropTask($element, event, kanban) var newLane = $newCol.closest('.kanban-lane').data('lane'); var cardType = $card.find('.kanban-card').data('type'); + if(!oldCol || !newCol || !newLane || !oldLane) return false; if(oldCol.id === newCol.id && newLane.id === oldLane.id) return false; var cardID = $card.data().id; @@ -1086,7 +1087,6 @@ function createTaskMenu(options) if(priv.canRestartTask && task.$col.type == 'pause') items.push({label: taskLang.restart, icon: 'play', url: createLink('task', 'restart', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canPauseTask && task.$col.type == 'developing') items.push({label: taskLang.pause, icon: 'pause', url: createLink('task', 'pause', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canRecordEstimateTask) items.push({label: executionLang.effort, icon: 'time', url: createLink('task', 'recordEstimate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); - if(priv.canBatchCreateTask && vision == 'lite') items.push({label: taskLang.children, icon:'split', url: $.createLink('task', 'batchcreate', 'executionID=' + executionID + '&storyID=0&moduleID=0&taskID=' + task.id, '', true), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canActivateTask && (task.$col.type == 'developed' || task.$col.type == 'canceled' || task.$col.type == 'closed')) items.push({label: executionLang.activate, icon: 'magic', url: createLink('task', 'activate', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canCreateTask) items.push({label: taskLang.copy, icon: 'copy', url: createLink('task', 'create', 'executionID=' + executionID + '&storyID=' + '0' + '&moduleID=' + '0' + '&taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); if(priv.canCancelTask && (task.$col.type == 'wait' || task.$col.type == 'developing' || task.$col.type == 'pause')) items.push({label: taskLang.cancel, icon: 'cancel', url: createLink('task', 'cancel', 'taskID=' + task.id, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); @@ -1156,12 +1156,7 @@ function initKanban($kanban) onRenderLaneName: renderLaneName, onRenderHeaderCol: renderHeaderCol, onRenderCount: renderCount, - droppable: - { - target: findDropColumns, - finish: handleFinishDrop, - mouseButton: 'left' - } + droppable: groupBy == 'default' ? {target: findDropColumns, finish:handleFinishDrop, mouseButton: 'left'} : false, }); $kanban.on('click', '.action-cancel', hideKanbanAction); diff --git a/module/execution/js/taskkanban.js b/module/execution/js/taskkanban.js index d10800f92b..c03748f81b 100644 --- a/module/execution/js/taskkanban.js +++ b/module/execution/js/taskkanban.js @@ -73,7 +73,7 @@ function renderDeadline(deadline) function renderStoryItem(item, $item, col) { var scaleSize = window.kanbanScaleSize; - if(+$item.attr('data-scale-size') !== scaleSize) $item.empty().attr('data-scale-size', scaleSize); + if($item.attr('data-scale-size') !== scaleSize) $item.empty().attr('data-scale-size', scaleSize); if(scaleSize <= 3) { @@ -135,7 +135,7 @@ function renderStoryItem(item, $item, col) function renderBugItem(item, $item, col) { var scaleSize = window.kanbanScaleSize; - if(+$item.attr('data-scale-size') !== scaleSize) $item.empty().attr('data-scale-size', scaleSize); + if($item.attr('data-scale-size') !== scaleSize) $item.empty().attr('data-scale-size', scaleSize); if(scaleSize <= 3) { @@ -199,7 +199,7 @@ function renderBugItem(item, $item, col) function renderTaskItem(item, $item, col) { var scaleSize = window.kanbanScaleSize; - if(+$item.attr('data-scale-size') !== scaleSize) $item.empty().attr('data-scale-size', scaleSize); + if($item.attr('data-scale-size') !== scaleSize) $item.empty().attr('data-scale-size', scaleSize); if(scaleSize <= 3) { @@ -298,6 +298,8 @@ function renderColumnCount($count, count, col) function renderHeaderCol($col, col, $header, kanban) { if(col.asParent) $col = $col.children('.kanban-header-col'); + if($col.children('.actions').context != undefined) return; + var $actions = $('
'); var printStoryButton = printTaskButton = printBugButton = false; if(priv.canCreateStory || priv.canBatchCreateStory || priv.canLinkStory || priv.canLinkStoryByPlan) printStoryButton = true; @@ -717,6 +719,7 @@ function handleDropTask($element, event, kanban) var newLane = $newCol.closest('.kanban-lane').data('lane'); var cardType = $card.find('.kanban-card').data('type'); + if(!oldCol || !newCol || !newLane || !oldLane) return false; if(oldCol.id === newCol.id && newLane.id === oldLane.id) return false; var cardID = $card.data().id; @@ -796,7 +799,7 @@ function createColumnCreateMenu(options) if(col.laneType == 'story') { if(priv.canCreateStory) items.push({label: storyLang.create, url: $.createLink('story', 'create', 'productID=' + productID, '', true), className: 'iframe'}); - if(priv.canBatchCreateStory) items.push({label: executionLang.batchCreateStroy, url: $.createLink('story', 'batchcreate', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}}); + if(priv.canBatchCreateStory) items.push({label: executionLang.batchCreateStory, url: $.createLink('story', 'batchcreate', 'productID=' + productID + '&branch=0&moduleID=0&storyID=0&executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}}); if(priv.canLinkStory) items.push({label: executionLang.linkStory, url: $.createLink('execution', 'linkStory', 'executionID=' + executionID, '', true), className: 'iframe', attrs: {'data-width': '90%'}}); if(priv.canLinkStoryByPlan) items.push({label: executionLang.linkStoryByPlan, url: '#linkStoryByPlan', 'attrs' : {'data-toggle': 'modal'}}); } diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index ec59ec90d7..32750f952d 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -57,7 +57,7 @@ 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='$from'");?> + createLink('execution', 'create', "projectID=$projectID"), " " . ((($from == 'execution') and ($config->systemMode == 'new')) ? $lang->execution->createExec : $lang->execution->create), '', "class='btn btn-info' data-app='execution'");?>

diff --git a/module/execution/view/linkstory.html.php b/module/execution/view/linkstory.html.php index b19a0ad488..50f4d5a968 100644 --- a/module/execution/view/linkstory.html.php +++ b/module/execution/view/linkstory.html.php @@ -20,7 +20,7 @@ execution->linkStory;?>
- createLink($this->app->rawModule, 'story', "objectID=$object->id"), 'btn btn-link');?> + createLink($this->app->rawModule, 'story', "objectID=$objectID"), 'btn btn-link');?>
diff --git a/module/gitlab/view/browsegroup.html.php b/module/gitlab/view/browsegroup.html.php index a07c1f50cb..1455f6a881 100644 --- a/module/gitlab/view/browsegroup.html.php +++ b/module/gitlab/view/browsegroup.html.php @@ -48,7 +48,7 @@ id;?> name))); ?> - + $gitlabGroup->avatar_url, 'account' => $groupName), 20); ?> name;?> url . '/' . $gitlabGroup->path, $gitlabGroup->path, '_target');?> diff --git a/module/group/control.php b/module/group/control.php index 8d83ca966a..d3737d9e81 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -306,7 +306,7 @@ class group extends control $this->view->position = $position; $this->view->allUsers = $allUsers; $this->view->group = $group; - $this->view->programs = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('type')->eq('project')->andWhere('deleted')->eq(0)->fetchPairs(); + $this->view->programs = $this->dao->select('id, name')->from(TABLE_PROJECT)->where('type')->eq('project')->andWhere('vision')->eq($this->config->vision)->andWhere('deleted')->eq(0)->fetchPairs(); $this->view->deptTree = $this->loadModel('dept')->getTreeMenu($rooteDeptID = 0, array('deptModel', 'createManageProjectAdminLink'), $groupID); $this->view->groupUsers = $groupUsers; $this->view->userPrograms = $userPrograms; diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 09f62cdc1c..4c9e654c9a 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -777,8 +777,6 @@ $lang->resource->execution->tree = 'treeAction'; $lang->resource->execution->treeTask = 'treeOnlyTask'; $lang->resource->execution->treeStory = 'treeOnlyStory'; $lang->resource->execution->all = 'allExecutionAB'; -$lang->resource->execution->kanbanHideCols = 'kanbanHideCols'; -$lang->resource->execution->kanbanColsColor = 'kanbanColsColor'; $lang->resource->execution->export = 'exportAction'; $lang->resource->execution->storyKanban = 'storyKanban'; $lang->resource->execution->storySort = 'storySort'; @@ -831,8 +829,6 @@ $lang->execution->methodOrder[180] = 'batchUnlinkStory'; $lang->execution->methodOrder[185] = 'updateOrder'; $lang->execution->methodOrder[190] = 'taskKanban'; $lang->execution->methodOrder[195] = 'printKanban'; -$lang->execution->methodOrder[200] = 'kanbanHideCols'; -$lang->execution->methodOrder[205] = 'kanbanColsColor'; $lang->execution->methodOrder[210] = 'tree'; $lang->execution->methodOrder[215] = 'treeTask'; $lang->execution->methodOrder[220] = 'treeStory'; diff --git a/module/group/model.php b/module/group/model.php index 844df156e5..57fb95c554 100644 --- a/module/group/model.php +++ b/module/group/model.php @@ -219,6 +219,7 @@ class groupModel extends model ->from(TABLE_USERGROUP)->alias('t1') ->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account') ->where('`group`')->eq((int)$groupID) + ->beginIF($this->config->vision)->andWhere("CONCAT(',', visions, ',')")->like("%,{$this->config->vision},%")->fi() ->andWhere('t2.deleted')->eq(0) ->orderBy('t2.account') ->fetchPairs(); diff --git a/module/holiday/model.php b/module/holiday/model.php index 004dcc41e7..943110a11e 100644 --- a/module/holiday/model.php +++ b/module/holiday/model.php @@ -13,7 +13,7 @@ class holidayModel extends model { /** * Get holiday by id. - * + * * @param int $id * @access public * @return object @@ -66,8 +66,8 @@ class holidayModel extends model { $holiday = fixer::input('post')->get(); $holiday->year = substr($holiday->begin, 0, 4); - if(helper::isZeroDate($holiday->year)) return dao::$errors['begin'][] = sprintf($this->lang->error->date, $this->lang->holiday->begin); - if(helper::isZeroDate($holiday->end)) return dao::$errors['end'][] = sprintf($this->lang->error->date, $this->lang->holiday->end); + if($holiday->year and helper::isZeroDate($holiday->year)) return dao::$errors['begin'][] = sprintf($this->lang->error->date, $this->lang->holiday->begin); + if($holiday->end and helper::isZeroDate($holiday->end)) return dao::$errors['end'][] = sprintf($this->lang->error->date, $this->lang->holiday->end); $this->dao->insert(TABLE_HOLIDAY)->data($holiday) ->autoCheck() @@ -302,7 +302,7 @@ class holidayModel extends model /** * Update project plan duration. - * + * * @param string $beginDate * @param string $endDate * @access public @@ -407,4 +407,4 @@ class holidayModel extends model $this->dao->update(TABLE_TASK)->set('realDuration')->eq($realDuration)->where('id')->eq($task->id)->exec(); } } -} \ No newline at end of file +} diff --git a/module/index/css/index.css b/module/index/css/index.css index 79cc5c8256..6d2db1a098 100644 --- a/module/index/css/index.css +++ b/module/index/css/index.css @@ -72,7 +72,7 @@ body.menu-hide {padding-left: 0;} #flodNav .dropdown-submenu:focus > a, #flodNav .dropdown-submenu:hover > a {background-color: rgba(0,0,0,.2);} #poweredBy {width: 40%; position: absolute; top: 4px; right: 0; padding: 0;} -#globalSearchDiv {width: 52%; float: right; margin-right: 4px;} +#globalSearchDiv {width: 200px; float: right; margin-right: 4px;} #globalSearchDiv .input-group {width: 194px; float: right; margin-top: 2px;} #searchbox .dropdown-menu.show-quick-go.with-active {min-width: 270px;} #searchbox .dropdown-menu.show-quick-go > li {padding: 0 5px;} diff --git a/module/install/control.php b/module/install/control.php index f4e411121d..6cff26c16d 100644 --- a/module/install/control.php +++ b/module/install/control.php @@ -181,10 +181,18 @@ class install extends control return print(js::locate(inlink('step5'), 'parent')); } - $this->app->loadLang('upgrade'); + if(!isset($this->config->installed) or !$this->config->installed) + { + $this->view->error = $this->lang->install->errorNotSaveConfig; + $this->display(); + } + else + { + $this->app->loadLang('upgrade'); - $this->view->title = $this->lang->install->introduction; - $this->display(); + $this->view->title = $this->lang->install->introduction; + $this->display(); + } } /** @@ -206,11 +214,13 @@ class install extends control if($this->post->importDemoData) $this->install->importDemoData(); if(dao::isError()) echo js::alert($this->lang->install->errorImportDemoData); - $this->loadModel('setting')->updateVersion($this->config->version); - $this->loadModel('setting')->setItem('system.common.global.flow', $this->post->flow); - $this->loadModel('setting')->setItem('system.common.safe.mode', '1'); - $this->loadModel('setting')->setItem('system.common.safe.changeWeak', '1'); - $this->loadModel('setting')->setItem('system.common.global.cron', 1); + $this->loadModel('setting'); + $this->setting->updateVersion($this->config->version); + $this->setting->setSN(); + $this->setting->setItem('system.common.global.flow', $this->post->flow); + $this->setting->setItem('system.common.safe.mode', '1'); + $this->setting->setItem('system.common.safe.changeWeak', '1'); + $this->setting->setItem('system.common.global.cron', 1); if(strpos($this->app->getClientLang(), 'zh') === 0) $this->loadModel('api')->createDemoData($this->lang->api->zentaoAPI, 'http://' . $_SERVER['HTTP_HOST'] . $this->app->config->webRoot . 'api.php/v1', '16.0'); return print(js::locate(inlink('step6'), 'parent')); diff --git a/module/install/view/step4.html.php b/module/install/view/step4.html.php index 0f8b3d9523..fa81c945f9 100644 --- a/module/install/view/step4.html.php +++ b/module/install/view/step4.html.php @@ -12,6 +12,22 @@ ?>
+ + +

@@ -21,6 +37,10 @@

install->howToUse;?>

upgrade->to15Mode['classic']) ? 'classic' : 'new';?> + visions == ',lite,'):?> + install->modeList['classic']);?> + +
install->modeList, $systemMode);?>
upgrade->selectedModeTips[$systemMode];?>
@@ -31,5 +51,6 @@
+
diff --git a/module/kanban/config.php b/module/kanban/config.php index d45192d2b1..70f04a7a32 100644 --- a/module/kanban/config.php +++ b/module/kanban/config.php @@ -34,15 +34,16 @@ $config->kanban->editregion->requiredFields = 'name'; $config->kanban->splitcolumn->requiredFields = 'name,limit'; $config->kanban->editor = new stdclass(); -$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools'); -$config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools'); -$config->kanban->editor->editcard = array('id' => 'desc', 'tools' => 'simpleTools'); -$config->kanban->editor->viewcard = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->editcard = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->kanban->editor->viewcard = array('id' => 'comment', 'tools' => 'simpleTools'); +$config->kanban->editor->activatecard = array('id' => 'comment', 'tools' => 'simpleTools'); $config->kanban->fromType = array('execution', 'productplan', 'release', 'build'); $config->kanban->executionField = array('name', 'status', 'end', 'PM', 'type', 'deleted'); diff --git a/module/kanban/control.php b/module/kanban/control.php index b5b36d6dff..4800a7444e 100644 --- a/module/kanban/control.php +++ b/module/kanban/control.php @@ -888,7 +888,7 @@ class kanban extends control $this->loadModel('action'); $oldCard = $this->kanban->getCardByID($cardID); - $this->dao->update(TABLE_KANBANCARD)->set('status')->eq('done')->where('id')->eq($cardID)->exec(); + $this->dao->update(TABLE_KANBANCARD)->set('progress')->eq(100)->set('status')->eq('done')->where('id')->eq($cardID)->exec(); $card = $this->kanban->getCardByID($cardID); $changes = common::createChanges($oldCard, $card); @@ -915,22 +915,26 @@ class kanban extends control public function activateCard($cardID, $kanbanID) { $this->loadModel('action'); + if(!empty($_POST)) + { + $oldCard = $this->kanban->getCardByID($cardID); + $this->kanban->activateCard($cardID); + $card = $this->kanban->getCardByID($cardID); - $oldCard = $this->kanban->getCardByID($cardID); - $this->dao->update(TABLE_KANBANCARD)->set('status')->eq('doing')->where('id')->eq($cardID)->exec(); - $card = $this->kanban->getCardByID($cardID); + $changes = common::createChanges($oldCard, $card); + if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); - $changes = common::createChanges($oldCard, $card); + $actionID = $this->action->create('kanbanCard', $cardID, 'activated'); + $this->action->logHistory($actionID, $changes); - if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); + return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent')); + } - $actionID = $this->action->create('kanbanCard', $cardID, 'activated'); - $this->action->logHistory($actionID, $changes); + $this->view->card = $this->kanban->getCardByID($cardID); + $this->view->actions = $this->action->getList('kanbancard', $cardID); + $this->view->users = $this->loadModel('user')->getPairs('noclosed|nodeleted'); - if(isonlybody()) return print(js::reload('parent.parent')); - - $kanbanGroup = $this->kanban->getKanbanData($kanbanID); - return print(json_encode($kanbanGroup)); + $this->display(); } /** @@ -1493,8 +1497,9 @@ class kanban extends control return $this->sendSuccess(array('locate' => 'parent')); } - $this->view->column = $column; - $this->view->title = $column->name . $this->lang->colon . $this->lang->kanban->setColumn; + $this->view->canEdit = $from == 'RDKanban' ? 0 : 1; + $this->view->column = $column; + $this->view->title = $column->name . $this->lang->colon . $this->lang->kanban->setColumn; $this->display(); } diff --git a/module/kanban/css/performable.css b/module/kanban/css/performable.css index bef5675724..9680e099f3 100644 --- a/module/kanban/css/performable.css +++ b/module/kanban/css/performable.css @@ -1 +1 @@ -#c-done {width: 110px;} +#c-title {width: 130px;} diff --git a/module/kanban/css/view.css b/module/kanban/css/view.css index 7c24d71151..5df3567167 100644 --- a/module/kanban/css/view.css +++ b/module/kanban/css/view.css @@ -19,6 +19,7 @@ .region .region-header label {color: #999; background: transparent; border: 1px solid #ddd; margin-left: 10px; margin-right: 10px} .region .region-header .action {float: right} .region .region-header .icon-double-angle-up,.icon-double-angle-down {cursor: pointer;} +.region .kanban-header-sub-cols {border-right: 2px solid #fff;margin-left:0;} .region .kanban-header-sub-cols .kanban-header-col > .title {max-width: 100% !important;min-width:240px;} .region .sort .region-header {cursor: move;} @@ -118,6 +119,10 @@ .kanban-card .label-finish {margin-right: 7px; margin-top: -1px; padding: 3px 5px; float: left; background-color:#2a5f29;} .kanban-card .releaseTitle, .kanban-card .productplanTitle {width: 100%; float: left;} +.progress-box {display: flex; flex-direction: row; margin-top: 10px;} +.progress {flex: auto; margin: 5px auto 5px;} +.progress-number {padding-left: 5px;} + @-moz-document url-prefix(){ .region .kanban-lane-items{scrollbar-width:thin; padding:5px 0px 5px 5px !important;} .region .kanban-card .info .user{right: -6px !important;}} #archivedCards .table-empty-tip {border-style: hidden;} #archivedColumns .table-empty-tip {border-style: hidden;} diff --git a/module/kanban/js/import.js b/module/kanban/js/import.js index 689502bdbe..1178f973b7 100644 --- a/module/kanban/js/import.js +++ b/module/kanban/js/import.js @@ -24,7 +24,7 @@ $(function() var enableImport = $("input:checked[name='import']").val(); var objectListLength = $("input:checked[name^=importObjectList]").length; - if(enableImport == 'on' && objectListLength == 0) + if(enableImport == 'on' && objectListLength == 0 && vision != 'lite') { $('#emptyTip').removeClass('hidden'); return false; diff --git a/module/kanban/js/view.js b/module/kanban/js/view.js index bf5a191c4e..c75e2bcf0d 100644 --- a/module/kanban/js/view.js +++ b/module/kanban/js/view.js @@ -357,6 +357,11 @@ function renderKanbanItem(item, $item) '
', '
' ].join('')).appendTo($item); + if(kanban.performable == 1) + { + var $progress = $item.children('.progress-box'); + if(!$progress.length) $progress = $('
' + item.progress + '%
').appendTo($item); + } $item.data('card', item); @@ -366,6 +371,11 @@ function renderKanbanItem(item, $item) $info.children('.pri') .attr('class', 'pri label-pri label-pri-' + item.pri) .text(item.pri); + if(kanban.performable == 1) + { + $progress.find('.progress-bar').css('width', item.progress + '%'); + $progress.find('.progress-number').html(item.progress + '%'); + } $item.css('background-color', item.color); $item.toggleClass('has-color', item.color != '#fff' && item.color != ''); @@ -808,31 +818,6 @@ function finishCard(cardID, kanbanID, regionID) }); } -/** - * Activate a card. - * - * @param int $cardID - * @param int $kanbanID - * @param int $regionID - * @access public - * @return void - */ -function activateCard(cardID, kanbanID, regionID) -{ - if(!cardID) return false; - var url = createLink('kanban', 'activateCard', 'cardID=' + cardID + '&kanbanID=' + kanbanID); - return $.ajax( - { - method: 'post', - dataType: 'json', - url: url, - success: function(data) - { - updateRegion(regionID, data[regionID]); - } - }); -} - /** * Update a region. * @@ -976,6 +961,7 @@ function handleDropTask($element, event, kanban) var regionID = $card.closest('.region').data('id'); var kanbanID = $card.closest('#kanban').data('id'); + if(!oldCol || !newCol || !newLane || !oldLane) return false; if(oldCol.id === newCol.id && newLane.id === oldLane.id) return false; var cardID = $card.data().id; @@ -1090,7 +1076,7 @@ function createCardMenu(options) { if(card.status == 'done') { - items.push({label: kanbanLang.activateCard, icon: 'magic', onClick: function(){activateCard(card.id, card.kanban, card.region);}}); + items.push({label: kanbanLang.activateCard, icon: 'magic', url: createLink('kanban', 'activateCard', 'cardID=' + card.id + '&kanbanID=' + card.kanban, '', 'true'), className: 'iframe', attrs: {'data-toggle': 'modal', 'data-width': '80%'}}); } else { @@ -1183,7 +1169,7 @@ function createColumnCreateMenu(options) var laneID = col.$kanbanData.lanes[0].id ? col.$kanbanData.lanes[0].id : 0; var columnID = col.id; - if(privs.includes('createCard')) items.push({label: kanbanLang.createCard, url: $.createLink('kanban', 'createCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID), className: 'iframe', attrs: {'data-toggle': 'modal'}}); + if(privs.includes('createCard')) items.push({label: kanbanLang.createCard, url: $.createLink('kanban', 'createCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID, '', true), className: 'iframe', attrs: {'data-toggle': 'modal'}}); if(privs.includes('batchCreateCard')) items.push({label: kanbanLang.batchCreateCard, url: $.createLink('kanban', 'batchCreateCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&laneID=' + laneID + '&columnID=' + columnID), attrs: {'data-width': '80%'}}); if(privs.includes('import') && kanban.object.indexOf('cards') != -1) items.push({label: kanbanLang.importCard, url: $.createLink('kanban', 'importCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&columnID=' + columnID), className: 'iframe', attrs: {'data-toggle': 'modal'}}); if(privs.includes('import') && kanban.object && kanban.object != 'cards') items.push({className: 'parentDivider'}); diff --git a/module/kanban/lang/en.php b/module/kanban/lang/en.php index 3f78e41151..481ef5e140 100644 --- a/module/kanban/lang/en.php +++ b/module/kanban/lang/en.php @@ -44,8 +44,8 @@ $lang->kanban->assigntoCard = 'Assign'; $lang->kanban->setting = 'Setting'; $lang->kanban->enableArchived = 'Enable Archived'; $lang->kanban->archive = 'Archive'; -$lang->kanban->performable = 'Set done function'; -$lang->kanban->doneFunction = 'Done function'; +$lang->kanban->performable = 'Set progress management'; +$lang->kanban->manageProgress = 'Manage Progress'; $lang->kanban->splitColumn = 'Split Column'; $lang->kanban->createColumnOnLeft = 'Create Column On Left'; $lang->kanban->createColumnOnRight = 'Create Column On Right'; @@ -120,8 +120,8 @@ $lang->kanban->aclList['private'] = 'Private (For the kanban team, whitelist mem $lang->kanban->archiveList['0'] = 'Disable'; $lang->kanban->archiveList['1'] = 'Enable'; -$lang->kanban->enableFinished['0'] = 'Disable'; -$lang->kanban->enableFinished['1'] = 'Enable'; +$lang->kanban->enableList['0'] = 'Disable'; +$lang->kanban->enableList['1'] = 'Enable'; $lang->kanban->type = array(); $lang->kanban->type['all'] = "All KanBan"; @@ -184,9 +184,9 @@ $lang->kanban->my = 'My'; $lang->kanban->other = 'Other'; $lang->kanban->error = new stdclass(); -$lang->kanban->error->mustBeInt = 'The WIPs must be positive integer.'; -$lang->kanban->error->parentLimitNote = 'The WIPs in the parent column cannot be < the sum of the WIPs in the child column.'; -$lang->kanban->error->childLimitNote = 'The sum of products in the child column cannot be > the number of products in the parent column.'; +$lang->kanban->error->mustBeInt = 'The WIPs must be positive integer.'; +$lang->kanban->error->parentLimitNote = 'The WIPs in the parent column cannot be < the sum of the WIPs in the child column.'; +$lang->kanban->error->childLimitNote = 'The sum of products in the child column cannot be > the number of products in the parent column.'; $lang->kanban->error->importObjNotEmpty = 'Please select at least one import object.'; $lang->kanban->importList = array(); @@ -340,6 +340,7 @@ $lang->kanbancard->beginAndEnd = 'Begin & End'; $lang->kanbancard->begin = 'Begin'; $lang->kanbancard->end = 'End'; $lang->kanbancard->pri = 'Priority'; +$lang->kanbancard->progress = 'Progress'; $lang->kanbancard->desc = 'Description'; $lang->kanbancard->estimate = 'Estimate'; $lang->kanbancard->createdBy = 'Created By'; @@ -373,5 +374,6 @@ $lang->kanbancard->colorList['#cfa227'] = 'Warning'; $lang->kanbancard->colorList['#2a5f29'] = 'Urgent'; $lang->kanbancard->error = new stdClass(); -$lang->kanbancard->error->recordMinus = 'Estimate cannot be negative!'; -$lang->kanbancard->error->endSmall = '"End Date" cannot be less than "Begin Date"'; +$lang->kanbancard->error->recordMinus = 'Estimate cannot be negative!'; +$lang->kanbancard->error->endSmall = '"End Date" cannot be less than "Begin Date"'; +$lang->kanbancard->error->progressIllegal = 'Please input correct progress.'; diff --git a/module/kanban/lang/zh-cn.php b/module/kanban/lang/zh-cn.php index 188ac3d69e..f5c05a67d9 100644 --- a/module/kanban/lang/zh-cn.php +++ b/module/kanban/lang/zh-cn.php @@ -44,8 +44,8 @@ $lang->kanban->assigntoCard = '指派'; $lang->kanban->setting = '设置'; $lang->kanban->enableArchived = '设置归档功能'; $lang->kanban->archive = '归档功能'; -$lang->kanban->performable = '设置完成功能'; -$lang->kanban->doneFunction = '完成功能'; +$lang->kanban->performable = '设置进度管理'; +$lang->kanban->manageProgress = '进度管理'; $lang->kanban->splitColumn = '新增子看板列'; $lang->kanban->createColumnOnLeft = '左侧新增看板列'; $lang->kanban->createColumnOnRight = '右侧新增看板列'; @@ -120,8 +120,8 @@ $lang->kanban->aclList['private'] = '私有(看板团队成员、白名单、 $lang->kanban->archiveList['0'] = '不启用'; $lang->kanban->archiveList['1'] = '启用'; -$lang->kanban->enableFinished['0'] = '不启用'; -$lang->kanban->enableFinished['1'] = '启用'; +$lang->kanban->enableList['0'] = '不启用'; +$lang->kanban->enableList['1'] = '启用'; $lang->kanban->type = array(); $lang->kanban->type['all'] = "综合看板"; @@ -340,6 +340,7 @@ $lang->kanbancard->beginAndEnd = '起止日期'; $lang->kanbancard->begin = '预计开始'; $lang->kanbancard->end = '截止日期'; $lang->kanbancard->pri = '优先级'; +$lang->kanbancard->progress = '进度'; $lang->kanbancard->desc = '描述'; $lang->kanbancard->estimate = '预计'; $lang->kanbancard->createdBy = '由谁创建'; @@ -373,5 +374,6 @@ $lang->kanbancard->colorList['#cfa227'] = '警告'; $lang->kanbancard->colorList['#2a5f29'] = '加急'; $lang->kanbancard->error = new stdClass(); -$lang->kanbancard->error->recordMinus = '预计不能为负数!'; -$lang->kanbancard->error->endSmall = '"截止日期"不能小于"预计开始"!'; +$lang->kanbancard->error->recordMinus = '预计不能为负数!'; +$lang->kanbancard->error->endSmall = '"截止日期"不能小于"预计开始"!'; +$lang->kanbancard->error->progressIllegal = '请输入正确的进度'; diff --git a/module/kanban/model.php b/module/kanban/model.php index a9ffd90ade..ff8097399c 100644 --- a/module/kanban/model.php +++ b/module/kanban/model.php @@ -1419,7 +1419,7 @@ class kanbanModel extends model $lanes = $this->getLanes4Group($executionID, $browseType, $groupBy, $cardList); if(empty($lanes)) return array(); - $columns = $this->dao->select('t1.*, t2.`type` as columnType, t2.limit, t2.name as columnName')->from(TABLE_KANBANCELL)->alias('t1') + $columns = $this->dao->select('t1.*, t2.`type` as columnType, t2.limit, t2.name as columnName, t2.color')->from(TABLE_KANBANCELL)->alias('t1') ->leftJoin(TABLE_KANBANCOLUMN)->alias('t2')->on('t1.`column` = t2.id') ->where('t1.kanban')->eq($executionID) ->andWhere('t1.`type`')->eq($browseType) @@ -1460,7 +1460,7 @@ class kanbanModel extends model $columnData[$column->column]['id'] = $column->column; $columnData[$column->column]['type'] = $column->columnType; $columnData[$column->column]['name'] = $column->columnName; - $columnData[$column->column]['color'] = '#333'; + $columnData[$column->column]['color'] = $column->color; $columnData[$column->column]['limit'] = $column->limit; $columnData[$column->column]['laneType'] = $browseType; $columnData[$column->column]['asParent'] = in_array($column->columnType, array('develop', 'test', 'resolving')) ? true : false; @@ -2661,6 +2661,22 @@ class kanbanModel extends model ->andWhere('groupby')->eq('') ->exec(); } + /** + * Activate a card. + * + * @param int $cardID + * @access public + * @return array + */ + public function activateCard($cardID) + { + if($this->post->progress >= 100 or $this->post->progress < 0) + { + dao::$errors[] = $this->lang->kanbancard->error->progressIllegal; + return false; + } + $this->dao->update(TABLE_KANBANCARD)->set('progress')->eq($this->post->progress)->set('status')->eq('doing')->where('id')->eq($cardID)->exec(); + } /** * Update a card. @@ -2683,6 +2699,12 @@ class kanbanModel extends model return false; } + if($this->post->progress > 100 or $this->post->progress < 0) + { + dao::$errors[] = $this->lang->kanbancard->error->progressIllegal; + return false; + } + $cardID = (int)$cardID; $oldCard = $this->getCardByID($cardID); @@ -2699,8 +2721,8 @@ class kanbanModel extends model ->remove('uid') ->get(); - if(isset($card->assignedTo)) $card->assignedTo = trim($card->assignedTo, ','); - if(!isset($card->assignedTo)) $card->assignedTo = ''; + $card->assignedTo = isset($card->assignedTo) ? trim($card->assignedTo, ',') : ''; + $card->status = $this->post->progress == 100 ? 'done' : 'doing'; $card = $this->loadModel('file')->processImgURL($card, $this->config->kanban->editor->editcard['id'], $this->post->uid); @@ -2902,7 +2924,7 @@ class kanbanModel extends model } if(common::hasPriv('kanban', 'setColumnWidth')) $actions .= '
  • ' . html::a(helper::createLink('kanban', 'setColumnWidth', "kanbanID=$kanban->id", '', true), '' . $this->lang->kanban->columnWidth, '', "class='iframe btn btn-link' data-width=30%") . '
  • '; - if(common::hasPriv('kanban', 'performable')) $actions .= '
  • ' . html::a(helper::createLink('kanban', 'performable', "kanbanID=$kanban->id", '', true), '' . $this->lang->kanban->doneFunction, '', "class='iframe btn btn-link' data-width=30%") . '
  • '; + if(common::hasPriv('kanban', 'performable')) $actions .= '
  • ' . html::a(helper::createLink('kanban', 'performable', "kanbanID=$kanban->id", '', true), '' . $this->lang->kanban->manageProgress, '', "class='iframe btn btn-link' data-width=40%") . '
  • '; $kanbanActions = ''; $attr = $kanban->status == 'closed' ? "disabled='disabled'" : ''; diff --git a/module/kanban/view/activatecard.html.php b/module/kanban/view/activatecard.html.php new file mode 100644 index 0000000000..7b61fe028d --- /dev/null +++ b/module/kanban/view/activatecard.html.php @@ -0,0 +1,49 @@ + + * @package kanban + * @version $Id: close.html.php 935 2021-12-09 10:49:24Z $ + * @link https://www.zentao.net + */ +?> + + +
    +
    +
    +

    + id;?> + name'>" . $card->name . '';?> +

    +
    +
    + + + + + + + + + + + + +
    kanbancard->progress;?> +
    + + % +
    +
    comment;?>
    + kanban->activateCard);?> +
    +
    +
    +
    +
    +
    + diff --git a/module/kanban/view/editcard.html.php b/module/kanban/view/editcard.html.php index 99b99ac3ad..26f9bd2d4c 100644 --- a/module/kanban/view/editcard.html.php +++ b/module/kanban/view/editcard.html.php @@ -58,14 +58,28 @@ kanbancard->end;?> end) ? '' : $card->end, "class='form-control form-date'");?> - - kanbancard->estimate;?> - estimate, "class='form-control' placeholder='{$lang->kanbancard->lblHour}'");?> - kanbancard->pri;?> kanbancard->priList, $card->pri, "class='form-control'");?> + + kanbancard->estimate;?> + +
    + estimate, "class='form-control'");?> + h +
    + + + + kanbancard->progress;?> + +
    + progress, "class='form-control'");?> + % +
    + +
    diff --git a/module/kanban/view/import.html.php b/module/kanban/view/import.html.php index acb798bedb..7ef66ecdbb 100644 --- a/module/kanban/view/import.html.php +++ b/module/kanban/view/import.html.php @@ -13,6 +13,7 @@ +config->vision);?>
    diff --git a/module/kanban/view/performable.html.php b/module/kanban/view/performable.html.php index 7a44e84fa0..455bfd7935 100644 --- a/module/kanban/view/performable.html.php +++ b/module/kanban/view/performable.html.php @@ -19,8 +19,8 @@
    - - + + + + + +
    kanban->doneFunction;?>kanban->enableFinished, $kanban->performable));?>kanban->manageProgress;?>kanban->enableList, $kanban->performable));?>
    diff --git a/module/kanban/view/view.html.php b/module/kanban/view/view.html.php index 8f02b06767..e2044c63c7 100644 --- a/module/kanban/view/view.html.php +++ b/module/kanban/view/view.html.php @@ -39,11 +39,7 @@ js::set('colorList', $this->config->kanban->cardColorList); js::set('displayCards', $kanban->displayCards); js::set('fluidBoard', $kanban->fluidBoard); js::set('mode', $config->systemMode); - -js::set('priv', - array( - 'canAssignCard' => common::hasPriv('kanban', 'assigncard'), - )); +js::set('priv', array('canAssignCard' => common::hasPriv('kanban', 'assigncard'))); $canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1; $canEditRegion = commonModel::hasPriv('kanban', 'editRegion'); diff --git a/module/kanban/view/viewcard.html.php b/module/kanban/view/viewcard.html.php index 048d4c731a..24399cc0e3 100644 --- a/module/kanban/view/viewcard.html.php +++ b/module/kanban/view/viewcard.html.php @@ -114,6 +114,10 @@ kanbancard->estimate;?> estimate, 2) . ' ' . $lang->kanbancard->lblHour;?>
    kanbancard->progress;?>progress, 2) . ' %';?>
    diff --git a/module/misc/control.php b/module/misc/control.php index 5806605e9e..1c78599c81 100644 --- a/module/misc/control.php +++ b/module/misc/control.php @@ -74,11 +74,14 @@ class misc extends control $source = isset($this->config->qcVersion) ? 'qucheng' : 'zentao'; $lang = str_replace('-', '_', $this->app->getClientLang()); - $link = $website . "/updater-getLatest-{$this->config->version}-$source-$lang.html"; + $link = $website . "/updater-getLatest-{$this->config->version}-$source-$lang-$sn.html"; $latestVersionList = common::http($link); - $this->loadModel('setting')->setItem('system.common.global.latestVersionList', $latestVersionList); + if(!isset($this->config->global->latestVersionList) or $this->config->global->latestVersionList != $latestVersionList) + { + $this->loadModel('setting')->setItem('system.common.global.latestVersionList', $latestVersionList); + } } /** diff --git a/module/misc/lang/en.php b/module/misc/lang/en.php index 9d3f90dd7a..6081f31c5e 100644 --- a/module/misc/lang/en.php +++ b/module/misc/lang/en.php @@ -88,13 +88,16 @@ $lang->misc->feature->tutorial = 'Tutorial'; $lang->misc->feature->tutorialImage = 'theme/default/images/main/tutorial_en.png'; $lang->misc->feature->youngBlueTheme = 'Young Blue Theme'; $lang->misc->feature->youngBlueImage = 'theme/default/images/main/new_theme_en.png'; +$lang->misc->feature->visions = "Interface switching"; $lang->misc->feature->nextStep = 'Next step'; $lang->misc->feature->close = 'Close'; $lang->misc->feature->downloadFile = 'Download introduction'; $lang->misc->feature->tutorialDesc = '

    ZenTao 15.0 has new functions, and you know how to use it through the "Tutorial".

    Click your [Avatar-Theme-Young Blue] to set it.

    '; $lang->misc->feature->themeDesc = '

    ZenTao 15.0+ a new "Youth Blue" theme, the pages are more beautiful and the experience is more friendly.

    Click your [Avatar-Theme-Young Blue] to set it.

    '; +$lang->misc->feature->visionsDesc = "

    The concept of interface has been added since 16.5. Users can deal with R & D affairs in [R&D] and daily office affairs in [Lite].

    You can view the current interface on the avatar, and click the name of the interface to view and switch other interfaces.

    "; +$lang->misc->feature->visionsImage = 'theme/default/images/main/visions.png'; -$lang->misc->releaseDate['16.5'] = '2022-02-22'; +$lang->misc->releaseDate['16.5.beta1'] = '2022-03-16'; $lang->misc->releaseDate['16.4'] = '2022-02-15'; $lang->misc->releaseDate['16.3'] = '2022-01-26'; $lang->misc->releaseDate['16.2'] = '2022-01-17'; @@ -169,7 +172,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; -$lang->misc->feature->all['16.5'][] = array('title' => 'Fix bug, merge all code to one package', 'desc' => ''); +$lang->misc->feature->all['16.5.beta1'][] = array('title' => 'Fix bug, merge all code to one package', 'desc' => ''); $lang->misc->feature->all['16.4'][] = array('title' => 'Implement JIRA import function and improve plug-in extension mechanism.', 'desc' => ''); $lang->misc->feature->all['16.3'][] = array('title' => 'Kanban adds related plan/release/version/iteration functions, and the detail experience is optimized, fix bugs.', 'desc' => ''); $lang->misc->feature->all['16.2'][] = array('title' => 'Add kanban model project, fix bugs.', 'desc' => ''); diff --git a/module/misc/lang/zh-cn.php b/module/misc/lang/zh-cn.php index 8180645d27..7fdcc84c52 100644 --- a/module/misc/lang/zh-cn.php +++ b/module/misc/lang/zh-cn.php @@ -88,13 +88,16 @@ $lang->misc->feature->tutorial = '新手引导教程'; $lang->misc->feature->tutorialImage = 'theme/default/images/main/tutorial.png'; $lang->misc->feature->youngBlueTheme = '全新青春蓝主题'; $lang->misc->feature->youngBlueImage = 'theme/default/images/main/new_theme.png'; +$lang->misc->feature->visions = "不同场景界面切换"; $lang->misc->feature->nextStep = '下一步'; $lang->misc->feature->close = '关闭'; $lang->misc->feature->downloadFile = '下载新版本功能介绍文档'; $lang->misc->feature->tutorialDesc = "

    禅道15系列新增了多项功能,您可以通过“新手引导教程”快速了解禅道的基本使用方法。

    通过鼠标经过 [头像-新手引导],点击新手引导,即可进入新手引导教程。

    "; $lang->misc->feature->themeDesc = "

    禅道15系列上线了全新的“青春蓝”主题,页面呈现更加美观,体验更加友好。

    通过鼠标经过 [头像-主题-青春蓝],点击青春蓝,即可设置成功。

    "; +$lang->misc->feature->visionsDesc = "

    从16.5开始增加了界面概念,用户可以在[研发综合界面]中处理研发事务、在[迅捷界面]处理日常办公事务。

    在头像右侧即可查看当前所处界面,点击当前界面名称可查看和切换其他的界面。

    "; +$lang->misc->feature->visionsImage = 'theme/default/images/main/visions.png'; -$lang->misc->releaseDate['16.5'] = '2022-02-22'; +$lang->misc->releaseDate['16.5.beta1'] = '2022-03-16'; $lang->misc->releaseDate['16.4'] = '2022-02-15'; $lang->misc->releaseDate['16.3'] = '2022-01-26'; $lang->misc->releaseDate['16.2'] = '2022-01-17'; @@ -169,7 +172,7 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22'; $lang->misc->releaseDate['7.1.stable'] = '2015-03-07'; $lang->misc->releaseDate['6.3.stable'] = '2014-11-07'; -$lang->misc->feature->all['16.5'][] = array('title' => '实现一码多面,多个禅道版本集成到一个包中。', 'desc' => ''); +$lang->misc->feature->all['16.5.beta1'][] = array('title' => '将禅道收费版和开源版集成到一个包中,优化升级步骤。', 'desc' => ''); $lang->misc->feature->all['16.4'][] = array('title' => '实现JIRA导入功能,完善插件扩展机制。', 'desc' => ''); $lang->misc->feature->all['16.3'][] = array('title' => '看板增加关联计划/发布/版本/迭代功能,细节体验优化。', 'desc' => ''); $lang->misc->feature->all['16.2'][] = array('title' => '新增专业研发看板,可以创建看板模型项目,修复Bug。', 'desc' => ''); diff --git a/module/misc/view/features.html.php b/module/misc/view/features.html.php index 2a23a7acf6..a8895fb2f7 100644 --- a/module/misc/view/features.html.php +++ b/module/misc/view/features.html.php @@ -42,6 +42,11 @@ misc->feature->themeDesc;?>
    + +
    + misc->feature->visionsDesc;?> + +
    diff --git a/module/my/control.php b/module/my/control.php index 95d130dc23..a8aa2cb476 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -499,7 +499,7 @@ EOF; $this->view->position[] = $this->lang->my->bug; $this->view->bugs = $bugs; $this->view->users = $this->user->getPairs('noletter'); - $this->view->memberPairs = $this->user->getPairs('noletter|nodeleted'); + $this->view->memberPairs = $this->user->getPairs('noletter|nodeleted|noclosed'); $this->view->tabID = 'bug'; $this->view->type = $type; $this->view->recTotal = $recTotal; @@ -1029,9 +1029,21 @@ EOF; } elseif($data->mode == 'edit') { + $response['result'] = 'success'; + $response['message'] = $this->lang->saveSuccess; + $this->user->updateContactList($data->listID, $data->listName, $data->users); $this->user->setGlobalContacts($data->listID, isset($data->share)); - return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('manageContacts', "listID=$listID"))); + + if(dao::isError()) + { + $response['result'] = 'fail'; + $response['message'] = dao::getError(); + return $this->send($response); + } + + $response['locate'] = inlink('manageContacts', "listID=$listID"); + return $this->send($response); } } @@ -1224,14 +1236,13 @@ EOF; /* Append id for secend sort. */ $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; - $sort = common::appendOrder($orderBy); /* The header and position. */ $this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->dynamic; $this->view->position[] = $this->lang->my->dynamic; $date = empty($date) ? '' : date('Y-m-d', $date); - $actions = $this->loadModel('action')->getDynamic($this->app->user->account, $type, $sort, $pager, 'all', 'all', 'all', $date, $direction); + $actions = $this->loadModel('action')->getDynamic($this->app->user->account, $type, $orderBy, $pager, 'all', 'all', 'all', $date, $direction); if(empty($recTotal)) $originTotal = $pager->recTotal; /* Assign. */ diff --git a/module/my/view/buildcontactlists.html.php b/module/my/view/buildcontactlists.html.php index 4500d2b2bd..1a210b3245 100644 --- a/module/my/view/buildcontactlists.html.php +++ b/module/my/view/buildcontactlists.html.php @@ -17,8 +17,9 @@ if($contactLists) } else { + $width = isonlybody() ? 'data-width=100%' : ''; echo ''; - echo '"; + echo '"; echo ''; echo ''; echo ''; diff --git a/module/my/view/profile.html.php b/module/my/view/profile.html.php index d36fd514be..33e9c60d5a 100644 --- a/module/my/view/profile.html.php +++ b/module/my/view/profile.html.php @@ -20,7 +20,7 @@ id='avatarForm' enctype='multipart/form-data'> - ', '', "class='btn-avatar' id='avatarUploadBtn' data-toggle='tooltip' data-container='body' data-placement='bottom' title='{$lang->my->uploadAvatar}'");?> + ', '', "class='btn-avatar' id='avatarUploadBtn' data-toggle='tooltip' data-container='body' data-placement='bottom' title='{$lang->my->uploadAvatar}'");?> realname;?> diff --git a/module/product/control.php b/module/product/control.php index 4592341ed0..36c5626427 100644 --- a/module/product/control.php +++ b/module/product/control.php @@ -854,7 +854,6 @@ class product extends control /* Append id for secend sort. */ $orderBy = $direction == 'next' ? 'date_desc' : 'date_asc'; - $sort = common::appendOrder($orderBy); /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -869,7 +868,7 @@ class product extends control } $period = $type == 'account' ? 'all' : $type; $date = empty($date) ? '' : date('Y-m-d', $date); - $actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, $productID, 'all', 'all', $date, $direction); + $actions = $this->loadModel('action')->getDynamic($account, $period, $orderBy, $pager, $productID, 'all', 'all', $date, $direction); /* The header and position. */ $this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->product->dynamic; diff --git a/module/program/view/browsebylist.html.php b/module/program/view/browsebylist.html.php index 5c52446040..efc038415a 100644 --- a/module/program/view/browsebylist.html.php +++ b/module/program/view/browsebylist.html.php @@ -151,6 +151,7 @@ #programTableList .icon-project:before {content: '\e99c';} #programTableList .icon-scrum:before {content: '\e9a2';} #programTableList .icon-waterfall:before {content: '\e9a4';} +#programTableList .icon-kanban:before {content: '\e983';}