Merge branch 'Zentao_app1.1' of https://gitlab.zcorp.cc/easycorp/zentaopms into Zentao_app1.1
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
/**
|
||||
* The testresults entry point of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @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());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* The testsuite entry point of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @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');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* The testsuites entry point of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
|
||||
* @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'));
|
||||
}
|
||||
}
|
||||
@@ -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'));
|
||||
}
|
||||
|
||||
+8
-8
@@ -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
|
||||
|
||||
+10
-10
@@ -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"
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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';
|
||||
|
||||
+3
-2
@@ -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`;
|
||||
|
||||
+33
-2
@@ -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`;
|
||||
|
||||
+6
-21
@@ -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\"}]}', '', '', '');
|
||||
|
||||
@@ -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` (
|
||||
|
||||
+468
-263
@@ -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;
|
||||
|
||||
@@ -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 如果您违反了该协议的任一条款,该授权协议将自动终止,我保留通过法律手段追究责任的权利。
|
||||
@@ -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.
|
||||
@@ -0,0 +1,9 @@
|
||||
<?php if(common::checkNotCN()):?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#searchForm .form-group #account').closest('.input-group').find('.input-group-addon').css('padding', '5px 32px');
|
||||
$('#searchForm .form-group #date').closest('.input-group').find('.input-group-addon').css('padding', '5px 32px');
|
||||
})
|
||||
</script>
|
||||
<?php endif;?>
|
||||
@@ -0,0 +1,211 @@
|
||||
<?php
|
||||
/**
|
||||
* The personal view file of attend module of Ranzhi.
|
||||
*
|
||||
* @copyright Copyright 2009-2018 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author liyuchun <liyuchun@cnezsoft.com>
|
||||
* @package attend
|
||||
* @version $Id$
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
|
||||
<style>
|
||||
#menuActions{float:right !important; margin-top: -60px !important;}
|
||||
.input-group-required > .required::after, .required-wrapper.required::after {top:12px !important;}
|
||||
.modal-body .table {margin-bottom:0px !important;}
|
||||
</style>
|
||||
<div id='featurebar'>
|
||||
<ul class='nav'>
|
||||
<?php
|
||||
$methodName = strtolower($this->app->getMethodName());
|
||||
foreach($lang->attend->featurebar as $key => $menu)
|
||||
{
|
||||
if(is_string($menu)) $link = $menu;
|
||||
if(is_array($menu)) $link = $menu['link'];
|
||||
|
||||
list($name, $currentModule, $currentMethod, $params) = explode('|', $link);
|
||||
$class = strtolower($key) == $methodName ? "class='active'" : '';
|
||||
if(isset($menu['alias'])) $class = strpos(strtolower($menu['alias']), strtolower($key)) !== false ? "class='active'" : $class;
|
||||
if(common::hasPriv($currentModule, $currentMethod)) echo "<li id='$key' $class>" . html::a($this->createLink($currentModule, $currentMethod, $params), $name) . '</li>';
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class='with-side'>
|
||||
<div class='side'>
|
||||
<div class='panel panel-sm'>
|
||||
<div class='panel-body'>
|
||||
<ul class='tree' data-ride='tree' data-collapsed='true'>
|
||||
<?php foreach($yearList as $year):?>
|
||||
<li class='<?php echo $year == $currentYear ? 'active' : ''?>'>
|
||||
<?php extCommonModel::printLink('attend', 'personal', "date=$year", $year);?>
|
||||
<ul>
|
||||
<?php foreach($monthList[$year] as $month):?>
|
||||
<li class='<?php echo ($year == $currentYear and $month == $currentMonth) ? 'active' : ''?>'>
|
||||
<?php extCommonModel::printLink('attend', 'personal', "date=$year$month", $year . $month);?>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='main'>
|
||||
<div class='row'>
|
||||
<?php
|
||||
$weekIndex = 0;
|
||||
if($this->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;
|
||||
}
|
||||
?>
|
||||
<?php while($startDate <= $endDate):?>
|
||||
<?php $dayIndex = date('w', $startDate);?>
|
||||
<?php if($dayIndex == $firstDayIndex):?>
|
||||
<div class='col-xs-4'>
|
||||
<div class='panel'>
|
||||
<div class='panel-body no-padding'>
|
||||
<table class="table table-data text-center table-fixed">
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='w-80px'><?php echo $lang->attend->weeks[$weekIndex];?></th>
|
||||
<th class='w-40px'><?php echo $lang->attend->dayName;?></th>
|
||||
<th title='<?php echo $lang->attend->signIn;?>'><?php echo $lang->attend->signIn;?></th>
|
||||
<th title='<?php echo $lang->attend->signOut;?>'><?php echo $lang->attend->signOut;?></th>
|
||||
<th class='w-100px'><?php echo $lang->actions . '/' . $lang->attend->status;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php endif;?>
|
||||
<?php $currentDate = date('Y-m-d', $startDate);?>
|
||||
<?php if(isset($attends[$currentDate])):?>
|
||||
<?php $attend = $attends[$currentDate];?>
|
||||
<?php $status = $attend->status;?>
|
||||
<?php $reason = $attend->reason;?>
|
||||
<?php $date = date('Ymd', $startDate);?>
|
||||
<?php $reviewStatus = isset($attend->reviewStatus) ? $attend->reviewStatus : '';?>
|
||||
<tr class="text-middle attend-<?php echo $status?> <?php echo (date('m', $startDate) == $currentMonth) ? '' : 'otherMonth'?>" title='<?php echo $lang->attend->statusList[$status]?>'>
|
||||
<td><?php echo formatTime($currentDate, DT_DATE1);?></td>
|
||||
<td><?php echo $lang->datepicker->abbrDayNames[$dayIndex]?></td>
|
||||
<td class='attend-signin'>
|
||||
<?php $signIn = substr($attend->signIn, 0, 5);?>
|
||||
<?php if(strpos(',late,absent,rest,leave,lieu,', ",$status,") !== false) $signIn = $lang->attend->statusList[$status];?>
|
||||
<?php if($status == 'both') $signIn = $lang->attend->statusList['late'];?>
|
||||
<?php echo $signIn;?>
|
||||
</td>
|
||||
<td class='attend-signout'>
|
||||
<?php $signOut = substr($attend->signOut, 0, 5);?>
|
||||
<?php if(strpos(',early,absent,rest,leave,lieu,', ",$status,") !== false) $signOut = $lang->attend->statusList[$status];?>
|
||||
<?php if($status == 'both') $signOut = $lang->attend->statusList['early'];?>
|
||||
<?php echo $signOut;?>
|
||||
</td>
|
||||
<td class='attend-actions'>
|
||||
<?php
|
||||
$edit = $reviewStatus == 'wait' ? $lang->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;
|
||||
?>
|
||||
<?php if($attend->hoursList):?>
|
||||
<?php
|
||||
$index = 1;
|
||||
$statusLabel = '';
|
||||
foreach($attend->hoursList as $status => $hours)
|
||||
{
|
||||
if($index > 1) $statusLabel .= '<br/>';
|
||||
$statusLabel .= $lang->attend->statusList[$status] . $hours . 'h';
|
||||
$index++;
|
||||
}
|
||||
?>
|
||||
<div class='dropdown text-left'>
|
||||
<a href='javascript:;' data-toggle='dropdown'>
|
||||
<span class='attend-<?php echo $status;?>'><?php echo $statusLabel;?></span>
|
||||
<span class='caret'></span>
|
||||
</a>
|
||||
<ul role='menu' class='dropdown-menu'>
|
||||
<li><?php echo baseHTML::a($this->createLink('attend', 'edit', "date=" . $date), $edit, "data-toggle='modal' data-width='500px'") . "</li>";?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php elseif($status == 'leave'):?>
|
||||
<span class='attend-<?php echo $status;?>'>
|
||||
<?php extCommonModel::printLink('leave', 'create', "date=" . $date, $leave, "data-toggle='modal' data-width='700px'");?>
|
||||
</span>
|
||||
<?php elseif($status == 'lieu'):?>
|
||||
<span class='attend-<?php echo $status;?>'>
|
||||
<?php extCommonModel::printLink('lieu', 'create', "date=" . $date, $lieu, "data-toggle='modal' data-width='700px'");?>
|
||||
</span>
|
||||
<?php elseif(strpos(',rest,normal,', ",$status,") === false):?>
|
||||
<?php if($reviewStatus == 'wait' or strpos(',late,early,both,', ",$status,") !== false):?>
|
||||
<?php echo baseHTML::a($this->createLink('attend', 'edit', "date=" . $date), $edit, "data-toggle='modal' data-width='500px'");?>
|
||||
<?php else:?>
|
||||
<div class='dropdown'>
|
||||
<a href='javascript:;' data-toggle='dropdown'><?php echo $lang->actions;?><span class='caret'></span></a>
|
||||
<ul role='menu' class='dropdown-menu'>
|
||||
<?php if($reason == '' or $reason == 'normal') extCommonModel::printLink('attend', 'edit', "date=" . $date, $edit, "data-toggle='modal' data-width='500px'", '', '', 'li');?>
|
||||
<?php if($reason == '' or $reason == 'leave') extCommonModel::printLink('leave', 'create', "date=" . $date, $leave, "data-toggle='modal' data-width='700px'", '', '', 'li');?>
|
||||
<?php if($reason == '' or $reason == 'makeup') extCommonModel::printLink('makeup', 'create', "date=" . $date, $makeup, "data-toggle='modal' data-width='700px'", '', '', 'li');?>
|
||||
<?php if($reason == '' or $reason == 'overtime') extCommonModel::printLink('overtime', 'create', "date=" . $date, $overtime, "data-toggle='modal' data-width='700px'", '', '', 'li');?>
|
||||
<?php if($reason == '' or $reason == 'lieu') extCommonModel::printLink('lieu', 'create', "date=" . $date, $lieu, "data-toggle='modal' data-width='700px'", '', '', 'li');?>
|
||||
<?php if($reason == '' or $reason == 'trip') extCommonModel::printLink('trip', 'create', "date=" . $date, $trip, "data-toggle='modal' data-width='700px'", '', '', 'li');?>
|
||||
<?php if($reason == '' or $reason == 'egress') extCommonModel::printLink('egress', 'create', "date=" . $date, $egress, "data-toggle='modal' data-width='700px'", '', '', 'li');?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php elseif($status == 'rest'):?>
|
||||
<span class='attend-<?php echo $status;?>'>
|
||||
<?php extCommonModel::printLink('overtime', 'create', "date=" . $date, $lang->attend->overtime, "data-toggle='modal' data-width='700px'");?>
|
||||
</span>
|
||||
<?php elseif($status == 'normal'):?>
|
||||
<span class='attend-<?php echo $status;?>'><?php echo $lang->attend->statusList[$status];?></span>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<tr class="<?php echo (date('m', $startDate) == $currentMonth) ? '' : 'otherMonth'?>">
|
||||
<td><?php echo formatTime($currentDate, DT_DATE1);?></td>
|
||||
<td><?php echo $lang->datepicker->abbrDayNames[$dayIndex]?></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($dayIndex == $lastDayIndex):?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<?php $weekIndex += 1;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php $startDate = strtotime('+1 day', $startDate);?>
|
||||
<?php endwhile;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('.side .has-active-item').addClass('open');
|
||||
})
|
||||
</script>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,6 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#featurebar #settings').addClass('active');
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#featurebar #settings').addClass('active');
|
||||
$('a.setDept').attr('href', createLink('dept', 'browse'));
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,6 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#ajaxForm .table #signInClient').closest('tr').hide();
|
||||
})
|
||||
</script>
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -30,15 +30,15 @@
|
||||
<div class="row tiles">
|
||||
<div class="col tile">
|
||||
<div class="tile-title"><?php echo $lang->block->undone?></div>
|
||||
<div class="tile-amount"><?php echo empty($data) ? 0 : html::a($this->createLink('my', 'work', 'mode=task'), (int)$data['undone']);?></div>
|
||||
<div class="tile-amount"><?php echo empty($data) ? 0 : html::a($this->createLink('my', 'contribute', 'mode=task&type=assignedTo'), (int)$data['undone']);?></div>
|
||||
</div>
|
||||
<div class="col tile">
|
||||
<div class="tile-title"><?php echo $lang->block->delaying?></div>
|
||||
<div class="tile-amount"><?php echo empty($data) ? 0 : html::a($this->createLink('my', 'work', 'mode=task'), (int)$data['delaying']);?></div>
|
||||
<div class="tile-amount"><?php echo empty($data) ? 0 : html::a($this->createLink('my', 'contribute', 'mode=task&type=assignedTo'), (int)$data['delaying']);?></div>
|
||||
</div>
|
||||
<div class="col tile">
|
||||
<div class="tile-title"><?php echo $lang->block->delayed?></div>
|
||||
<div class="tile-amount"><?php echo empty($data) ? 0 : html::a($this->createLink('my', 'work', 'mode=task'), (int)$data['delayed']);?></div>
|
||||
<div class="tile-amount"><?php echo empty($data) ? 0 : html::a($this->createLink('my', 'contribute', 'mode=task&type=assignedTo'), (int)$data['delayed']);?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
|
||||
@@ -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'] = '优先级';
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
$config->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');
|
||||
@@ -0,0 +1,6 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#productBox').addClass("hide");
|
||||
});
|
||||
</script>
|
||||
@@ -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 .= "<div class='dropdown'>";
|
||||
$TRActions .= html::a('javascript:;', $this->lang->execution->kanbanGroup[$groupBy] . "<span class='caret'></span>", '', "data-toggle='dropdown' data- class='btn btn-link'");
|
||||
$TRActions .= html::a('javascript:;', $this->lang->execution->kanbanGroup[$groupBy] . " <span class='caret'></span>", '', "data-toggle='dropdown' data- class='btn btn-link'");
|
||||
$TRActions .= "<ul class='dropdown-menu pull-right course-groupBy'>";
|
||||
foreach($this->lang->execution->kanbanGroup as $groupKey => $groupName)
|
||||
{
|
||||
|
||||
@@ -22,3 +22,5 @@ $lang->execution->icons['tree'] = 'treemap';
|
||||
$lang->execution->icons['grouptask'] = 'sitemap';
|
||||
|
||||
$lang->execution->aclList['private'] = "Private (Accessible to team members and project leaders)";
|
||||
|
||||
$lang->execution->common = 'Project Execution';
|
||||
@@ -7,6 +7,7 @@ $lang->execution->createKanban = '创建看板';
|
||||
$lang->execution->noExecution = "暂时没有看板。";
|
||||
$lang->execution->importTask = '转入任务';
|
||||
$lang->execution->batchCreateTask = '批量创建任务';
|
||||
$lang->execution->linkStory = "创建{$lang->SRCommon}";
|
||||
|
||||
$lang->execution->kanbanGroup['default'] = '默认方式';
|
||||
$lang->execution->kanbanGroup['story'] = '目标';
|
||||
@@ -22,3 +23,5 @@ $lang->execution->icons['tree'] = 'treemap';
|
||||
$lang->execution->icons['grouptask'] = 'sitemap';
|
||||
|
||||
$lang->execution->aclList['private'] = "私有(团队成员和项目负责人可访问)";
|
||||
|
||||
$lang->execution->common = '项目看板';
|
||||
@@ -25,12 +25,45 @@ public function setMenu($executionID, $buildID = 0, $extra = '')
|
||||
$modulePageNav .= "<ul class='dropdown-menu'>";
|
||||
foreach($kanbanList as $kanbanID => $kanban)
|
||||
{
|
||||
$modulePageNav .= '<li>' . html::a(helper::createLink('execution', $this->app->rawMethod, "execution=$kanban->id"), $kanban->name) . '</li>';
|
||||
if($this->session->kanbanview && strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$this->session->kanbanview}|") !== false)
|
||||
{
|
||||
$method = $this->session->kanbanview;
|
||||
}
|
||||
elseif($this->cookie->kanbanview && strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$this->cookie->kanbanview}|") !== false)
|
||||
{
|
||||
$method = $this->cookie->kanbanview;
|
||||
}
|
||||
else
|
||||
{
|
||||
$method = 'kanban';
|
||||
}
|
||||
|
||||
$modulePageNav .= '<li>' . html::a(helper::createLink('execution', $method, "execution=$kanban->id"), $kanban->name) . '</li>';
|
||||
}
|
||||
$modulePageNav .= "</ul></div></div>";
|
||||
|
||||
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 .= "<div class='dropdown'>";
|
||||
$TRActions .= html::a('javascript:;', "<i class='icon icon-" . $this->lang->execution->icons[$currentMethod]."'></i> " . $subMenu->{$currentMethod}['name'] . "<span class='caret'></span>", '', "data-toggle='dropdown' class='btn btn-link'");
|
||||
$TRActions .= "<div class='btn-group dropdown'>";
|
||||
$TRActions .= html::a("javascript:;", "<i class='icon icon-" . $this->lang->execution->icons[$currentMethod]."'> </i>" . $subMenu->{$currentMethod}['name'] . " <span class='caret'></span>", '', "class='btn btn-link' data-toggle='dropdown'");
|
||||
$TRActions .= "<ul class='dropdown-menu pull-right'>";
|
||||
foreach($subMenu as $subKey => $subName)
|
||||
{
|
||||
$TRActions .= '<li>' . html::a(helper::createLink('execution', $subName['method'], $subName['vars']), "<i class='icon icon-" . $this->lang->execution->icons[$subName['method']] . "'></i> " . $subName['name']) . '</li>';
|
||||
$active = $this->session->kanbanview == $subKey ? "class='active'" : '';
|
||||
$TRActions .= "<li $active>" . html::a(helper::createLink('execution', $subName['method'], $subName['vars']), "<i class='icon icon-" . $this->lang->execution->icons[$subName['method']] . "'></i> " . $subName['name']) . '</li>';
|
||||
}
|
||||
|
||||
$TRActions .= "</ul></div>";
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?php
|
||||
$lang->feedback->typeList = array();
|
||||
$lang->feedback->typeList[''] = '';
|
||||
$lang->feedback->typeList['story'] = '目标';
|
||||
$lang->feedback->typeList['task'] = '任务';
|
||||
$lang->feedback->typeList['todo'] = '待办';
|
||||
@@ -1,2 +1,15 @@
|
||||
<?php
|
||||
include dirname(dirname(__FILE__)) . '/resource.php';
|
||||
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$lang->resource->company->todo = 'companyTodo';
|
||||
$lang->resource->company->calendar = 'effortCalendar';
|
||||
$lang->resource->company->allTodo = 'allTodo';
|
||||
$lang->resource->company->effort = 'companyEffort';
|
||||
$lang->resource->company->alleffort = 'allEffort';
|
||||
$lang->resource->sms = new stdclass();
|
||||
$lang->resource->sms->index = 'index';
|
||||
$lang->resource->sms->test = 'test';
|
||||
$lang->resource->sms->reset = 'reset';
|
||||
}
|
||||
@@ -435,8 +435,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';
|
||||
@@ -444,8 +442,7 @@ $lang->resource->execution->whitelist = 'whitelist';
|
||||
$lang->resource->execution->addWhitelist = 'addWhitelist';
|
||||
$lang->resource->execution->unbindWhitelist = 'unbindWhitelist';
|
||||
//$lang->resource->execution->storyEstimate = 'storyEstimate';
|
||||
$lang->resource->execution->executionkanban = 'kanbanAction';
|
||||
$lang->resource->execution->kanban = 'RDKanban';
|
||||
$lang->resource->execution->kanban = 'kanban';
|
||||
//if($config->systemMode == 'classic') $lang->resource->project->list = 'list';
|
||||
|
||||
//$lang->execution->methodOrder[0] = 'index';
|
||||
@@ -489,8 +486,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';
|
||||
@@ -502,7 +497,6 @@ $lang->execution->methodOrder[245] = 'whitelist';
|
||||
$lang->execution->methodOrder[250] = 'addWhitelist';
|
||||
$lang->execution->methodOrder[255] = 'unbindWhitelist';
|
||||
$lang->execution->methodOrder[260] = 'storyEstimate';
|
||||
$lang->execution->methodOrder[265] = 'executionkanban';
|
||||
$lang->execution->methodOrder[270] = 'kanban';
|
||||
|
||||
/* Task. */
|
||||
|
||||
@@ -1,2 +1,15 @@
|
||||
<?php
|
||||
include dirname(dirname(__FILE__)) . '/resource.php';
|
||||
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$lang->resource->company->todo = 'companyTodo';
|
||||
$lang->resource->company->calendar = 'effortCalendar';
|
||||
$lang->resource->company->allTodo = 'allTodo';
|
||||
$lang->resource->company->effort = 'companyEffort';
|
||||
$lang->resource->company->alleffort = 'allEffort';
|
||||
$lang->resource->sms = new stdclass();
|
||||
$lang->resource->sms->index = 'index';
|
||||
$lang->resource->sms->test = 'test';
|
||||
$lang->resource->sms->reset = 'reset';
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
helper::importControl('install');
|
||||
class myinstall extends install
|
||||
{
|
||||
public function step4()
|
||||
{
|
||||
if(!isset($this->config->installed) or !$this->config->installed)
|
||||
{
|
||||
$this->view->error = $this->lang->install->errorNotSaveConfig;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
$_POST['mode'] = 'new';
|
||||
return parent::step4();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
helper::importControl('install');
|
||||
class myinstall extends install
|
||||
{
|
||||
public function step6()
|
||||
{
|
||||
$this->config->version = $this->config->liteVersion;
|
||||
return parent::step6();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
$lang->install->license = 'ZenTao Lite is under Z PUBLIC LICENSE(ZPL) 1.2';
|
||||
$lang->install->welcome = 'Thanks for choosing ZenTao Lite!';
|
||||
$lang->install->desc = <<<EOT
|
||||
ZenTao Lite is a lightweight project management software from Nature EasySoft.ltd, which is mainly designed to be a project management tool available for every single of us. ZenTao Lite covers project
|
||||
|
||||
management, Kanban management, attendance management, Doc management, system management, custom workflow and many other practical features, tailored for small and medium-sized
|
||||
|
||||
enterprises. It enables every department and every employee in the company to manage projects well and improve efficiency.
|
||||
|
||||
|
||||
EOT;
|
||||
$lang->install->links = <<<EOT
|
||||
ZenTao Lite is developed by <strong><a href='https://en.easysoft.ltd' target='_blank' class='text-danger'>EasyCorp</a></strong>.
|
||||
Official Website: <a href='https://www.zentao.pm' target='_blank'>https://www.zentao.pm</a>
|
||||
Technical Support: <a href='https://www.zentao.pm/forum/' target='_blank'>https://www.zentao.pm/forum/</a>
|
||||
LinkedIn: <a href='https://www.linkedin.com/company/1156596/' target='_blank'>EasyCorp</a>
|
||||
Facebook: <a href='https://www.facebook.com/natureeasysoft' target='_blank'>EasyCorp</a>
|
||||
Twitter: <a href='https://twitter.com/ZentaoA' target='_blank'>ZenTao Lite</a>
|
||||
|
||||
|
||||
|
||||
EOT;
|
||||
|
||||
$lang->install->successLabel = "<p>You have installed ZenTao Lite %s.</p>";
|
||||
$lang->install->successNoticeLabel = "<p>You have installed ZenTao Lite %s.<strong class='text-danger'> Please delete install.php</strong>.</p>";
|
||||
$lang->install->joinZentao = <<<EOT
|
||||
<p>Note: In order to get the latest news of ZenTao Lite, please sign up on ZenTao Community(<a href='https://www.zentao.pm' class='alert-link' target='_blank'>www.zentao.pm</a>).</p>
|
||||
EOT;
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$lang->install->license = '禅道迅捷版软件使用 Z PUBLIC LICENSE(ZPL) 1.2 授权协议';
|
||||
$lang->install->welcome = '欢迎使用禅道迅捷版!';
|
||||
$lang->install->desc = <<<EOT
|
||||
禅道迅捷版是易软天创旗下的一款轻量级的项目管理软件,主要定位于人人都可用的项目管理工具。禅道迅捷版涵盖了项目管理、通用看板管理、考勤管理、文档管理、组织管理、自定义工作流等诸多
|
||||
|
||||
实用功能,专为中小企业量身打造,让公司每个部门、每个人都能做好项目管理、提高工作效率。
|
||||
EOT;
|
||||
$lang->install->links = <<<EOT
|
||||
禅道迅捷版由<strong><a href='https://www.cnezsoft.com' target='_blank' class='text-danger'>青岛易软天创网络科技有限公司</a>开发</strong>。
|
||||
官方网站:<a href='https://www.zentao.net' target='_blank'>https://www.zentao.net</a>
|
||||
技术支持:<a href='https://www.zentao.net/ask/' target='_blank'>https://www.zentao.net/ask/</a>
|
||||
新浪微博:<a href='https://weibo.com/easysoft' target='_blank'>https://weibo.com/easysoft</a>
|
||||
|
||||
|
||||
|
||||
EOT;
|
||||
|
||||
$lang->install->successLabel = "<p>您已经成功安装禅道迅捷版%s。</p>";
|
||||
$lang->install->successNoticeLabel = "<p>您已经成功安装禅道迅捷版%s,<strong class='text-danger'>请及时删除install.php</strong>。</p>";
|
||||
$lang->install->joinZentao = <<<EOT
|
||||
<p>友情提示:为了您及时获得禅道迅捷版的最新动态,请在禅道社区(<a href='https://www.zentao.net' class='alert-link' target='_blank'>www.zentao.net</a>)进行登记。</p>
|
||||
EOT;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Get license according the client lang.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getLicense()
|
||||
{
|
||||
$clientLang = $this->app->getClientLang();
|
||||
$licenseCN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.LITE.CN');
|
||||
$licenseEN = file_get_contents($this->app->getBasePath() . 'doc/LICENSE.LITE.EN');
|
||||
|
||||
if($clientLang == 'zh-cn' or $clientLang == 'zh-tw') return $licenseCN . $licenseEN;
|
||||
return $licenseEN . $licenseCN;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<script>
|
||||
$('#importDemoData0').closest('tr').remove();
|
||||
</script>
|
||||
@@ -6,3 +6,6 @@ $lang->kanban->taskColumn['developed'] = 'Developed';
|
||||
$lang->kanban->taskColumn['pause'] = 'Pause';
|
||||
$lang->kanban->taskColumn['canceled'] = 'Canceled';
|
||||
$lang->kanban->taskColumn['closed'] = 'Closed';
|
||||
|
||||
$lang->kanban->importCards = 'Enable the import function, you can only import cards that you have permission to view.';
|
||||
$lang->kanban->common = 'Common Kanban';
|
||||
|
||||
@@ -6,3 +6,6 @@ $lang->kanban->taskColumn['developed'] = '已完成';
|
||||
$lang->kanban->taskColumn['pause'] = '已暂停';
|
||||
$lang->kanban->taskColumn['canceled'] = '已取消';
|
||||
$lang->kanban->taskColumn['closed'] = '已关闭';
|
||||
|
||||
$lang->kanban->importCards = '启用导入功能,只能导入自己有权限查看的卡片';
|
||||
$lang->kanban->common = '通用看板';
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* The import file of kanban module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Fangzhou Hu <hufangzhou@easycorp.ltd>
|
||||
* @package kanban
|
||||
* @version $Id: import.html.php 935 2022-01-19 14:15:24Z hufangzhou@easycorp.ltd $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
|
||||
<?php include $app->getModuleRoot() . 'common/view/header.lite.html.php';?>
|
||||
<?php js::set('enableImport', $enableImport);?>
|
||||
<?php js::set('vision', $this->config->vision);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
<?php echo "<span>" . $lang->kanban->import . '</span>';?>
|
||||
</h2>
|
||||
</div>
|
||||
<form method='post' class="load-indicator main-form form-ajax" target='hiddenwin' id='importForm'>
|
||||
<table align='center' class='table table-form'>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<label class="radio-inline">
|
||||
<input type='radio' name='import' value='off' <?php echo $enableImport == 'off' ? "checked='checked'" : ''; ?> id='importoff'/>
|
||||
<?php echo $lang->kanban->importList['off'];?>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2'>
|
||||
<label class="radio-inline">
|
||||
<input type='radio' name='import' value='on' <?php echo $enableImport == 'on' ? "checked='checked'" : ''; ?> id='importon'/>
|
||||
<?php echo $lang->kanban->importCards;?>
|
||||
<input type='hidden' name='importObjectList[]' value='cards'/>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id='emptyTip' class='hidden'><td colspan='3' style='color: red;'><?php echo $lang->kanban->error->importObjNotEmpty;?></td></tr>
|
||||
<tr>
|
||||
<td class='form-actions'><?php echo html::submitButton();?></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#name').attr("disabled", true);
|
||||
})
|
||||
</script>
|
||||
<?php if(!$canEdit): ?>
|
||||
<script>$('#name').attr("disabled", true);</script>
|
||||
<?php endif; ?>
|
||||
@@ -0,0 +1 @@
|
||||
<?php include $this->app->getExtensionRoot() . 'biz/leave/ext/view/' . basename(__FILE__);?>
|
||||
@@ -0,0 +1 @@
|
||||
<?php include $this->app->getExtensionRoot() . 'biz/leave/ext/view/' . basename(__FILE__);?>
|
||||
@@ -0,0 +1 @@
|
||||
<?php include $this->app->getExtensionRoot() . 'biz/leave/ext/view/' . basename(__FILE__);?>
|
||||
@@ -0,0 +1 @@
|
||||
<?php include $this->app->getExtensionRoot() . 'biz/leave/ext/view/' . basename(__FILE__);?>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php js::set('type', $type)?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#<?php echo $type?>').addClass('active');
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#trip').closest('tr').hide();
|
||||
$('#begin, #end, #hours, #overtime').parent().addClass('required');
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,7 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#trip').closest('tr').hide();
|
||||
$('#begin, #end, #hours, #overtime').parent().addClass('required');
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php js::set('type', $type)?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#<?php echo $type?>').addClass('active');
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,6 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#begin, #end, #hours, #leave').parent().addClass('required');
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,6 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#begin, #end, #hours, #leave').parent().addClass('required');
|
||||
})
|
||||
</script>
|
||||
@@ -139,7 +139,6 @@
|
||||
|
||||
common::printIcon('task', 'recordEstimate', "taskID=$task->id", $task, 'list', 'time', '', 'iframe', true, '', '', $task->project);
|
||||
common::printIcon('task', 'edit', "taskID=$task->id", $task, 'list', '', '', 'iframe', true, "data-width='95%'", '', $task->project);
|
||||
common::printIcon('task', 'batchCreate', "executionID=$task->execution&storyID=$task->story&moduleID=$task->module&taskID=$task->id&ifame=true", $task, 'list', 'split', '', 'iframe', true, "data-width='95%'", $this->lang->task->children, $task->project);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
$calendarHookFile = $app->getExtensionRoot() . 'biz/my/ext/view/todo.calendar.html.hook.php';
|
||||
if(file_exists($calendarHookFile)) include $calendarHookFile;
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php js::set('type', $type)?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#<?php echo $type?>').addClass('active');
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,6 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#begin, #end, #hours').parent().addClass('required');
|
||||
})
|
||||
</script>
|
||||
@@ -0,0 +1,6 @@
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#begin, #end, #hours').parent().addClass('required');
|
||||
})
|
||||
</script>
|
||||
@@ -376,29 +376,6 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->story->review, '', $class) . '</li>';
|
||||
}
|
||||
|
||||
|
||||
if($storyType == 'story')
|
||||
{
|
||||
if($canBatchChangeStage)
|
||||
{
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->stageAB, '', "id='stageItem'");
|
||||
echo "<ul class='dropdown-menu'>";
|
||||
foreach($lang->story->stageList as $key => $stage)
|
||||
{
|
||||
if(empty($key)) continue;
|
||||
if(strpos('tested|verified|released|closed', $key) === false) continue;
|
||||
$actionLink = $this->createLink('story', 'batchChangeStage', "stage=$key");
|
||||
echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('$actionLink', 'hiddenwin', '#productStoryForm')\"") . "</li>";
|
||||
}
|
||||
echo '</ul></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$class= "class='disabled'";
|
||||
echo "<li $class>" . html::a('javascript:;', $lang->story->stageAB, '', $class) . '</li>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -462,9 +439,6 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if($canBatchImportToLib):?>
|
||||
<?php echo html::a('#batchImportToLib', $lang->story->importToLib, '', 'class="btn" data-toggle="modal" id="importToLib"');?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class="table-statistic"><?php echo $summary;?></div>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
$lang->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)";
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
$lang->project->leftStories = '剩余目标';
|
||||
$lang->project->doingExecutions = '进行中的看板';
|
||||
$lang->project->select = "请选择{$lang->project->common}";
|
||||
$lang->project->noProject = "暂时没有{$lang->project->common}。";
|
||||
|
||||
$lang->project->aclList['private'] = "私有 (只有项目负责人、团队成员可访问)";
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<?php else:?>
|
||||
<div class='kanban-cards'>
|
||||
<?php foreach($kanbanList as $index => $kanban):?>
|
||||
<div id="kanban-<?php echo $kanban->id;?>" class='kanban-card col' data-url='<?php echo $this->createLink('execution', 'kanban', "kanbanID=$kanban->id");?>'>
|
||||
<div id="kanban-<?php echo $kanban->id;?>" class='kanban-card col' data-url='<?php echo $this->createLink('execution', $this->cookie->kanbanview ? $this->cookie->kanbanview : 'kanban', "kanbanID=$kanban->id");?>'>
|
||||
<div class="panel">
|
||||
<div class="panel-heading">
|
||||
<span class="label kanban-status-<?php echo $kanban->status;?>"><?php echo zget($lang->execution->statusList, $kanban->status);?></span>
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
<th class='c-pri'> <?php echo $lang->priAB;?></th>
|
||||
<th class='c-user'> <?php echo $lang->story->assignedTo;?></th>
|
||||
<th class='c-status'><?php echo $lang->story->status;?></th>
|
||||
<th class='c-stage'> <?php echo $lang->story->stageAB;?></th>
|
||||
<th class='c-user-box'><?php echo $lang->story->closedBy;?></th>
|
||||
<th class='c-reason'> <?php echo $lang->story->closedReason;?></th>
|
||||
<th class='c-keywords'><?php echo $lang->story->keywords;?></th>
|
||||
@@ -51,7 +50,7 @@
|
||||
<tr>
|
||||
<td><?php echo $storyID . html::hidden("storyIdList[$storyID]", $storyID);?></td>
|
||||
<td class='text-left'>
|
||||
<?php echo html::select("modules[$storyID]", isset($modules[$story->product][$story->branch]) ? $modules[$story->product][$story->branch] : array('0' => '/'), $story->module, "class='form-control chosen'");?>
|
||||
<?php echo html::select("modules[$storyID]", isset($moduleList[$story->id]) ? $moduleList[$story->id] : array('0' => '/'), $story->module, "class='form-control chosen'");?>
|
||||
</td>
|
||||
<td title='<?php echo $story->title?>'>
|
||||
<div class="input-group">
|
||||
@@ -74,7 +73,6 @@
|
||||
<td><?php echo html::select("pris[$storyID]", $priList, $story->pri, 'class=form-control');?></td>
|
||||
<td class='text-left'><?php echo html::select("assignedTo[$storyID]", $users, $story->assignedTo, "class='form-control chosen'");?></td>
|
||||
<td class='story-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></td>
|
||||
<td><?php echo html::select("stages[$storyID]", $stageList, $story->stage, 'class="form-control"' . ($story->status == 'draft' ? ' disabled="disabled"' : ''));?></td>
|
||||
<td class='text-left'><?php echo html::select("closedBys[$storyID]", $users, $story->closedBy, "class='form-control" . ($story->status == 'closed' ? " chosen'" : "' disabled='disabled'"));?></td>
|
||||
|
||||
<?php if($story->status == 'closed'):?>
|
||||
@@ -103,7 +101,7 @@
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='11' class='text-center form-actions'>
|
||||
<td colspan='10' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo $this->app->tab == 'product' ? html::a($this->session->storyList, $lang->goback, '', "class='btn btn-back btn-wide'") : html::backButton();?>
|
||||
</td>
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
<?php include $this->app->getModuleRoot() . '/common/view/sortable.html.php';?>
|
||||
<?php js::set('toTaskList', !empty($task->id));?>
|
||||
<?php js::set('blockID', $blockID);?>
|
||||
<?php js::set('vision', $this->config->vision);?>
|
||||
<?php js::set('projectID', $projectID);?>
|
||||
<?php js::set('productID', $productID);?>
|
||||
<?php if(!empty($storyID)):?>
|
||||
<style> .title-group.required > .required:after {right: 110px;}</style>
|
||||
<?php endif;?>
|
||||
@@ -95,7 +98,7 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->task->story;?></th>
|
||||
<td colspan='3'>
|
||||
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->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"'));?></span>
|
||||
<span id='storyBox' class="<?php if(!empty($stories)) echo 'hidden';?> "><?php printf($lang->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"'));?></span>
|
||||
<div class='input-group <?php if(empty($stories)) echo "hidden";?>'>
|
||||
<?php echo html::select('story', array($task->story => empty($stories) ? '': $stories[$task->story]), $task->story, "class='form-control chosen' onchange='setStoryRelated();'");?>
|
||||
<span class='input-group-btn' id='preview'><a href='#' class='btn iframe'><?php echo $lang->preview;?></a></span>
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<?php $html = '<div class="divider"></div><button id="closeModal" type="button" class="btn btn-link" data-dismiss="modal"><i class="icon icon-close"></i></button>';?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
for(var index = 0; index <= 9; index++) $('#todoBatchAddForm').append(`<input type="hidden" name="vision[${index}]" id="vision[${index}]" value="lite">`);
|
||||
$('#mainContent .main-header .pull-right.btn-toolbar').append(<?php echo json_encode($html)?>);
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
<div class="modal fade" id="projectModal">
|
||||
<div class="modal-dialog mw-500px">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="icon icon-close"></i></button>
|
||||
<h4 class="modal-title"><?php echo $lang->project->select;?></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<?php if(empty($projects)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->project->noProject;?></span>
|
||||
<?php echo html::a("javascript:createProject()", "<i class='icon icon-plus'></i> " . $lang->project->create, '', "class='btn btn-info'");?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('projectToStory', $projects, '', "class='form-control chosen' onchange=getProgramByProject(this.value);");?>
|
||||
<span class='input-group-btn'><?php echo html::commonButton($lang->todo->reasonList['story'], "id='toStoryButtonByProject'", 'btn btn-primary');?></span>
|
||||
<?php echo html::hidden('projectProgram', 0);?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$("#projectModal modal-header modal-title").text("<?php echo $lang->project->select; ?>")
|
||||
|
||||
$('#toStoryLink').click(function()
|
||||
{
|
||||
$('#projectModal .modal-body .input-group .input-group-btn').addClass('hidden');
|
||||
$('#projectModal #toStoryButtonByProject').closest('.input-group-btn').removeClass('hidden');
|
||||
})
|
||||
|
||||
$('#toStoryButtonByProject').click(function()
|
||||
{
|
||||
var onlybody = config.onlybody == 'yes';
|
||||
var projectID = $('#projectToStory').val();
|
||||
var link = createLink('story', 'create', 'productID=0&branch=0&moduleID=0&storyID=0&projectID=' + projectID + '&bugID=0&planID=0&todoID=' + todoID, config.defaultView, onlybody);
|
||||
|
||||
if(!onlybody) window.parent.$.apps.open(link, 'project');
|
||||
if(onlybody) location.href = link;
|
||||
})
|
||||
|
||||
/**
|
||||
* Get programs by project id.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function getProgramByProject(projectID)
|
||||
{
|
||||
link = createLink('todo', 'ajaxGetProgramID', "projectID=" + projectID + '&type=project');
|
||||
$.post(link, function(data)
|
||||
{
|
||||
$('#projectProgram').val(data);
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Link to create project.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function createProject()
|
||||
{
|
||||
var onlybody = config.onlybody;
|
||||
config.onlybody = 'no';
|
||||
|
||||
var link = createLink('project', 'create');
|
||||
config.onlybody = onlybody;
|
||||
parent.location.href = link;
|
||||
}
|
||||
</script>
|
||||
@@ -36,9 +36,6 @@
|
||||
<tr>
|
||||
<td><?php echo html::a($executionLink, $execution->id);?></td>
|
||||
<td>
|
||||
<?php if(isset($config->maxVersion)):?>
|
||||
<span class='project-type-label label label-info label-outline'><?php echo zget($lang->user->executionTypeList, $execution->type);?></span>
|
||||
<?php endif;?>
|
||||
<?php echo html::a($executionLink, $execution->name);?>
|
||||
</td>
|
||||
<?php if(isset($execution->delay)):?>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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方法来避免这个错误。
|
||||
|
||||
@@ -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' ? '' : "<div style='float:$align; clear:none;' class='page'>{$this->lang->pager->noRecord}</div>";
|
||||
if($this->recTotal == 0) return $type == 'mobile' ? '' : "<div style='float:$align; clear:none;' class='page'>{$this->lang->pager->noRecord}</div>";
|
||||
|
||||
/* 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 .= "<input type='text' id='_pageID' value='$this->pageID' style='text-align:center;width:30px;' class='form-control' /> \n";
|
||||
$goToHtml .= "<input type='button' id='goto' value='{$this->lang->pager->locate}' onclick='submitPage(\"changePageID\");' class='btn'/>";
|
||||
return $goToHtml;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建链接。
|
||||
* Create link.
|
||||
*
|
||||
* @param string $title
|
||||
*
|
||||
* @param string $title
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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 @@
|
||||
<div class='col'>
|
||||
<div class='panel-content'>
|
||||
<div class='panel-heading not-move-handler'>
|
||||
<?php if($project->model === 'waterfall'): ?>
|
||||
<span class='project-type-label label label-warning label-outline'><?php echo $lang->project->waterfall; ?></span>
|
||||
<?php else: ?>
|
||||
<span class='project-type-label label label-info label-outline'><?php echo $lang->project->scrum; ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if($config->systemMode == 'new'):?>
|
||||
<?php $projectLabel = $project->model == 'waterfall' ? 'label-warning' : 'label-info';?>
|
||||
<span class="project-type-label label <?php echo $projectLabel;?> label-outline"><?php echo $lang->project->{$project->model};?></span>
|
||||
<?php endif;?>
|
||||
<strong class='project-name' title='<?php echo $project->name;?>'> <?php echo html::a($viewLink, $project->name);?> </strong>
|
||||
<nav class='panel-actions nav nav-default'>
|
||||
<li class='dropdown'>
|
||||
@@ -98,8 +97,8 @@
|
||||
<?php else: ?>
|
||||
<?php $project = empty($project->executions ) ? '' : end($project->executions);?>
|
||||
<div class='project-detail project-iteration'>
|
||||
<p class='text-muted'><?php echo $lang->project->lastIteration; ?></p>
|
||||
<?php if($project):?>
|
||||
<p class='text-muted'><?php echo $project->type == 'kanban' ? $lang->project->lastKanban : $lang->project->lastIteration;?></p>
|
||||
<div class='row'>
|
||||
<div class='col-xs-5 execution-name' title="<?php echo $project->name;?>"><?php echo html::a($this->createLink('execution', 'task', "executionID={$project->id}"), $project->name);?></div>
|
||||
<div class='col-xs-7'>
|
||||
|
||||
@@ -413,14 +413,14 @@ class bug extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$executionID = $this->post->execution ? $this->post->execution : $output['executionID'];
|
||||
$executionID = $this->post->execution ? $this->post->execution : zget($output, 'executionID', $this->session->execution);
|
||||
$location = $this->createLink('execution', 'bug', "executionID=$executionID");
|
||||
}
|
||||
|
||||
}
|
||||
elseif($this->app->tab == 'project')
|
||||
{
|
||||
$location = $this->createLink('project', 'bug', "projectID={$output['projectID']}");
|
||||
$location = $this->createLink('project', 'bug', "projectID=" . zget($output, 'projectID', $this->session->project));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2236,15 +2236,17 @@ class bug extends control
|
||||
* Ajax get project team members.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @param string $$selectedUser
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetProjectTeamMembers($projectID)
|
||||
public function ajaxGetProjectTeamMembers($projectID, $selectedUser = '')
|
||||
{
|
||||
$users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$teamMembers = empty($projectID) ? array() : $this->loadModel('project')->getTeamMemberPairs($projectID);
|
||||
foreach($teamMembers as $account => $member) $teamMembers[$account] = $users[$account];
|
||||
return print(html::select('assignedTo', $teamMembers, '', 'class="form-control"'));
|
||||
|
||||
return print(html::select('assignedTo', $teamMembers, $selectedUser, 'class="form-control"'));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,11 +29,7 @@ $(function()
|
||||
*/
|
||||
function loadAll(productID)
|
||||
{
|
||||
if(page == 'create')
|
||||
{
|
||||
loadExecutionTeamMembers(productID);
|
||||
setAssignedTo();
|
||||
}
|
||||
if(page == 'create') loadExecutionTeamMembers(productID, true);
|
||||
|
||||
if(typeof(changeProductConfirmed) != 'undefined' && !changeProductConfirmed)
|
||||
{
|
||||
@@ -485,7 +481,7 @@ function loadExecutionBuilds(executionID)
|
||||
*/
|
||||
function loadProjectTeamMembers(projectID)
|
||||
{
|
||||
link = createLink('bug', 'ajaxGetProjectTeamMembers', 'projectID=' + projectID);
|
||||
link = createLink('bug', 'ajaxGetProjectTeamMembers', 'projectID=' + projectID + '&selectedUser=' + $('#assignedTo').val());
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(!data) data = '<select id="assignedTo" name="assignedTo" class="form-control"></select>';
|
||||
|
||||
@@ -25,10 +25,11 @@ function loadAllUsers()
|
||||
* Load team members of the latest execution of a product as assignedTo list.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param bool $changeProduct
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadExecutionTeamMembers(productID)
|
||||
function loadExecutionTeamMembers(productID, changeProduct)
|
||||
{
|
||||
var link = createLink('bug', 'ajaxLoadExecutionTeamMembers', 'productID=' + productID + '&selectedUser=' + $('#assignedTo').val());
|
||||
$.post(link, function(data)
|
||||
@@ -36,6 +37,7 @@ function loadExecutionTeamMembers(productID)
|
||||
$('#assignedTo').replaceWith(data);
|
||||
$('#assignedTo_chosen').remove();
|
||||
$('#assignedTo').chosen();
|
||||
if(typeof(changeProduct) != undefined && changeProduct) setAssignedTo();
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ class bugModel extends model
|
||||
|
||||
/* Check repeat bug. */
|
||||
$result = $this->loadModel('common')->removeDuplicate('bug', $bug, "product={$bug->product}");
|
||||
if($result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
|
||||
if($result and $result['stop']) return array('status' => 'exists', 'id' => $result['duplicate']);
|
||||
|
||||
$bug = $this->loadModel('file')->processImgURL($bug, $this->config->bug->editor->create['id'], $this->post->uid);
|
||||
|
||||
@@ -542,7 +542,7 @@ class bugModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* getActiveBugs
|
||||
* Get active bugs.
|
||||
*
|
||||
* @param array $products
|
||||
* @param int $branch
|
||||
@@ -885,7 +885,6 @@ class bugModel extends model
|
||||
/* Update bugs. */
|
||||
foreach($activateBugs as $bugID => $bug)
|
||||
{
|
||||
$oldBug = $bugs[$bugID];
|
||||
$this->dao->update(TABLE_BUG)->data($bug, $skipFields = 'comment')->autoCheck()->where('id')->eq((int)$bugID)->exec();
|
||||
if(dao::isError()) return print(js::error('bug#' . $bugID . dao::getError(true)));
|
||||
|
||||
|
||||
@@ -124,7 +124,9 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
|
||||
<div class='input-group' id='buildBox'>
|
||||
<span class="input-group-addon"><?php echo $lang->bug->openedBuild?></span>
|
||||
<?php echo html::select('openedBuild[]', $builds, empty($buildID) ? '' : $buildID, "multiple=multiple class='chosen form-control'");?>
|
||||
<?php if(count($builds) < 2):?>
|
||||
<span class='input-group-addon fix-border' id='buildBoxActions'></span>
|
||||
<?php endif;?>
|
||||
<div class='input-group-btn'><?php echo html::commonButton($lang->bug->allBuilds, "class='btn' id='all' data-toggle='tooltip' onclick='loadAllBuilds()'")?></div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -507,7 +507,7 @@ $lang->admin->menuOrder[35] = 'dev';
|
||||
$lang->admin->menuOrder[40] = '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');
|
||||
$lang->admin->menu->message['subMenu']->browser = array('link' => "$lang->browser|message|browser");
|
||||
|
||||
@@ -243,6 +243,7 @@ class commonModel extends model
|
||||
$user->admin = false;
|
||||
$user->rights = $this->loadModel('user')->authorize('guest');
|
||||
$user->groups = array('group');
|
||||
$user->visions = $this->config->vision;
|
||||
if(!defined('IN_UPGRADE')) $user->view = $this->user->grantUserView($user->account, $user->rights['acls']);
|
||||
$this->session->set('user', $user);
|
||||
$this->app->user = $this->session->user;
|
||||
@@ -359,7 +360,7 @@ class commonModel extends model
|
||||
{
|
||||
echo js::locate($denyLink);
|
||||
}
|
||||
helper::end();
|
||||
die;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2205,6 +2206,8 @@ EOD;
|
||||
|
||||
if(isset($this->app->user))
|
||||
{
|
||||
if(in_array($module, $this->config->programPriv->waterfall) and $this->app->tab == 'project') return true;
|
||||
|
||||
$this->app->user = $this->session->user;
|
||||
if(!commonModel::hasPriv($module, $method)) $this->deny($module, $method);
|
||||
}
|
||||
@@ -2237,8 +2240,11 @@ EOD;
|
||||
if(!empty($app->user->admin) || strpos($app->company->admins, ",{$app->user->account},") !== false) return true;
|
||||
|
||||
/* If is the program admin, have all program privs. */
|
||||
$inProject = isset($lang->navGroup->$module) && $lang->navGroup->$module == 'project';
|
||||
if($inProject && $app->session->project && strpos(",{$app->user->rights['projects']},", ",{$app->session->project},") !== false) return true;
|
||||
if($app->config->vision != 'lite')
|
||||
{
|
||||
$inProject = isset($lang->navGroup->$module) && $lang->navGroup->$module == 'project';
|
||||
if($inProject && $app->session->project && strpos(",{$app->user->rights['projects']},", ",{$app->session->project},") !== false) return true;
|
||||
}
|
||||
|
||||
/* If not super admin, check the rights. */
|
||||
$rights = $app->user->rights['rights'];
|
||||
|
||||
@@ -98,7 +98,7 @@ $(function()
|
||||
<td class='w-150px'><?php echo $lang->datatable->showModule;?></td>
|
||||
<td><?php echo html::radio('showModule', $lang->datatable->showModuleList, isset($config->datatable->$datatableId->showModule) ? $config->datatable->$datatableId->showModule : '');?></td>
|
||||
</tr>
|
||||
<?php if($app->moduleName == 'execution' and $app->methodName == 'task'):?>
|
||||
<?php if($app->moduleName == 'execution' and $app->methodName == 'task' and $this->config->vision != 'lite'):?>
|
||||
<tr>
|
||||
<td><?php echo $lang->datatable->showAllModule;?></td>
|
||||
<td><?php echo html::radio('showAllModule', $lang->datatable->showAllModuleList, isset($config->execution->task->allModule) ? $config->execution->task->allModule : 0);?></td>
|
||||
|
||||
@@ -37,6 +37,7 @@ $config->company->browse->search['fields']['dept'] = $lang->user->dept;
|
||||
$config->company->browse->search['fields']['account'] = $lang->user->account;
|
||||
$config->company->browse->search['fields']['role'] = $lang->user->role;
|
||||
$config->company->browse->search['fields']['phone'] = $lang->user->phone;
|
||||
$config->company->browse->search['fields']['visions'] = $lang->user->visions;
|
||||
$config->company->browse->search['fields']['join'] = $lang->user->join;
|
||||
$config->company->browse->search['fields']['id'] = $lang->user->id;
|
||||
$config->company->browse->search['fields']['commiter'] = $lang->user->commiter;
|
||||
@@ -57,6 +58,7 @@ $config->company->browse->search['params']['account'] = array('operator' => 'in
|
||||
$config->company->browse->search['params']['role'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->user->roleList);
|
||||
$config->company->browse->search['params']['phone'] = array('operator' => 'include', 'control' => 'input', 'values' => '');
|
||||
$config->company->browse->search['params']['join'] = array('operator' => '=', 'control' => 'input', 'values' => '', 'class' => 'date');
|
||||
$config->company->browse->search['params']['visions'] = array('operator' => 'include', 'control' => 'select', 'values' => $lang->visionList);
|
||||
$config->company->browse->search['params']['id'] = array('operator' => '=', 'control' => 'input', 'values' => '');
|
||||
$config->company->browse->search['params']['commiter'] = array('operator' => 'include', 'control' => 'select', 'values' => '');
|
||||
$config->company->browse->search['params']['gender'] = array('operator' => '=', 'control' => 'select', 'values' => $lang->user->genderList);
|
||||
|
||||
@@ -204,8 +204,7 @@ class company extends control
|
||||
$pager = new pager($recTotal, $recPerPage = 50, $pageID = 1);
|
||||
|
||||
/* Append id for secend sort. */
|
||||
$order = $direction == 'next' ? 'date_desc' : 'date_asc';
|
||||
$sort = common::appendOrder($order);
|
||||
$orderBy = $direction == 'next' ? 'date_desc' : 'date_asc';
|
||||
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
$date = empty($date) ? '' : date('Y-m-d', $date);
|
||||
@@ -245,11 +244,11 @@ class company extends control
|
||||
if(!$productID) $productID = 'all';
|
||||
if(!$projectID) $projectID = 'all';
|
||||
if(!$executionID) $executionID = 'all';
|
||||
$actions = $this->action->getDynamic($account, $browseType, $sort, $pager, $productID, $projectID, $executionID, $date, $direction);
|
||||
$actions = $this->action->getDynamic($account, $browseType, $orderBy, $pager, $productID, $projectID, $executionID, $date, $direction);
|
||||
}
|
||||
else
|
||||
{
|
||||
$actions = $this->action->getDynamicBySearch($products, $projects, $executions, $queryID, $sort, $pager, $date, $direction);
|
||||
$actions = $this->action->getDynamicBySearch($products, $projects, $executions, $queryID, $orderBy, $pager, $date, $direction);
|
||||
}
|
||||
|
||||
/* Build search form. */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user