Merge remote-tracking branch 'origin/18.x' into 18.x+bi
This commit is contained in:
@@ -97,6 +97,9 @@ zentaoxx:
|
||||
cp -r xuanxuan/extension/xuan/* zentaoxx/extension/xuan/
|
||||
cp -r xuanxuan/www/* zentaoxx/www/
|
||||
cp -r $(XUAN_WEB_PATH) zentaoxx/www/data/xuanxuan/
|
||||
rm -rf zentaoxx/www/data/xuanxuan/web/node_modules zentaoxx/www/data/xuanxuan/web/*.json zentaoxx/www/data/xuanxuan/web/resources zentaoxx/www/data/xuanxuan/web/media/img zentaoxx/www/data/xuanxuan/web/assets/draft.dev.js
|
||||
find zentaoxx/www/data/xuanxuan/web/media/sound -not -name 'message.mp3' -type f -delete
|
||||
find zentaoxx/www/data/xuanxuan/web/lang -not -name 'zh-*.json' -not -name 'en.json' -type f -delete
|
||||
mv zentaoxx/db/ zentaoxx/db_bak
|
||||
mkdir zentaoxx/db/
|
||||
sed -i "s/datetime NOT NULL DEFAULT '0000-00-00 00:00:00'/datetime NULL/" zentaoxx/db_bak/*.sql
|
||||
@@ -109,7 +112,8 @@ zentaoxx:
|
||||
sed -i "/\$$this->dao->update(TABLE_IM_CHAT)->data(\$$chat)->where('gid')->eq(\$$chat->gid)/i foreach(array('dismissDate', 'mergedDate', 'archiveDate') as \$$nullable) if(isset(\$$chat->\$$nullable) && empty(\$$chat->\$$nullable)) \$$chat->\$$nullable = null;" zentaoxx/extension/xuan/im/model/chat.php
|
||||
sed -i -z "s/\$$account = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('account');\s*\$$this->setting->setItem(\"\$$account\./\$$account = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('account');\n\$$this->app->user->account = \$$account;\n\$$this->setting->setItem(\"\$$account\./" zentaoxx/extension/xuan/im/model/chat.php
|
||||
sed -i "s/owner=system\&module=chat\§ion=settings\&key=\$$account/owner=\$$account\&module=chat\§ion=clientSettings\&key=settings/g" zentaoxx/extension/xuan/im/control.php
|
||||
sed -i "s/system.chat.settings.\$$account/\$$account.system.chat.clientSettings.settings/g" zentaoxx/extension/xuan/im/control.php
|
||||
sed -i "s/system.chat.settings.\$$account/\$$account.chat.clientSettings.settings/g" zentaoxx/extension/xuan/im/control.php
|
||||
sed -i 's/\$$this->setting->setItem("\$$account/\$$this->app->user = (object)array("account" => \$$account); \$$this->setting->setItem("\$$account/' zentaoxx/extension/xuan/im/control.php
|
||||
sed -i "s/\$$super = \$$this->dao->select('admin')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('admin');/\$$account = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('account');\n\$$sysAdmins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$sysAdminArray = explode(',', \$$sysAdmins);\n\$$super = in_array(\$$account, \$$sysAdminArray) ? 'super' : '';/g" zentaoxx/extension/xuan/im/control.php
|
||||
sed -i "/foreach(\$$users as \$$user)/i \$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\$$adminArray = explode(',', \$$admins);" zentaoxx/extension/xuan/im/model/user.php
|
||||
sed -i "/if(\!isset(\$$user->signed)) \$$user->signed = 0;/a \$$user->admin = in_array(\$$user->account, \$$adminArray) ? 'super' : '';" zentaoxx/extension/xuan/im/model/user.php
|
||||
|
||||
@@ -44,7 +44,7 @@ class buildEntry extends entry
|
||||
$oldBuild = $this->loadModel('build')->getByID($buildID);
|
||||
|
||||
/* Set $_POST variables. */
|
||||
$fields = 'execution,product,name,builder,date,scmPath,filePath,desc';
|
||||
$fields = 'execution,product,branch,name,builder,date,scmPath,filePath,desc';
|
||||
$this->batchSetPost($fields, $oldBuild);
|
||||
|
||||
$control = $this->loadController('build', 'edit');
|
||||
|
||||
@@ -49,6 +49,7 @@ class buildsEntry extends entry
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
if(!$projectID) $projectID = $this->param('project', 0);
|
||||
if(!$projectID and isset($this->requestBody->project)) $projectID = $this->requestBody->project;
|
||||
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
if(!$project) return $this->sendError(404, 'Error project id');
|
||||
|
||||
@@ -70,7 +70,6 @@ class hostHeartbeatEntry extends baseEntry
|
||||
{
|
||||
foreach($vms as $vm)
|
||||
{
|
||||
$heartbeat = strtotime(substr($vm->heartbeat, 0, 19));
|
||||
$vmData = array(
|
||||
'vnc' => $vm->vncPortOnHost,
|
||||
'zap' => $vm->agentPortOnHost,
|
||||
@@ -79,11 +78,10 @@ class hostHeartbeatEntry extends baseEntry
|
||||
'ssh' => $vm->sshPortOnHost,
|
||||
'status' => $vm->status,
|
||||
'extranet' => $vm->ip,
|
||||
'heartbeat' => helper::now()
|
||||
);
|
||||
|
||||
|
||||
if(!$vm->sshPortOnHost) unset($vmData['ssh']);
|
||||
if($heartbeat > 0) $vmData['heartbeat'] = date("Y-m-d H:i:s", $heartbeat);
|
||||
|
||||
if($isPhysicsNode)
|
||||
{
|
||||
unset($vmData['extranet']);
|
||||
@@ -98,7 +96,7 @@ class hostHeartbeatEntry extends baseEntry
|
||||
$vmData['status'] = $vm->status = $node->status;
|
||||
$this->dao->update(TABLE_ZAHOST)->data($vmData)->where('mac')->eq($vm->macAddress)->exec();
|
||||
}
|
||||
|
||||
|
||||
if($vm->status == 'running' && !$isPhysicsNode)
|
||||
{
|
||||
if(!empty($node))
|
||||
|
||||
@@ -79,7 +79,7 @@ class storiesEntry extends entry
|
||||
$reviewer = $this->request('reviewer');
|
||||
if(empty($reviewer)) $this->setPost('needNotReview', 1);
|
||||
$this->setPost('product', $productID);
|
||||
$this->setPost('type', $this->param('type', 'story'));
|
||||
if($this->param('type')) $this->setPost('type', $this->param('type', 'story'));
|
||||
$this->setPost('status', $this->param('status', 'draft'));
|
||||
|
||||
$control = $this->loadController('story', 'create');
|
||||
|
||||
@@ -38,7 +38,11 @@ class userEntry extends entry
|
||||
if(!$data) return $this->send404(); // If no user, send 404.
|
||||
|
||||
$user = $data->data->user;
|
||||
unset($user->password);
|
||||
if($user)
|
||||
{
|
||||
$user->group = $this->loadModel('group')->getByAccount($user->account);
|
||||
unset($user->password);
|
||||
}
|
||||
|
||||
return $this->send(200, $user);
|
||||
}
|
||||
|
||||
@@ -34,9 +34,11 @@ class usersEntry extends entry
|
||||
|
||||
$users = $this->loadModel('company')->getUsers($this->param('browse', 'inside'), $type, 0, 0, $this->param('order', 'id_desc'), $pager);
|
||||
$result = array();
|
||||
$this->loadModel('group');
|
||||
foreach($users as $user)
|
||||
{
|
||||
$user = $this->filterFields($user, 'id,dept,account,realname,role,pinyin,email,' . $appendFields);
|
||||
$user->group = $this->group->getByAccount($user->account);
|
||||
$result[] = $this->format($user, 'locked:time');
|
||||
}
|
||||
|
||||
@@ -83,7 +85,11 @@ class usersEntry extends entry
|
||||
if(isset($data->result) and !isset($data->id)) return $this->sendError(400, $data->message);
|
||||
|
||||
$user = $this->loadModel('user')->getByID($data->id, 'id');
|
||||
unset($user->password);
|
||||
if($user)
|
||||
{
|
||||
$user->group = $this->loadModel('group')->getByAccount($user->account);
|
||||
unset($user->password);
|
||||
}
|
||||
|
||||
return $this->send(201, $this->format($user, 'last:time,locked:time'));
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"version": "8.0"
|
||||
},
|
||||
"zentaoext": {
|
||||
"gitVersion": "18.x",
|
||||
"gitVersion": "release-18.10",
|
||||
"gitRepo": "easycorp/zentaoext"
|
||||
},
|
||||
"zdoo": {
|
||||
@@ -15,6 +15,7 @@
|
||||
"gitVersion": "master"
|
||||
},
|
||||
"downgrade": {
|
||||
"gitVersion": "release-18.10",
|
||||
"gitRepo": "devops/zentaopms-downgrade"
|
||||
}
|
||||
},
|
||||
|
||||
+23
-23
@@ -261,16 +261,16 @@ CREATE TABLE `zt_approvalrole` (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
CREATE TABLE `zt_artifactrepo` (
|
||||
`id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(45) NOT NULL DEFAULT '',
|
||||
`products` varchar(255) NOT NULL DEFAULT '',
|
||||
`serverID` smallint(8) NOT NULL DEFAULT 0,
|
||||
`repoName` varchar(45) NOT NULL DEFAULT '',
|
||||
`format` varchar(10) NOT NULL DEFAULT '',
|
||||
`type` char(7) NOT NULL DEFAULT '',
|
||||
`status` varchar(10) NOT NULL DEFAULT '',
|
||||
`createdBy` varchar(30) NOT NULL DEFAULT '',
|
||||
`name` varchar(45) NOT NULL,
|
||||
`products` varchar(1000) NOT NULL,
|
||||
`serverID` smallint(8) NOT NULL,
|
||||
`repoName` varchar(45) NOT NULL,
|
||||
`format` varchar(10) NOT NULL,
|
||||
`type` char(7) NOT NULL,
|
||||
`status` varchar(10) NOT NULL,
|
||||
`createdBy` varchar(30) NOT NULL,
|
||||
`createdDate` datetime DEFAULT NULL,
|
||||
`editedBy` varchar(30) NOT NULL DEFAULT '',
|
||||
`editedBy` varchar(30) NOT NULL,
|
||||
`editedDate` datetime DEFAULT NULL,
|
||||
`deleted` tinyint(4) unsigned NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`)
|
||||
@@ -1625,23 +1625,23 @@ CREATE TABLE `zt_instance` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`space` mediumint(8) unsigned NOT NULL DEFAULT 0,
|
||||
`solution` mediumint(8) unsigned NOT NULL DEFAULT 0,
|
||||
`name` char(50) NOT NULL DEFAULT '',
|
||||
`name` char(50) DEFAULT '',
|
||||
`appID` mediumint(8) unsigned NOT NULL DEFAULT 0,
|
||||
`appName` char(50) NOT NULL DEFAULT '',
|
||||
`appVersion` char(20) NOT NULL DEFAULT '',
|
||||
`chart` char(50) NOT NULL DEFAULT '',
|
||||
`logo` varchar(255) NOT NULL DEFAULT '',
|
||||
`logo` varchar(255) DEFAULT '',
|
||||
`version` char(50) NOT NULL DEFAULT '',
|
||||
`desc` text DEFAULT NULL,
|
||||
`introduction` text DEFAULT NULL,
|
||||
`introduction` varchar(500) DEFAULT '',
|
||||
`source` char(20) NOT NULL DEFAULT '',
|
||||
`channel` char(20) NOT NULL DEFAULT '',
|
||||
`channel` char(20) DEFAULT '',
|
||||
`k8name` char(64) NOT NULL DEFAULT '',
|
||||
`status` char(20) NOT NULL DEFAULT '',
|
||||
`pinned` enum('0','1') NOT NULL DEFAULT '0',
|
||||
`domain` char(255) NOT NULL DEFAULT '',
|
||||
`smtpSnippetName` char(30) NOT NULL DEFAULT '',
|
||||
`ldapSnippetName` char(30) NOT NULL DEFAULT '',
|
||||
`smtpSnippetName` char(30) DEFAULT '',
|
||||
`ldapSnippetName` char(30) DEFAULT '',
|
||||
`ldapSettings` text DEFAULT NULL,
|
||||
`dbSettings` text DEFAULT NULL,
|
||||
`autoBackup` tinyint(1) NOT NULL DEFAULT 0,
|
||||
@@ -1649,7 +1649,7 @@ CREATE TABLE `zt_instance` (
|
||||
`autoRestore` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`env` text DEFAULT NULL,
|
||||
`createdBy` char(30) NOT NULL DEFAULT '',
|
||||
`createdAt` datetime DEFAULT NULL,
|
||||
`createdAt` datetime NOT NULL,
|
||||
`deleted` tinyint(1) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `space` (`space`),
|
||||
@@ -3208,14 +3208,14 @@ CREATE TABLE `zt_solution` (
|
||||
`chart` char(50) NOT NULL DEFAULT '',
|
||||
`cover` varchar(255) NOT NULL DEFAULT '',
|
||||
`desc` text DEFAULT NULL,
|
||||
`introduction` varchar(255) NOT NULL DEFAULT '',
|
||||
`source` char(20) NOT NULL DEFAULT '',
|
||||
`channel` char(20) NOT NULL DEFAULT '',
|
||||
`introduction` varchar(500) DEFAULT NULL,
|
||||
`source` char(20) NOT NULL,
|
||||
`channel` char(20) DEFAULT NULL,
|
||||
`components` text DEFAULT NULL,
|
||||
`status` char(20) NOT NULL DEFAULT '',
|
||||
`status` char(20) NOT NULL,
|
||||
`deleted` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`createdBy` char(30) NOT NULL DEFAULT '',
|
||||
`createdAt` datetime DEFAULT NULL,
|
||||
`createdBy` char(30) NOT NULL,
|
||||
`createdAt` datetime NOT NULL,
|
||||
`updatedDate` datetime DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -3240,7 +3240,7 @@ CREATE TABLE `zt_space` (
|
||||
`k8space` char(64) NOT NULL,
|
||||
`owner` char(30) NOT NULL,
|
||||
`default` tinyint(1) NOT NULL DEFAULT 0,
|
||||
`createdAt` datetime DEFAULT NULL,
|
||||
`createdAt` datetime NOT NULL,
|
||||
`deleted` tinyint(1) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `name` (`name`)
|
||||
|
||||
@@ -6,6 +6,73 @@ CREATE INDEX `metricID` ON zt_metriclib (metricID) USING BTREE;
|
||||
|
||||
ALTER TABLE `zt_feedback` ADD COLUMN `keywords` varchar(255) NOT NULL DEFAULT '';
|
||||
|
||||
-- Update createdBy to system in chart and pivot
|
||||
UPDATE `zt_chart` SET `createdBy` = 'system' WHERE `builtin` = '1';
|
||||
UPDATE `zt_pivot` SET `createdBy` = 'system' WHERE `id` >= 1000 and `id` <= 1027;
|
||||
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"topProgram\",\"name\":\"topProgram\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"storyDoneRate\",\"name\":\"storyDoneRate\",\"valOrAgg\":\"sum\"},{\"field\":\"bugSolvedRate\",\"name\":\"bugSolvedRate\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"topProgram\":{\"name\":\"topProgram\",\"object\":\"bug\",\"field\":\"topProgram\",\"type\":\"string\"},\"doneStory\":{\"name\":\"doneStory\",\"object\":\"bug\",\"field\":\"doneStory\",\"type\":\"number\"},\"allStory\":{\"name\":\"allStory\",\"object\":\"bug\",\"field\":\"allStory\",\"type\":\"number\"},\"storyDoneRate\":{\"name\":\"storyDoneRate\",\"object\":\"bug\",\"field\":\"storyDoneRate\",\"type\":\"number\"},\"solvedBug\":{\"name\":\"solvedBug\",\"object\":\"bug\",\"field\":\"solvedBug\",\"type\":\"number\"},\"allBug\":{\"name\":\"allBug\",\"object\":\"bug\",\"field\":\"allBug\",\"type\":\"number\"},\"bugSolvedRate\":{\"name\":\"bugSolvedRate\",\"object\":\"bug\",\"field\":\"bugSolvedRate\",\"type\":\"number\"}}', `filters` = '[]', `langs` = '{\"topProgram\":{\"zh-cn\":\"\\u4e00\\u7ea7\\u9879\\u76ee\\u96c6\",\"zh-tw\":\"\",\"en\":\"topProgram\",\"de\":\"\",\"fr\":\"\"},\"doneStory\":{\"zh-cn\":\"\\u5b8c\\u6210\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\",\"en\":\"doneStory\",\"de\":\"\",\"fr\":\"\"},\"allStory\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\",\"en\":\"allStory\",\"de\":\"\",\"fr\":\"\"},\"storyDoneRate\":{\"zh-cn\":\"\\u9700\\u6c42\\u5b8c\\u6210\\u7387\",\"zh-tw\":\"\",\"en\":\"storyDoneRate\",\"de\":\"\",\"fr\":\"\"},\"solvedBug\":{\"zh-cn\":\"\\u89e3\\u51b3bug\\u6570\",\"zh-tw\":\"\",\"en\":\"solvedBug\",\"de\":\"\",\"fr\":\"\"},\"allBug\":{\"zh-cn\":\"bug\\u6570\",\"zh-tw\":\"\",\"en\":\"allBug\",\"de\":\"\",\"fr\":\"\"},\"bugSolvedRate\":{\"zh-cn\":\"bug\\u4fee\\u590d\\u7387\",\"zh-tw\":\"\",\"en\":\"bugSolvedRate\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT\n t1.name AS topProgram,\n SUM(IFNULL(t3.doneStory,0)) as doneStory,\n SUM(IFNULL(t4.allStory,0)) as allStory,\n CONVERT(IF(SUM(IFNULL(t4.allStory,0)) <= 0, 0, SUM(IFNULL(t3.doneStory,0)) / SUM(IFNULL(t4.allStory,0))*100), decimal(10,2)) as storyDoneRate, \n SUM(IFNULL(t5.solvedBug,0)) as solvedBug,\n SUM(IFNULL(t6.allBug,0)) as allBug,\n CONVERT(IF(SUM(IFNULL(t6.allBug,0)) <= 0, 0, SUM(IFNULL(t5.solvedBug,0)) / SUM(IFNULL(t6.allBug,0))*100), decimal(10,2)) as bugSolvedRate\nFROM zt_project AS t1\nLEFT JOIN zt_product AS t2 ON t1.id = t2.program\nLEFT JOIN (SELECT COUNT(1) as doneStory, product FROM zt_story WHERE deleted = \'0\' AND closedReason = \'done\' AND status = \'closed\' GROUP BY product) AS t3 ON t2.id = t3.product\nLEFT JOIN (SELECT COUNT(1) as allStory, product FROM zt_story WHERE deleted = \'0\' AND ((closedReason = \'done\' AND status = \'closed\') OR status != \'closed\') GROUP BY product) AS t4 ON t2.id = t4.product\nLEFT JOIN (SELECT COUNT(1) as solvedBug, product FROM zt_bug WHERE deleted = \'0\' AND resolution = \'fixed\' AND status = \'closed\' GROUP BY product) AS t5 ON t2.id = t5.product\nLEFT JOIN (SELECT COUNT(1) as allBug, product FROM zt_bug WHERE deleted = \'0\' AND (resolution in (\'fixed\', \'postponed\') OR status = \'active\') GROUP BY product) AS t6 ON t2.id = t6.product\nWHERE t1.type = \'program\' AND t1.grade = 1 AND t1.deleted = \'0\'\nAND t2.deleted = \'0\'\nGROUP BY t1.name\nORDER BY t1.`order` DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1042;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"status\",\"name\":\"\\u72b6\\u6001\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"\\u9879\\u76eeID\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"\\u9879\\u76eeID\",\"object\":\"project\",\"field\":\"id\",\"type\":\"number\"},\"status\":{\"name\":\"\\u72b6\\u6001\",\"object\":\"project\",\"field\":\"status\",\"type\":\"option\"}}', `filters` = '[]', `langs` = '{\"id\":{\"zh-cn\":\"\\u9879\\u76eeID\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"status\":{\"zh-cn\":\"\\u72b6\\u6001\",\"zh-tw\":\"\",\"en\":\"status\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT id, CASE `status` WHEN \'wait\' then \'未开始\' WHEN \'doing\' THEN \'进行中\' WHEN \'suspended\' THEN \'已挂起\' ELSE \'已关闭\' END status FROM zt_project WHERE type = \'program\' AND grade = 1 AND deleted = \'0\'', `stage` = 'published', `builtin` = 0 WHERE `id` = 1043;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"status\",\"name\":\"\\u72b6\\u6001\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"\\u9879\\u76eeID\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"\\u9879\\u76eeID\",\"object\":\"project\",\"field\":\"id\",\"type\":\"number\"},\"status\":{\"name\":\"\\u72b6\\u6001\",\"object\":\"project\",\"field\":\"status\",\"type\":\"option\"}}', `filters` = '[]', `langs` = '{\"id\":{\"zh-cn\":\"\\u9879\\u76eeID\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"status\":{\"zh-cn\":\"\\u72b6\\u6001\",\"zh-tw\":\"\",\"en\":\"status\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT id, CASE `status` WHEN \'wait\' then \'未开始\' WHEN \'doing\' THEN \'进行中\' WHEN \'suspended\' THEN \'已挂起\' ELSE \'已关闭\' END status FROM zt_project WHERE type = \'project\' AND deleted = \'0\'', `stage` = 'published', `builtin` = 0 WHERE `id` = 1044;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"product\",\"name\":\"\\u6240\\u5c5e\\u4ea7\\u54c1\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"closedRate\",\"name\":\"closedRate\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"product\":{\"name\":\"\\u6240\\u5c5e\\u4ea7\\u54c1\",\"object\":\"story\",\"field\":\"product\",\"type\":\"string\"},\"program\":{\"name\":\"program\",\"object\":\"story\",\"field\":\"program\",\"type\":\"string\"},\"productLine\":{\"name\":\"productLine\",\"object\":\"story\",\"field\":\"productLine\",\"type\":\"string\"},\"closedStory\":{\"name\":\"\\u9700\\u6c42\\uff1a%s \\u5df2\\u5173\\u95ed\\uff0c\\u5c06\\u4e0d\\u4f1a\\u88ab\\u5173\\u95ed\\u3002\",\"object\":\"story\",\"field\":\"closedStory\",\"type\":\"string\"},\"totalStory\":{\"name\":\"totalStory\",\"object\":\"story\",\"field\":\"totalStory\",\"type\":\"string\"},\"closedRate\":{\"name\":\"closedRate\",\"object\":\"story\",\"field\":\"closedRate\",\"type\":\"number\"}}', `filters` = '[]', `langs` = '{\"product\":{\"zh-cn\":\"\\u6240\\u5c5e\\u4ea7\\u54c1\",\"zh-tw\":\"\",\"en\":\"product\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"productLine\":{\"zh-cn\":\"\\u4ea7\\u54c1\\u7ebf\",\"zh-tw\":\"\",\"en\":\"productLine\",\"de\":\"\",\"fr\":\"\"},\"closedStory\":{\"zh-cn\":\"\\u5b8c\\u6210\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\",\"en\":\"closedStory\",\"de\":\"\",\"fr\":\"\"},\"totalStory\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\",\"en\":\"totalStory\",\"de\":\"\",\"fr\":\"\"},\"closedRate\":{\"zh-cn\":\"\\u9700\\u6c42\\u5b8c\\u6210\\u7387\",\"zh-tw\":\"\",\"en\":\"closedRate\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT\n t1.name AS product,\n IFNULL(t2.name, \'/\') AS program, \n IFNULL(t3.name, \'/\') AS productLine, \n IFNULL(t4.story, 0) AS closedStory, \n t5.story AS totalStory, \n ROUND(IFNULL(t4.story, 0) / t5.story * 100, 2) AS closedRate \nFROM zt_product AS t1 \nLEFT JOIN zt_project AS t2 ON t1.program = t2.id AND t2.type = \'program\' AND t2.grade = 1 \nLEFT JOIN zt_module AS t3 ON t1.line = t3.id AND t3.type = \'line\' \nLEFT JOIN (SELECT product, COUNT(1) AS story FROM zt_story WHERE deleted = \'0\' AND closedReason = \'done\' GROUP BY product) AS t4 ON t1.id = t4.product \nLEFT JOIN (SELECT product, COUNT(1) AS story FROM zt_story WHERE deleted = \'0\' AND ( closedReason = \'done\' OR status != \'closed\') GROUP BY product) AS t5 ON t1.id = t5.product \nWHERE t1.deleted = \'0\' AND t1.status != \'closed\' AND t1.shadow = \'0\' AND t1.vision = \'rnd\' AND t5.story IS NOT NULL \nORDER BY t1.order DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1046;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"product\",\"name\":\"\\u6240\\u5c5e\\u4ea7\\u54c1\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"fixedRate\",\"name\":\"\\u4fee\\u590d\\u7387\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"product\":{\"name\":\"\\u6240\\u5c5e\\u4ea7\\u54c1\",\"object\":\"bug\",\"field\":\"product\",\"type\":\"string\"},\"program\":{\"name\":\"program\",\"object\":\"bug\",\"field\":\"program\",\"type\":\"string\"},\"productLine\":{\"name\":\"productLine\",\"object\":\"bug\",\"field\":\"productLine\",\"type\":\"string\"},\"fixedBug\":{\"name\":\"fixedBug\",\"object\":\"bug\",\"field\":\"fixedBug\",\"type\":\"string\"},\"totalBug\":{\"name\":\"totalBug\",\"object\":\"bug\",\"field\":\"totalBug\",\"type\":\"string\"},\"fixedRate\":{\"name\":\"\\u4fee\\u590d\\u7387\",\"object\":\"bug\",\"field\":\"fixedRate\",\"type\":\"number\"}}', `filters` = '[]', `langs` = '{\"product\":{\"zh-cn\":\"\\u6240\\u5c5e\\u4ea7\\u54c1\",\"zh-tw\":\"\",\"en\":\"product\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"productLine\":{\"zh-cn\":\"\\u4ea7\\u54c1\\u7ebf\",\"zh-tw\":\"\",\"en\":\"productLine\",\"de\":\"\",\"fr\":\"\"},\"fixedBug\":{\"zh-cn\":\"\\u4fee\\u590dbug\\u6570\",\"zh-tw\":\"\",\"en\":\"fixedBug\",\"de\":\"\",\"fr\":\"\"},\"totalBug\":{\"zh-cn\":\"bug\\u6570\",\"zh-tw\":\"\",\"en\":\"totalBug\",\"de\":\"\",\"fr\":\"\"},\"fixedRate\":{\"zh-cn\":\"bug\\u4fee\\u590d\\u7387\",\"zh-tw\":\"\",\"en\":\"fixedRate\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n t1.name AS product,\n IFNULL(t2.name, \'/\') AS program,\n IFNULL(t3.name, \'/\') AS productLine,\n IFNULL(t4.bug, 0) AS fixedBug,\n t5.bug AS totalBug,\n ROUND(IFNULL(t4.bug, 0) / t5.bug * 100, 2) AS fixedRate\nFROM zt_product AS t1\nLEFT JOIN zt_project AS t2 ON t1.program = t2.id AND t2.type = \'program\' AND t2.grade = 1\nLEFT JOIN zt_module AS t3 ON t1.line = t3.id AND t3.type = \'line\'\nLEFT JOIN (SELECT product, COUNT(1) AS bug FROM zt_bug WHERE deleted = \'0\' AND resolution = \'fixed\' AND status = \'closed\' GROUP BY product) AS t4 ON t1.id = t4.product\nLEFT JOIN (SELECT product, COUNT(1) AS bug FROM zt_bug WHERE deleted = \'0\' AND (resolution = \'fixed\' OR resolution = \'postponed\' OR status = \'active\') GROUP BY product) AS t5 ON t1.id = t5.product\nWHERE t1.deleted = \'0\' AND t1.status != \'closed\' AND t1.shadow = \'0\' AND t1.vision = \'rnd\' AND t5.bug IS NOT NULL\nORDER BY t1.order DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1047;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"deptName\",\"name\":\"deptName\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"count\",\"name\":\"count\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"deptName\":{\"name\":\"deptName\",\"object\":\"false\",\"field\":\"deptName\",\"type\":\"object\"},\"count\":{\"name\":\"count\",\"object\":\"false\",\"field\":\"count\",\"type\":\"object\"},\"deptOrder\":{\"name\":\"deptOrder\",\"object\":\"false\",\"field\":\"deptOrder\",\"type\":\"object\"}}', `filters` = '[]', `langs` = '{\"deptName\":{\"zh-cn\":\"\\u90e8\\u95e8\",\"zh-tw\":\"\",\"en\":\"deptName\",\"de\":\"\",\"fr\":\"\"},\"count\":{\"zh-cn\":\"\\u4eba\\u6570\",\"zh-tw\":\"\",\"en\":\"count\",\"de\":\"\",\"fr\":\"\"},\"deptOrder\":{\"zh-cn\":\"\\u987a\\u5e8f\",\"zh-tw\":\"\",\"en\":\"deptOrder\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT IF(t3.id IS NOT NULL, t3.`name`, \"空\") AS deptName,count(1) as count, \nIF(t3.id IS NOT NULL, t3.`order`, 9999) AS deptOrder \nFROM zt_user AS t1 \nLEFT JOIN zt_dept AS t2 ON t1.dept = t2.id\nLEFT JOIN zt_dept AS t3 ON FIND_IN_SET(TRIM(\',\' FROM t3.path), TRIM(\',\' FROM t2.path)) AND t3.grade = \'1\'\nWHERE t1.deleted = \'0\'\nGROUP BY deptName, deptOrder \nORDER BY deptOrder ASC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1049;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"role\",\"name\":\"\\u804c\\u4f4d\",\"group\":\"\"}],\"metric\":[{\"field\":\"account\",\"name\":\"\\u7528\\u6237\\u540d\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"account\":{\"name\":\"\\u7528\\u6237\\u540d\",\"object\":\"user\",\"field\":\"account\",\"type\":\"string\"},\"role\":{\"name\":\"\\u804c\\u4f4d\",\"object\":\"user\",\"field\":\"role\",\"type\":\"string\"}}', `filters` = '[]', `langs` = '{\"account\":{\"zh-cn\":\"\\u7528\\u6237\\u540d\",\"zh-tw\":\"\",\"en\":\"account\",\"de\":\"\",\"fr\":\"\"},\"role\":{\"zh-cn\":\"\\u804c\\u4f4d\",\"zh-tw\":\"\",\"en\":\"role\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT\n account,\nCASE\n ROLE \n WHEN \'dev\' THEN\n \"研发\" \n WHEN \'qa\' THEN\n \"测试\" \n WHEN \'pm\' THEN\n \"项目经理\" \n WHEN \'others\' THEN\n \"其他\" \n WHEN \'td\' THEN\n \"研发主管\" \n WHEN \'pd\' THEN\n \"产品主管\" \n WHEN \'po\' THEN\n \"产品经理\" \n WHEN \'qd\' THEN\n \"测试主管\" \n WHEN \'top\' THEN\n \"高层管理\" ELSE \"未知\" \n END role \nFROM\n zt_user \nWHERE\n deleted = \'0\'', `stage` = 'published', `builtin` = 0 WHERE `id` = 1050;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"joinDate\",\"name\":\"joinDate\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"count\",\"name\":\"count\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"count\":{\"name\":\"count\",\"object\":\"user\",\"field\":\"count\",\"type\":\"string\"},\"joinDate\":{\"name\":\"joinDate\",\"object\":\"user\",\"field\":\"joinDate\",\"type\":\"string\"}}', `filters` = '[]', `langs` = '{\"count\":{\"zh-cn\":\"\\u4eba\\u6570\",\"zh-tw\":\"\",\"en\":\"count\",\"de\":\"\",\"fr\":\"\"},\"joinDate\":{\"zh-cn\":\"\\u5de5\\u9f84\",\"zh-tw\":\"\",\"en\":\"joinDate\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT count(1) as count, \"0-1年\" as joinDate FROM zt_user WHERE deleted = \'0\' AND `join` > DATE_SUB(NOW(), INTERVAL 1 YEAR)\nunion\nSELECT count(1) as count, \"1-3年\" as joinDate FROM zt_user WHERE deleted = \'0\' AND `join` > DATE_SUB(NOW(), INTERVAL 3 YEAR) AND `join` <= DATE_SUB(NOW(), INTERVAL 1 YEAR)\nunion\nSELECT count(1) as count, \"3-5年\" as joinDate FROM zt_user WHERE deleted = \'0\' AND `join` > DATE_SUB(NOW(), INTERVAL 5 YEAR) AND `join` <= DATE_SUB(NOW(), INTERVAL 3 YEAR)\nunion\nSELECT count(1) as count, \"5-10年\" as joinDate FROM zt_user WHERE deleted = \'0\' AND `join` > DATE_SUB(NOW(), INTERVAL 10 YEAR) AND `join` <= DATE_SUB(NOW(), INTERVAL 5 YEAR)\nunion\nSELECT count(1) as count, \"10年以上\" as joinDate FROM zt_user WHERE deleted = \'0\' AND `join` < DATE_SUB(NOW(), INTERVAL 10 YEAR) AND LEFT(`join`, 4) != \'0000\'\nunion \nSELECT count(1) as count, \"未知\" as joinDate FROM zt_user WHERE deleted = \'0\' AND LEFT(`join`, 4) = \'0000\'', `stage` = 'published', `builtin` = 0 WHERE `id` = 1051;
|
||||
|
||||
-- 年度进行中项目过程大屏
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"status\",\"name\":\"\\u72b6\\u6001\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"id\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"name\":{\"name\":\"name\",\"object\":\"zt_project\",\"field\":\"name\",\"type\":\"string\"},\"status\":{\"name\":\"\\u72b6\\u6001\",\"object\":\"project\",\"field\":\"status\",\"type\":\"option\"},\"prograss\":{\"name\":\"prograss\",\"object\":\"task\",\"field\":\"prograss\",\"type\":\"number\"},\"planPrograss\":{\"name\":\"planPrograss\",\"object\":\"task\",\"field\":\"planPrograss\",\"type\":\"number\"},\"endYear\":{\"name\":\"endYear\",\"object\":\"task\",\"field\":\"endYear\",\"type\":\"string\"}}', `langs` = '{\"id\":{\"zh-cn\":\"\\u9879\\u76eeID\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"name\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"name\",\"de\":\"\",\"fr\":\"\"},\"status\":{\"zh-cn\":\"\\u72b6\\u6001\",\"zh-tw\":\"\",\"en\":\"status\",\"de\":\"\",\"fr\":\"\"},\"prograss\":{\"zh-cn\":\"\\u9879\\u76ee\\u8fdb\\u5ea6\",\"zh-tw\":\"\",\"en\":\"prograss\",\"de\":\"\",\"fr\":\"\"},\"planPrograss\":{\"zh-cn\":\"\\u8ba1\\u5212\\u8fdb\\u5ea6\",\"zh-tw\":\"\",\"en\":\"planPrograss\",\"de\":\"\",\"fr\":\"\"},\"endYear\":{\"zh-cn\":\"\\u7ed3\\u675f\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"endYear\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT t1.id, t1.name, \nIF(\n DATEDIFF(t1.`end`, NOW()) < 0, \n \"延期\", \n (IF(\n (IFNULL(prograss, 0) >= (DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100) AND LEFT(t1.`end`, 4) != \'2059\') \n OR LEFT(t1.`end`, 4) = \'2059\' ,\n \"顺利\",\n \"滞后\"\n ))) AS \'status\',\nIFNULL(prograss, 0) AS prograss, ROUND(DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100, 2) AS planPrograss,LEFT(t1.`end`, 4) AS endYear\nFROM zt_project AS t1\nLEFT JOIN (\n SELECT t22.project,\n ROUND(IF(SUM(t22.consumed) + SUM(IF(t22.status != \'closed\' && t22.status != \'cancel\', t22.`left`, 0)) > 0, SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != \'closed\' && t22.status != \'cancel\', t22.`left`, 0))), 0) * 100, 2) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = \'0\' AND t21.type IN (\'sprint\', \'kanban\')\n AND t22.deleted = \'0\' AND t22.parent < 1\n GROUP BY t22.project\n UNION\n SELECT t.project, ROUND(SUM(t.prograss * (t.percent / 100)), 2) as prograss\n FROM (\n SELECT t21.id,t21.percent, t22.project,\n IF(SUM(t22.consumed) + SUM(IF(t22.status != \'closed\' && t22.status != \'cancel\', t22.`left`, 0)) > 0, ROUND(SUM(t22.consumed) / (SUM(t22.consumed) + SUM(IF(t22.status != \'closed\' && t22.status != \'cancel\', t22.`left`, 0))) * 1000 / 1000 * 100, 2), 0) AS prograss\n FROM zt_project AS t21\n LEFT JOIN zt_task AS t22 ON t21.id = t22.execution\n WHERE t21.deleted = \'0\' AND t21.type = \'stage\'\n AND t22.deleted = \'0\' AND t22.parent < 1\n AND t22.id IS NOT NULL\n GROUP BY t21.id, t21.percent, t22.project\n ) t\n GROUP BY t.project\n) AS t2 ON t1.id = t2.project \nWHERE t1.deleted = \'0\'\nAND t1.status = \'doing\' \nAND t1.type = \'project\'', `stage` = 'published', `builtin` = 0 WHERE `id` = 10114;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"status\",\"name\":\"\\u72b6\\u6001\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"\\u9879\\u76eeID\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"\\u9879\\u76eeID\",\"object\":\"project\",\"field\":\"id\",\"type\":\"number\"},\"name\":{\"name\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"object\":\"project\",\"field\":\"name\",\"type\":\"string\"},\"status\":{\"name\":\"\\u72b6\\u6001\",\"object\":\"project\",\"field\":\"status\",\"type\":\"option\"},\"prograss\":{\"name\":\"prograss\",\"object\":\"task\",\"field\":\"prograss\",\"type\":\"number\"},\"planPrograss\":{\"name\":\"planPrograss\",\"object\":\"task\",\"field\":\"planPrograss\",\"type\":\"number\"},\"end\":{\"name\":\"\\u8ba1\\u5212\\u5b8c\\u6210\",\"object\":\"project\",\"field\":\"end\",\"type\":\"date\"}}', `langs` = '{\"id\":{\"zh-cn\":\"\\u9879\\u76eeID\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"name\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"name\",\"de\":\"\",\"fr\":\"\"},\"status\":{\"zh-cn\":\"\\u72b6\\u6001\",\"zh-tw\":\"\",\"en\":\"status\",\"de\":\"\",\"fr\":\"\"},\"prograss\":{\"zh-cn\":\"\\u9879\\u76ee\\u8fdb\\u5ea6\",\"zh-tw\":\"\",\"en\":\"prograss\",\"de\":\"\",\"fr\":\"\"},\"planPrograss\":{\"zh-cn\":\"\\u8ba1\\u5212\\u8fdb\\u5ea6\",\"zh-tw\":\"\",\"en\":\"planPrograss\",\"de\":\"\",\"fr\":\"\"},\"end\":{\"zh-cn\":\"\\u8ba1\\u5212\\u5b8c\\u6210\",\"zh-tw\":\"\",\"en\":\"end\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT id, name,IF(\n DATEDIFF(`end`, NOW()) < 0,\n \"延期\",\n (IF(\n prograss >= planPrograss,\n \"顺利\",\n \"滞后\"\n ))\n) AS status,\nprograss, planPrograss, `end`\nFROM (\nSELECT t1.id,t1.name,ROUND(DATEDIFF(NOW(), t1.`begin`) / DATEDIFF(t1.`end`, t1.`begin`) * 100, 2) AS planPrograss,t1.`end`,\nROUND(IF(SUM(t2.consumed) + SUM(IF(t2.status != \'closed\' && t2.status != \'cancel\', t2.`left`, 0)) > 0, SUM(t2.consumed) / (SUM(t2.consumed) + SUM(IF(t2.status != \'closed\' && t2.status != \'cancel\', t2.`left`, 0))), 0) * 100, 2) AS prograss\nFROM zt_project AS t1\nLEFT JOIN zt_task AS t2 ON t1.id = t2.execution\nWHERE t1.deleted = \'0\' AND t1.type IN (\'sprint\', \'stage\', \'kanban\') AND t1.status = \'doing\' AND t1.multiple = \'1\'\nAND ((t2.deleted = \'0\' AND t2.parent < 1) OR t2.id IS NULL)\nGROUP BY t1.id\n) AS t', `stage` = 'published', `builtin` = 0 WHERE `id` = 10115;
|
||||
|
||||
-- 年度汇总数据大屏
|
||||
UPDATE `zt_chart` SET `type` = 'line', `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"month\",\"name\":\"month\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newStory\",\"name\":\"\\u7ee7\\u7eed\\u6dfb\\u52a0\\u7814\\u53d1\\u9700\\u6c42\",\"valOrAgg\":\"sum\"},{\"field\":\"closedStory\",\"name\":\"\\u9700\\u6c42\\uff1a%s \\u5df2\\u5173\\u95ed\\uff0c\\u5c06\\u4e0d\\u4f1a\\u88ab\\u5173\\u95ed\\u3002\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"story\",\"field\":\"month\",\"type\":\"string\"},\"newStory\":{\"name\":\"\\u7ee7\\u7eed\\u6dfb\\u52a0\\u7814\\u53d1\\u9700\\u6c42\",\"object\":\"story\",\"field\":\"newStory\",\"type\":\"string\"},\"closedStory\":{\"name\":\"\\u9700\\u6c42\\uff1a%s \\u5df2\\u5173\\u95ed\\uff0c\\u5c06\\u4e0d\\u4f1a\\u88ab\\u5173\\u95ed\\u3002\",\"object\":\"story\",\"field\":\"closedStory\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u5ea6\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u5ea6\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u5ea6\",\"zh-tw\":\"\",\"en\":\"month\",\"de\":\"\",\"fr\":\"\"},\"newStory\":{\"zh-cn\":\"\\u65b0\\u589e\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\",\"en\":\"newStory\",\"de\":\"\",\"fr\":\"\"},\"closedStory\":{\"zh-cn\":\"\\u5b8c\\u6210\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\",\"en\":\"closedStory\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.story, 0) AS newStory, IFNULL(t3.story, 0) AS closedStory\nFROM (SELECT DISTINCT Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS story FROM zt_story WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS story FROM zt_story WHERE deleted = \'0\' AND closedReason = \'done\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', `stage` = 'published', `builtin` = 0 WHERE `id` = 1077;
|
||||
UPDATE `zt_chart` SET `type` = 'line', `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"month\",\"name\":\"month\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newBug\",\"name\":\"newBug\",\"valOrAgg\":\"sum\"},{\"field\":\"fixedBug\",\"name\":\"fixedBug\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"bug\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"bug\",\"field\":\"month\",\"type\":\"string\"},\"newBug\":{\"name\":\"newBug\",\"object\":\"bug\",\"field\":\"newBug\",\"type\":\"string\"},\"fixedBug\":{\"name\":\"fixedBug\",\"object\":\"bug\",\"field\":\"fixedBug\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u5ea6\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u5ea6\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"month\",\"de\":\"\",\"fr\":\"\"},\"newBug\":{\"zh-cn\":\"\\u65b0\\u589eBug\\u6570\",\"zh-tw\":\"\",\"en\":\"newBug\",\"de\":\"\",\"fr\":\"\"},\"fixedBug\":{\"zh-cn\":\"\\u89e3\\u51b3Bug\\u6570\",\"zh-tw\":\"\",\"en\":\"fixedBug\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.bug, 0) AS newBug, IFNULL(t3.bug, 0) AS fixedBug\nFROM (SELECT DISTINCT Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS bug FROM zt_bug WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS bug FROM zt_bug WHERE deleted = \'0\' AND resolution = \'fixed\' AND status = \'closed\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', `stage` = 'published', `builtin` = 0 WHERE `id` = 1078;
|
||||
UPDATE `zt_chart` SET `type` = 'line', `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"month\",\"name\":\"month\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newTask\",\"name\":\"newTask\",\"valOrAgg\":\"sum\"},{\"field\":\"closedTask\",\"name\":\"closedTask\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"task\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"task\",\"field\":\"month\",\"type\":\"string\"},\"newTask\":{\"name\":\"newTask\",\"object\":\"task\",\"field\":\"newTask\",\"type\":\"string\"},\"closedTask\":{\"name\":\"closedTask\",\"object\":\"task\",\"field\":\"closedTask\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"month\",\"de\":\"\",\"fr\":\"\"},\"newTask\":{\"zh-cn\":\"\\u65b0\\u589e\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\",\"en\":\"newTask\",\"de\":\"\",\"fr\":\"\"},\"closedTask\":{\"zh-cn\":\"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\",\"en\":\"closedTask\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.task, 0) AS newTask, IFNULL(t3.task, 0) AS closedTask\nFROM (SELECT DISTINCT Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS task FROM zt_task WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS task FROM zt_task WHERE deleted = \'0\' AND status = \'closed\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', `stage` = 'published', `builtin` = 0 WHERE `id` = 1079;
|
||||
UPDATE `zt_chart` SET `type` = 'line', `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"month\",\"name\":\"month\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newProject\",\"name\":\"newProject\",\"valOrAgg\":\"sum\"},{\"field\":\"closedProject\",\"name\":\"\\u5df2\\u5173\\u95ed\\u7684\\u9879\\u76ee\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"project\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"project\",\"field\":\"month\",\"type\":\"string\"},\"newProject\":{\"name\":\"newProject\",\"object\":\"project\",\"field\":\"newProject\",\"type\":\"string\"},\"closedProject\":{\"name\":\"\\u5df2\\u5173\\u95ed\\u7684\\u9879\\u76ee\",\"object\":\"project\",\"field\":\"closedProject\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"month\",\"de\":\"\",\"fr\":\"\"},\"newProject\":{\"zh-cn\":\"\\u65b0\\u589e\\u9879\\u76ee\\u6570\",\"zh-tw\":\"\",\"en\":\"newProject\",\"de\":\"\",\"fr\":\"\"},\"closedProject\":{\"zh-cn\":\"\\u5b8c\\u6210\\u9879\\u76ee\\u6570\",\"zh-tw\":\"\",\"en\":\"closedProject\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.project, 0) AS newProject, IFNULL(t3.project, 0) AS closedProject\nFROM (SELECT DISTINCT Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS project FROM zt_project WHERE deleted = \'0\' AND type = \'project\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS project FROM zt_project WHERE deleted = \'0\' AND type = \'project\' AND status = \'closed\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', `stage` = 'published', `builtin` = 0 WHERE `id` = 1080;
|
||||
UPDATE `zt_chart` SET `type` = 'line', `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"month\",\"name\":\"month\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newExecution\",\"name\":\"newExecution\",\"valOrAgg\":\"sum\"},{\"field\":\"closedExecution\",\"name\":\"closedExecution\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"project\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"project\",\"field\":\"month\",\"type\":\"string\"},\"newExecution\":{\"name\":\"newExecution\",\"object\":\"project\",\"field\":\"newExecution\",\"type\":\"string\"},\"closedExecution\":{\"name\":\"closedExecution\",\"object\":\"project\",\"field\":\"closedExecution\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"month\",\"de\":\"\",\"fr\":\"\"},\"newExecution\":{\"zh-cn\":\"\\u65b0\\u589e\\u6267\\u884c\\u6570\",\"zh-tw\":\"\",\"en\":\"newExecution\",\"de\":\"\",\"fr\":\"\"},\"closedExecution\":{\"zh-cn\":\"\\u5b8c\\u6210\\u6267\\u884c\\u6570\",\"zh-tw\":\"\",\"en\":\"closedExecution\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.execution, 0) AS newExecution, IFNULL(t3.execution, 0) AS closedExecution\nFROM (SELECT DISTINCT YEAR(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = \'0\' AND type IN (\'sprint\', \'stage\', \'kanban\') AND multiple = \'1\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = \'0\' AND type IN (\'sprint\', \'stage\', \'kanban\') AND status = \'closed\' AND multiple = \'1\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month', `stage` = 'published', `builtin` = 0 WHERE `id` = 1081;
|
||||
UPDATE `zt_chart` SET `type` = 'line', `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"month\",\"name\":\"month\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"release\",\"name\":\"release\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"release\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"release\",\"field\":\"month\",\"type\":\"string\"},\"release\":{\"name\":\"release\",\"object\":\"release\",\"field\":\"release\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"month\",\"de\":\"\",\"fr\":\"\"},\"release\":{\"zh-cn\":\"\\u53d1\\u5e03\\u6b21\\u6570\",\"zh-tw\":\"\",\"en\":\"release\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.release, 0) AS `release`\nFROM (SELECT DISTINCT Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(createdDate) AS `year`, MONTH(createdDate) AS `month`, COUNT(1) AS `release` FROM zt_release WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nORDER BY `year`, t1.month', `stage` = 'published', `builtin` = 0 WHERE `id` = 1082;
|
||||
|
||||
-- 年度完成项目过程数据大屏
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"name\",\"name\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"daterate\",\"name\":\"daterate\",\"valOrAgg\":\"max\"}]}]', `fields` = '{\"name\":{\"name\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"object\":\"project\",\"field\":\"name\",\"type\":\"string\"},\"closedDate\":{\"name\":\"\\u5173\\u95ed\\u65e5\\u671f\",\"object\":\"project\",\"field\":\"closedDate\",\"type\":\"date\"},\"daterate\":{\"name\":\"daterate\",\"object\":\"project\",\"field\":\"daterate\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"closedDate\",\"type\":\"date\",\"name\":\"\\u5173\\u95ed\\u65e5\\u671f\",\"default\":{\"begin\":\"\",\"end\":\"\"}}]', `langs` = '{\"name\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"name\",\"de\":\"\",\"fr\":\"\"},\"closedDate\":{\"zh-cn\":\"\\u5173\\u95ed\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"closedDate\",\"de\":\"\",\"fr\":\"\"},\"daterate\":{\"zh-cn\":\"\\u5de5\\u671f\\u504f\\u5dee\\u7387\",\"zh-tw\":\"\",\"en\":\"daterate\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select\nt1.name,\nt1.closedDate,\nround(t1.realduration-t1.planduration)/t1.planduration as daterate\nfrom(\nselect\nname,\nid,\nclosedDate,\nbegin,\nend,\ndatediff(`end`,`begin`) planduration,\nrealBegan,\nrealEnd,\nifnull(if(left(realEnd,4) != \'0000\',datediff(`realEnd`,`realBegan`),datediff(`closedDate`,`realBegan`)),0) realduration\nfrom\nzt_project\nwhere deleted=\'0\'\nand status=\'closed\'\nand type=\'project\'\n) t1', `stage` = 'published', `builtin` = 0 WHERE `id` = 10018;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"completeStatus\",\"name\":\"completeStatus\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"\\u9879\\u76eeID\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"\\u9879\\u76eeID\",\"object\":\"project\",\"field\":\"id\",\"type\":\"number\"},\"completeStatus\":{\"name\":\"completeStatus\",\"object\":\"project\",\"field\":\"completeStatus\",\"type\":\"string\"},\"closedDate\":{\"name\":\"\\u5173\\u95ed\\u65e5\\u671f\",\"object\":\"project\",\"field\":\"closedDate\",\"type\":\"date\"}}', `filters` = '[{\"field\":\"closedDate\",\"type\":\"date\",\"name\":\"\\u5173\\u95ed\\u65e5\\u671f\",\"default\":{\"begin\":\"\",\"end\":\"\"}}]', `langs` = '{\"id\":{\"zh-cn\":\"\\u9879\\u76eeID\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"completeStatus\":{\"zh-cn\":\"\\u9879\\u76ee\\u5b8c\\u6210\\u60c5\\u51b5\",\"zh-tw\":\"\",\"en\":\"completeStatus\",\"de\":\"\",\"fr\":\"\"},\"closedDate\":{\"zh-cn\":\"\\u5173\\u95ed\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"closedDate\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select\nt1.id,\n(case when t1.realEnd<t1.end then \"提前完成项目\" when t1.realEnd=t1.end then \"正常完成项目\" else \"延期完成项目\" end) \"completeStatus\",\nt1.closedDate\nfrom(\nselect\nid,\nclosedDate,\nend,\nif(left(realEnd, 4) = \'0000\', closedDate, realEnd) as realEnd\nfrom\nzt_project\nwhere deleted=\'0\'\nand status=\'closed\'\nand type=\'project\') t1', `stage` = 'published', `builtin` = 0 WHERE `id` = 10020;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"completeStatus\",\"name\":\"completeStatus\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"\\u9879\\u76eeID\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"\\u9879\\u76eeID\",\"object\":\"project\",\"field\":\"id\",\"type\":\"number\"},\"completeStatus\":{\"name\":\"completeStatus\",\"object\":\"project\",\"field\":\"completeStatus\",\"type\":\"string\"},\"closedDate\":{\"name\":\"\\u5173\\u95ed\\u65e5\\u671f\",\"object\":\"project\",\"field\":\"closedDate\",\"type\":\"date\"}}', `filters` = '[{\"field\":\"closedDate\",\"type\":\"date\",\"name\":\"\\u5173\\u95ed\\u65e5\\u671f\",\"default\":{\"begin\":\"\",\"end\":\"\"}}]', `langs` = '{\"id\":{\"zh-cn\":\"\\u6267\\u884cID\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"completeStatus\":{\"zh-cn\":\"\\u5b8c\\u6210\\u60c5\\u51b5\",\"zh-tw\":\"\",\"en\":\"completeStatus\",\"de\":\"\",\"fr\":\"\"},\"closedDate\":{\"zh-cn\":\"\\u5173\\u95ed\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select\nt1.id,\n(case when t1.realEnd<t1.end then \"提前完成执行\" when t1.realEnd=t1.end then \"正常完成执行\" else \"延期完成执行\" end) \"completeStatus\",\nt1.closedDate\nfrom(\nselect\nid,\nclosedDate,\nend,\nif(left(realEnd, 4) = \'0000\', closedDate, realEnd) as realEnd\nfrom\nzt_project\nwhere deleted=\'0\'\nand status=\'closed\'\nand type=\'sprint\') t1', `stage` = 'published', `builtin` = 0 WHERE `id` = 10021;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"name\",\"name\":\"\\u4efb\\u52a1\\u540d\\u79f0\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"rate\",\"name\":\"rate\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"name\":{\"name\":\"\\u4efb\\u52a1\\u540d\\u79f0\",\"object\":\"project\",\"field\":\"name\",\"type\":\"string\"},\"id\":{\"name\":\"\\u7f16\\u53f7\",\"object\":\"project\",\"field\":\"id\",\"type\":\"number\"},\"closedDate\":{\"name\":\"\\u5173\\u95ed\\u65f6\\u95f4\",\"object\":\"task\",\"field\":\"closedDate\",\"type\":\"date\"},\"estimate\":{\"name\":\"\\u6700\\u521d\\u9884\\u8ba1\",\"object\":\"task\",\"field\":\"estimate\",\"type\":\"string\"},\"consumed\":{\"name\":\"\\u603b\\u8ba1\\u6d88\\u8017\",\"object\":\"task\",\"field\":\"consumed\",\"type\":\"string\"},\"left\":{\"name\":\"\\u9884\\u8ba1\\u5269\\u4f59\",\"object\":\"task\",\"field\":\"left\",\"type\":\"string\"},\"deviation\":{\"name\":\"deviation\",\"object\":\"task\",\"field\":\"deviation\",\"type\":\"number\"},\"rate\":{\"name\":\"rate\",\"object\":\"task\",\"field\":\"rate\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"closedDate\",\"type\":\"date\",\"name\":\"\\u5173\\u95ed\\u65f6\\u95f4\",\"default\":{\"begin\":\"\",\"end\":\"\"}}]', `langs` = '{\"name\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"name\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"closedDate\":{\"zh-cn\":\"\\u5173\\u95ed\\u65f6\\u95f4\",\"zh-tw\":\"\",\"en\":\"closedDate\",\"de\":\"\",\"fr\":\"\"},\"estimate\":{\"zh-cn\":\"\\u6700\\u521d\\u9884\\u8ba1\",\"zh-tw\":\"\",\"en\":\"estimate\",\"de\":\"\",\"fr\":\"\"},\"consumed\":{\"zh-cn\":\"\\u603b\\u8ba1\\u6d88\\u8017\",\"zh-tw\":\"\",\"en\":\"consumed\",\"de\":\"\",\"fr\":\"\"},\"left\":{\"zh-cn\":\"\\u9884\\u8ba1\\u5269\\u4f59\",\"zh-tw\":\"\",\"en\":\"left\",\"de\":\"\",\"fr\":\"\"},\"deviation\":{\"zh-cn\":\"\\u504f\\u5dee\",\"zh-tw\":\"\",\"en\":\"deviation\",\"de\":\"\",\"fr\":\"\"},\"rate\":{\"zh-cn\":\"\\u504f\\u5dee\\u6bd4\\u7387\",\"zh-tw\":\"\",\"en\":\"rate\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select\n*,\nround(tt.deviation/tt.estimate,3) rate\nfrom(\nselect\nt1.name,\nt1.id,\nt1.closedDate,\nt2.estimate estimate,\nt2.consumed consumed,\nt2.`left`,\nt2.consumed-t2.estimate deviation\nfrom\nzt_project t1\nleft join\n(select\nproject,\nsum(estimate) estimate,\nsum(consumed) consumed,\nsum(`left`) `left`\nfrom\nzt_task\ngroup by project) t2\non t1.id=t2.project\nwhere t1.deleted=\'0\'\nand t1.status=\'closed\'\nand t1.type=\'project\') tt', `stage` = 'published', `builtin` = 0 WHERE `id` = 10022;
|
||||
|
||||
-- 公司质量数据盘点大屏
|
||||
UPDATE `zt_chart` SET `type` = 'line', `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"year\",\"name\":\"year\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"effectiveBugRate\",\"name\":\"effectiveBugRate\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"bug\",\"field\":\"year\",\"type\":\"string\"},\"totalBugCount\":{\"name\":\"totalBugCount\",\"object\":\"bug\",\"field\":\"totalBugCount\",\"type\":\"string\"},\"effectiveBugCount\":{\"name\":\"effectiveBugCount\",\"object\":\"bug\",\"field\":\"effectiveBugCount\",\"type\":\"number\"},\"effectiveBugRate\":{\"name\":\"effectiveBugRate\",\"object\":\"bug\",\"field\":\"effectiveBugRate\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"Year\",\"de\":\"\",\"fr\":\"\"},\"totalBugCount\":{\"zh-cn\":\"Bug\\u603b\\u6570\",\"zh-tw\":\"\",\"en\":\"Total Bug Count\",\"de\":\"\",\"fr\":\"\"},\"effectiveBugCount\":{\"zh-cn\":\"\\u6709\\u6548Bug\\u6570\",\"zh-tw\":\"\",\"en\":\"Effective Bug Count\",\"de\":\"\",\"fr\":\"\"},\"effectiveBugRate\":{\"zh-cn\":\"\\u6709\\u6548Bug\\u7387\",\"zh-tw\":\"\",\"en\":\"Effective Bug Rate\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select\nyear,\ncount(a.id) as totalBugCount,\nsum(a.effectivebug) as effectiveBugCount,\nsum(a.effectivebug)/count(a.id) effectiveBugRate\nfrom(\nselect \nleft(openedDate,4) year,\nid,\n(case when resolution in (\'fixed\',\'postponed\') or status=\'active\' then 1 else 0 end) effectivebug,\n(case when resolution=\'fixed\' then 1 else 0 end) fixedBug\nfrom zt_bug\nwhere zt_bug.deleted=\'0\'\n) a\ngroup by a.year\norder by a.year', `stage` = 'published', `builtin` = 0 WHERE `id` = 10212;
|
||||
UPDATE `zt_chart` SET `type` = 'line', `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"year\",\"name\":\"year\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"bugCount\",\"name\":\"Bug\\u6570\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"string\"},\"createdBugs\":{\"name\":\"createdBugs\",\"object\":\"story\",\"field\":\"createdBugs\",\"type\":\"string\"},\"exfixedstoryestimate\":{\"name\":\"exfixedstoryestimate\",\"object\":\"story\",\"field\":\"exfixedstoryestimate\",\"type\":\"number\"},\"bugCount\":{\"name\":\"Bug\\u6570\",\"object\":\"story\",\"field\":\"bugCount\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"Year\",\"de\":\"\",\"fr\":\"\"},\"createdBugs\":{\"zh-cn\":\"\\u4ea7\\u751fBug\",\"zh-tw\":\"\",\"en\":\"Created Bug\",\"de\":\"\",\"fr\":\"\"},\"exfixedstoryestimate\":{\"zh-cn\":\"\\u5b8c\\u6210\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\",\"en\":\"Finished Story\",\"de\":\"\",\"fr\":\"\"},\"bugCount\":{\"zh-cn\":\"\\u5355\\u4f4d\\u5b8c\\u6210\\u9700\\u6c42\\u89c4\\u6a21\\u4ea7\\u751f\\u7684Bug\\u6570\",\"zh-tw\":\"\",\"en\":\"Bug Density\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select\nbug.year as year,\ncreatedBugs, \nexfixedstoryestimate,\nround(createdBugs/exfixedstoryestimate,2) as bugCount \nfrom\n(select \nleft(openedDate,4) year,\ncount(id) createdBugs\nfrom zt_bug\nwhere zt_bug.deleted=\'0\'\ngroup by year\n) bug \nleft join\n(select\nsum(estimate) exfixedstoryestimate,\nleft(closedDate,4) year\nfrom\nzt_story\nwhere zt_story.deleted=\'0\' and zt_story.status=\'closed\' and zt_story.closedReason=\'done\'\ngroup by year\n) story\non story.year=bug.year\norder by bug.year', `stage` = 'published', `builtin` = 0 WHERE `id` = 10213;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"name\",\"name\":\"name\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"count\",\"name\":\"count\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"name\":{\"name\":\"name\",\"object\":\"product\",\"field\":\"name\",\"type\":\"string\"},\"count\":{\"name\":\"count\",\"object\":\"testcase\",\"field\":\"id\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"name\",\"type\":\"select\",\"name\":\"\\u4ea7\\u54c1\"}]', `langs` = '{\"name\":{\"zh-cn\":\"\\u4ea7\\u54c1\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"Product\",\"de\":\"\",\"fr\":\"\"},\"count\":{\"zh-cn\":\"\\u7528\\u4f8b\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"Case Count\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select \nt1.name,\nifnull(t2.cases,0) as count\nfrom\nzt_product t1\nleft join\n(\nselect\nproduct,\ncount(id) cases \nfrom\nzt_case\nwhere deleted=\'0\'\ngroup by product )\nt2 on t1.id=t2.product', `stage` = 'published', `builtin` = 0 WHERE `id` = 10215;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"name\",\"name\":\"name\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"bug\",\"name\":\"bug\",\"valOrAgg\":\"sum\"}],\"rotateX\":\"notuse\"}]', `fields` = '{\"name\":{\"name\":\"name\",\"object\":\"product\",\"field\":\"name\",\"type\":\"string\"},\"bug\":{\"name\":\"bug\",\"object\":\"bug\",\"field\":\"id\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"name\",\"type\":\"select\",\"name\":\"\\u4ea7\\u54c1\"}]', `langs` = '{\"name\":{\"zh-cn\":\"\\u4ea7\\u54c1\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"Product\",\"de\":\"\",\"fr\":\"\"},\"bug\":{\"zh-cn\":\"Bug\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"Bug Count\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select \nt1.name,\nifnull(t2.bugs,0) bug\nfrom\nzt_product t1\nleft join\n(\nselect\nproduct,\ncount(id) bugs \nfrom\nzt_bug\nwhere zt_bug.deleted=\'0\'\ngroup by product )\nt2 on t1.id=t2.product', `stage` = 'published', `builtin` = 0 WHERE `id` = 10216;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"status\",\"name\":\"Bug\\u72b6\\u6001\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"Bug\\u7f16\\u53f7\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"Bug\\u7f16\\u53f7\",\"object\":\"bug\",\"field\":\"id\",\"type\":\"number\"},\"status\":{\"name\":\"Bug\\u72b6\\u6001\",\"object\":\"bug\",\"field\":\"status\",\"type\":\"option\"},\"openedDate\":{\"name\":\"\\u521b\\u5efa\\u65e5\\u671f\",\"object\":\"bug\",\"field\":\"openedDate\",\"type\":\"date\"}}', `filters` = '[{\"field\":\"openedDate\",\"type\":\"date\",\"name\":\"\\u521b\\u5efa\\u65e5\\u671f\",\"default\":{\"begin\":\"\",\"end\":\"\"}}]', `langs` = '{\"id\":{\"zh-cn\":\"Bug\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"Bug ID\",\"de\":\"\",\"fr\":\"\"},\"status\":{\"zh-cn\":\"Bug\\u72b6\\u6001\",\"zh-tw\":\"\",\"en\":\"Status\",\"de\":\"\",\"fr\":\"\"},\"openedDate\":{\"zh-cn\":\"\\u521b\\u5efa\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"Opened Date\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select \nid,status,openedDate \nfrom zt_bug\nwhere deleted=\'0\'', `stage` = 'published', `builtin` = 0 WHERE `id` = 10217;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"type\",\"name\":\"Bug\\u7c7b\\u578b\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"Bug\\u7f16\\u53f7\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"Bug\\u7f16\\u53f7\",\"object\":\"bug\",\"field\":\"id\",\"type\":\"number\"},\"type\":{\"name\":\"Bug\\u7c7b\\u578b\",\"object\":\"bug\",\"field\":\"type\",\"type\":\"option\"},\"openedDate\":{\"name\":\"\\u521b\\u5efa\\u65e5\\u671f\",\"object\":\"bug\",\"field\":\"openedDate\",\"type\":\"date\"}}', `filters` = '[{\"field\":\"openedDate\",\"type\":\"date\",\"name\":\"\\u521b\\u5efa\\u65e5\\u671f\",\"default\":{\"begin\":\"\",\"end\":\"\"}}]', `langs` = '{\"id\":{\"zh-cn\":\"Bug\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"Bug ID\",\"de\":\"\",\"fr\":\"\"},\"type\":{\"zh-cn\":\"Bug\\u7c7b\\u578b\",\"zh-tw\":\"\",\"en\":\"Type\",\"de\":\"\",\"fr\":\"\"},\"openedDate\":{\"zh-cn\":\"\\u521b\\u5efa\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"Opened Date\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select\nid,type,openedDate\nfrom\nzt_bug\nwhere deleted=\'0\'', `stage` = 'published', `builtin` = 0 WHERE `id` = 10218;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"severity\",\"name\":\"\\u4e25\\u91cd\\u7a0b\\u5ea6\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"Bug\\u7f16\\u53f7\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"Bug\\u7f16\\u53f7\",\"object\":\"bug\",\"field\":\"id\",\"type\":\"number\"},\"severity\":{\"name\":\"\\u4e25\\u91cd\\u7a0b\\u5ea6\",\"object\":\"bug\",\"field\":\"severity\",\"type\":\"option\"},\"openedDate\":{\"name\":\"\\u521b\\u5efa\\u65e5\\u671f\",\"object\":\"bug\",\"field\":\"openedDate\",\"type\":\"date\"}}', `filters` = '[{\"field\":\"openedDate\",\"type\":\"date\",\"name\":\"\\u521b\\u5efa\\u65e5\\u671f\",\"default\":{\"begin\":\"\",\"end\":\"\"}}]', `langs` = '{\"id\":{\"zh-cn\":\"Bug\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"Bug ID\",\"de\":\"\",\"fr\":\"\"},\"severity\":{\"zh-cn\":\"\\u4e25\\u91cd\\u7a0b\\u5ea6\",\"zh-tw\":\"\",\"en\":\"Severity\",\"de\":\"\",\"fr\":\"\"},\"openedDate\":{\"zh-cn\":\"\\u521b\\u5efa\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"Opened Date\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select\nid,severity,openedDate\nfrom\nzt_bug\nwhere deleted=\'0\'', `stage` = 'published', `builtin` = 0 WHERE `id` = 10219;
|
||||
UPDATE `zt_chart` SET `type` = 'pie', `settings` = '[{\"type\":\"pie\",\"group\":[{\"field\":\"resolution\",\"name\":\"\\u89e3\\u51b3\\u65b9\\u6848\",\"group\":\"\"}],\"metric\":[{\"field\":\"id\",\"name\":\"Bug\\u7f16\\u53f7\",\"valOrAgg\":\"count\"}]}]', `fields` = '{\"id\":{\"name\":\"Bug\\u7f16\\u53f7\",\"object\":\"bug\",\"field\":\"id\",\"type\":\"number\"},\"resolution\":{\"name\":\"\\u89e3\\u51b3\\u65b9\\u6848\",\"object\":\"bug\",\"field\":\"resolution\",\"type\":\"option\"},\"resolvedDate\":{\"name\":\"\\u89e3\\u51b3\\u65e5\\u671f\",\"object\":\"bug\",\"field\":\"resolvedDate\",\"type\":\"date\"}}', `filters` = '[{\"field\":\"resolvedDate\",\"type\":\"date\",\"name\":\"\\u89e3\\u51b3\\u65e5\\u671f\",\"default\":{\"begin\":\"\",\"end\":\"\"}}]', `langs` = '{\"id\":{\"zh-cn\":\"Bug\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"Bug ID\",\"de\":\"\",\"fr\":\"\"},\"resolution\":{\"zh-cn\":\"\\u89e3\\u51b3\\u65b9\\u6848\",\"zh-tw\":\"\",\"en\":\"Resolution\",\"de\":\"\",\"fr\":\"\"},\"resolvedDate\":{\"zh-cn\":\"\\u89e3\\u51b3\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"Resolved Date\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'select id,resolution,resolvedDate from zt_bug\nwhere deleted=\'0\' and resolution!=\' \'', `stage` = 'published', `builtin` = 0 WHERE `id` = 10220;
|
||||
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"program\",\"name\":\"program\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"budget\",\"name\":\"\\u9884\\u7b97\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"project\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"program\":{\"name\":\"program\",\"object\":\"zt_project\",\"field\":\"program\",\"type\":\"string\"},\"budget\":{\"name\":\"\\u9884\\u7b97\",\"object\":\"project\",\"field\":\"budget\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"budget\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u9884\\u7b97\",\"zh-tw\":\"\",\"en\":\"budget\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t2.openedDate) AS `year`, \n t1.id,\n t1.name AS program, \n ROUND(\n SUM(\n IFNULL(t2.budget, 0)\n ) / 10000, \n 2\n ) AS budget \nFROM \n zt_project AS t1 \n LEFT JOIN zt_project AS t2 ON FIND_IN_SET(t1.id, t2.path) \n AND t2.deleted = \'0\' \n AND t2.type = \'project\' \nWHERE \n t1.deleted = \'0\' \n AND t1.type = \'program\' \n AND t1.grade = 1 \nGROUP BY \n `year`, \n id,\n program \nORDER BY \n `year`, \n budget DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1085;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"setName\",\"name\":\"setName\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"number\",\"name\":\"number\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"user\",\"field\":\"year\",\"type\":\"number\"},\"number\":{\"name\":\"number\",\"object\":\"user\",\"field\":\"number\",\"type\":\"string\"},\"setName\":{\"name\":\"setName\",\"object\":\"user\",\"field\":\"setName\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"number\":{\"zh-cn\":\"\\u4eba\\u5458\\u6570\\u91cf\",\"zh-tw\":\"\",\"en\":\"number\",\"de\":\"\",\"fr\":\"\"},\"setName\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"setName\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT tt.join as `year`, count(1) as number, tt.setName from (\nselect \nYEAR(t1.join) as `join`, t4.name as setName \nfrom zt_team t1 \nRIGHT JOIN zt_project t2 on t2.id = t1.root\nLEFT JOIN zt_project t4 on FIND_IN_SET(t4.id,t2.path) and t4.grade = 1\nRIGHT JOIN zt_user t3 on t3.account = t1.account\nWHERE t1.type = \'project\'\nAND t2.deleted = \'0\'\nAND t3.deleted = \'0\'\n) tt\nGROUP BY tt.setName, tt.join\nORDER BY tt.join, number desc, tt.setName', `stage` = 'published', `builtin` = 0 WHERE `id` = 1086;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"program\",\"name\":\"program\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"consumed\",\"name\":\"\\u603b\\u8ba1\\u6d88\\u8017\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"effort\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"program\":{\"name\":\"program\",\"object\":\"zt_project\",\"field\":\"program\",\"type\":\"string\"},\"consumed\":{\"name\":\"\\u603b\\u8ba1\\u6d88\\u8017\",\"object\":\"task\",\"field\":\"consumed\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"consumed\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u603b\\u8ba1\\u6d88\\u8017\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t5.date) AS `year`, \n t1.id,\n t1.name AS program, \n ROUND(\n SUM(t5.consumed), \n 2\n ) AS consumed \nFROM \n zt_project AS t1 \n LEFT JOIN zt_project AS t2 ON FIND_IN_SET(t1.id, t2.path) \n AND t2.deleted = \'0\' \n AND t2.type = \'project\' \n LEFT JOIN zt_project AS t3 ON t2.id = t3.parent \n AND t3.deleted = \'0\' \n AND t3.type IN (\'sprint\', \'stage\', \'kanban\') \n LEFT JOIN zt_task AS t4 ON t3.id = t4.execution \n AND t4.deleted = \'0\' \n AND t4.status != \'cancel\' \n LEFT JOIN zt_effort AS t5 ON t4.id = t5.objectID \n AND t5.deleted = \'0\' \n AND t5.objectType = \'task\' \nWHERE \n t1.deleted = \'0\' \n AND t1.type = \'program\' \n AND t1.grade = 1 \n AND t5.id IS NOT NULL \nGROUP BY \n `year`, \n id,\n program \nORDER BY \n `year`, \n consumed DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1087;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"program\",\"name\":\"program\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"story\",\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"program\":{\"name\":\"program\",\"object\":\"zt_project\",\"field\":\"program\",\"type\":\"string\"},\"story\":{\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"object\":\"story\",\"field\":\"story\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"story\":{\"zh-cn\":\"\\u65b0\\u589e\\u7814\\u53d1\\u9700\\u6c42\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"story\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t3.openedDate) AS `year`,\n t1.id, \n t1.name AS program, \n COUNT(1) AS story \nFROM \n zt_project AS t1 \n LEFT JOIN zt_product AS t2 ON t1.id = t2.program \n AND t2.deleted = \'0\' \n LEFT JOIN zt_story AS t3 ON t2.id = t3.product \n AND t3.deleted = \'0\' \nWHERE \n t1.deleted = \'0\' \n AND t1.type = \'program\' \n AND t1.grade = 1 \n AND t3.id IS NOT NULL \nGROUP BY \n `year`, \n id,\n program \nORDER BY \n `year`, \n story DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1088;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"program\",\"name\":\"program\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"story\",\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"program\":{\"name\":\"program\",\"object\":\"zt_project\",\"field\":\"program\",\"type\":\"string\"},\"story\":{\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"object\":\"story\",\"field\":\"story\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"story\":{\"zh-cn\":\"\\u65b0\\u589e\\u7814\\u53d1\\u9700\\u6c42\\u89c4\\u6a21\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t3.openedDate) AS `year`, \n t1.id,\n t1.name AS program, \n ROUND(\n SUM(t3.estimate), \n 2\n ) AS story \nFROM \n zt_project AS t1 \n LEFT JOIN zt_product AS t2 ON t1.id = t2.program \n AND t2.deleted = \'0\' \n LEFT JOIN zt_story AS t3 ON t2.id = t3.product \n AND t3.deleted = \'0\' \nWHERE \n t1.deleted = \'0\' \n AND t1.type = \'program\' \n AND t1.grade = 1 \n AND t3.id IS NOT NULL \nGROUP BY \n `year`,\n id, \n program \nORDER BY \n `year`, \n story DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1089;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"program\",\"name\":\"program\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"bug\",\"name\":\"Bug\\u5217\\u8868\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"bug\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"program\":{\"name\":\"program\",\"object\":\"zt_project\",\"field\":\"program\",\"type\":\"string\"},\"bug\":{\"name\":\"Bug\\u5217\\u8868\",\"object\":\"project\",\"field\":\"bug\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"bug\":{\"zh-cn\":\"\\u65b0\\u589eBug\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"bug\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t3.openedDate) AS `year`,\n t1.id, \n t1.name AS program, \n COUNT(1) AS bug \nFROM \n zt_project AS t1 \n LEFT JOIN zt_product AS t2 ON t1.id = t2.program \n AND t2.deleted = \'0\' \n LEFT JOIN zt_bug AS t3 ON t2.id = t3.product \n AND t3.deleted = \'0\' \nWHERE \n t1.deleted = \'0\' \n AND t1.type = \'program\' \n AND t1.grade = 1 \n AND t3.id IS NOT NULL \nGROUP BY \n `year`, \n id,\n program \nORDER BY \n `year`, \n bug DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1090;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"program\",\"name\":\"program\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"story\",\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"program\":{\"name\":\"program\",\"object\":\"zt_project\",\"field\":\"program\",\"type\":\"string\"},\"story\":{\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"object\":\"story\",\"field\":\"story\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"story\":{\"zh-cn\":\"\\u5b8c\\u6210\\u7814\\u53d1\\u9700\\u6c42\\u6c42\\u548c\",\"zh-tw\":\"\",\"en\":\"story\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t3.closedDate) AS `year`, \n t1.id,\n t1.name AS program, \n COUNT(1) AS story \nFROM \n zt_project AS t1 \n LEFT JOIN zt_product AS t2 ON t1.id = t2.program \n AND t2.deleted = \'0\' \n LEFT JOIN zt_story AS t3 ON t2.id = t3.product \n AND t3.deleted = \'0\' \n AND t3.closedReason = \'done\' \nWHERE \n t1.deleted = \'0\' \n AND t1.type = \'program\' \n AND t1.grade = 1 \n AND t3.id IS NOT NULL \nGROUP BY \n `year`,\n id, \n program \nORDER BY \n `year`, \n story DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1091;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"program\",\"name\":\"program\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"story\",\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"program\":{\"name\":\"program\",\"object\":\"zt_project\",\"field\":\"program\",\"type\":\"string\"},\"story\":{\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"object\":\"story\",\"field\":\"story\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"story\":{\"zh-cn\":\"\\u7814\\u53d1\\u9700\\u6c42\\u9884\\u8ba1\\u5de5\\u65f6\\u6c42\\u548c\",\"zh-tw\":\"\",\"en\":\"story\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t3.closedDate) AS `year`, \n t1.id,\n t1.name AS program, \n ROUND(\n SUM(t3.estimate), \n 2\n ) AS story \nFROM \n zt_project AS t1 \n LEFT JOIN zt_product AS t2 ON t1.id = t2.program \n AND t2.deleted = \'0\' \n LEFT JOIN zt_story AS t3 ON t2.id = t3.product \n AND t3.deleted = \'0\' \n AND t3.closedReason = \'done\' \nWHERE \n t1.deleted = \'0\' \n AND t1.type = \'program\' \n AND t1.grade = 1 \n AND t3.id IS NOT NULL \nGROUP BY \n `year`, \n id,\n program \nORDER BY \n `year`, \n story DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1092;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"program\",\"name\":\"program\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"bug\",\"name\":\"Bug\\u5217\\u8868\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"bug\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"program\":{\"name\":\"program\",\"object\":\"zt_project\",\"field\":\"program\",\"type\":\"string\"},\"bug\":{\"name\":\"Bug\\u5217\\u8868\",\"object\":\"project\",\"field\":\"bug\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"program\":{\"zh-cn\":\"\\u9879\\u76ee\\u96c6\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"program\",\"de\":\"\",\"fr\":\"\"},\"bug\":{\"zh-cn\":\"Bug\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"bug\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t3.closedDate) AS `year`,\n t1.id, \n t1.name AS program, \n COUNT(1) AS bug \nFROM \n zt_project AS t1 \n LEFT JOIN zt_product AS t2 ON t1.id = t2.program \n AND t2.deleted = \'0\' \n LEFT JOIN zt_bug AS t3 ON t2.id = t3.product \n AND t3.deleted = \'0\' \n AND t3.resolution = \'fixed\' \n AND t3.status = \'closed\' \nWHERE \n t1.deleted = \'0\' \n AND t1.type = \'program\' \n AND t1.grade = 1 \n AND t3.id IS NOT NULL \nGROUP BY \n `year`, \n id,\n program \nORDER BY \n `year`, \n bug DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1093;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"name\",\"name\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"duration\",\"name\":\"duration\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"project\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"\\u7f16\\u53f7\",\"object\":\"project\",\"field\":\"id\",\"type\":\"number\"},\"name\":{\"name\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"object\":\"project\",\"field\":\"name\",\"type\":\"string\"},\"status\":{\"name\":\"\\u72b6\\u6001\",\"object\":\"project\",\"field\":\"status\",\"type\":\"option\"},\"realBegan\":{\"name\":\"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f\",\"object\":\"project\",\"field\":\"realBegan\",\"type\":\"date\"},\"realEnd\":{\"name\":\"\\u5b9e\\u9645\\u5b8c\\u6210\\u65e5\\u671f\",\"object\":\"project\",\"field\":\"realEnd\",\"type\":\"date\"},\"duration\":{\"name\":\"duration\",\"object\":\"project\",\"field\":\"duration\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"name\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"name\",\"de\":\"\",\"fr\":\"\"},\"status\":{\"zh-cn\":\"\\u72b6\\u6001\",\"zh-tw\":\"\",\"en\":\"status\",\"de\":\"\",\"fr\":\"\"},\"realBegan\":{\"zh-cn\":\"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"realBegan\",\"de\":\"\",\"fr\":\"\"},\"realEnd\":{\"zh-cn\":\"\\u5b9e\\u9645\\u5b8c\\u6210\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"realEnd\",\"de\":\"\",\"fr\":\"\"},\"duration\":{\"zh-cn\":\"\\u5de5\\u671f\",\"zh-tw\":\"\",\"en\":\"duration\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT `year`, id,name,status,realBegan,realEnd,IF(status = \'closed\', DATEDIFF(realEnd, realBegan), DATEDIFF(NOW(),realBegan)) as duration\nFROM (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) AS t1\nLEFT JOIN zt_project AS t2 ON 1 = 1 WHERE deleted = \'0\' AND type = \'project\' AND YEAR(realBegan) <= `year` AND LEFT(realBegan, 4) != \'0000\' AND (status =\'doing\' OR (status = \'suspended\' AND YEAR(suspendedDate) >= `year`) OR (status = \'closed\' AND YEAR(realEnd) >= `year`)) HAVING 1=1 ORDER BY `year`, duration desc', `stage` = 'published', `builtin` = 0 WHERE `id` = 1094;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"name\",\"name\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"duration\",\"name\":\"duration\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"project\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"\\u7f16\\u53f7\",\"object\":\"action\",\"field\":\"id\",\"type\":\"number\"},\"name\":{\"name\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"object\":\"project\",\"field\":\"name\",\"type\":\"string\"},\"status\":{\"name\":\"\\u72b6\\u6001\",\"object\":\"project\",\"field\":\"status\",\"type\":\"option\"},\"begin\":{\"name\":\"\\u8ba1\\u5212\\u5f00\\u59cb\",\"object\":\"project\",\"field\":\"begin\",\"type\":\"date\"},\"end\":{\"name\":\"\\u8ba1\\u5212\\u5b8c\\u6210\",\"object\":\"project\",\"field\":\"end\",\"type\":\"date\"},\"realBegan\":{\"name\":\"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f\",\"object\":\"project\",\"field\":\"realBegan\",\"type\":\"date\"},\"realEnd\":{\"name\":\"\\u5b9e\\u9645\\u5b8c\\u6210\\u65e5\\u671f\",\"object\":\"project\",\"field\":\"realEnd\",\"type\":\"date\"},\"duration\":{\"name\":\"duration\",\"object\":\"project\",\"field\":\"duration\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"name\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"name\",\"de\":\"\",\"fr\":\"\"},\"status\":{\"zh-cn\":\"\\u72b6\\u6001\",\"zh-tw\":\"\",\"en\":\"status\",\"de\":\"\",\"fr\":\"\"},\"begin\":{\"zh-cn\":\"\\u8ba1\\u5212\\u5f00\\u59cb\",\"zh-tw\":\"\",\"en\":\"begin\",\"de\":\"\",\"fr\":\"\"},\"end\":{\"zh-cn\":\"\\u8ba1\\u5212\\u5b8c\\u6210\",\"zh-tw\":\"\",\"en\":\"end\",\"de\":\"\",\"fr\":\"\"},\"realBegan\":{\"zh-cn\":\"\\u5b9e\\u9645\\u5f00\\u59cb\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"realBegan\",\"de\":\"\",\"fr\":\"\"},\"realEnd\":{\"zh-cn\":\"\\u5b9e\\u9645\\u5b8c\\u6210\\u65e5\\u671f\",\"zh-tw\":\"\",\"en\":\"realEnd\",\"de\":\"\",\"fr\":\"\"},\"duration\":{\"zh-cn\":\"\\u5de5\\u671f\\u504f\\u5dee\",\"zh-tw\":\"\",\"en\":\"duration\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT `year`, id,name,status,`begin`,`end`,realBegan,realEnd,\nROUND((IF(LEFT(realEnd,4) != \'0000\', DATEDIFF(realEnd, realBegan), DATEDIFF(NOW(),realBegan)) - DATEDIFF(`end`, `begin`)) / DATEDIFF(`end`,`begin`) * 100) as duration\nFROM (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) AS t1\nLEFT JOIN zt_project AS t2 ON 1 = 1 \nWHERE deleted = \'0\' AND type = \'project\'\nAND YEAR(realBegan) <= `year` AND LEFT(realBegan, 4) != \'0000\'\nAND (YEAR(realEnd) >= `year` OR LEFT(realEnd, 4) = \'0000\') AND YEAR(`end`) != \'2059\'\nHAVING 1=1\nORDER BY duration ASC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1096;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"name\",\"name\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"number\",\"name\":\"number\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"user\",\"field\":\"year\",\"type\":\"number\"},\"number\":{\"name\":\"number\",\"object\":\"user\",\"field\":\"number\",\"type\":\"string\"},\"name\":{\"name\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"object\":\"project\",\"field\":\"name\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"number\":{\"zh-cn\":\"\\u4eba\\u5458\\u4e2a\\u6570\",\"zh-tw\":\"\",\"en\":\"number\",\"de\":\"\",\"fr\":\"\"},\"name\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"name\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT tt.join as `year`, count(1) as number, tt.name from (\nselect \nt2.name, YEAR(t1.join) as `join`\nfrom zt_team t1 \nRIGHT JOIN zt_project t2 on t2.id = t1.root\nRIGHT JOIN zt_user t3 on t3.account = t1.account\nWHERE t1.type = \'project\'\nAND t2.deleted = \'0\'\n) tt\nGROUP BY tt.`name`, tt.join\nORDER BY tt.join, number desc, tt.name', `stage` = 'published', `builtin` = 0 WHERE `id` = 1097;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"project\",\"name\":\"project\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"consumed\",\"name\":\"\\u603b\\u8ba1\\u6d88\\u8017\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"effort\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_project\",\"field\":\"id\",\"type\":\"number\"},\"project\":{\"name\":\"project\",\"object\":\"zt_project\",\"field\":\"project\",\"type\":\"string\"},\"consumed\":{\"name\":\"\\u603b\\u8ba1\\u6d88\\u8017\",\"object\":\"task\",\"field\":\"consumed\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"project\":{\"zh-cn\":\"\\u9879\\u76ee\",\"zh-tw\":\"\",\"en\":\"project\",\"de\":\"\",\"fr\":\"\"},\"consumed\":{\"zh-cn\":\"\\u4efb\\u52a1\\u603b\\u8ba1\\u6d88\\u8017\",\"zh-tw\":\"\",\"en\":\"consumed\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t4.date) AS `year`,\n t1.id, \n t1.name AS project, \n ROUND(\n SUM(t4.consumed), \n 2\n ) AS consumed \nFROM \n zt_project AS t1 \n LEFT JOIN zt_project AS t2 ON t1.id = t2.parent \n AND t2.deleted = \'0\' \n AND t2.type IN (\'sprint\', \'stage\', \'kanban\') \n LEFT JOIN zt_task AS t3 ON t2.id = t3.execution \n AND t3.deleted = \'0\' \n AND t3.status != \'cancel\' \n LEFT JOIN zt_effort AS t4 ON t3.id = t4.objectID \n AND t4.deleted = \'0\' \n AND t4.objectType = \'task\' \nWHERE \n t1.deleted = \'0\' \n AND t1.type = \'project\' \n AND t4.id IS NOT NULL \nGROUP BY \n `year`, \n id,\n project \nORDER BY \n `year`, \n consumed DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1098;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"project\",\"name\":\"\\u6240\\u5c5e\\u9879\\u76ee\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"story\",\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\\u5217\\u8868\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"\\u9879\\u76eeID\",\"object\":\"project\",\"field\":\"id\",\"type\":\"number\"},\"project\":{\"name\":\"\\u6240\\u5c5e\\u9879\\u76ee\",\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"story\":{\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\\u5217\\u8868\",\"object\":\"projectstory\",\"field\":\"story\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"project\":{\"zh-cn\":\"\\u6240\\u5c5e\\u9879\\u76ee\",\"zh-tw\":\"\",\"en\":\"project\",\"de\":\"\",\"fr\":\"\"},\"story\":{\"zh-cn\":\"\\u7814\\u53d1\\u9700\\u6c42\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"story\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t1.closedDate) AS `year`, \n t1.id, \n t1.project, \n COUNT(1) AS story \nFROM \n (\n SELECT \n DISTINCT t1.id, \n t1.name AS project, \n t4.id AS story, \n t4.closedDate \n FROM \n zt_project AS t1 \n LEFT JOIN zt_project AS t2 ON t1.id = t2.parent \n AND t2.deleted = \'0\' \n AND t2.type IN (\'sprint\', \'stage\', \'kanban\') \n LEFT JOIN zt_projectstory AS t3 ON t2.id = t3.project \n LEFT JOIN zt_story AS t4 ON t3.story = t4.id \n AND t4.deleted = \'0\' \n AND t4.closedReason = \'done\' \n WHERE \n t1.deleted = \'0\' \n AND t1.type = \'project\' \n AND t4.id IS NOT NULL\n ) AS t1 \nGROUP BY \n `year`, \n id, \n project \nORDER BY \n `year`, \n story DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1099;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"project\",\"name\":\"\\u6240\\u5c5e\\u9879\\u76ee\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"story\",\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\\u5217\\u8868\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"\\u9879\\u76eeID\",\"object\":\"project\",\"field\":\"id\",\"type\":\"number\"},\"project\":{\"name\":\"\\u6240\\u5c5e\\u9879\\u76ee\",\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"story\":{\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\\u5217\\u8868\",\"object\":\"projectstory\",\"field\":\"story\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u9879\\u76ee\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"project\":{\"zh-cn\":\"\\u6240\\u5c5e\\u9879\\u76ee\",\"zh-tw\":\"\",\"en\":\"project\",\"de\":\"\",\"fr\":\"\"},\"story\":{\"zh-cn\":\"\\u9700\\u6c42\\u9884\\u8ba1\\u5de5\\u65f6\",\"zh-tw\":\"\",\"en\":\"story\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \n YEAR(t1.closedDate) AS `year`, \n t1.id, \n t1.project, \n ROUND(\n SUM(t1.estimate), \n 2\n ) AS story \nFROM \n (\n SELECT \n DISTINCT t1.id, \n t1.name AS project, \n t4.id AS story, \n t4.estimate, \n t4.closedDate \n FROM \n zt_project AS t1 \n LEFT JOIN zt_project AS t2 ON t1.id = t2.parent \n AND t2.deleted = \'0\' \n AND t2.type IN (\'sprint\', \'stage\', \'kanban\') \n LEFT JOIN zt_projectstory AS t3 ON t2.id = t3.project \n LEFT JOIN zt_story AS t4 ON t3.story = t4.id \n AND t4.deleted = \'0\' \n AND t4.closedReason = \'done\' \n WHERE \n t1.deleted = \'0\' \n AND t1.type = \'project\' \n AND t4.id IS NOT NULL\n ) AS t1 \nGROUP BY \n `year`, \n id, \n project \nORDER BY \n `year`, \n story DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1100;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"product\",\"name\":\"product\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"story\",\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_product\",\"field\":\"id\",\"type\":\"number\"},\"product\":{\"name\":\"product\",\"object\":\"zt_product\",\"field\":\"product\",\"type\":\"string\"},\"story\":{\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"object\":\"story\",\"field\":\"story\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u4ea7\\u54c1\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"product\":{\"zh-cn\":\"\\u4ea7\\u54c1\",\"zh-tw\":\"\",\"en\":\"product\",\"de\":\"\",\"fr\":\"\"},\"story\":{\"zh-cn\":\"\\u7814\\u53d1\\u9700\\u6c42\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"story\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEAR(t2.openedDate) AS `year`, t1.id, t1.name AS product, COUNT(1) AS story\nFROM zt_product AS t1\nLEFT JOIN zt_story AS t2 ON t1.id = t2.product AND t2.deleted = \'0\'\nWHERE t1.deleted = \'0\' AND t1.shadow = \'0\' AND t1.vision = \'rnd\' AND t2.id IS NOT NULL\nGROUP BY `year`, id, product\nORDER BY `year`, story DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1101;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"product\",\"name\":\"product\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"story\",\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_product\",\"field\":\"id\",\"type\":\"number\"},\"product\":{\"name\":\"product\",\"object\":\"zt_product\",\"field\":\"product\",\"type\":\"string\"},\"story\":{\"name\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"object\":\"story\",\"field\":\"story\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u4ea7\\u54c1\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"product\":{\"zh-cn\":\"\\u4ea7\\u54c1\",\"zh-tw\":\"\",\"en\":\"product\",\"de\":\"\",\"fr\":\"\"},\"story\":{\"zh-cn\":\"\\u7814\\u53d1\\u9700\\u6c42\\u9884\\u8ba1\\u5de5\\u65f6\\u6c42\\u548c\",\"zh-tw\":\"\",\"en\":\"story\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEAR(t2.closedDate) AS `year`, t1.id, t1.name AS product, ROUND(SUM(t2.estimate), 1) AS story\nFROM zt_product AS t1\nLEFT JOIN zt_story AS t2 ON t1.id = t2.product AND t2.deleted = \'0\' AND t2.closedReason = \'done\'\nWHERE t1.deleted = \'0\' AND t1.shadow = \'0\' AND t1.vision = \'rnd\' AND t2.id IS NOT NULL\nGROUP BY `year`, id, product\nORDER BY `year`, story DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1102;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"product\",\"name\":\"product\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"bug\",\"name\":\"bug\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"bug\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_product\",\"field\":\"id\",\"type\":\"number\"},\"product\":{\"name\":\"product\",\"object\":\"zt_product\",\"field\":\"product\",\"type\":\"string\"},\"bug\":{\"name\":\"bug\",\"object\":\"bug\",\"field\":\"bug\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u4ea7\\u54c1\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"product\":{\"zh-cn\":\"\\u4ea7\\u54c1\",\"zh-tw\":\"\",\"en\":\"product\",\"de\":\"\",\"fr\":\"\"},\"bug\":{\"zh-cn\":\"Bug\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"bug\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEAR(t2.openedDate) AS `year`, t1.id, t1.name AS product, COUNT(1) AS bug\nFROM zt_product AS t1\nLEFT JOIN zt_bug AS t2 ON t1.id = t2.product AND t2.deleted = \'0\'\nWHERE t1.deleted = \'0\' AND t1.shadow = \'0\' AND t1.vision = \'rnd\' AND t2.id IS NOT NULL\nGROUP BY `year`, id, product\nORDER BY `year`, bug DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1103;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"product\",\"name\":\"product\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"bug\",\"name\":\"bug\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"bug\",\"field\":\"year\",\"type\":\"number\"},\"id\":{\"name\":\"id\",\"object\":\"zt_product\",\"field\":\"id\",\"type\":\"number\"},\"product\":{\"name\":\"product\",\"object\":\"zt_product\",\"field\":\"product\",\"type\":\"string\"},\"bug\":{\"name\":\"bug\",\"object\":\"bug\",\"field\":\"bug\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"\\u4ea7\\u54c1\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"product\":{\"zh-cn\":\"\\u4ea7\\u54c1\",\"zh-tw\":\"\",\"en\":\"product\",\"de\":\"\",\"fr\":\"\"},\"bug\":{\"zh-cn\":\"Bug\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"bug\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEAR(t2.closedDate) AS `year`, t1.id, t1.name AS product, COUNT(1) AS bug\nFROM zt_product AS t1\nLEFT JOIN zt_bug AS t2 ON t1.id = t2.product AND t2.deleted = \'0\' AND t2.resolution = \'fixed\' AND t2.status = \'closed\'\nWHERE t1.deleted = \'0\' AND t1.shadow = \'0\' AND t1.vision = \'rnd\' AND t2.id IS NOT NULL\nGROUP BY `year`, id, product\nORDER BY `year`, bug DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1104;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"realname\",\"name\":\"realname\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"count\",\"name\":\"count\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"realname\":{\"name\":\"realname\",\"object\":\"zt_user\",\"field\":\"realname\",\"type\":\"string\"},\"count\":{\"name\":\"count\",\"object\":\"story\",\"field\":\"count\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"realname\":{\"zh-cn\":\"\\u59d3\\u540d\",\"zh-tw\":\"\",\"en\":\"realname\",\"de\":\"\",\"fr\":\"\"},\"count\":{\"zh-cn\":\"\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"count\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \nYEAR(t3.openedDate) AS `year`,t2.realname,count(1) AS count\nFROM zt_action AS t1 RIGHT JOIN zt_user AS t2 ON t1.actor=t2.account LEFT JOIN zt_story AS t3 ON t1.objectID=t3.id\nWHERE t1.objectType=\'story\' AND t1.action=\'opened\' AND t3.deleted=\'0\'\nGROUP BY `year`,t2.account ORDER BY `year`,count DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1105;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"realname\",\"name\":\"realname\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"count\",\"name\":\"count\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"testcase\",\"field\":\"year\",\"type\":\"number\"},\"realname\":{\"name\":\"realname\",\"object\":\"zt_user\",\"field\":\"realname\",\"type\":\"string\"},\"count\":{\"name\":\"count\",\"object\":\"testcase\",\"field\":\"count\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"realname\":{\"zh-cn\":\"\\u59d3\\u540d\",\"zh-tw\":\"\",\"en\":\"realname\",\"de\":\"\",\"fr\":\"\"},\"count\":{\"zh-cn\":\"\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"count\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \nYEAR(t3.openedDate) AS `year`,t2.realname,count(1) AS count\nFROM zt_action AS t1 RIGHT JOIN zt_user AS t2 ON t1.actor=t2.account LEFT JOIN zt_case AS t3 ON t1.objectID=t3.id\nWHERE t1.objectType=\'case\' AND t1.action=\'opened\' AND t3.deleted=\'0\'\nGROUP BY `year`,t2.account ORDER BY `year`,count DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1106;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"realname\",\"name\":\"realname\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"count\",\"name\":\"count\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"bug\",\"field\":\"year\",\"type\":\"number\"},\"realname\":{\"name\":\"realname\",\"object\":\"zt_user\",\"field\":\"realname\",\"type\":\"string\"},\"count\":{\"name\":\"count\",\"object\":\"bug\",\"field\":\"count\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"realname\":{\"zh-cn\":\"\\u59d3\\u540d\",\"zh-tw\":\"\",\"en\":\"realname\",\"de\":\"\",\"fr\":\"\"},\"count\":{\"zh-cn\":\"\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"count\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \nYEAR(t3.openedDate) AS `year`,t2.realname,count(1) AS count\nFROM zt_action AS t1 RIGHT JOIN zt_user AS t2 ON t1.actor=t2.account LEFT JOIN zt_bug AS t3 ON t1.objectID=t3.id\nWHERE t1.objectType=\'bug\' AND t1.action=\'opened\' AND t3.deleted=\'0\'\nGROUP BY `year`,t2.account ORDER BY `year`,count DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1107;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"realname\",\"name\":\"realname\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"count\",\"name\":\"count\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"bug\",\"field\":\"year\",\"type\":\"number\"},\"realname\":{\"name\":\"realname\",\"object\":\"zt_user\",\"field\":\"realname\",\"type\":\"string\"},\"count\":{\"name\":\"count\",\"object\":\"bug\",\"field\":\"count\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"realname\":{\"zh-cn\":\"\\u59d3\\u540d\",\"zh-tw\":\"\",\"en\":\"realname\",\"de\":\"\",\"fr\":\"\"},\"count\":{\"zh-cn\":\"\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"count\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT \nYEAR(t3.openedDate) AS `year`,t2.realname,count(DISTINCT t3.id) AS count\nFROM zt_action AS t1 RIGHT JOIN zt_user AS t2 ON t1.actor=t2.account LEFT JOIN zt_bug AS t3 ON t1.objectID=t3.id\nWHERE t1.objectType=\'bug\' AND t1.action=\'resolved\' AND t3.deleted=\'0\'\nGROUP BY `year`,t2.account ORDER BY `year`,count DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1108;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"realname\",\"name\":\"realname\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"consumed\",\"name\":\"\\u8017\\u65f6\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"user\",\"field\":\"year\",\"type\":\"number\"},\"realname\":{\"name\":\"realname\",\"object\":\"zt_user\",\"field\":\"realname\",\"type\":\"string\"},\"consumed\":{\"name\":\"\\u8017\\u65f6\",\"object\":\"effort\",\"field\":\"consumed\",\"type\":\"number\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"realname\":{\"zh-cn\":\"\\u59d3\\u540d\",\"zh-tw\":\"\",\"en\":\"realname\",\"de\":\"\",\"fr\":\"\"},\"consumed\":{\"zh-cn\":\"\\u8017\\u65f6\",\"zh-tw\":\"\",\"en\":\"consumed\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEAR(t1.date) AS `year`, t2.realname, ROUND(SUM(t1.consumed),1) AS consumed\nFROM zt_effort AS t1 LEFT JOIN zt_user AS t2 ON t1.account = t2.account\nWHERE t1.deleted = \'0\' AND t2.deleted = \'0\'\nGROUP BY `year`, realname\nORDER BY `year`, consumed DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1109;
|
||||
UPDATE `zt_chart` SET `type` = 'cluBarY', `settings` = '[{\"type\":\"cluBarY\",\"xaxis\":[{\"field\":\"realname\",\"name\":\"realname\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"count\",\"name\":\"count\",\"valOrAgg\":\"sum\"}]}]', `fields` = '{\"year\":{\"name\":\"year\",\"object\":\"user\",\"field\":\"year\",\"type\":\"number\"},\"realname\":{\"name\":\"realname\",\"object\":\"zt_action\",\"field\":\"realname\",\"type\":\"string\"},\"count\":{\"name\":\"count\",\"object\":\"user\",\"field\":\"count\",\"type\":\"string\"}}', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u4efd\"}]', `langs` = '{\"year\":{\"zh-cn\":\"\\u5e74\\u4efd\",\"zh-tw\":\"\",\"en\":\"year\",\"de\":\"\",\"fr\":\"\"},\"realname\":{\"zh-cn\":\"\\u59d3\\u540d\",\"zh-tw\":\"\",\"en\":\"realname\",\"de\":\"\",\"fr\":\"\"},\"count\":{\"zh-cn\":\"\\u8ba1\\u6570\",\"zh-tw\":\"\",\"en\":\"count\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEAR(t1.date) AS `year`,IFNULL(t2.realname,t1.actor) AS realname,count(1) AS count\nFROM zt_action t1 LEFT JOIN zt_user AS t2 ON t1.actor=t2.account\nGROUP BY `year`,t1.actor\nORDER BY `year`, `count` DESC', `stage` = 'published', `builtin` = 0 WHERE `id` = 1110;
|
||||
|
||||
-- 升级水球图
|
||||
-- 宏观数据盘点大屏
|
||||
UPDATE `zt_chart` SET `type` = 'waterpolo', `settings` = '[{\"type\":\"waterpolo\",\"calc\":\"count\",\"goal\":\"id\",\"conditions\":[{\"field\":\"bugstatus\",\"condition\":\"eq\",\"value\":\"done\"}]}]', `fields` = '{\"id\":{\"name\":\"\\u7f16\\u53f7\",\"object\":\"story\",\"field\":\"id\",\"type\":\"number\"},\"bugstatus\":{\"name\":\"bugstatus\",\"object\":\"story\",\"field\":\"bugstatus\",\"type\":\"string\"}}', `filters` = '[]', `langs` = '{\"id\":{\"zh-cn\":\"\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"id\",\"de\":\"\",\"fr\":\"\"},\"bugstatus\":{\"zh-cn\":\"Bug\\u72b6\\u6001\",\"zh-tw\":\"\",\"en\":\"bugstatus\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT id, IF(closedReason=\'done\', \'done\', \'undone\') AS bugstatus FROM zt_story WHERE deleted=\'0\' AND (status != \'closed\' OR closedReason=\'done\')', `stage` = 'published', `builtin` = 0 WHERE `id` = 1031;
|
||||
@@ -34,3 +101,66 @@ ALTER TABLE `zt_review` MODIFY `docVersion` varchar(255) DEFAULT '';
|
||||
|
||||
DELETE FROM `zt_cron` WHERE command='moduleName=measurement&methodName=initCrontabQueue';
|
||||
DELETE FROM `zt_cron` WHERE command='moduleName=measurement&methodName=execCrontabQueue';
|
||||
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `name` varchar(45) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `products` varchar(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `serverID` smallint(8) NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `repoName` varchar(45) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `format` varchar(10) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `type` char(7) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `status` varchar(10) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `createdBy` varchar(30) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `editedBy` varchar(30) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_artifactrepo` MODIFY `deleted` tinyint(4) UNSIGNED NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE `zt_space` MODIFY `createdAt` datetime NULL;
|
||||
ALTER TABLE `zt_space` MODIFY `name` varchar(200) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_space` MODIFY `k8space` char(64) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_space` MODIFY `owner` char(30) NOT NULL DEFAULT '';
|
||||
|
||||
ALTER TABLE `zt_instance` MODIFY `name` char(50) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_instance` MODIFY `logo` varchar(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_instance` MODIFY `desc` text NULL;
|
||||
ALTER TABLE `zt_instance` MODIFY `introduction` text NULL;
|
||||
ALTER TABLE `zt_instance` MODIFY `channel` char(20) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_instance` MODIFY `smtpSnippetName` char(30) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_instance` MODIFY `ldapSnippetName` char(30) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_instance` MODIFY `ldapSettings` text NULL;
|
||||
ALTER TABLE `zt_instance` MODIFY `dbSettings` text NULL;
|
||||
ALTER TABLE `zt_instance` MODIFY `env` text NULL;
|
||||
ALTER TABLE `zt_instance` MODIFY `createdAt` datetime NULL;
|
||||
|
||||
ALTER TABLE `zt_solution` MODIFY `name` char(50) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `appID` mediumint(8) unsigned NOT NULL DEFAULT 0;
|
||||
ALTER TABLE `zt_solution` MODIFY `appName` char(50) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `appVersion` char(20) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `version` char(50) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `chart` char(50) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `cover` varchar(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `desc` text NULL;
|
||||
ALTER TABLE `zt_solution` MODIFY `introduction` varchar(255) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `source` char(20) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `channel` char(20) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `components` text NULL;
|
||||
ALTER TABLE `zt_solution` MODIFY `status` char(20) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `createdBy` char(30) NOT NULL DEFAULT '';
|
||||
ALTER TABLE `zt_solution` MODIFY `createdAt` datetime NULL;
|
||||
|
||||
UPDATE `zt_chart` SET `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"YEARMONTH\",\"name\":\"YEARMONTH\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newStory\",\"name\":\"\\u7ee7\\u7eed\\u6dfb\\u52a0\\u7814\\u53d1\\u9700\\u6c42\",\"valOrAgg\":\"sum\"},{\"field\":\"closedStory\",\"name\":\"\\u9700\\u6c42\\uff1a%s \\u5df2\\u5173\\u95ed\\uff0c\\u5c06\\u4e0d\\u4f1a\\u88ab\\u5173\\u95ed\\u3002\",\"valOrAgg\":\"sum\"}],\"rotateX\":\"notuse\"}]', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u5ea6\"}]', `fields` = '{\"YEARMONTH\":{\"name\":\"YEARMONTH\",\"object\":\"story\",\"field\":\"YEARMONTH\",\"type\":\"string\"},\"year\":{\"name\":\"year\",\"object\":\"story\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"story\",\"field\":\"month\",\"type\":\"number\"},\"newStory\":{\"name\":\"\\u7ee7\\u7eed\\u6dfb\\u52a0\\u7814\\u53d1\\u9700\\u6c42\",\"object\":\"story\",\"field\":\"newStory\",\"type\":\"string\"},\"closedStory\":{\"name\":\"\\u9700\\u6c42\\uff1a%s \\u5df2\\u5173\\u95ed\\uff0c\\u5c06\\u4e0d\\u4f1a\\u88ab\\u5173\\u95ed\\u3002\",\"object\":\"story\",\"field\":\"closedStory\",\"type\":\"string\"}}', `langs` = '{\"YEARMONTH\":{\"zh-cn\":\"YEARMONTH\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"year\":{\"zh-cn\":\"\\u5e74\\u5ea6\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"newStory\":{\"zh-cn\":\"\\u65b0\\u589e\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"closedStory\":{\"zh-cn\":\"\\u5b8c\\u6210\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT t1.YEARMONTH, t1.year, t1.month AS `month`, IFNULL(t2.story, 0) AS newStory, IFNULL(t3.story, 0) AS closedStory\nFROM (SELECT DISTINCT DATE_FORMAT(date, \'%Y-%m\') YEARMONTH, Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS story FROM zt_story WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS story FROM zt_story WHERE deleted = \'0\' AND closedReason = \'done\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month' WHERE `name` = '年度新增-需求年度新增和完成趋势图';
|
||||
UPDATE `zt_chart` SET `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"YEARMONTH\",\"name\":\"YEARMONTH\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newBug\",\"name\":\"newBug\",\"valOrAgg\":\"sum\"},{\"field\":\"fixedBug\",\"name\":\"fixedBug\",\"valOrAgg\":\"sum\"}]}]', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u5ea6\"}]', `fields` = '{\"YEARMONTH\":{\"name\":\"YEARMONTH\",\"object\":\"bug\",\"field\":\"YEARMONTH\",\"type\":\"string\"},\"year\":{\"name\":\"year\",\"object\":\"bug\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"bug\",\"field\":\"month\",\"type\":\"number\"},\"newBug\":{\"name\":\"newBug\",\"object\":\"bug\",\"field\":\"newBug\",\"type\":\"string\"},\"fixedBug\":{\"name\":\"fixedBug\",\"object\":\"bug\",\"field\":\"fixedBug\",\"type\":\"string\"}}', `langs` = '{\"YEARMONTH\":{\"zh-cn\":\"\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"year\":{\"zh-cn\":\"\\u5e74\\u5ea6\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"newBug\":{\"zh-cn\":\"\\u65b0\\u589eBug\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"fixedBug\":{\"zh-cn\":\"\\u89e3\\u51b3Bug\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEARMONTH, t1.year, t1.month AS `month`, IFNULL(t2.bug, 0) AS newBug, IFNULL(t3.bug, 0) AS fixedBug\nFROM (SELECT DISTINCT DATE_FORMAT(date, \'%Y-%m\') YEARMONTH, Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS bug FROM zt_bug WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS bug FROM zt_bug WHERE deleted = \'0\' AND resolution = \'fixed\' AND status = \'closed\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month' WHERE `name` = '年度新增-Bug年度新增和解决趋势图';
|
||||
UPDATE `zt_chart` SET `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"YEARMONTH\",\"name\":\"YEARMONTH\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newTask\",\"name\":\"newTask\",\"valOrAgg\":\"sum\"},{\"field\":\"closedTask\",\"name\":\"closedTask\",\"valOrAgg\":\"sum\"}]}]', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u5ea6\"}]', `fields` = '{\"YEARMONTH\":{\"name\":\"YEARMONTH\",\"object\":\"task\",\"field\":\"YEARMONTH\",\"type\":\"string\"},\"year\":{\"name\":\"year\",\"object\":\"task\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"task\",\"field\":\"month\",\"type\":\"string\"},\"newTask\":{\"name\":\"newTask\",\"object\":\"task\",\"field\":\"newTask\",\"type\":\"string\"},\"closedTask\":{\"name\":\"closedTask\",\"object\":\"task\",\"field\":\"closedTask\",\"type\":\"string\"}}', `langs` = '{\"YEARMONTH\":{\"zh-cn\":\"YEARMONTH\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"year\":{\"zh-cn\":\"\\u5e74\\u5ea6\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"newTask\":{\"zh-cn\":\"\\u65b0\\u589e\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"closedTask\":{\"zh-cn\":\"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEARMONTH, t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.task, 0) AS newTask, IFNULL(t3.task, 0) AS closedTask\nFROM (SELECT DISTINCT DATE_FORMAT(date, \'%Y-%m\') YEARMONTH, Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS task FROM zt_task WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS task FROM zt_task WHERE deleted = \'0\' AND status = \'closed\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month' WHERE `name` = '年度新增-任务年度新增和完成趋势图';
|
||||
UPDATE `zt_chart` SET `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"YEARMONTH\",\"name\":\"YEARMONTH\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newProject\",\"name\":\"newProject\",\"valOrAgg\":\"sum\"},{\"field\":\"closedProject\",\"name\":\"\\u5df2\\u5173\\u95ed\\u7684\\u9879\\u76ee\",\"valOrAgg\":\"sum\"}]}]', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u5ea6\"}]', `fields` = '{\"YEARMONTH\":{\"name\":\"YEARMONTH\",\"object\":\"project\",\"field\":\"YEARMONTH\",\"type\":\"string\"},\"year\":{\"name\":\"year\",\"object\":\"project\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"project\",\"field\":\"month\",\"type\":\"string\"},\"newProject\":{\"name\":\"newProject\",\"object\":\"project\",\"field\":\"newProject\",\"type\":\"string\"},\"closedProject\":{\"name\":\"\\u5df2\\u5173\\u95ed\\u7684\\u9879\\u76ee\",\"object\":\"project\",\"field\":\"closedProject\",\"type\":\"string\"}}', `langs` = '{\"YEARMONTH\":{\"zh-cn\":\"YEARMONTH\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"year\":{\"zh-cn\":\"\\u5e74\\u5ea6\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"newProject\":{\"zh-cn\":\"\\u65b0\\u589e\\u9879\\u76ee\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"closedProject\":{\"zh-cn\":\"\\u5b8c\\u6210\\u9879\\u76ee\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEARMONTH, t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.project, 0) AS newProject, IFNULL(t3.project, 0) AS closedProject\nFROM (SELECT DISTINCT DATE_FORMAT(date, \'%Y-%m\') YEARMONTH, Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS project FROM zt_project WHERE deleted = \'0\' AND type = \'project\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS project FROM zt_project WHERE deleted = \'0\' AND type = \'project\' AND status = \'closed\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month' WHERE `name` = '年度新增-项目年度新增和完成趋势图';
|
||||
UPDATE `zt_chart` SET `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"YEARMONTH\",\"name\":\"YEARMONTH\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"newExecution\",\"name\":\"newExecution\",\"valOrAgg\":\"sum\"},{\"field\":\"closedExecution\",\"name\":\"closedExecution\",\"valOrAgg\":\"sum\"}]}]', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u5ea6\"}]', `fields` = '{\"YEARMONTH\":{\"name\":\"YEARMONTH\",\"object\":\"project\",\"field\":\"YEARMONTH\",\"type\":\"string\"},\"year\":{\"name\":\"year\",\"object\":\"project\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"project\",\"field\":\"month\",\"type\":\"string\"},\"newExecution\":{\"name\":\"newExecution\",\"object\":\"project\",\"field\":\"newExecution\",\"type\":\"string\"},\"closedExecution\":{\"name\":\"closedExecution\",\"object\":\"project\",\"field\":\"closedExecution\",\"type\":\"string\"}}', `langs` = '{\"YEARMONTH\":{\"zh-cn\":\"YEARMONTH\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"year\":{\"zh-cn\":\"\\u5e74\\u5ea6\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"newExecution\":{\"zh-cn\":\"\\u65b0\\u589e\\u6267\\u884c\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"closedExecution\":{\"zh-cn\":\"\\u5b8c\\u6210\\u6267\\u884c\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEARMONTH, t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.execution, 0) AS newExecution, IFNULL(t3.execution, 0) AS closedExecution\nFROM (SELECT DISTINCT DATE_FORMAT(date, \'%Y-%m\') YEARMONTH,YEAR(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(openedDate) AS `year`, MONTH(openedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = \'0\' AND type IN (\'sprint\', \'stage\', \'kanban\') AND multiple = \'1\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nLEFT JOIN (SELECT YEAR(closedDate) AS `year`, MONTH(closedDate) AS `month`, COUNT(1) AS execution FROM zt_project WHERE deleted = \'0\' AND type IN (\'sprint\', \'stage\', \'kanban\') AND status = \'closed\' AND multiple = \'1\' GROUP BY `year`, `month`) AS t3 ON t1.year = t3.year AND t1.month = t3.month\nORDER BY `year`, t1.month' WHERE `name` = '年度新增-执行年度新增和完成趋势图';
|
||||
UPDATE `zt_chart` SET `settings` = '[{\"type\":\"line\",\"xaxis\":[{\"field\":\"YEARMONTH\",\"name\":\"YEARMONTH\",\"group\":\"\"}],\"yaxis\":[{\"field\":\"release\",\"name\":\"release\",\"valOrAgg\":\"sum\"}]}]', `filters` = '[{\"field\":\"year\",\"type\":\"select\",\"name\":\"\\u5e74\\u5ea6\"}]', `fields` = '{\"YEARMONTH\":{\"name\":\"YEARMONTH\",\"object\":\"release\",\"field\":\"YEARMONTH\",\"type\":\"string\"},\"year\":{\"name\":\"year\",\"object\":\"release\",\"field\":\"year\",\"type\":\"number\"},\"month\":{\"name\":\"month\",\"object\":\"release\",\"field\":\"month\",\"type\":\"string\"},\"release\":{\"name\":\"release\",\"object\":\"release\",\"field\":\"release\",\"type\":\"string\"}}', `langs` = '{\"YEARMONTH\":{\"zh-cn\":\"YEARMONTH\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"year\":{\"zh-cn\":\"\\u5e74\\u5ea6\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"month\":{\"zh-cn\":\"\\u6708\\u4efd\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"release\":{\"zh-cn\":\"\\u53d1\\u5e03\\u6b21\\u6570\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"}}', `sql` = 'SELECT YEARMONTH, t1.year, CONCAT(t1.month, \"月\") AS `month`, IFNULL(t2.release, 0) AS `release`\nFROM (SELECT DISTINCT DATE_FORMAT(date, \'%Y-%m\') YEARMONTH,Year(date) AS `year`, MONTH(date) AS `month` FROM zt_action) AS t1\nLEFT JOIN (SELECT YEAR(createdDate) AS `year`, MONTH(createdDate) AS `month`, COUNT(1) AS `release` FROM zt_release WHERE deleted = \'0\' GROUP BY `year`, `month`) AS t2 ON t1.year = t2.year AND t1.month = t2.month\nORDER BY `year`, t1.month' WHERE `name` = '年度新增-产品发布次数年度趋势图';
|
||||
UPDATE `zt_chart` SET `sql` = "SELECT id FROM (SELECT id,deleted FROM zt_task WHERE `status` NOT IN ('closed','cancel','done')) AS task WHERE task.deleted='0'" WHERE `id` = 1040;
|
||||
|
||||
UPDATE `zt_chart` SET `sql` = "SELECT t1.name,t1.id,t2.`year`,IF(YEAR(t1.createdDate) = t2.`year`, 1, 0) as newProduct, SUM(IFNULL(t3.story, 0)) AS story, SUM(IFNULL(t4.bug, 0)) AS bug, SUM(IFNULL(t5.`plan`, 0)) AS 'plan', SUM(IFNULL(t6.`release`, 0)) AS 'release' FROM zt_product AS t1 LEFT JOIN (SELECT DISTINCT YEAR(`date`) as 'year' FROM zt_action) as t2 ON 1 = 1 LEFT JOIN (SELECT COUNT(1) as 'story', product, YEAR(openedDate) as `year` FROM zt_story WHERE deleted = '0' GROUP BY product, `year`) AS t3 on t1.id = t3.product AND t3.`year` = t2.`year` LEFT JOIN (SELECT COUNT(1) as 'bug', product, YEAR(openedDate) as `year` FROM zt_bug WHERE deleted = '0' GROUP BY product, `year`) AS t4 on t1.id = t4.product AND t4.`year` = t2.`year` LEFT JOIN (SELECT COUNT(1) as 'plan', product, YEAR(createdDate) AS 'year' FROM zt_productplan WHERE deleted = '0' GROUP BY product,`year`) AS t5 on t1.id = t5.product AND t5.`year` = t2.`year` LEFT JOIN (SELECT COUNT(1) as 'release', product, YEAR(`date`) as `year` FROM zt_release WHERE deleted = '0' GROUP BY product, `year`) AS t6 ON t1.id = t6.product AND t6.`year` = t2.`year` WHERE t1.deleted = '0' AND t1.status != 'closed' AND t1.shadow = '0' GROUP BY t1.name,t1.id,t2.`year`,newProduct" WHERE `id` = 1075;
|
||||
|
||||
UPDATE `zt_cron` SET `h` = '1', `m` = '0' WHERE `command` = 'moduleName=metric&methodName=updateMetricLib';
|
||||
|
||||
UPDATE `zt_pivot` SET `fields` = '{\"account\":{\"object\":\"effort\",\"field\":\"account\",\"type\":\"user\",\"name\":\"account\"},\"consumed\":{\"object\":\"effort\",\"field\":\"consumed\",\"type\":\"object\",\"name\":\"consumed\"},\"date\":{\"object\":\"effort\",\"field\":\"date\",\"type\":\"object\",\"name\":\"date\"},\"dept\":{\"object\":\"user\",\"field\":\"dept\",\"type\":\"string\",\"name\":\"dept\"}}' WHERE `name` = '{\"zh-cn\":\"\\u65e5\\u5fd7\\u6c47\\u603b\\u8868\",\"zh-tw\":\"\\u65e5\\u8a8c\\u532f\\u7e3d\\u8868\",\"en\":\"Effort Summary\",\"de\":\"Effort Summary\",\"fr\":\"Effort Summary\"}';
|
||||
UPDATE `zt_pivot` SET `sql` = 'SELECT\n COALESCE(p.id, 0) AS projectID,\n p.name AS projectName,\n COALESCE(e.id, 0) AS executionID,\n e.name AS executionName,\n b.id,\n b.resolution\nFROM zt_bug AS b\nLEFT JOIN zt_project AS p ON b.project = p.id\nLEFT JOIN zt_project AS e ON b.execution = e.id AND e.parent != 0\nWHERE p.id != 0 AND p.deleted = \'0\' AND b.deleted = \'0\' AND b.resolution != \'\' AND if($project=\'\',1,p.id=$project) AND if($execution=\'\',1,e.id=$execution)', `fields` = '{\"projectID\":{\"name\":\"projectID\",\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"projectName\":{\"name\":\"projectName\",\"object\":\"project\",\"field\":\"name\",\"type\":\"object\"},\"executionID\":{\"name\":\"executionID\",\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"executionName\":{\"name\":\"executionName\",\"object\":\"project\",\"field\":\"name\",\"type\":\"object\"},\"id\":{\"name\":\"Bug\\u7f16\\u53f7\",\"object\":\"bug\",\"field\":\"id\",\"type\":\"number\"},\"resolution\":{\"name\":\"resolution\",\"object\":\"bug\",\"field\":\"resolution\",\"type\":\"option\"}}', `langs` = '{\"projectID\":{\"zh-cn\":\"\\u9879\\u76eeID\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"projectName\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"executionID\":{\"zh-cn\":\"\\u6267\\u884cID\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"executionName\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"id\":{\"zh-cn\":\"Bug\\u7f16\\u53f7\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"},\"resolution\":{\"zh-cn\":\"\\u89e3\\u51b3\\u65b9\\u6848\",\"zh-tw\":\"\",\"en\":\"\",\"de\":\"\",\"fr\":\"\"}}', `settings` = '{\"columns\":[{\"field\":\"resolution\",\"stat\":\"count\",\"slice\":\"resolution\",\"showMode\":\"default\",\"monopolize\":\"0\",\"showTotal\":\"sum\",\"showOrigin\":\"0\"}],\"filterType\":\"query\",\"columnTotal\":\"noShow\",\"group1\":\"projectName\",\"group2\":\"executionName\",\"lastStep\":\"4\"}', `filters` = '[{\"from\":\"query\",\"field\":\"project\",\"type\":\"select\",\"typeOption\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"type\":\"select\",\"typeOption\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"default\":\"\"}]' WHERE `name` = '{\"zh-cn\":\"\\u9879\\u76eeBug\\u89e3\\u51b3\\u65b9\\u6848\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u89e3\\u6c7a\\u65b9\\u6848\\u5206\\u5e03\\u8868\",\"en\":\"Project Bug Resolution\",\"de\":\"Project Bug Resolution\",\"fr\":\"Project Bug Resolution\",\"vi\":\"Project Bug Resolution\",\"ja\":\"Project Bug Resolution\"}';
|
||||
|
||||
UPDATE `zt_chart` SET `sql` = 'select tt.topProgram,tt.programID as id,tt.`year`,sum(tt.product) as product,sum(tt.plan) as plan,sum(tt.`release`) as `release`,sum(tt.story) as story,sum(tt.bug) as bug,sum(tt.doc) as doc\r\nfrom (\r\nselect t2.name as topProgram,t2.id as programID,t0.`year`,count(1) as product,0 as plan,0 as story,0 as bug,0 as `release`, 0 as doc\r\nfrom zt_product t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.createdDate) = t0.`year`\r\nleft join zt_project t2 on t1.program = t2.id\r\nwhere t1.deleted = \'0\' and t1.shadow = \'0\'\r\nand t2.type = \'program\' and t2.grade = 1 and t2.deleted = \'0\'\r\ngroup by t2.id, t0.`year`\r\nunion all\r\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,count(1) as plan,0 as story,0 as bug,0 as `release`, 0 as doc\r\nfrom zt_productplan t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.createdDate) = t0.`year`\r\nleft join zt_product t2 on t2.id = t1.product\r\nleft join zt_project t3 on t2.program = t3.id\r\nwhere t1.deleted = \'0\'\r\nand t2.deleted = \'0\'\r\nand t3.type = \'program\' and t3.grade = 1 and t3.deleted = \'0\'\r\ngroup by t3.id, t0.`year`\r\nunion all\r\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,0 as plan,0 as story,0 as bug,0 as `release`, count(1) as doc\r\nfrom zt_doc t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.addedDate) = t0.`year`\r\nleft join zt_product t2 on t2.id = t1.product\r\nleft join zt_project t3 on t2.program = t3.id\r\nwhere t1.deleted = \'0\'\r\nand t2.deleted = \'0\'\r\nand t3.type = \'program\' and t3.grade = 1 and t3.deleted = \'0\'\r\ngroup by t3.id, t0.`year`\r\nunion all\r\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,0 as plan,0 as story,0 as bug,count(1) as `release`, 0 as doc\r\nfrom zt_release t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.date) = t0.`year`\r\nleft join zt_product t2 on t2.id = t1.product\r\nleft join zt_project t3 on t2.program = t3.id\r\nwhere t1.deleted = \'0\'\r\nand t2.deleted = \'0\'\r\nand t3.type = \'program\' and t3.grade = 1 and t3.deleted = \'0\'\r\ngroup by t3.id, t0.`year`\r\nunion all\r\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,0 as plan,count(1) as story,0 as bug,0 as `release`, 0 as doc\r\nfrom zt_story t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.openedDate) = t0.`year`\r\nleft join zt_product t2 on t2.id = t1.product\r\nleft join zt_project t3 on t2.program = t3.id\r\nwhere t1.deleted = \'0\'\r\nand t2.deleted = \'0\'\r\nand t3.type = \'program\' and t3.grade = 1 and t3.deleted = \'0\'\r\ngroup by t3.id, t0.`year`\r\nunion all\r\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as product,0 as plan,0 as story,count(1) as bug,0 as `release`, 0 as doc\r\nfrom zt_bug t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.openedDate) = t0.`year`\r\nleft join zt_product t2 on t2.id = t1.product\r\nleft join zt_project t3 on t2.program = t3.id\r\nwhere t1.deleted = \'0\'\r\nand t2.deleted = \'0\'\r\nand t3.type = \'program\' and t3.grade = 1 and t3.deleted = \'0\'\r\ngroup by t3.id, t0.`year`\r\n) tt\r\ngroup by tt.programID, tt.`year`' WHERE `name` = '年度新增-项目集年度新增数据汇总表';
|
||||
UPDATE `zt_chart` SET `sql` = 'select tt.topProgram,tt.programID as id,tt.`year`,sum(tt.projectA) as projectA,sum(tt.executionA) as executionA,sum(tt.releaseA) as `release`,sum(tt.storyA) as story,sum(tt.bugA) as bug \r\nfrom (\r\nselect t2.name as topProgram,t2.id as programID,t0.`year`,count(1) as projectA,0 as executionA,0 as releaseA,0 as storyA,0 as bugA\r\nfrom zt_project t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.closedDate) = t0.`year`\r\nleft join zt_project t2 on FIND_IN_SET(t2.id, t1.path)\r\nwhere t1.type = \'project\' and t1.deleted = \'0\'\r\nand t2.type = \'program\' and t2.grade = 1 and t2.deleted = \'0\'\r\nand t1.`status` = \'closed\'\r\ngroup by t2.id, t0.`year`\r\nunion all\r\nselect t3.name as topProgram, t3.id as programID,t0.`year`,0 as projectA,count(1) as executionA,0 as releaseA,0 as storyA,0 as bugA\r\nfrom zt_project t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.closedDate) = t0.`year`\r\nleft join zt_project t2 on t1.parent = t2.id\r\nleft join zt_project t3 on FIND_IN_SET(t3.id, t2.path)\r\nwhere t1.type in (\'sprint\', \'stage\', \'kanban\') and t1.deleted = \'0\'\r\nand t2.type = \'project\' and t2.deleted = \'0\'\r\nand t3.type = \'program\' and t3.grade = 1 and t3.deleted = \'0\'\r\nand t1.`status` = \'closed\'\r\ngroup by t3.id, t0.`year`\r\nunion all\r\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as projectA,0 as executionA,count(1) as releaseA,0 as storyA,0 as bugA\r\nfrom zt_release t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.date) = t0.`year`\r\nleft join zt_product t2 on t2.id = t1.product\r\nleft join zt_project t3 on t2.program = t3.id\r\nwhere t1.deleted = \'0\'\r\nand t2.deleted = \'0\'\r\nand t3.type = \'program\' and t3.grade = 1 and t3.deleted = \'0\'\r\ngroup by t3.id, t0.`year`\r\nunion all\r\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as projectA,0 as executionA,0 as releaseA,count(1) as storyA,0 as bugA\r\nfrom zt_story t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.closedDate) = t0.`year`\r\nleft join zt_product t2 on t2.id = t1.product\r\nleft join zt_project t3 on t2.program = t3.id\r\nwhere t1.deleted = \'0\' and t1.closedReason = \'done\' and t1.status = \'closed\'\r\nand t2.deleted = \'0\'\r\nand t3.type = \'program\' and t3.grade = 1 and t3.deleted = \'0\'\r\ngroup by t3.id, t0.`year`\r\nunion all\r\nselect t3.name as topProgram,t3.id as programID,t0.`year`,0 as projectA,0 as executionA,0 as releaseA,0 as storyA,count(1) as bugA\r\nfrom zt_bug t1\r\nleft join (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) t0 on YEAR(t1.resolvedDate) = t0.`year`\r\nleft join zt_product t2 on t2.id = t1.product\r\nleft join zt_project t3 on t2.program = t3.id\r\nwhere t1.deleted = \'0\' and t1.resolution = \'fixed\' and t1.status = \'closed\'\r\nand t2.deleted = \'0\'\r\nand t3.type = \'program\' and t3.grade = 1 and t3.deleted = \'0\'\r\ngroup by t3.id, t0.`year`\r\n) tt\r\ngroup by tt.programID, tt.`year`' WHERE `name` = '年度新增-项目集年度完成数据概览';
|
||||
UPDATE `zt_chart` SET `sql` = 'SELECT\r\n t1.name,t1.id,t2.`year`,IF(YEAR(t1.createdDate) = t2.`year`, 1, 0) as newProduct,\r\n SUM(IFNULL(t3.story, 0)) AS story,\r\n SUM(IFNULL(t4.bug, 0)) AS bug,\r\n SUM(IFNULL(t5.`plan`, 0)) AS \'plan\',\r\n SUM(IFNULL(t6.`release`, 0)) AS \'release\'\r\nFROM zt_product AS t1\r\nLEFT JOIN (SELECT DISTINCT YEAR(`date`) as \'year\' FROM zt_action) as t2 ON 1 = 1\r\nLEFT JOIN (SELECT COUNT(1) as \'story\', product, YEAR(openedDate) as `year` FROM zt_story WHERE deleted = \'0\' GROUP BY product, `year`) AS t3 on t1.id = t3.product AND t3.`year` = t2.`year`\r\nLEFT JOIN (SELECT COUNT(1) as \'bug\', product, YEAR(openedDate) as `year` FROM zt_bug WHERE deleted = \'0\' GROUP BY product, `year`) AS t4 on t1.id = t4.product AND t4.`year` = t2.`year`\r\nLEFT JOIN (SELECT COUNT(1) as \'plan\', product, YEAR(createdDate) AS \'year\' FROM zt_productplan WHERE deleted = \'0\' GROUP BY product,`year`) AS t5 on t1.id = t5.product AND t5.`year` = t2.`year`\r\nLEFT JOIN (SELECT COUNT(1) as \'release\', product, YEAR(`date`) as `year` FROM zt_release WHERE deleted = \'0\' GROUP BY product, `year`) AS t6 ON t1.id = t6.product AND t6.`year` = t2.`year`\r\nWHERE t1.deleted = \'0\' AND t1.status != \'closed\' AND t1.shadow = \'0\'\r\nGROUP BY t1.name,t1.id,t2.`year`,newProduct' WHERE `name` = '年度新增-产品年度新增数据汇总表';
|
||||
|
||||
+19
-16
File diff suppressed because one or more lines are too long
+22
-25
@@ -1,22 +1,31 @@
|
||||
2023-12-18 18.10
|
||||
完成的需求
|
||||
开源版:
|
||||
50937 Bug确认页面增加截止日期的设置
|
||||
50474 调整用例列表中自动化checkbox的逻辑
|
||||
50475 调整自动化用例图标的展示位置和样式
|
||||
50474 调整用例列表中自动化checkbox的逻辑
|
||||
51227 测试单用例列表中所属模块增加显示设置功能
|
||||
50937 Bug确认页面增加截止日期的设置
|
||||
50747 创建文档时可以进入上次使用的编辑器页面
|
||||
50630 项目型项目中激活状态且没有分解任务的软件需求支持细分操作
|
||||
50669 测试单的参与人可以在地盘待处理中查看到该测试单
|
||||
50474 调整用例列表中自动化checkbox的逻辑
|
||||
51227 测试单用例列表中所属模块增加显示设置功能
|
||||
51176 将禅道中的logo都更新为最新版本
|
||||
51049 项目中多个测试单可以生成一份测试报告
|
||||
50937 Bug确认页面增加截止日期的设置
|
||||
50747 创建文档时可以进入上次使用的编辑器页面
|
||||
50781 历史记录的排序方式增加cookie记录功能
|
||||
50747 创建文档时可以进入上次使用的编辑器页面
|
||||
50669 测试单的参与人可以在地盘待处理中查看到该测试单
|
||||
50474 调整用例列表中自动化checkbox的逻辑
|
||||
50937 Bug确认页面增加截止日期的设置
|
||||
50939 用例库用例增加从其他用例库导入功能
|
||||
50944 用例的自动化字段支持搜索功能
|
||||
51049 项目中多个测试单可以生成一份测试报告
|
||||
51176 将禅道中的logo都更新为最新版本
|
||||
51177 禅道版本信息与版本号之间增加空格间隔
|
||||
51227 测试单用例列表中所属模块增加显示设置功能
|
||||
49435 透视表汇总数据后表头无序排列
|
||||
50718 浏览器页面拖动条问题
|
||||
50740 度量项采集和储存逻辑变更
|
||||
50741 度量项数据表样式优化
|
||||
50742 度量项可视化区域新增日期筛选标签
|
||||
50744 度量项列表实现按对象分类展示,按对象、目的、时间周期排序
|
||||
50779 日期筛选标签交互与样式
|
||||
50780 度量项列表实现展开收起功能
|
||||
50938 透视表展示时分页器的优化
|
||||
50949 日志汇总表可以显示人员真实姓名
|
||||
50962 自定义透视表反馈状态不能带出汉字
|
||||
51001 大屏中表格的表头冻结展示
|
||||
企业版:
|
||||
51227 测试单用例列表中所属模块增加显示设置功能
|
||||
50747 创建文档时可以进入上次使用的编辑器页面
|
||||
@@ -42,24 +51,12 @@
|
||||
50818 导出任务的字段中增加所属项目字段
|
||||
51138 工单转软件需求页面可以自动带入工单中的附件
|
||||
51139 工单转Bug页面可以自动带入工单中的附件
|
||||
49435 透视表汇总数据后表头无序排列
|
||||
50677 实现大屏引用水球图的功能
|
||||
50679 内置大屏中环形图改为水球图
|
||||
50680 图表中内置水球图支持在前台展示
|
||||
50718 浏览器页面拖动条问题
|
||||
50719 待处理度量项计算规则调整
|
||||
50740 度量项采集和储存逻辑变更
|
||||
50741 度量项数据表样式优化
|
||||
50742 度量项可视化区域新增日期筛选标签
|
||||
50744 度量项列表实现按对象分类展示,按对象、目的、时间周期排序
|
||||
50779 日期筛选标签交互与样式
|
||||
50780 度量项列表实现展开收起功能
|
||||
50782 不同分辨率下度量项查看页面列表与内容区域自适应规则
|
||||
50877 数据表样式交互规则
|
||||
50938 透视表展示时分页器的优化
|
||||
50949 日志汇总表可以显示人员真实姓名
|
||||
50962 自定义透视表反馈状态不能带出汉字
|
||||
51001 大屏中表格的表头冻结展示
|
||||
旗舰版:
|
||||
50189 基线评审页面中增加上传附件功能
|
||||
50400 在审批进度页面中查看评审时上传的附件
|
||||
|
||||
@@ -184,6 +184,7 @@ class product extends control
|
||||
$this->view->storyType = $storyType;
|
||||
$this->view->from = $this->app->tab;
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($productID, 'story', $showModule) : array();
|
||||
$this->view->libs = $this->loadModel('assetlib')->getPairs('story');
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1083,7 +1083,7 @@ function isLocalIP()
|
||||
*/
|
||||
function getWebRoot($full = false)
|
||||
{
|
||||
if(getenv('APP_WEB_ROOT') !== false) return '/' . trim(getenv('APP_WEB_ROOT'), '/') . '/';
|
||||
if(getenv('APP_WEB_ROOT')) return '/' . trim(getenv('APP_WEB_ROOT'), '/') . '/';
|
||||
|
||||
$path = $_SERVER['SCRIPT_NAME'];
|
||||
|
||||
|
||||
@@ -3149,6 +3149,28 @@ class baseRouter
|
||||
return strtolower(getenv('IS_CONTAINER')) == 'true';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check app if it can be upgraded automatically.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function canAutoUpgrade()
|
||||
{
|
||||
return strtolower(getenv('ZT_AUTO_UPGRADE')) == 'true';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check app if it need check safe file.
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function hasValidSafeFile()
|
||||
{
|
||||
return strtolower(getenv('ZT_CHECK_SAFE_FILE')) == 'true';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get main file and ext files.
|
||||
*
|
||||
|
||||
@@ -436,7 +436,7 @@ class baseDAO
|
||||
try
|
||||
{
|
||||
$dbh = $this->slaveDBH ? $this->slaveDBH : $this->dbh;
|
||||
$row = $dbh->rawQuery($sql)->fetch(PDO::FETCH_OBJ);
|
||||
$row = $dbh->query($sql)->fetch(PDO::FETCH_OBJ);
|
||||
}
|
||||
catch (PDOException $e)
|
||||
{
|
||||
@@ -761,7 +761,7 @@ class baseDAO
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = $this->processSQL();
|
||||
$sql = $this->dbh->formatSQL($this->processSQL());
|
||||
}
|
||||
|
||||
try
|
||||
|
||||
@@ -543,6 +543,10 @@ class baseHTML
|
||||
$app->loadClass('purifier', true);
|
||||
$purifierConfig = HTMLPurifier_Config::createDefault();
|
||||
$purifierConfig->set('Cache.DefinitionImpl', null);
|
||||
|
||||
/* 设置a标签允许的特殊属性,应用于高亮左侧导航。 */
|
||||
$purifierConfig->getHTMLDefinition(true)->addAttribute('a', 'data-app', 'CDATA');
|
||||
|
||||
$purifier = new HTMLPurifier($purifierConfig);
|
||||
|
||||
return $purifier->purify($button);
|
||||
|
||||
@@ -135,7 +135,7 @@ class captcha
|
||||
} else {
|
||||
$this->builder = $builder;
|
||||
}
|
||||
|
||||
|
||||
$this->phrase = is_string($phrase) ? $phrase : $this->builder->build($phrase);
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ class captcha
|
||||
$w = $box[2] - $box[0];
|
||||
$angle = $this->rand(-$this->maxAngle, $this->maxAngle);
|
||||
$offset = $this->rand(-$this->maxOffset, $this->maxOffset);
|
||||
\imagettftext($image, $size, $angle, $x, $y + $offset, $col, $font, $symbol);
|
||||
\imagettftext($image, $size, $angle, (int)$x, (int)($y + $offset), $col, $font, $symbol);
|
||||
$x += $w;
|
||||
}
|
||||
|
||||
@@ -787,7 +787,7 @@ class PhraseBuilder
|
||||
{
|
||||
return self::doNiceize($str);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* A static helper to niceize
|
||||
*/
|
||||
|
||||
@@ -152,7 +152,7 @@ class dbh
|
||||
$sql = "SHOW DATABASES like '{$this->config->name}'";
|
||||
break;
|
||||
case 'dm':
|
||||
$sql = "SELECT * FROM dba_objects WHERE object_type='SCH' AND owner='{$this->config->name}'";
|
||||
$sql = "SELECT * FROM ALL_OBJECTS WHERE object_type='SCH' AND owner='{$this->config->name}'";
|
||||
break;
|
||||
default:
|
||||
$sql = '';
|
||||
@@ -204,6 +204,7 @@ class dbh
|
||||
return $this->rawQuery($sql);
|
||||
|
||||
case 'dm':
|
||||
/*
|
||||
$tableSpace = strtoupper($this->config->name);
|
||||
$res = $this->rawQuery("SELECT * FROM dba_data_files WHERE TABLESPACE_NAME = '$tableSpace'")->fetchAll();
|
||||
|
||||
@@ -215,8 +216,9 @@ class dbh
|
||||
$this->rawQuery($createTableSpace);
|
||||
$this->rawQuery($createUser);
|
||||
}
|
||||
*/
|
||||
|
||||
$createSchema = "CREATE SCHEMA {$this->config->name} AUTHORIZATION {$this->config->name}";
|
||||
$createSchema = "CREATE SCHEMA {$this->config->name} AUTHORIZATION {$this->config->user}";
|
||||
return $this->rawQuery($createSchema);
|
||||
|
||||
default:
|
||||
|
||||
@@ -47,6 +47,13 @@ function usePager(string|array $pagerName = 'pager', string $extra = '', ?array
|
||||
$setting['items'][] = array('type' => 'link', 'page' => 'prev', 'hint' => $pager->lang->pager->previousPage, 'icon' => 'icon-angle-left');
|
||||
$setting['items'][] = array('type' => 'link', 'page' => 'next', 'hint' => $pager->lang->pager->nextPage, 'icon' => 'icon-angle-right');
|
||||
}
|
||||
elseif($extra == 'shortPageSize')
|
||||
{
|
||||
$setting['items'][] = array('type' => 'size-menu', 'text' => str_replace('<strong>', '', str_replace('</strong>', '', $pager->lang->pager->shortPageSize)), 'dropdown' => array('placement' => 'top'), 'itemProps' => array('onClick' => jsRaw("(e, item) => $.cookie.set('$pager->pageCookie', item.text)")));
|
||||
$setting['items'][] = array('type' => 'link', 'page' => 'prev', 'hint' => $pager->lang->pager->previousPage, 'icon' => 'icon-angle-left');
|
||||
$setting['items'][] = array('type' => 'info', 'text' => '{page}/{pageTotal}');
|
||||
$setting['items'][] = array('type' => 'link', 'page' => 'next', 'hint' => $pager->lang->pager->nextPage, 'icon' => 'icon-angle-right');
|
||||
}
|
||||
else
|
||||
{
|
||||
$setting['items'][] = array('type' => 'info', 'text' => $pager->lang->pager->totalCountAB);
|
||||
|
||||
Vendored
+28
-14
@@ -46,6 +46,10 @@ pipeline {
|
||||
SRC_ZDOOEXT_PATH = "${WORKSPACE}/zdooext"
|
||||
SRC_ZENTAOEXT_PATH = "${WORKSPACE}/zentaoext"
|
||||
|
||||
OUTPUT_PKG_PATH = "${ZENTAO_RELEASE_PATH}/output"
|
||||
QINIU_ACCESS_KEY = credentials('qiniu-upload-ak')
|
||||
QINIU_SECRET_KEY = credentials('qiniu-upload-sk')
|
||||
|
||||
MIRROR = "true"
|
||||
|
||||
// 默认从job参数里读取,打开后覆盖
|
||||
@@ -87,8 +91,6 @@ pipeline {
|
||||
|
||||
def j = job.newJob()
|
||||
|
||||
env.GIT_BRANCH = j.getBranchById(env.GIT_COMMIT)
|
||||
|
||||
zentaopms.setupStaticEnv()
|
||||
zentaopms.setupEnvAfterCheckout()
|
||||
|
||||
@@ -97,12 +99,14 @@ pipeline {
|
||||
[name: "zdoo", subDir: true, url: "https://${env.GIT_HOST}/easycorp/zdoo.git", credentialsId: "git-jenkins-bot-http", branchs: ["${params.zdoo_version}", j.getReplaySHA("zdoo"), "${env.ZDOO_VERSION}"] ],
|
||||
[name: "zdooext", subDir: true, url: "https://${env.GIT_HOST}/easycorp/zdooext.git", credentialsId: "git-jenkins-bot-http", branchs: ["${params.zdooext_version}", j.getReplaySHA("zdooext"), "${env.ZDOOEXT_VERSION}"] ],
|
||||
[name: "zentaoext", subDir: true, url: "https://${env.GIT_HOST}/${env.ZENTAOEXT_GIT_REPO}.git", credentialsId: "git-jenkins-bot-http", branchs: ["${params.zentaoext_version}", j.getReplaySHA("zentaoext"), "${env.ZENTAOEXT_VERSION}"] ],
|
||||
[name: "downRepo", subDir: true, url: "https://${env.GIT_HOST}/${env.DOWNGRADE_GIT_REPO}.git", credentialsId: "git-jenkins-bot-http", branchs: ["${params.fulldown_version}", j.getReplaySHA("${env.DOWNGRADE_GIT_REPO}"), "downgrade/${env.GIT_BRANCH}/src"] ]
|
||||
[name: "downRepo", subDir: true, url: "https://${env.GIT_HOST}/${env.DOWNGRADE_GIT_REPO}.git", credentialsId: "git-jenkins-bot-http", branchs: ["${params.fulldown_version}", j.getReplaySHA("${env.DOWNGRADE_GIT_REPO}"), "downgrade/${env.DOWNGRADE_VERSION}/src"] ]
|
||||
])
|
||||
|
||||
zentaopms.setupEnvAfterCheckoutExt()
|
||||
|
||||
}
|
||||
|
||||
sh 'mkdir -pv ${ZENTAO_RELEASE_PATH} && chown 1000:1000 ${ZENTAO_RELEASE_PATH}'
|
||||
|
||||
}
|
||||
}
|
||||
@@ -115,6 +119,7 @@ pipeline {
|
||||
j.SaveHeadReport('./.head.md')
|
||||
|
||||
// update custom envoronment here
|
||||
env.PLUGIN_SAFE_EXIST = sh(returnStatus: true, script: 'test -d $SRC_ZENTAOEXT_PATH/zentaopro/safe')
|
||||
|
||||
// send start msg
|
||||
def mdPath = "start.md"
|
||||
@@ -126,11 +131,12 @@ pipeline {
|
||||
}
|
||||
|
||||
stage("Build") {
|
||||
when { expression { return params.publish_open || params.publish_biz } }
|
||||
when { expression { return params.publish_open || params.publish_biz || params.publish_plugin_safe } }
|
||||
stages {
|
||||
stage("增量降级") {
|
||||
when { expression { return params.publish_open } }
|
||||
steps {
|
||||
echo "GIT_BRANCH in jenkinsfile is ${env.GIT_BRANCH}"
|
||||
echo "DOWNGRADE_VERSION in jenkinsfile is ${env.DOWNGRADE_VERSION}"
|
||||
script { downgrade.increase() }
|
||||
}
|
||||
post {
|
||||
@@ -141,6 +147,7 @@ pipeline {
|
||||
}
|
||||
|
||||
stage("make ciCommon") {
|
||||
when { expression { return params.publish_open } }
|
||||
steps {
|
||||
withCredentials([gitUsernamePassword(credentialsId: 'git-jenkins-bot-http',gitToolName: 'git-tool')]) {
|
||||
container('package') {
|
||||
@@ -168,7 +175,6 @@ pipeline {
|
||||
}
|
||||
script {
|
||||
buildPkg.uploadSource()
|
||||
env.PLUGIN_SAFE_EXIST = sh(returnStatus: true, script: 'test -d $SRC_ZENTAOEXT_PATH/zentaopro/safe')
|
||||
}
|
||||
|
||||
}
|
||||
@@ -192,7 +198,19 @@ pipeline {
|
||||
}
|
||||
script {
|
||||
env.UPLOADED_PLUGIN_SAFE = 'true'
|
||||
buildPkg.uploadSAFe(["php5.4_5.6", "php7.0", "php7.1", "php7.2_7.4", "php8.1"])
|
||||
def versions = ["php5.4_5.6", "php7.0", "php7.1", "php7.2_7.4", "php8.1"]
|
||||
buildPkg.uploadSAFe(versions)
|
||||
if (env.BUILD_KIND=="release") {
|
||||
sh 'mkdir -pv ./release/upload && cd ./release/upload && mkdir -pv $MAX_VERSION/safe $IPD_VERSION/safe'
|
||||
for (v in versions) {
|
||||
sh "mv $ZENTAO_RELEASE_PATH/safe.max." + v + ".zip ./release/upload/$MAX_VERSION/safe/safe-$MAX_VERSION-" + v + ".zip"
|
||||
sh "mv $ZENTAO_RELEASE_PATH/safe.ipd." + v + ".zip ./release/upload/$IPD_VERSION/safe/safe-$IPD_VERSION-" + v + ".zip"
|
||||
}
|
||||
container('jnlp') {
|
||||
sh 'qshell account $QINIU_ACCESS_KEY $QINIU_SECRET_KEY uploader'
|
||||
sh 'qshell qupload2 --bucket $QINIU_BUCKET --overwrite --src-dir ./release/upload --key-prefix $OBJECT_KEY_PREFIX'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -204,12 +222,6 @@ pipeline {
|
||||
}
|
||||
|
||||
stage("Publish") {
|
||||
environment {
|
||||
OUTPUT_PKG_PATH = "${ZENTAO_RELEASE_PATH}/output"
|
||||
QINIU_ACCESS_KEY = credentials('qiniu-upload-ak')
|
||||
QINIU_SECRET_KEY = credentials('qiniu-upload-sk')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Merge and Upload") {
|
||||
when { expression { return params.publish_biz } }
|
||||
@@ -331,7 +343,7 @@ pipeline {
|
||||
} // End Merge and Upload Max
|
||||
|
||||
stage("Notice ZIP") {
|
||||
when { expression { return params.publish_biz } }
|
||||
when { expression { return params.publish_biz || params.publish_plugin_safe } }
|
||||
steps {
|
||||
checkout scmGit(branches: [[name: "master"]],
|
||||
extensions: [cloneOption(depth: 2, noTags: false, reference: '', shallow: true)],
|
||||
@@ -431,6 +443,7 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
buildZboxLinux.doBuild()
|
||||
buildZboxLinux.test()
|
||||
buildZboxLinux.uploadInternal()
|
||||
}
|
||||
}
|
||||
@@ -601,3 +614,4 @@ pipeline {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -331,6 +331,7 @@ class action extends control
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$isInZinPage = isInModal() || in_array($objectType, $this->config->action->newPageModule);
|
||||
|
||||
if(strtolower($objectType) == 'task')
|
||||
{
|
||||
$task = $this->loadModel('task')->getById($objectID);
|
||||
@@ -353,15 +354,19 @@ class action extends control
|
||||
}
|
||||
}
|
||||
|
||||
$actionID = $this->action->create($objectType, $objectID, 'Commented', isset($this->post->actioncomment) ? $this->post->actioncomment : $this->post->comment);
|
||||
if(empty($actionID))
|
||||
$comment = isset($this->post->actioncomment) ? $this->post->actioncomment : $this->post->comment;
|
||||
if($comment)
|
||||
{
|
||||
if($isInZinPage) return $this->send(array('result' => 'fail', 'message' => $this->lang->error->accessDenied));
|
||||
return print(js::error($this->lang->error->accessDenied));
|
||||
}
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
return $this->send(array('status' => 'success', 'data' => $actionID));
|
||||
$actionID = $this->action->create($objectType, $objectID, 'Commented', $comment);
|
||||
if(empty($actionID))
|
||||
{
|
||||
if($isInZinPage) return $this->send(array('result' => 'fail', 'message' => $this->lang->error->accessDenied));
|
||||
return print(js::error($this->lang->error->accessDenied));
|
||||
}
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api')
|
||||
{
|
||||
return $this->send(array('status' => 'success', 'data' => $actionID));
|
||||
}
|
||||
}
|
||||
|
||||
if($isInZinPage)
|
||||
|
||||
+17
-13
@@ -919,10 +919,10 @@ class actionModel extends model
|
||||
$this->dao->insert(TABLE_HISTORY)->data($change)->exec();
|
||||
}
|
||||
|
||||
if(isset($this->session->calllbackActionList[$actionID]))
|
||||
if(isset($this->session->callbackActionList[$actionID]))
|
||||
{
|
||||
$callbackMethod = $this->session->calllbackActionList[$actionID];
|
||||
unset($this->session->calllbackActionList[$actionID]);
|
||||
$callbackMethod = $this->session->callbackActionList[$actionID];
|
||||
unset($this->session->callbackActionList[$actionID]);
|
||||
if(method_exists($this, $callbackMethod)) call_user_func_array(array($this, $callbackMethod), array($actionID));
|
||||
}
|
||||
}
|
||||
@@ -998,21 +998,25 @@ class actionModel extends model
|
||||
$action->newMemory = $action->comment;
|
||||
$action->comment = '';
|
||||
}
|
||||
|
||||
if(!empty($extra))
|
||||
{
|
||||
$action->oldName = zget($extra->data, 'oldName', '');
|
||||
$action->newName = zget($extra->data, 'newName', '');
|
||||
$action->oldVersion = zget($extra->data, 'oldVersion', '');
|
||||
$action->newVersion = zget($extra->data, 'newVersion', '');
|
||||
$action->oldAppName = zget($extra->data, 'oldAppName', '');
|
||||
$action->newAppName = zget($extra->data, 'newAppName', '');
|
||||
$enableAutoBackup = zget($extra->data, 'autoBackup', 0);
|
||||
|
||||
if($actionType == 'saveautobackupsettings' && $enableAutoBackup) $desc = $this->lang->action->desc->closeautobackupsettings;
|
||||
$action->extra = '';
|
||||
if(!empty($extra->data))
|
||||
{
|
||||
$action->oldName = zget($extra->data, 'oldName', '');
|
||||
$action->newName = zget($extra->data, 'newName', '');
|
||||
$action->oldVersion = zget($extra->data, 'oldVersion', '');
|
||||
$action->newVersion = zget($extra->data, 'newVersion', '');
|
||||
$action->oldAppName = zget($extra->data, 'oldAppName', '');
|
||||
$action->newAppName = zget($extra->data, 'newAppName', '');
|
||||
$enableAutoBackup = zget($extra->data, 'autoBackup', 0);
|
||||
|
||||
if($actionType == 'saveautobackupsettings' && $enableAutoBackup) $desc = $this->lang->action->desc->closeautobackupsettings;
|
||||
}
|
||||
|
||||
if(!empty($extra->result->code) && $extra->result->code != 200 && !empty($extra->result->message)) $action->comment = $extra->result->message;
|
||||
if(is_string($extra->result) && $extra->result != 'fail')
|
||||
if(is_string($extra->result) && $extra->result != 'fail' && isset($extra->message))
|
||||
{
|
||||
$action->comment = "\n" . $extra->message;
|
||||
}
|
||||
|
||||
@@ -665,7 +665,7 @@ if($config->edition == 'ipd')
|
||||
$lang->block->visionTitle = '禅道使用界面分为【需求与市场管理界面】【IPD研发管理界面】和【运营管理界面】。';
|
||||
|
||||
$lang->block->visions['rnd']->title = 'IPD研发管理界面';
|
||||
$lang->block->visions['rnd']->text = "正确的做事,集项目集、{$lang->productCommon}、{$lang->projectCommon}、执行、测试等多维度管理于一体,提供全过程{$lang->projectCommon}管理解决方案。";
|
||||
$lang->block->visions['rnd']->text = "正确地做事,集项目集、{$lang->productCommon}、{$lang->projectCommon}、执行、测试等多维度管理于一体,提供全过程{$lang->projectCommon}管理解决方案。";
|
||||
|
||||
$lang->block->visions['or'] = new stdclass();
|
||||
$lang->block->visions['or']->key = 'or';
|
||||
|
||||
@@ -18,6 +18,11 @@ $(function()
|
||||
});
|
||||
|
||||
$('#dropMenu').css('z-index', 9999);
|
||||
|
||||
$("input[name^='uploadImage']").each(function()
|
||||
{
|
||||
$(this).closest('td').siblings("td[id^='buildBox']").find('select').data('zui.picker').setValue('trunk');
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
|
||||
@@ -694,10 +694,12 @@ function loadExecutionBuilds(executionID, num)
|
||||
$.get(link, function(data)
|
||||
{
|
||||
if(!data) data = '<select id="openedBuild" name="openedBuild" class="form-control picker-select" multiple=multiple></select>';
|
||||
$('#openedBuild').replaceWith(data);
|
||||
$('#openedBuild').val(oldOpenedBuild);
|
||||
$('#buildBox .input-group-btn').remove();
|
||||
$('#pickerDropMenu-pk_openedBuild').remove();
|
||||
$('#openedBuild').next('.picker').remove();
|
||||
$('#openedBuild').replaceWith(data);
|
||||
$('#openedBuild').val(oldOpenedBuild);
|
||||
$('#buildBoxActions').insertBefore('#buildBox .input-group-btn');
|
||||
notice();
|
||||
$("#openedBuild").picker({optionRender: markReleasedBuilds});
|
||||
})
|
||||
|
||||
+13
-1
@@ -220,7 +220,7 @@ class bugModel extends model
|
||||
$bug->module = (int)$data->modules[$i];
|
||||
$bug->project = (int)$data->projects[$i];
|
||||
$bug->execution = (int)$data->executions[$i];
|
||||
$bug->openedBuild = isset($data->openedBuilds) ? implode(',', $data->openedBuilds[$i]) : '';
|
||||
$bug->openedBuild = !empty($data->openedBuilds[$i]) ? implode(',', $data->openedBuilds[$i]) : '';
|
||||
$bug->color = $data->color[$i];
|
||||
$bug->title = $title;
|
||||
$bug->deadline = $data->deadlines[$i];
|
||||
@@ -4038,6 +4038,18 @@ class bugModel extends model
|
||||
$bug->$field = "<span $class title='{$bug->$field}'>{$bug->$field}</span>";
|
||||
}
|
||||
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$this->loadModel('flow');
|
||||
$extendFields = $this->loadModel('workflowfield')->getList('bug');
|
||||
foreach($extendFields as $fieldCode => $field)
|
||||
{
|
||||
if(isset($field->buildin) && $field->buildin == 0)
|
||||
{
|
||||
$bug->$fieldCode = $this->flow->printFlowCell('bug', $bug, $fieldCode, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
$rows[] = $bug;
|
||||
}
|
||||
return $rows;
|
||||
|
||||
@@ -15,6 +15,7 @@ include '../../common/view/header.html.php';
|
||||
js::set('requiredFields', $config->bug->create->requiredFields);
|
||||
js::set('productID', $productID);
|
||||
js::set('released', $lang->build->released);
|
||||
js::set('titles', !empty($titles) ? $titles : array());
|
||||
?>
|
||||
<?php
|
||||
$visibleFields = array();
|
||||
@@ -109,7 +110,7 @@ foreach(explode(',', $config->bug->create->requiredFields) as $field)
|
||||
<td><?php echo html::select("modules[$i]", $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'project', ' hidden')?> projectBox' style='overflow:visible'><?php echo html::select("projects[$i]", $projects, $projectID, "class='form-control chosen' onchange='loadProductExecutionsByProject($productID, this.value, $i)'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'execution', ' hidden')?> executionBox' style='overflow:visible'><?php echo html::select("executions[$i]", $executions, $executionID, "class='form-control chosen' onchange='loadExecutionBuilds($productID, this.value, $i)'");?></td>
|
||||
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, 'trunk', "class='form-control picker-select' multiple");?></td>
|
||||
<td id='buildBox<?php echo $i;?>'><?php echo html::select("openedBuilds[$i][]", $builds, '', "class='form-control picker-select' multiple");?></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<div class="input-control has-icon-right">
|
||||
|
||||
@@ -49,7 +49,7 @@ class build extends control
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
if(empty($executionID) && $this->app->tab == 'execution') dao::$errors['execution'] = $this->lang->build->emptyExecution;
|
||||
if(empty($executionID) && $this->app->tab == 'execution' && (!defined('RUN_MODE') || RUN_MODE != 'api')) dao::$errors['execution'] = $this->lang->build->emptyExecution;
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
if(defined('TUTORIAL')) return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true)); // Fix bug #21095.
|
||||
|
||||
@@ -579,7 +579,7 @@ class caselib extends control
|
||||
*/
|
||||
public function importFromLib($productID, $branch = 0, $libID = 0, $orderBy = 'id_desc', $browseType = '', $queryID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1, $projectID = 0, $toLib = true)
|
||||
{
|
||||
echo $this->fetch('testcase', 'importFromLib', "productID=$productID&libID=$libID&branch=$branch&orderBy=$orderBy&browseType=$browseType&queryID=$queryID&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID&toLib=$toLib");
|
||||
echo $this->fetch('testcase', 'importFromLib', "productID=$productID&branch=$branch&libID=$libID&orderBy=$orderBy&browseType=$browseType&queryID=$queryID&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID&toLib=$toLib");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,9 +36,11 @@ $lang->chart->aggList['min'] = 'MIN';
|
||||
$lang->chart->typeList = array();
|
||||
$lang->chart->typeList['pie'] = 'Pie';
|
||||
$lang->chart->typeList['line'] = 'Line';
|
||||
//$lang->chart->typeList['waterpolo'] = 'Liquid Fill';
|
||||
$lang->chart->typeList['waterpolo'] = 'Liquid Fill';
|
||||
$lang->chart->typeList['radar'] = 'Radar';
|
||||
$lang->chart->typeList['cluBarY'] = 'Clustered Bar Y';
|
||||
$lang->chart->typeList['stackedBarY'] = 'Stacked Bar Y';
|
||||
$lang->chart->typeList['cluBarX'] = 'Clustered Bar X';
|
||||
$lang->chart->typeList['stackedBar'] = 'Stacked Bar X';
|
||||
|
||||
$lang->chart->conditionList['eq'] = '=';
|
||||
|
||||
@@ -36,9 +36,11 @@ $lang->chart->aggList['min'] = 'MIN';
|
||||
$lang->chart->typeList = array();
|
||||
$lang->chart->typeList['pie'] = 'Pie';
|
||||
$lang->chart->typeList['line'] = 'Line';
|
||||
//$lang->chart->typeList['waterpolo'] = 'Liquid Fill';
|
||||
$lang->chart->typeList['waterpolo'] = 'Liquid Fill';
|
||||
$lang->chart->typeList['radar'] = 'Radar';
|
||||
$lang->chart->typeList['cluBarY'] = 'Clustered Bar Y';
|
||||
$lang->chart->typeList['stackedBarY'] = 'Stacked Bar Y';
|
||||
$lang->chart->typeList['cluBarX'] = 'Clustered Bar X';
|
||||
$lang->chart->typeList['stackedBar'] = 'Stacked Bar X';
|
||||
|
||||
$lang->chart->conditionList['eq'] = '=';
|
||||
|
||||
@@ -36,9 +36,11 @@ $lang->chart->aggList['min'] = 'MIN';
|
||||
$lang->chart->typeList = array();
|
||||
$lang->chart->typeList['pie'] = 'Pie';
|
||||
$lang->chart->typeList['line'] = 'Line';
|
||||
//$lang->chart->typeList['waterpolo'] = 'Liquid Fill';
|
||||
$lang->chart->typeList['waterpolo'] = 'Liquid Fill';
|
||||
$lang->chart->typeList['radar'] = 'Radar';
|
||||
$lang->chart->typeList['cluBarY'] = 'Clustered Bar Y';
|
||||
$lang->chart->typeList['stackedBarY'] = 'Stacked Bar Y';
|
||||
$lang->chart->typeList['cluBarX'] = 'Clustered Bar X';
|
||||
$lang->chart->typeList['stackedBar'] = 'Stacked Bar X';
|
||||
|
||||
$lang->chart->conditionList['eq'] = '=';
|
||||
|
||||
@@ -42,3 +42,5 @@ $lang->chart->typeList['cluBarY'] = '簇状条形图';
|
||||
$lang->chart->typeList['stackedBarY'] = '堆积条形图';
|
||||
$lang->chart->typeList['cluBarX'] = '簇状柱形图';
|
||||
$lang->chart->typeList['stackedBar'] = '堆积柱形图';
|
||||
|
||||
$lang->chart->conditionList['eq'] = '=';
|
||||
|
||||
@@ -625,7 +625,7 @@ class chartModel extends model
|
||||
$molecule = $this->dao->query($moleculeSQL)->fetch();
|
||||
$denominator = $this->dao->query($denominatorSQL)->fetch();
|
||||
|
||||
$percent = $denominator->count ? round($molecule->count / $denominator->count, 4) : 0;
|
||||
$percent = $denominator->count ? round((int)$molecule->count / (int)$denominator->count, 4) : 0;
|
||||
|
||||
$series = array(array('type' => 'liquidFill', 'data' => array($percent), 'color' => array('#2e7fff'), 'outline' => array('show' => false), 'label' => array('fontSize' => 26)));
|
||||
$tooltip = array('show' => true);
|
||||
|
||||
+4
-3
@@ -103,8 +103,9 @@ class ciModel extends model
|
||||
if($compile->engine != 'gitlab') $this->dao->update(TABLE_COMPILE)->set('times = times + 1')->where('id')->eq($compile->id)->exec();
|
||||
if(strripos($response, "404") > -1)
|
||||
{
|
||||
$infoUrl = sprintf("%s/job/%s/api/xml?tree=builds[id,number,result,queueId]&xpath=//build[queueId=%s]", $jenkinsServer, $compile->pipeline, $compile->queue);
|
||||
$response = common::http($infoUrl, '', array(CURLOPT_USERPWD => $userPWD));
|
||||
$jenkinsServer = strpos($compile->pipeline, '/job/') === 0 ? $jenkinsServer . $compile->pipeline : $jenkinsServer . '/job/' . $compile->pipeline;
|
||||
$infoUrl = sprintf("%s/api/xml?tree=builds[id,number,result,queueId]&xpath=//build[queueId=%s]", $jenkinsServer, $compile->queue);
|
||||
$response = common::http($infoUrl, '', array(CURLOPT_USERPWD => $userPWD));
|
||||
if($response)
|
||||
{
|
||||
$buildInfo = simplexml_load_string($response);
|
||||
@@ -115,7 +116,7 @@ class ciModel extends model
|
||||
if(empty($result)) return false;
|
||||
$this->updateBuildStatus($compile, $result);
|
||||
|
||||
$logUrl = sprintf('%s/job/%s/%s/consoleText', $jenkinsServer, $compile->pipeline, $buildNumber);
|
||||
$logUrl = sprintf('%s/%s/consoleText', $jenkinsServer, $buildNumber);
|
||||
$response = common::http($logUrl, '', array(CURLOPT_USERPWD => $userPWD));
|
||||
$this->dao->update(TABLE_COMPILE)->set('logs')->eq($response)->where('id')->eq($compile->id)->exec();
|
||||
}
|
||||
|
||||
@@ -538,6 +538,8 @@ $lang->pager->pageOfTotal = "Page <strong>{page}</strong> of <strong>{totalPage
|
||||
$lang->pager->totalCountAB = "Total: {recTotal} items";
|
||||
$lang->pager->pageSizeAB = "{recPerPage} per page";
|
||||
|
||||
$lang->pager->shortPageSize = '<strong>{recPerPage}</strong> / Page';
|
||||
|
||||
$lang->colorPicker = new stdclass();
|
||||
$lang->colorPicker->errorTip = 'Not a valid color value';
|
||||
|
||||
|
||||
@@ -538,6 +538,8 @@ $lang->pager->pageOfTotal = "Page <strong>{page}</strong> of <strong>{totalPage
|
||||
$lang->pager->totalCountAB = "Total: {recTotal} items";
|
||||
$lang->pager->pageSizeAB = "{recPerPage} per page";
|
||||
|
||||
$lang->pager->shortPageSize = '<strong>{recPerPage}</strong> / Page';
|
||||
|
||||
$lang->colorPicker = new stdclass();
|
||||
$lang->colorPicker->errorTip = 'Not a valid color value';
|
||||
|
||||
|
||||
@@ -538,6 +538,8 @@ $lang->pager->pageOfTotal = "Page <strong>{page}</strong> sur <strong>{totalPag
|
||||
$lang->pager->totalCountAB = "Total: {recTotal} lignes";
|
||||
$lang->pager->pageSizeAB = "{recPerPage} par page";
|
||||
|
||||
$lang->pager->shortPageSize = '<strong>{recPerPage}</strong> / Page';
|
||||
|
||||
$lang->colorPicker = new stdclass();
|
||||
$lang->colorPicker->errorTip = "Ce n'est pas une valeur de couleur valide";
|
||||
|
||||
|
||||
@@ -538,6 +538,8 @@ $lang->pager->pageOfTotal = '第 <strong>{page}</strong>/<strong>{totalPage}</s
|
||||
$lang->pager->totalCountAB = '共 {recTotal} 项';
|
||||
$lang->pager->pageSizeAB = '每页 {recPerPage} 项';
|
||||
|
||||
$lang->pager->shortPageSize = '<strong>{recPerPage}</strong> / 页';
|
||||
|
||||
$lang->colorPicker = new stdclass();
|
||||
$lang->colorPicker->errorTip = '不是有效的颜色值';
|
||||
|
||||
|
||||
@@ -2474,6 +2474,8 @@ EOF;
|
||||
{
|
||||
if($this->app->isContainer()) return false;
|
||||
|
||||
if($this->app->hasValidSafeFile()) return false;
|
||||
|
||||
if($this->app->getModuleName() == 'upgrade' and $this->session->upgrading) return false;
|
||||
|
||||
$statusFile = $this->app->getAppRoot() . 'www' . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'ok.txt';
|
||||
@@ -3164,7 +3166,7 @@ EOF;
|
||||
}
|
||||
|
||||
/* Check the execution is closed. */
|
||||
$productModuleList = array('story', 'bug', 'testtask');
|
||||
$productModuleList = array('story', 'bug', 'testtask', 'testreport');
|
||||
if(!in_array($module, $productModuleList) and !empty($object->execution) and is_numeric($object->execution) and empty($config->CRExecution))
|
||||
{
|
||||
if(!isset($executionsStatus[$object->execution]))
|
||||
|
||||
@@ -395,6 +395,8 @@ class cron extends control
|
||||
parse_str($task->command, $params);
|
||||
if(isset($params['moduleName']) and isset($params['methodName']))
|
||||
{
|
||||
$this->viewType = 'html';
|
||||
|
||||
$this->app->loadLang($params['moduleName']);
|
||||
$this->app->loadConfig($params['moduleName']);
|
||||
$output = $this->fetch($params['moduleName'], $params['methodName']);
|
||||
|
||||
@@ -110,7 +110,7 @@ class datatable extends control
|
||||
$project = $this->loadModel('project')->getByID($this->session->project);
|
||||
|
||||
if(!$project->multiple) unset($cols['execution']);
|
||||
if(!$project->hasProduct and $project->model != 'scrum') unset($cols['plan']);
|
||||
if(!$project->hasProduct && ($project->model != 'scrum' || !$project->multiple)) unset($cols['plan']);
|
||||
if(!$project->hasProduct) unset($cols['branch']);
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ function buildTable(resp)
|
||||
for(var field in resp.fields)
|
||||
{
|
||||
var fieldName = field;
|
||||
if(dataview && checkObjProp(dataview, fieldSettings)) fieldName = dataview.fieldSettings[field].name || field;
|
||||
if(dataview && checkObjProp(dataview, 'fieldSettings')) fieldName = dataview.fieldSettings[field].name || field;
|
||||
if(dataview && checkObjProp(dataview, langs) && dataview.langs != '')
|
||||
{
|
||||
var langs = JSON.parse(dataview.langs);
|
||||
|
||||
@@ -98,6 +98,7 @@ $lang->dataview->objects['testrun'] = 'testrun';
|
||||
$lang->dataview->objects['testcase'] = 'testcase';
|
||||
$lang->dataview->objects['testresult'] = 'result';
|
||||
$lang->dataview->objects['casemodule'] = 'case module';
|
||||
$lang->dataview->objects['feedback'] = 'Feedback';
|
||||
$lang->dataview->objects['action'] = 'Action';
|
||||
$lang->dataview->objects['effort'] = 'Effort';
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ $lang->dataview->objects['testrun'] = 'testrun';
|
||||
$lang->dataview->objects['testcase'] = 'testcase';
|
||||
$lang->dataview->objects['testresult'] = 'result';
|
||||
$lang->dataview->objects['casemodule'] = 'case module';
|
||||
$lang->dataview->objects['feedback'] = 'Feedback';
|
||||
$lang->dataview->objects['action'] = 'Action';
|
||||
$lang->dataview->objects['effort'] = 'Effort';
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ $lang->dataview->objects['testrun'] = 'testrun';
|
||||
$lang->dataview->objects['testcase'] = 'testcase';
|
||||
$lang->dataview->objects['testresult'] = 'result';
|
||||
$lang->dataview->objects['casemodule'] = 'case module';
|
||||
$lang->dataview->objects['feedback'] = 'Feedback';
|
||||
$lang->dataview->objects['action'] = 'Action';
|
||||
$lang->dataview->objects['effort'] = 'Effort';
|
||||
|
||||
|
||||
@@ -92,6 +92,7 @@ $lang->dataview->objects['bug'] = $lang->bug->common;
|
||||
$lang->dataview->objects['project'] = $lang->project->common;
|
||||
$lang->dataview->objects['task'] = $lang->task->common;
|
||||
$lang->dataview->objects['team'] = '团队';
|
||||
$lang->dataview->objects['user'] = '用户';
|
||||
$lang->dataview->objects['execution'] = '阶段';
|
||||
$lang->dataview->objects['testtask'] = '测试单';
|
||||
$lang->dataview->objects['testrun'] = '测试执行';
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$this->app->loadLang('user');
|
||||
$this->app->loadLang('dept');
|
||||
|
||||
$schema = new stdclass();
|
||||
|
||||
$schema->primaryTable = 'user';
|
||||
|
||||
$schema->tables = array();
|
||||
$schema->tables['user'] = 'zt_user';
|
||||
$schema->tables['dept'] = 'zt_dept';
|
||||
|
||||
$schema->joins = array();
|
||||
$schema->joins['dept'] = 'dept.id = user.dept';
|
||||
|
||||
$schema->fields = array();
|
||||
$schema->fields['id'] = array('type' => 'number', 'name' => $this->lang->user->id);
|
||||
$schema->fields['dept'] = array('type' => 'object', 'name' => $this->lang->user->dept, 'object' => 'dept', 'show' => 'dept.name');
|
||||
+13
-13
@@ -183,9 +183,10 @@ class design extends control
|
||||
$this->view->position[] = $this->lang->design->create;
|
||||
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productIdList, 'all', 0, 'active', 'id_desc', 0, 'full', 'story', false);
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productIdList, 'all', 0, 'active');
|
||||
$this->view->productID = $productID;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->view->type = $type;
|
||||
$this->view->typeList = $project->model == 'waterfall' ? $this->lang->design->typeList : $this->lang->design->plusTypeList;
|
||||
|
||||
@@ -231,7 +232,7 @@ class design extends control
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->batchCreate;
|
||||
$this->view->position[] = $this->lang->design->batchCreate;
|
||||
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productIdList);
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productIdList, 'all', 0, 'active');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$this->view->type = $type;
|
||||
$this->view->typeList = $project->model == 'waterfall' ? $this->lang->design->typeList : $this->lang->design->plusTypeList;
|
||||
@@ -262,11 +263,11 @@ class design extends control
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->view;
|
||||
$this->view->position[] = $this->lang->design->view;
|
||||
|
||||
$this->view->design = $design;
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productIdList);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('design', $design->id);
|
||||
$this->view->repos = $this->loadModel('repo')->getRepoPairs('project', $design->project);
|
||||
$this->view->design = $design;
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productIdList, 'all', 0, 'active');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('design', $design->id);
|
||||
$this->view->repos = $this->loadModel('repo')->getRepoPairs('project', $design->project);
|
||||
$this->view->project = $project;
|
||||
$this->view->typeList = $project->model == 'waterfall' ? $this->lang->design->typeList : $this->lang->design->plusTypeList;
|
||||
|
||||
@@ -319,7 +320,7 @@ class design extends control
|
||||
|
||||
$this->view->design = $design;
|
||||
$this->view->project = $project;
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productIdList);
|
||||
$this->view->stories = $this->loadModel('story')->getProductStoryPairs($productIdList, 'all', 0, 'active');
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed');
|
||||
$this->view->typeList = $project->model == 'waterfall' ? $this->lang->design->typeList : $this->lang->design->plusTypeList;
|
||||
|
||||
@@ -435,13 +436,12 @@ class design extends control
|
||||
*/
|
||||
public function viewCommit($designID = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$design = $this->design->getCommit($designID, $pager);
|
||||
$productID = $this->commonAction($design->project, $design->product, $designID);
|
||||
|
||||
/* Init pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init(0, $recPerPage, $pageID);
|
||||
$this->app->loadClass('pager', true);
|
||||
$pager = pager::init($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$design = $this->design->getCommit($designID, $pager);
|
||||
$this->commonAction($design->project, $design->product, $designID);
|
||||
|
||||
$this->view->title = $this->lang->design->common . $this->lang->colon . $this->lang->design->submission;
|
||||
$this->view->position[] = $this->lang->design->submission;
|
||||
|
||||
+7
-10
@@ -449,22 +449,19 @@ class designModel extends model
|
||||
|
||||
if($this->app->rawMethod == 'browse') $this->lang->waterfall->menu->design['subMenu']->bysearch = array('link' => '<a href="javascript:;" class="querybox-toggle"><i class="icon-search icon"></i> ' . $this->lang->searchAB . '</a>');
|
||||
|
||||
if(empty($products) || !$productID) return '';
|
||||
if(empty($products)) return '';
|
||||
|
||||
if($productID)
|
||||
{
|
||||
$currentProduct = $this->loadModel('product')->getById($productID);
|
||||
setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
}
|
||||
else
|
||||
$currentProduct = $this->loadModel('product')->getById($productID);
|
||||
setCookie("lastProduct", $productID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
$currentProduct = $this->loadModel('product')->getById($productID);
|
||||
if(!empty($currentProduct->shadow)) return '';
|
||||
|
||||
if(!$productID)
|
||||
{
|
||||
$currentProduct = new stdclass();
|
||||
$currentProduct->name = $this->lang->product->all;
|
||||
}
|
||||
|
||||
$currentProduct = $this->loadModel('product')->getById($productID);
|
||||
if(!empty($currentProduct->shadow)) return '';
|
||||
|
||||
$output = '';
|
||||
if(!empty($products))
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ foreach($products as $product)
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
<?php if($currentProduct->status == 'closed'):?>
|
||||
<?php if($productID && $currentProduct->status == 'closed'):?>
|
||||
$('.col-footer .toggle-right-col').click(function(){ scrollToSelected(); })
|
||||
<?php else:?>
|
||||
scrollToSelected();
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<?php if($changeOnlyBody) $_Get['onlybody'] = 'yes'?>
|
||||
<?php if($changeOnlyBody) $_GET['onlybody'] = 'yes'?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer table-statistic'>
|
||||
|
||||
@@ -770,7 +770,8 @@ class doc extends control
|
||||
$objects = array();
|
||||
if($objectType == 'project')
|
||||
{
|
||||
$objects = $this->project->getPairsByProgram('', 'all', false, 'order_asc', 'kanban');
|
||||
$excludedModel = $this->config->vision != 'lite' ? 'kanban' : '';
|
||||
$objects = $this->project->getPairsByProgram('', 'all', false, 'order_asc', $excludedModel);
|
||||
}
|
||||
elseif($objectType == 'execution')
|
||||
{
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
.h-full-adjust {overflow-y: auto; height: calc(100vh - 125px);}
|
||||
.main-col .block-files .panel-heading {padding-right: 20px;}
|
||||
.main-col .block-files .panel-heading .panel-title {height: 35px; line-height: 30px;}
|
||||
|
||||
@@ -55,7 +54,6 @@
|
||||
.flex-auto {flex: auto;}
|
||||
.flex-full > .panel {box-shadow: none;}
|
||||
.float-r {float: right;}
|
||||
.h-full {height: 100%;}
|
||||
.w-full {width: 100%;}
|
||||
.overflow-x-auto {overflow-x: auto;}
|
||||
.overflow-auto {overflow: auto;}
|
||||
@@ -122,3 +120,4 @@
|
||||
.history-btn:focus {background-color: rgba(255,255,255,.8)}
|
||||
|
||||
#actionbox {margin-left: 30px;}
|
||||
#diffContain .CodeMirror.cm-s-paper.CodeMirror-wrap {overflow-y: hidden; height: calc(100vh - 230px);}
|
||||
|
||||
@@ -56,7 +56,7 @@ $(function()
|
||||
$('#status').val('normal');
|
||||
});
|
||||
|
||||
if(docType == 'html' || docType == 'markdown') docType = docContentType;
|
||||
if(docType == 'html' || docType == 'template') docType = docContentType;
|
||||
setTimeout(function(){initPage(docType)}, 50);
|
||||
if(typeof(window.editor) != 'undefined')
|
||||
{
|
||||
|
||||
@@ -4,6 +4,17 @@ $(function()
|
||||
var contentHeight = $(document).height() - 92;
|
||||
setTimeout(function(){$('.ke-edit-iframe, .ke-edit, .ke-edit-textarea').height(contentHeight);}, 100);
|
||||
setTimeout(function(){$('.CodeMirror').height($(document).height() - 112);}, 100);
|
||||
if(contentType == 'markdown' && $(document).height() > $(window).height())
|
||||
{
|
||||
setTimeout(function()
|
||||
{
|
||||
var visibleHeight = $(window).height() - $('#headerBox').height() - $('#appsBar').height() - 40;
|
||||
$('#contentBox .CodeMirror.cm-s-paper.CodeMirror-wrap').css('max-height', visibleHeight + 'px');
|
||||
$('#contentBox .CodeMirror.cm-s-paper.CodeMirror-wrap .CodeMirror-vscrollbar').css('display', 'block');
|
||||
$('#contentBox .CodeMirror.cm-s-paper.CodeMirror-wrap .CodeMirror-vscrollbar').height(visibleHeight);
|
||||
$('#contentBox .CodeMirror.cm-s-paper.CodeMirror-wrap .CodeMirror-vscrollbar div').height(contentHeight);
|
||||
}, 200);
|
||||
}
|
||||
$('iframe.ke-edit-iframe').contents().find('.article-content').css('padding', '20px 20px 0 20px');
|
||||
|
||||
$('#saveDraft').click(function()
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
$(function()
|
||||
{
|
||||
if($.cookie('isFullScreen') == 1) fullScreen();
|
||||
|
||||
$('.menu-actions > a').click(function()
|
||||
{
|
||||
$(this).parent().hasClass('open') ? $(this).css('background', 'none') : $(this).css('background', '#f1f1f1');
|
||||
@@ -82,6 +80,7 @@ function fullScreen()
|
||||
$('#content .file-image .right-icon').addClass('hidden');
|
||||
$('#content .detail').eq(1).addClass('hidden');
|
||||
$.cookie('isFullScreen', 1);
|
||||
$('#diffContain .CodeMirror.cm-s-paper.CodeMirror-wrap').css('height', 'calc(100vh - 120px)');
|
||||
};
|
||||
|
||||
var whenFailEnterFullscreen = function(error)
|
||||
@@ -125,6 +124,7 @@ function exitFullScreen()
|
||||
$('#content .detail').eq(1).removeClass('hidden');
|
||||
$('.main-col iframe').css('min-height', '380px');
|
||||
$.cookie('isFullScreen', 0);
|
||||
$('#diffContain .CodeMirror.cm-s-paper.CodeMirror-wrap').css('height', 'calc(100vh - 230px)');
|
||||
}
|
||||
|
||||
document.addEventListener('fullscreenchange', function (e)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php js::set('confirmDelete', $lang->doc->confirmDelete);?>
|
||||
<?php js::set('latestVersion', $doc->version);?>
|
||||
<?php $sessionString = session_name() . '=' . session_id();?>
|
||||
<div style="height:100%" id="h-full">
|
||||
<div>
|
||||
<div class="main-col col-8 flex-content">
|
||||
<div class="cell" id="content">
|
||||
<div class="detail no-padding">
|
||||
@@ -294,7 +294,10 @@
|
||||
<?php if($doc->contentType == 'markdown'):?>
|
||||
<?php css::import($jsRoot . "markdown/simplemde.min.css");?>
|
||||
<?php js::import($jsRoot . 'markdown/simplemde.min.js'); ?>
|
||||
<?php js::set('markdownText', htmlspecialchars($doc->content));?>
|
||||
<?php
|
||||
$markdownText = preg_replace("/(\r\n)+|\r+|\n+/", "\n", $doc->content);
|
||||
js::set('markdownText', htmlspecialchars($markdownText));
|
||||
?>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
|
||||
@@ -149,5 +149,6 @@ $(function()
|
||||
<?php js::set('draft', $doc->draft);?>
|
||||
<?php js::set('type', 'doc');?>
|
||||
<?php js::set('titleNotEmpty', sprintf($lang->error->notempty, $lang->doc->title));?>
|
||||
<?php js::set('contentType', $doc->contentType);?>
|
||||
<?php include '../../ai/view/inputinject.html.php';?>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1605,8 +1605,10 @@ class execution extends control
|
||||
|
||||
$execution = $this->execution->getById($executionID);
|
||||
|
||||
if($execution->type == 'stage') $this->lang->execution->placeholder->totalLeft = str_replace($this->lang->executionCommon, $this->lang->execution->stage, $this->lang->execution->placeholder->totalLeft);
|
||||
|
||||
$this->view->firstBurn = $this->dao->select('*')->from(TABLE_BURN)->where('execution')->eq($executionID)->andWhere('date')->eq($execution->begin)->fetch();
|
||||
$this->view->execution = $execution;
|
||||
$this->view->execution = $execution;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -306,7 +306,7 @@ function renderTaskItem(item, $item, col)
|
||||
$item.html(renderUserAvatar(item.assignedTo, 'task', item.id, 'md'));
|
||||
}
|
||||
|
||||
if(scaleSize <= 1)
|
||||
if(canBeChanged && scaleSize <= 1)
|
||||
{
|
||||
var $actions = $item.find('.actions');
|
||||
if(!$actions.length && item.menus && item.menus.length)
|
||||
@@ -356,8 +356,13 @@ function renderColumnCount($count, count, col)
|
||||
return;
|
||||
}
|
||||
|
||||
var text = count + '/' + (col.limit < 0 ? '<i class="icon icon-infinite"></i>' : col.limit);
|
||||
$count.html(text + '<i class="icon icon-arrow-up" data-toggle="tooltip" data-original-title="' + kanbanLang.limitExceeded + '"></i>');
|
||||
var text = count + '/' + (col.limit < 0 ? '<i class="icon icon-infinite"></i>' : col.limit);
|
||||
var limitTip = '';
|
||||
if(col.limit >= 0 && count > col.limit)
|
||||
{
|
||||
limitTip = 'data-original-title="' + kanbanLang.limitExceeded + '"';
|
||||
}
|
||||
$count.html(text + '<i class="icon icon-arrow-up" data-toggle="tooltip" ' + limitTip + '"></i>');
|
||||
|
||||
if(col.limit != -1 && col.limit < count)
|
||||
{
|
||||
@@ -1238,16 +1243,12 @@ $(function()
|
||||
onAction: handleKanbanAction,
|
||||
virtualRenderOptions: {container: '#kanbanContainer>.panel-body,#kanbanContainer'},
|
||||
virtualCardList: true,
|
||||
droppable:
|
||||
{
|
||||
target: findDropColumns,
|
||||
finish: handleFinishDrop
|
||||
},
|
||||
onRenderHeaderCol: renderHeaderCol,
|
||||
onRenderLaneName: renderLaneName,
|
||||
onRenderCount: renderColumnCount,
|
||||
sortable: handleSortCards,
|
||||
};
|
||||
if(canBeChanged) commonOptions.droppable = {target: findDropColumns, finish: handleFinishDrop};
|
||||
|
||||
/* Create kanban */
|
||||
if(groupBy == 'default')
|
||||
|
||||
+14
-16
@@ -788,6 +788,8 @@ class executionModel extends model
|
||||
$parents = array();
|
||||
foreach($oldExecutions as $oldExecution) $parents[$oldExecution->id] = $oldExecution->parent;
|
||||
|
||||
$parentAttrs = $this->dao->select('id,attribute')->from(TABLE_PROJECT)->where('id')->in($parents)->andWhere('deleted')->eq(0)->fetchPairs('id');
|
||||
|
||||
/* Replace required language. */
|
||||
if($this->app->tab == 'project')
|
||||
{
|
||||
@@ -873,16 +875,8 @@ class executionModel extends model
|
||||
if(isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus'))
|
||||
{
|
||||
$this->app->loadLang('stage');
|
||||
$attribute = $executions[$executionID]->attribute;
|
||||
|
||||
if(isset($attributeList[$parentID]))
|
||||
{
|
||||
$parentAttr = $attributeList[$parentID];
|
||||
}
|
||||
else
|
||||
{
|
||||
$parentAttr = $this->dao->select('attribute')->from(TABLE_PROJECT)->where('id')->eq($parentID)->fetch('attribute');
|
||||
}
|
||||
$attribute = $executions[$executionID]->attribute;
|
||||
$parentAttr = $parentAttrs[$parentID];
|
||||
|
||||
if($parentAttr and $parentAttr != $attribute and $parentAttr != 'mix')
|
||||
{
|
||||
@@ -4102,11 +4096,12 @@ class executionModel extends model
|
||||
$execution = $this->getById($executionID);
|
||||
$burn = $this->dao->select('*')->from(TABLE_BURN)->where('execution')->eq($executionID)->andWhere('date')->eq($execution->begin)->andWhere('task')->eq(0)->fetch();
|
||||
$withLeft = $this->post->withLeft ? $this->post->withLeft : 0;
|
||||
$burnLeft = empty($burn) ? 0 : $burn->left;
|
||||
|
||||
$data = fixer::input('post')
|
||||
->add('execution', $executionID)
|
||||
->add('date', $execution->begin)
|
||||
->add('left', $withLeft ? $this->post->estimate : $burn->left)
|
||||
->add('left', $withLeft ? $this->post->estimate : $burnLeft)
|
||||
->add('consumed', empty($burn) ? 0 : $burn->consumed)
|
||||
->remove('withLeft')
|
||||
->get();
|
||||
@@ -4505,13 +4500,15 @@ class executionModel extends model
|
||||
*
|
||||
* @param object $execution
|
||||
* @param string $action
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public static function isClickable($execution, $action)
|
||||
public static function isClickable($execution, $action, $module = 'execution')
|
||||
{
|
||||
if($module == 'programplan') $module = 'execution';
|
||||
$action = strtolower($action);
|
||||
$clickable = commonModel::hasPriv('execution', $action);
|
||||
$clickable = commonModel::hasPriv($module, $action);
|
||||
if(!$clickable) return false;
|
||||
|
||||
if($action == 'start') return $execution->status == 'wait';
|
||||
@@ -5417,13 +5414,13 @@ class executionModel extends model
|
||||
echo "<td id='spark-{$execution->id}' class='sparkline text-left no-padding' values='$burns'></td>";
|
||||
echo '<td class="c-actions text-left">';
|
||||
|
||||
$title = '';
|
||||
$disabled = '';
|
||||
$title = '';
|
||||
$disabled = $execution->status == 'wait' ? '' : 'disabled';
|
||||
$this->app->loadLang('stage');
|
||||
if($project and $project->model == 'ipd')
|
||||
{
|
||||
$title = ($execution->ipdStage['canStart'] or $execution->ipdStage['isFirst']) ? '' : sprintf($this->lang->execution->disabledTip->startTip, $this->lang->stage->ipdTypeList[$execution->ipdStage['preAttribute']], $this->lang->stage->ipdTypeList[$execution->attribute]);
|
||||
$disabled = $execution->ipdStage['canStart'] ? '' : 'disabled';
|
||||
$disabled = $execution->ipdStage['canStart'] ? $disabled : 'disabled';
|
||||
}
|
||||
echo common::buildIconButton('execution', 'start', "executionID={$execution->id}", $execution, 'list', '', '', 'iframe', true, $disabled, $title, '', empty($disabled));
|
||||
|
||||
@@ -5880,6 +5877,7 @@ class executionModel extends model
|
||||
if($sortType) $set->sortType = $sortType;
|
||||
|
||||
if(isset($set->width)) $set->width = str_replace('px', '', $set->width);
|
||||
if(empty($set->fixed) || $set->fixed == 'no') $set->fixed = 'right';
|
||||
|
||||
unset($set->id);
|
||||
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
<th><?php echo $lang->execution->linkPlan;?></th>
|
||||
<td id="plansBox">
|
||||
<?php $planProductID = current(array_keys($allProducts));?>
|
||||
<?php echo html::select("plans[$planProductID][]", isset($productPlan) ? $productPlan : array(), '', "class='form-control chosen' multiple");?>
|
||||
<?php echo html::select("plans[$planProductID][]", isset($productPlan) ? $productPlan : array(), isset($productPlan[$plan->id]) ? $plan->id : '', "class='form-control chosen' multiple");?>
|
||||
<?php echo html::hidden("products[]", $planProductID);?>
|
||||
<?php echo html::hidden("branch[0][0]", '0');?>
|
||||
</td>
|
||||
|
||||
@@ -238,5 +238,6 @@ js::set('priv',
|
||||
<?php js::set('defaultMaxColWidth', $this->config->maxColWidth);?>
|
||||
<?php js::set('teamWords', $lang->execution->teamWords);?>
|
||||
<?php js::set('canImportBug', $features['qa']);?>
|
||||
<?php js::set('canBeChanged', $canBeChanged);?>
|
||||
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
$planIDList = explode(',', $planIDList);
|
||||
foreach($planIDList as $planID)
|
||||
{
|
||||
if(isset($planGroups[$productID][$planID])) echo '<div class="col-xs-12">' . "<i class='icon icon-calendar text-muted'></i> " . html::a($this->createLink('productplan', 'view', "planID={$planID}"), $product->name . '/' . $planGroups[$productID][$planID]) . '</div>';
|
||||
if(isset($planGroups[$productID][$planID])) echo '<div class="col-xs-12">' . "<i class='icon icon-calendar text-muted'></i> " . html::a($this->createLink('productplan', 'view', "planID={$planID}"), $product->name . '/' . $planGroups[$productID][$planID], '_self', $execution->projectInfo->hasProduct ? '' : "data-app='project'") . '</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +249,7 @@ $lang->group->package->importRelease = 'Import Release';
|
||||
$lang->group->package->deleteRelease = 'Delete Release';
|
||||
$lang->group->package->releaseNotify = 'Release Notify';
|
||||
$lang->group->package->projectPlan = 'Project Plan';
|
||||
$lang->group->package->manageProjectStory = 'Manage Project Story';
|
||||
$lang->group->package->manageProjectStory = 'Manage Project ' . $lang->SRCommon;
|
||||
$lang->group->package->browseProject = 'Browse Project';
|
||||
$lang->group->package->manageProject = 'Manage Project';
|
||||
$lang->group->package->importProject = 'Import Project';
|
||||
@@ -315,6 +315,7 @@ $lang->group->package->lieu = 'Lieu';
|
||||
$lang->group->package->holiday = 'Holiday';
|
||||
$lang->group->package->exportOffice = 'Export Office';
|
||||
$lang->group->package->browseFeedback = 'Browse Feedback';
|
||||
$lang->group->package->browseLiteFeedback = 'Browse Feedback';
|
||||
$lang->group->package->manageFeedback = 'Manage Feedback';
|
||||
$lang->group->package->importFeedback = 'Import Feedback';
|
||||
$lang->group->package->handleFeedback = 'Handle Feedback';
|
||||
@@ -505,7 +506,7 @@ $lang->group->package->executionRelation = 'Execution Relation';
|
||||
$lang->group->package->browseBuild = 'Browse Build';
|
||||
$lang->group->package->browseExecutionStory = 'Browse Execution Story';
|
||||
$lang->group->package->manageCard = 'Manage Card';
|
||||
$lang->group->package->browseProjectStory = 'Browse Project Story';
|
||||
$lang->group->package->browseProjectStory = 'Browse Project ' . $lang->SRCommon;
|
||||
$lang->group->package->chckAuditPlan = 'Chck Audit Plan';
|
||||
$lang->group->package->reviewAssess = 'Review Assess';
|
||||
$lang->group->package->reviewAudit = 'Review Audit';
|
||||
@@ -588,6 +589,5 @@ $lang->group->package->deleteArtifactrepo = 'Delete Artifact Repo';
|
||||
$lang->group->package->browseApplication = 'Application List';
|
||||
$lang->group->package->mangeApplication = 'Manage Application';
|
||||
$lang->group->package->trainPracticeLib = 'Practice Library';
|
||||
$lang->group->package->other = 'Other';
|
||||
|
||||
include (dirname(__FILE__) . '/resource.php');
|
||||
|
||||
@@ -249,7 +249,7 @@ $lang->group->package->importRelease = 'Import Release';
|
||||
$lang->group->package->deleteRelease = 'Delete Release';
|
||||
$lang->group->package->releaseNotify = 'Release Notify';
|
||||
$lang->group->package->projectPlan = 'Project Plan';
|
||||
$lang->group->package->manageProjectStory = 'Manage Project Story';
|
||||
$lang->group->package->manageProjectStory = 'Manage Project ' . $lang->SRCommon;
|
||||
$lang->group->package->browseProject = 'Browse Project';
|
||||
$lang->group->package->manageProject = 'Manage Project';
|
||||
$lang->group->package->importProject = 'Import Project';
|
||||
@@ -315,6 +315,7 @@ $lang->group->package->lieu = 'Lieu';
|
||||
$lang->group->package->holiday = 'Holiday';
|
||||
$lang->group->package->exportOffice = 'Export Office';
|
||||
$lang->group->package->browseFeedback = 'Browse Feedback';
|
||||
$lang->group->package->browseLiteFeedback = 'Browse Feedback';
|
||||
$lang->group->package->manageFeedback = 'Manage Feedback';
|
||||
$lang->group->package->importFeedback = 'Import Feedback';
|
||||
$lang->group->package->handleFeedback = 'Handle Feedback';
|
||||
@@ -505,7 +506,7 @@ $lang->group->package->executionRelation = 'Execution Relation';
|
||||
$lang->group->package->browseBuild = 'Browse Build';
|
||||
$lang->group->package->browseExecutionStory = 'Browse Execution Story';
|
||||
$lang->group->package->manageCard = 'Manage Card';
|
||||
$lang->group->package->browseProjectStory = 'Browse Project Story';
|
||||
$lang->group->package->browseProjectStory = 'Browse Project ' . $lang->SRCommon;
|
||||
$lang->group->package->chckAuditPlan = 'Chck Audit Plan';
|
||||
$lang->group->package->reviewAssess = 'Review Assess';
|
||||
$lang->group->package->reviewAudit = 'Review Audit';
|
||||
|
||||
@@ -249,7 +249,7 @@ $lang->group->package->importRelease = 'Import Release';
|
||||
$lang->group->package->deleteRelease = 'Delete Release';
|
||||
$lang->group->package->releaseNotify = 'Release Notify';
|
||||
$lang->group->package->projectPlan = 'Project Plan';
|
||||
$lang->group->package->manageProjectStory = 'Manage Project Story';
|
||||
$lang->group->package->manageProjectStory = 'Manage Project ' . $lang->SRCommon;
|
||||
$lang->group->package->browseProject = 'Browse Project';
|
||||
$lang->group->package->manageProject = 'Manage Project';
|
||||
$lang->group->package->importProject = 'Import Project';
|
||||
@@ -315,6 +315,7 @@ $lang->group->package->lieu = 'Lieu';
|
||||
$lang->group->package->holiday = 'Holiday';
|
||||
$lang->group->package->exportOffice = 'Export Office';
|
||||
$lang->group->package->browseFeedback = 'Browse Feedback';
|
||||
$lang->group->package->browseLiteFeedback = 'Browse Feedback';
|
||||
$lang->group->package->manageFeedback = 'Manage Feedback';
|
||||
$lang->group->package->importFeedback = 'Import Feedback';
|
||||
$lang->group->package->handleFeedback = 'Handle Feedback';
|
||||
@@ -505,7 +506,7 @@ $lang->group->package->executionRelation = 'Execution Relation';
|
||||
$lang->group->package->browseBuild = 'Browse Build';
|
||||
$lang->group->package->browseExecutionStory = 'Browse Execution Story';
|
||||
$lang->group->package->manageCard = 'Manage Card';
|
||||
$lang->group->package->browseProjectStory = 'Browse Project Story';
|
||||
$lang->group->package->browseProjectStory = 'Browse Project ' . $lang->SRCommon;
|
||||
$lang->group->package->chckAuditPlan = 'Chck Audit Plan';
|
||||
$lang->group->package->reviewAssess = 'Review Assess';
|
||||
$lang->group->package->reviewAudit = 'Review Audit';
|
||||
@@ -588,6 +589,5 @@ $lang->group->package->deleteArtifactrepo = 'Delete Artifact Repo';
|
||||
$lang->group->package->browseApplication = 'Application List';
|
||||
$lang->group->package->mangeApplication = 'Manage Application';
|
||||
$lang->group->package->trainPracticeLib = 'Practice Library';
|
||||
$lang->group->package->other = 'Other';
|
||||
|
||||
include (dirname(__FILE__) . '/resource.php');
|
||||
|
||||
@@ -249,7 +249,7 @@ $lang->group->package->importRelease = '导入导出发布';
|
||||
$lang->group->package->deleteRelease = '删除发布';
|
||||
$lang->group->package->releaseNotify = '发布通知';
|
||||
$lang->group->package->projectPlan = '项目计划';
|
||||
$lang->group->package->manageProjectStory = '维护项目研发需求';
|
||||
$lang->group->package->manageProjectStory = '维护项目' . $lang->SRCommon;
|
||||
$lang->group->package->browseProject = '浏览项目';
|
||||
$lang->group->package->manageProject = '创建维护项目';
|
||||
$lang->group->package->importProject = '导入导出项目';
|
||||
@@ -315,6 +315,7 @@ $lang->group->package->lieu = '个人调休';
|
||||
$lang->group->package->holiday = '节假日';
|
||||
$lang->group->package->exportOffice = '办公导出';
|
||||
$lang->group->package->browseFeedback = '浏览反馈';
|
||||
$lang->group->package->browseLiteFeedback = '浏览反馈';
|
||||
$lang->group->package->manageFeedback = '创建维护反馈';
|
||||
$lang->group->package->importFeedback = '导入导出反馈';
|
||||
$lang->group->package->handleFeedback = '处理反馈';
|
||||
@@ -505,7 +506,7 @@ $lang->group->package->executionRelation = '维护任务关系';
|
||||
$lang->group->package->browseBuild = '浏览版本';
|
||||
$lang->group->package->browseExecutionStory = '浏览执行研发需求';
|
||||
$lang->group->package->manageCard = '维护卡片';
|
||||
$lang->group->package->browseProjectStory = '浏览项目研发需求';
|
||||
$lang->group->package->browseProjectStory = '浏览项目' . $lang->SRCommon;
|
||||
$lang->group->package->chckAuditPlan = '检查质量保证计划';
|
||||
$lang->group->package->reviewAssess = '评审基线评审';
|
||||
$lang->group->package->reviewAudit = '审计基线评审';
|
||||
|
||||
@@ -1512,6 +1512,13 @@ $config->group->package->browseFeedback->privs = array();
|
||||
$config->group->package->browseFeedback->privs['feedback-adminView'] = array('edition' => 'biz,max,ipd', 'vision' => 'rnd', 'order' => 25, 'depend' => array('feedback-admin'), 'recommend' => array('feedback-create', 'feedback-edit'));
|
||||
$config->group->package->browseFeedback->privs['feedback-admin'] = array('edition' => 'biz,max,ipd', 'vision' => 'rnd', 'order' => 30, 'depend' => array(), 'recommend' => array('feedback-adminView'));
|
||||
|
||||
$config->group->package->browseLiteFeedback = new stdclass();
|
||||
$config->group->package->browseLiteFeedback->order = 5;
|
||||
$config->group->package->browseLiteFeedback->subset = 'feedback';
|
||||
$config->group->package->browseLiteFeedback->privs = array();
|
||||
$config->group->package->browseLiteFeedback->privs['feedback-view'] = array('edition' => 'biz,max,ipd', 'vision' => 'lite', 'order' => 25, 'depend' => array('feedback-browse'), 'recommend' => array('feedback-create', 'feedback-edit'));
|
||||
$config->group->package->browseLiteFeedback->privs['feedback-browse'] = array('edition' => 'biz,max,ipd', 'vision' => 'lite', 'order' => 30, 'depend' => array(), 'recommend' => array('feedback-view'));
|
||||
|
||||
$config->group->package->manageFeedback = new stdclass();
|
||||
$config->group->package->manageFeedback->order = 10;
|
||||
$config->group->package->manageFeedback->subset = 'feedback';
|
||||
|
||||
@@ -648,7 +648,7 @@ class installModel extends model
|
||||
<?php
|
||||
\$config->installed = true;
|
||||
\$config->debug = false;
|
||||
\$config->requestType = '{$this->config->requestType}';
|
||||
\$config->requestType = 'PATH_INFO';
|
||||
\$config->timezone = '$timezone';
|
||||
\$config->db->driver = '{$this->config->db->driver}';
|
||||
\$config->db->host = '$dbHost';
|
||||
|
||||
@@ -22,15 +22,15 @@ class count_of_annual_created_release_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = 'getProductReleases';
|
||||
|
||||
public $fieldList = array('t1.id', 't1.product', 't1.createdDate');
|
||||
public $fieldList = array('t1.id', 't1.product', 't1.date');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if(empty($row->createdDate)) return null;
|
||||
if(empty($row->date)) return null;
|
||||
|
||||
$year = substr($row->createdDate, 0, 4);
|
||||
$year = substr($row->date, 0, 4);
|
||||
if($year == '0000') return null;
|
||||
|
||||
if(!isset($this->result[$year])) $this->result[$year] = array();
|
||||
|
||||
@@ -22,14 +22,14 @@ class count_of_monthly_created_release_in_product extends baseCalc
|
||||
{
|
||||
public $dataset = 'getProductReleases';
|
||||
|
||||
public $fieldList = array('t1.id', 't1.product', 't1.createdDate');
|
||||
public $fieldList = array('t1.id', 't1.product', 't1.date');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$product = $row->product;
|
||||
$createdDate = $row->createdDate;
|
||||
$createdDate = $row->date;
|
||||
|
||||
if(empty($createdDate)) return false;
|
||||
|
||||
|
||||
@@ -22,13 +22,14 @@ class count_of_finished_task extends baseCalc
|
||||
{
|
||||
public $dataset = 'getTasks';
|
||||
|
||||
public $fieldList = array('t1.status');
|
||||
public $fieldList = array('t1.status', 't1.closedReason');
|
||||
|
||||
public $result = 0;
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if($row->status == 'done') $this->result ++;
|
||||
if($row->status == 'closed' and $row->closedReason == 'done') $this->result ++;
|
||||
}
|
||||
|
||||
public function getResult($options = array())
|
||||
|
||||
@@ -28,7 +28,7 @@ class count_of_unfinished_task extends baseCalc
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
if($row->status != 'done') $this->result ++;
|
||||
if(!in_array($row->status, array('done', 'closed', 'cancel'))) $this->result ++;
|
||||
}
|
||||
|
||||
public function getResult($options = array())
|
||||
|
||||
@@ -22,14 +22,14 @@ class count_of_weekly_created_release extends baseCalc
|
||||
{
|
||||
public $dataset = 'getReleases';
|
||||
|
||||
public $fieldList = array('t1.createdDate');
|
||||
public $fieldList = array('t1.date');
|
||||
|
||||
public $result = array();
|
||||
|
||||
public function calculate($row)
|
||||
{
|
||||
$year = $this->getYear($row->createdDate);
|
||||
$week = $this->getWeek($row->createdDate);
|
||||
$year = $this->getYear($row->date);
|
||||
$week = $this->getWeek($row->date);
|
||||
|
||||
if(!$year) return false;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ class count_of_reviewing_story_in_user extends baseCalc
|
||||
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t2.product=t3.id')
|
||||
->where('t2.deleted')->eq('0')
|
||||
->andWhere('t2.type')->eq('story')
|
||||
->andWhere('t3.deleted')->eq('0')
|
||||
->andWhere('t2.status')->eq('reviewing')
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$config->metric = new stdclass();
|
||||
$config->metric->scopeList = array('system', 'program', 'product', 'project', 'execution', 'dept', 'user', 'code', 'pipeline');
|
||||
$config->metric->scopeList = array('system', 'program', 'project', 'execution', 'product', 'user', 'dept');
|
||||
$config->metric->objectList = array('program', 'line', 'product', 'project', 'productplan', 'execution', 'release', 'story', 'requirement', 'task', 'bug', 'case', 'user', 'effort', 'doc', 'feedback', 'risk', 'issue', 'review');
|
||||
$config->metric->purposeList = array('scale', 'qc', 'hour', 'cost', 'rate', 'time');
|
||||
$config->metric->dateList = array('year', 'month', 'week', 'day');
|
||||
|
||||
@@ -85,6 +85,7 @@ class metric extends control
|
||||
$this->view->dateLabels = $this->metric->getDateLabels($this->view->dateType);
|
||||
$this->view->defaultDate = $this->metric->getDefaultDate($this->view->dateLabels);
|
||||
$this->view->tableWidth = $this->metricZen->getViewTableWidth($groupHeader);
|
||||
$this->view->pagerExtra = $this->metricZen->getPagerExtra($this->view->tableWidth);
|
||||
$this->view->headerGroup = $this->metric->isHeaderGroup($groupHeader);
|
||||
|
||||
$this->view->metrics = $metrics;
|
||||
@@ -296,6 +297,7 @@ class metric extends control
|
||||
$this->view->dateLabels = $this->metric->getDateLabels($this->view->dateType);
|
||||
$this->view->defaultDate = $this->metric->getDefaultDate($this->view->dateLabels);
|
||||
$this->view->tableWidth = $this->metricZen->getViewTableWidth($groupHeader);
|
||||
$this->view->pagerExtra = $this->metricZen->getPagerExtra($this->view->tableWidth);
|
||||
$this->view->headerGroup = $this->metric->isHeaderGroup($groupHeader);
|
||||
$this->view->dtablePager = $pager;
|
||||
$this->view->metricRecordType = $this->metric->getMetricRecordType($resultHeader);
|
||||
@@ -326,6 +328,7 @@ class metric extends control
|
||||
$this->view->groupHeader = $groupHeader;
|
||||
$this->view->groupData = $groupData;
|
||||
$this->view->tableWidth = $this->metricZen->getViewTableWidth($groupHeader);
|
||||
$this->view->pagerExtra = $this->metricZen->getPagerExtra($this->view->tableWidth);
|
||||
$this->view->headerGroup = $this->metric->isHeaderGroup($groupHeader);
|
||||
$this->view->metricRecordType = $this->metric->getMetricRecordType($resultHeader);
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#mainMenu {padding-left: unset !important; padding-right: unset !important;}
|
||||
.filter-panel .panel-body .divider {opacity: unset;}
|
||||
#mainContent {display: flex; padding-top: 0;}
|
||||
#mainContent .side {overflow-x: hidden; padding-right: 4px;}
|
||||
#mainContent .main {overflow-x: hidden;}
|
||||
|
||||
@@ -115,8 +115,10 @@ class dataset
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product=t3.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)")
|
||||
->andWhere("NOT FIND_IN_SET('lite', t2.vision)")
|
||||
->andWhere("NOT FIND_IN_SET('or', t2.vision)", true)
|
||||
->orWhere("t2.vision IS NULL")->markRight(1)
|
||||
->andWhere("NOT FIND_IN_SET('lite', t2.vision)", true)
|
||||
->orWhere("t2.vision IS NULL")->markRight(1)
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -563,7 +565,7 @@ class dataset
|
||||
*/
|
||||
public function getPipeline($fieldList)
|
||||
{
|
||||
return $this->dao->select($fieldList)->from(TABLE_PIPELINE)->alias('t1')
|
||||
return $this->dao->select($fieldList)->from(TABLE_JOB)->alias('t1')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->query();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ window.afterPageUpdate = function($target, info, options)
|
||||
{
|
||||
window.isDropdown = false;
|
||||
window.lineCount = 1;
|
||||
window.checkedList = [{id:current.id + '', name:current.name}];
|
||||
window.checkedList = window.initCheckedList();
|
||||
window.chartList = [];
|
||||
for(key in chartTypeList) {
|
||||
chartList.push({value: key, text: chartTypeList[key]});
|
||||
@@ -19,6 +19,18 @@ window.afterPageUpdate = function($target, info, options)
|
||||
window.initFilterPanel();
|
||||
}
|
||||
|
||||
window.initCheckedList = function()
|
||||
{
|
||||
if(typeof window.checkedList !== 'undefined' && Array.isArray(window.checkedList) && window.checkedList.length > 1)
|
||||
{
|
||||
return window.checkedList;
|
||||
}
|
||||
else
|
||||
{
|
||||
return [{id:current.id + '', name:current.name}];
|
||||
}
|
||||
}
|
||||
|
||||
window.addTitle2Star = function()
|
||||
{
|
||||
$('.metric-collect').attr('title', collectStar);
|
||||
|
||||
@@ -155,8 +155,8 @@ $lang->metric->featureBar['preview']['dept'] = 'Team';
|
||||
$lang->metric->featureBar['preview']['user'] = 'Individual';
|
||||
$lang->metric->featureBar['preview']['program'] = 'Program';
|
||||
$lang->metric->featureBar['preview']['system'] = 'System';
|
||||
$lang->metric->featureBar['preview']['code'] = 'Code Repository';
|
||||
$lang->metric->featureBar['preview']['pipeline'] = 'Pipeline';
|
||||
// $lang->metric->featureBar['preview']['code'] = 'Code Repository';
|
||||
// $lang->metric->featureBar['preview']['pipeline'] = 'Pipeline';
|
||||
|
||||
$lang->metric->more = 'More';
|
||||
$lang->metric->collect = 'My Collect';
|
||||
@@ -204,8 +204,8 @@ $lang->metric->scopeList['project'] = "Project";
|
||||
$lang->metric->scopeList['execution'] = "Execution";
|
||||
$lang->metric->scopeList['dept'] = "Team";
|
||||
$lang->metric->scopeList['user'] = "Individual";
|
||||
$lang->metric->scopeList['code'] = "Code Repository";
|
||||
$lang->metric->scopeList['pipeline'] = "Pipeline";
|
||||
// $lang->metric->scopeList['code'] = "Code Repository";
|
||||
// $lang->metric->scopeList['pipeline'] = "Pipeline";
|
||||
$lang->metric->scopeList['other'] = "Other";
|
||||
|
||||
global $config;
|
||||
|
||||
@@ -155,8 +155,8 @@ $lang->metric->featureBar['preview']['dept'] = 'Team';
|
||||
$lang->metric->featureBar['preview']['user'] = 'Individual';
|
||||
$lang->metric->featureBar['preview']['program'] = 'Program';
|
||||
$lang->metric->featureBar['preview']['system'] = 'System';
|
||||
$lang->metric->featureBar['preview']['code'] = 'Code Repository';
|
||||
$lang->metric->featureBar['preview']['pipeline'] = 'Pipeline';
|
||||
// $lang->metric->featureBar['preview']['code'] = 'Code Repository';
|
||||
// $lang->metric->featureBar['preview']['pipeline'] = 'Pipeline';
|
||||
|
||||
$lang->metric->more = 'More';
|
||||
$lang->metric->collect = 'My Collect';
|
||||
@@ -204,8 +204,8 @@ $lang->metric->scopeList['project'] = "Project";
|
||||
$lang->metric->scopeList['execution'] = "Execution";
|
||||
$lang->metric->scopeList['dept'] = "Team";
|
||||
$lang->metric->scopeList['user'] = "Individual";
|
||||
$lang->metric->scopeList['code'] = "Code Repository";
|
||||
$lang->metric->scopeList['pipeline'] = "Pipeline";
|
||||
// $lang->metric->scopeList['code'] = "Code Repository";
|
||||
// $lang->metric->scopeList['pipeline'] = "Pipeline";
|
||||
$lang->metric->scopeList['other'] = "Other";
|
||||
|
||||
global $config;
|
||||
|
||||
@@ -155,8 +155,8 @@ $lang->metric->featureBar['preview']['dept'] = 'Team';
|
||||
$lang->metric->featureBar['preview']['user'] = 'Individual';
|
||||
$lang->metric->featureBar['preview']['program'] = 'Program';
|
||||
$lang->metric->featureBar['preview']['system'] = 'System';
|
||||
$lang->metric->featureBar['preview']['code'] = 'Code Repository';
|
||||
$lang->metric->featureBar['preview']['pipeline'] = 'Pipeline';
|
||||
// $lang->metric->featureBar['preview']['code'] = 'Code Repository';
|
||||
// $lang->metric->featureBar['preview']['pipeline'] = 'Pipeline';
|
||||
|
||||
$lang->metric->more = 'More';
|
||||
$lang->metric->collect = 'My Collect';
|
||||
@@ -204,8 +204,8 @@ $lang->metric->scopeList['project'] = "Project";
|
||||
$lang->metric->scopeList['execution'] = "Execution";
|
||||
$lang->metric->scopeList['dept'] = "Team";
|
||||
$lang->metric->scopeList['user'] = "Individual";
|
||||
$lang->metric->scopeList['code'] = "Code Repository";
|
||||
$lang->metric->scopeList['pipeline'] = "Pipeline";
|
||||
// $lang->metric->scopeList['code'] = "Code Repository";
|
||||
// $lang->metric->scopeList['pipeline'] = "Pipeline";
|
||||
$lang->metric->scopeList['other'] = "Other";
|
||||
|
||||
global $config;
|
||||
|
||||
@@ -155,8 +155,8 @@ $lang->metric->featureBar['preview']['dept'] = '团队';
|
||||
$lang->metric->featureBar['preview']['user'] = '个人';
|
||||
$lang->metric->featureBar['preview']['program'] = '项目集';
|
||||
$lang->metric->featureBar['preview']['system'] = '系统';
|
||||
$lang->metric->featureBar['preview']['code'] = '代码库';
|
||||
$lang->metric->featureBar['preview']['pipeline'] = '流水线';
|
||||
// $lang->metric->featureBar['preview']['code'] = '代码库';
|
||||
// $lang->metric->featureBar['preview']['pipeline'] = '流水线';
|
||||
|
||||
$lang->metric->more = '更多';
|
||||
$lang->metric->collect = '我收藏的';
|
||||
@@ -204,8 +204,8 @@ $lang->metric->scopeList['project'] = "项目";
|
||||
$lang->metric->scopeList['execution'] = "执行";
|
||||
$lang->metric->scopeList['dept'] = "团队";
|
||||
$lang->metric->scopeList['user'] = "个人";
|
||||
$lang->metric->scopeList['code'] = "代码库";
|
||||
$lang->metric->scopeList['pipeline'] = "流水线";
|
||||
// $lang->metric->scopeList['code'] = "代码库";
|
||||
// $lang->metric->scopeList['pipeline'] = "流水线";
|
||||
$lang->metric->scopeList['other'] = "其他";
|
||||
|
||||
global $config;
|
||||
|
||||
@@ -77,8 +77,8 @@ $lang->metric->scopeList['project'] = "專案";
|
||||
$lang->metric->scopeList['execution'] = "執行";
|
||||
$lang->metric->scopeList['dept'] = "團隊";
|
||||
$lang->metric->scopeList['user'] = "個人";
|
||||
$lang->metric->scopeList['code'] = "程式庫";
|
||||
$lang->metric->scopeList['pipeline'] = "流水線";
|
||||
// $lang->metric->scopeList['code'] = "程式庫";
|
||||
// $lang->metric->scopeList['pipeline'] = "流水線";
|
||||
|
||||
global $config;
|
||||
$lang->metric->objectList = array();
|
||||
|
||||
+2
-21
@@ -271,16 +271,11 @@ class metricModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getScopePairs($all = true)
|
||||
public function getScopePairs()
|
||||
{
|
||||
$scopePairs = array();
|
||||
foreach($this->config->metric->scopeList as $scope)
|
||||
{
|
||||
if(!$all)
|
||||
{
|
||||
$metrics = $this->metricTao->fetchMetricsByScope($scope, 1);
|
||||
if(empty($metrics)) continue;
|
||||
}
|
||||
$scopePair = new stdclass();
|
||||
$scopePair->value = $scope;
|
||||
$scopePair->label = $this->lang->metric->scopeList[$scope];
|
||||
@@ -1091,7 +1086,7 @@ class metricModel extends model
|
||||
{
|
||||
foreach($this->lang->metric->scopeList as $scope => $name)
|
||||
{
|
||||
$metrics = $this->metricTao->fetchMetricsByScope($scope, 1);
|
||||
$metrics = $this->metricTao->fetchMetrics($scope, $stage);
|
||||
if(empty($metrics))
|
||||
{
|
||||
unset($this->lang->metric->scopeList[$scope]);
|
||||
@@ -1541,20 +1536,6 @@ class metricModel extends model
|
||||
return in_array('scope', array_column($header, 'name'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过header来判断一个度量项有没有日期的概念。
|
||||
* Judge whether a metric has the concept of an date.
|
||||
*
|
||||
* header 通过 metric 模块的 getViewTableHeader 方法取得
|
||||
* @param array $header 表头
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function isDateMetric($header)
|
||||
{
|
||||
return in_array('date', array_column($header, 'name'));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取一个echarts的配置项。
|
||||
* Get options of echarts by head and data.
|
||||
|
||||
+4
-26
@@ -43,27 +43,6 @@ class metricTao extends metricModel
|
||||
return $metrics;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据范围获取度量项。
|
||||
* Fetch metric by scope.
|
||||
*
|
||||
* @param string $scope
|
||||
* @param int $limit
|
||||
* @access protected
|
||||
* @return array
|
||||
*/
|
||||
protected function fetchMetricsByScope($scope, $limit = -1)
|
||||
{
|
||||
$metrics = $this->dao->select('*')->from(TABLE_METRIC)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('scope')->eq($scope)
|
||||
->andWhere('object')->in(array_keys($this->lang->metric->objectList))
|
||||
->beginIF($limit > 0)->limit($limit)->fi()
|
||||
->fetchAll();
|
||||
|
||||
return $metrics;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编号获取度项。
|
||||
* Fetch metric by id.
|
||||
@@ -280,7 +259,7 @@ class metricTao extends metricModel
|
||||
$wrapFields = array_map(fn($value) => "`$value`", $fieldList);
|
||||
$dataFieldStr = implode(',', $wrapFields);
|
||||
|
||||
$records = $this->dao->select($dataFieldStr)
|
||||
$stmt = $this->dao->select($dataFieldStr)
|
||||
->from(TABLE_METRICLIB)
|
||||
->where('metricCode')->eq($code)
|
||||
->beginIF($metricScope != 'system')->andWhere($metricScope)->in($objectList)->fi()
|
||||
@@ -295,11 +274,10 @@ class metricTao extends metricModel
|
||||
->beginIF(!empty($dateEnd) and $dateType == 'day')->andWhere('CONCAT(`year`, `month`, `day`)')->le($dayEnd)->fi()
|
||||
->beginIF(!empty($calcDate))->andWhere('date')->ge($calcDate)->fi()
|
||||
->beginIF(!empty($scopeList))->orderBy("date desc, $scopeKey, year desc, month desc, week desc, day desc")->fi()
|
||||
->beginIF(empty($scopeList))->orderBy("date desc, year desc, month desc, week desc, day desc")->fi()
|
||||
->beginIF($metricScope == 'system')->page($pager)->fi()
|
||||
->fetchAll();
|
||||
->beginIF(empty($scopeList))->orderBy("date desc, year desc, month desc, week desc, day desc")->fi();
|
||||
|
||||
return $records;
|
||||
if($metricScope == 'system') $stmt = $stmt->page($pager); // beginIF not work with page()
|
||||
return $stmt->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -198,12 +198,13 @@ div
|
||||
(
|
||||
dtable
|
||||
(
|
||||
setID('ajaxmetric' . $metric->id),
|
||||
set::height(328),
|
||||
set::rowHeight(32),
|
||||
set::bordered(true),
|
||||
set::cols($groupHeader),
|
||||
set::data(array_values($groupData)),
|
||||
set::footPager(usePager('dtablePager')),
|
||||
set::footPager(usePager('dtablePager', $pagerExtra)),
|
||||
$headerGroup ? set::plugins(array('header-group')) : null,
|
||||
set::onRenderCell(jsRaw('window.renderDTableCell')),
|
||||
set::loadPartial(true)
|
||||
|
||||
@@ -22,12 +22,13 @@ div
|
||||
(
|
||||
dtable
|
||||
(
|
||||
setID('ajaxmetric' . $metric->id),
|
||||
$viewType == 'multiple' ? set::height(328) : set::height(jsRaw('window.getTableHeight')),
|
||||
set::rowHeight(32),
|
||||
set::bordered(true),
|
||||
set::cols($groupHeader),
|
||||
set::data(array_values($groupData)),
|
||||
set::footPager(usePager('dtablePager')),
|
||||
set::footPager(usePager('dtablePager', $pagerExtra)),
|
||||
$headerGroup ? set::plugins(array('header-group')) : null,
|
||||
set::onRenderCell(jsRaw('window.renderDTableCell')),
|
||||
set::loadPartial(true)
|
||||
|
||||
@@ -400,7 +400,7 @@ $metricBoxs = div
|
||||
set::bordered(true),
|
||||
set::cols($groupHeader),
|
||||
set::data(array_values($groupData)),
|
||||
set::footPager(usePager('dtablePager')),
|
||||
set::footPager(usePager('dtablePager', $pagerExtra)),
|
||||
$headerGroup ? set::plugins(array('header-group')) : null,
|
||||
set::onRenderCell(jsRaw('window.renderDTableCell')),
|
||||
set::loadPartial(true)
|
||||
|
||||
@@ -358,7 +358,7 @@ div
|
||||
set::rowHeight(32),
|
||||
set::cols($groupHeader),
|
||||
set::data(array_values($groupData)),
|
||||
set::footPager(usePager('dtablePager')),
|
||||
set::footPager(usePager('dtablePager', $pagerExtra)),
|
||||
$headerGroup ? set::plugins(array('header-group')) : null,
|
||||
set::onRenderCell(jsRaw('window.renderDTableCell'))
|
||||
)
|
||||
|
||||
@@ -388,6 +388,19 @@ class metricZen extends metric
|
||||
return $width;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据table宽度返回pager extra。
|
||||
* Return pager extra based on the table width.
|
||||
*
|
||||
* @param string $tableWidth
|
||||
* @access protected
|
||||
* @return int
|
||||
*/
|
||||
public function getPagerExtra($tableWidth)
|
||||
{
|
||||
return ($tableWidth > 300) ? '' : 'shortPageSize';
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据后台配置的估算单位对列表赋值。
|
||||
* Assign unitList['measure'] by custom hourPoint.
|
||||
|
||||
@@ -232,13 +232,15 @@ class misc extends control
|
||||
{
|
||||
if(in_array(strtolower($sessionVar), $this->config->misc->disabledSessionVar)) die("The string {$sessionVar} is not allowed to be defined as a session field.");
|
||||
|
||||
$captcha = $this->app->loadClass('captcha');
|
||||
$this->session->set($sessionVar, $captcha->getPhrase());
|
||||
$captcha->build();
|
||||
|
||||
$obLevel = ob_get_level();
|
||||
for($i = 0; $i < $obLevel; $i++) ob_end_clean();
|
||||
|
||||
header('Content-Type: image/jpeg');
|
||||
$captcha = $this->app->loadClass('captcha');
|
||||
$this->session->set($sessionVar, $captcha->getPhrase());
|
||||
$captcha->build()->output();
|
||||
$captcha->output();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -217,7 +217,7 @@ $lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
/* Release Detail. */
|
||||
$lang->misc->feature->all['18.10'][] = array('title' => '', 'desc' => '');
|
||||
$lang->misc->feature->all['18.10'][] = array('title' => 'The use case library offers the capability to import test cases from other libraries, enables document export with image proportions automatically adjusted to fit Word, includes the addition of cookie records to the history record sorting method, and incorporates optimized logic for modifying logs of other users.When converting feedback or tickets, attachments can now be automatically included. Feedback functionality has been enhanced with the addition of keywords and CC fields. Additionally, a new water drop chart type has been introduced, and improvements have been made to the logic and visual presentation of metric collection.', 'desc' => '');
|
||||
$lang->misc->feature->all['18.9'][] = array('title' => 'We have now implemented comprehensive integration of AI Large Language Models, introduced an upgraded client version for meetings, and improved the ability to add participants in test requests. To enhance usability, we have also implemented online preview capabilities for video attachments and increased flexibility in customizing review inspection categories.', 'desc' => '');
|
||||
$lang->misc->feature->all['18.8'][] = array('title' => 'In the BI section, we have introduced new features such as metric item functionality and an application inspection report dashboard. The DevOps platform edition now includes a configuration wizard. Additionally, we have enhanced the requitement and market management interface by adding a market management feature. New revision of client navigation and personal center.', 'desc' => '');
|
||||
$lang->misc->feature->all['18.7'][] = array('title' => 'DevOps has introduced new features such as cloud-native platform, artifact repository, and application management, while also enhancing the navigation structure and improving the UI interactions. Additionally, a new AI suggestion designer has been added, which supports integration with large language models and allows for customization of AI applications.', 'desc' => '');
|
||||
|
||||
@@ -217,7 +217,7 @@ $lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
/* Release Detail. */
|
||||
$lang->misc->feature->all['18.10'][] = array('title' => '', 'desc' => '');
|
||||
$lang->misc->feature->all['18.10'][] = array('title' => 'The use case library offers the capability to import test cases from other libraries, enables document export with image proportions automatically adjusted to fit Word, includes the addition of cookie records to the history record sorting method, and incorporates optimized logic for modifying logs of other users.When converting feedback or tickets, attachments can now be automatically included. Feedback functionality has been enhanced with the addition of keywords and CC fields. Additionally, a new water drop chart type has been introduced, and improvements have been made to the logic and visual presentation of metric collection.', 'desc' => '');
|
||||
$lang->misc->feature->all['18.9'][] = array('title' => 'We have now implemented comprehensive integration of AI Large Language Models, introduced an upgraded client version for meetings, and improved the ability to add participants in test requests. To enhance usability, we have also implemented online preview capabilities for video attachments and increased flexibility in customizing review inspection categories.', 'desc' => '');
|
||||
$lang->misc->feature->all['18.8'][] = array('title' => 'In the BI section, we have introduced new features such as metric item functionality and an application inspection report dashboard. The DevOps platform edition now includes a configuration wizard. Additionally, we have enhanced the requitement and market management interface by adding a market management feature. New revision of client navigation and personal center.', 'desc' => '');
|
||||
$lang->misc->feature->all['18.7'][] = array('title' => 'DevOps has introduced new features such as cloud-native platform, artifact repository, and application management, while also enhancing the navigation structure and improving the UI interactions. Additionally, a new AI suggestion designer has been added, which supports integration with large language models and allows for customization of AI applications.', 'desc' => '');
|
||||
|
||||
@@ -217,7 +217,7 @@ $lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
|
||||
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
|
||||
|
||||
/* Release Detail. */
|
||||
$lang->misc->feature->all['18.10'][] = array('title' => '', 'desc' => '');
|
||||
$lang->misc->feature->all['18.10'][] = array('title' => 'The use case library offers the capability to import test cases from other libraries, enables document export with image proportions automatically adjusted to fit Word, includes the addition of cookie records to the history record sorting method, and incorporates optimized logic for modifying logs of other users.When converting feedback or tickets, attachments can now be automatically included. Feedback functionality has been enhanced with the addition of keywords and CC fields. Additionally, a new water drop chart type has been introduced, and improvements have been made to the logic and visual presentation of metric collection.', 'desc' => '');
|
||||
$lang->misc->feature->all['18.9'][] = array('title' => 'We have now implemented comprehensive integration of AI Large Language Models, introduced an upgraded client version for meetings, and improved the ability to add participants in test requests. To enhance usability, we have also implemented online preview capabilities for video attachments and increased flexibility in customizing review inspection categories.', 'desc' => '');
|
||||
$lang->misc->feature->all['18.8'][] = array('title' => 'In the BI section, we have introduced new features such as metric item functionality and an application inspection report dashboard. The DevOps platform edition now includes a configuration wizard. Additionally, we have enhanced the requitement and market management interface by adding a market management feature. New revision of client navigation and personal center.', 'desc' => '');
|
||||
$lang->misc->feature->all['18.7'][] = array('title' => 'DevOps has introduced new features such as cloud-native platform, artifact repository, and application management, while also enhancing the navigation structure and improving the UI interactions. Additionally, a new AI suggestion designer has been added, which supports integration with large language models and allows for customization of AI applications.', 'desc' => '');
|
||||
|
||||
@@ -749,7 +749,7 @@ class mr extends control
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$link = inlink('link', "MRID=$MRID&type=story&orderBy=$orderBy");
|
||||
return $this->send(array('result' => 'success', 'callback' => "loadTable('$link', 'storyTable')", 'closeModal' => true));
|
||||
return $this->send(array('result' => 'success', 'load' => $link, 'closeModal' => true));
|
||||
}
|
||||
|
||||
$this->loadModel('story');
|
||||
@@ -771,7 +771,7 @@ class mr extends control
|
||||
$queryID = ($browseType == 'bySearch') ? (int) $param : 0;
|
||||
|
||||
unset($this->config->product->search['fields']['product']);
|
||||
$this->config->product->search['actionURL'] = $this->createLink('mr', 'linkStory', "MRID={$MRID}&productID={$productID}&browseType=bySearch¶m=myQueryID&orderBy={$orderBy}");
|
||||
$this->config->product->search['actionURL'] = $this->createLink('mr', 'linkStory', "MRID={$MRID}&productID={$productID}&browseType=bySearch¶m=myQueryID&orderBy={$orderBy}") . "#app={$this->app->tab}";
|
||||
$this->config->product->search['queryID'] = $queryID;
|
||||
$this->config->product->search['style'] = 'simple';
|
||||
$this->config->product->search['params']['product']['values'] = array($product) + array('all' => $this->lang->product->allProductsOfProject);
|
||||
@@ -841,7 +841,7 @@ class mr extends control
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$link = inlink('link', "MRID=$MRID&type=bug&orderBy=$orderBy");
|
||||
return $this->send(array('result' => 'success', 'callback' => "loadTable('$link', 'bugTable')", 'closeModal' => true));
|
||||
return $this->send(array('result' => 'success', 'load' => $link, 'closeModal' => true));
|
||||
}
|
||||
|
||||
$this->loadModel('bug');
|
||||
@@ -858,7 +858,7 @@ class mr extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Build search form. */
|
||||
$this->config->bug->search['actionURL'] = $this->createLink('mr', 'linkBug', "MRID={$MRID}&productID={$productID}&browseType=bySearch¶m=myQueryID&orderBy={$orderBy}");
|
||||
$this->config->bug->search['actionURL'] = $this->createLink('mr', 'linkBug', "MRID={$MRID}&productID={$productID}&browseType=bySearch¶m=myQueryID&orderBy={$orderBy}") . "#app={$this->app->tab}";
|
||||
$this->config->bug->search['queryID'] = $queryID;
|
||||
$this->config->bug->search['style'] = 'simple';
|
||||
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($productID => $productID));
|
||||
@@ -930,7 +930,7 @@ class mr extends control
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$link = inlink('link', "MRID=$MRID&type=task&orderBy=$orderBy");
|
||||
return $this->send(array('result' => 'success', 'callback' => "loadTable('$link', 'taskTable')", 'closeModal' => true));
|
||||
return $this->send(array('result' => 'success', 'load' => $link, 'closeModal' => true));
|
||||
}
|
||||
|
||||
$this->loadModel('execution');
|
||||
@@ -950,7 +950,7 @@ class mr extends control
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
/* Build search form. */
|
||||
$this->config->execution->search['actionURL'] = $this->createLink('mr', 'linkTask', "MRID={$MRID}&productID={$productID}&browseType=bySearch¶m=myQueryID&orderBy={$orderBy}");
|
||||
$this->config->execution->search['actionURL'] = $this->createLink('mr', 'linkTask', "MRID={$MRID}&productID={$productID}&browseType=bySearch¶m=myQueryID&orderBy={$orderBy}") . "#app={$this->app->tab}";
|
||||
$this->config->execution->search['queryID'] = $queryID;
|
||||
$this->config->execution->search['params']['module']['values'] = $modules;
|
||||
$this->config->execution->search['params']['execution']['values'] = $this->product->getExecutionPairsByProduct($productID);
|
||||
@@ -969,8 +969,8 @@ class mr extends control
|
||||
$allTasks = array();
|
||||
foreach($productExecutionIDs as $productExecutionID)
|
||||
{
|
||||
$tasks = $this->execution->getTasks(0, $productExecutionID, array(), $browseType, $queryID, 0, $orderBy, null);
|
||||
$allTasks = array_merge($tasks, $allTasks);
|
||||
$tasks = $this->execution->getTasks(0, $productExecutionID, array(), $browseType, $queryID, 0, $orderBy, null);
|
||||
$allTasks += $tasks;
|
||||
}
|
||||
/* Filter linked tasks. */
|
||||
$linkedTaskIDs = array_keys($linkedTasks);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user