diff --git a/Jenkinsfile b/Jenkinsfile
index 07e6bf0d4a..a60cb6b5ad 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -18,6 +18,8 @@ pipeline {
SRC_ZDOOEXT_PATH = "${WORKSPACE}/zdooext"
SRC_ZENTAOEXT_PATH = "${WORKSPACE}/zentaoext"
+
+ MIRROR = "true"
}
stages {
@@ -48,6 +50,7 @@ pipeline {
stage("Pull") {
steps {
checkout scm
+ sh 'env'
}
}
@@ -102,24 +105,13 @@ pipeline {
}
stage("Build") {
- environment {
- GIT_TAG_BUILD_TYPE = """${sh(
- returnStdout: true,
- script: 'misc/parse_tag.sh $TAG_NAME type'
- ).trim()}"""
-
- GIT_TAG_BUILD_GROUP = """${sh(
- returnStdout: true,
- script: 'misc/parse_tag.sh $TAG_NAME group'
- ).trim()}"""
- }
-
stages {
stage("make ciCommon") {
steps {
-
- sh "echo $GIT_TAG_BUILD_TYPE/abc"
- sh "echo $GIT_TAG_BUILD_GROUP/def"
+ container('xuanimbot') {
+ sh 'git config --global --add safe.directory $(pwd)'
+ sh '/usr/local/bin/xuanimbot --groups 84be4c6e-02e3-4fdc-b081-318c0c1eca02 --groups 31a0008b-6e3e-4b7f-9b7b-396a46b1f8f4 --title "Start build zentaopms" --url "${BUILD_URL}" --content "Build by Tag ${TAG_NAME}" --debug --custom'
+ }
withCredentials([gitUsernamePassword(credentialsId: 'git-zcorp-cc-jenkins-bot-http',gitToolName: 'git-tool')]) {
container('package') {
sh 'mkdir ${ZENTAO_RELEASE_PATH} && chown 1000:1000 ${ZENTAO_RELEASE_PATH}'
@@ -162,6 +154,11 @@ pipeline {
script: 'cat ${SRC_ZENTAOEXT_PATH}/MAXVERSION'
).trim()}"""
+ GIT_COMMIT = """${sh(
+ returnStdout: true,
+ script: 'git rev-parse HEAD'
+ ).trim()}"""
+
GIT_TAG_BUILD_TYPE = """${sh(
returnStdout: true,
script: 'misc/parse_tag.sh $TAG_NAME type'
@@ -172,11 +169,16 @@ pipeline {
script: 'misc/parse_tag.sh $TAG_NAME group'
).trim()}"""
+ GIT_TAGGER_NAME = """${sh(
+ returnStdout: true,
+ script: 'git for-each-ref --format="%(taggername)" refs/tags/$(git tag --points-at HEAD)'
+ ).trim()}"""
+
OUTPUT_PKG_PATH = "${ZENTAO_RELEASE_PATH}/output"
ARTIFACT_REPOSITORY = """${sh(
returnStdout: true,
- script: 'echo easycorp-snapshot'
+ script: 'misc/parse_tag.sh $TAG_NAME type | grep release >/dev/null && echo easycorp || echo easycorp-snapshot'
).trim()}"""
ARTIFACT_HOST = "nexus.qc.oop.cc"
ARTIFACT_PROTOCOL = "https"
@@ -185,6 +187,7 @@ pipeline {
stages {
stage("Merge and Upload") {
+
matrix {
agent {
kubernetes {
@@ -194,10 +197,11 @@ pipeline {
command "sleep"
args "99d"
}
- inheritFrom "publish-qiniu"
}
}
- options { skipDefaultCheckout() }
+ options {
+ skipDefaultCheckout()
+ }
axes {
axis {
@@ -223,11 +227,15 @@ pipeline {
}
stages {
- stage("frame") {
+ stage("ZIP") {
environment {
ARTIFACT_NAME = """${sh(
returnStdout: true,
- script: 'test ${ZLANG} = cn && echo -n zentaopms || echo -n zentaoalm'
+ script: 'test ${ZLANG} = cn && echo -n ZenTaoPMS || echo -n ZenTaoALM'
+ ).trim()}"""
+ INT_FLAG = """${sh(
+ returnStdout: true,
+ script: 'test ${ZLANG} = cn && echo -n "int." || echo -n ""'
).trim()}"""
}
@@ -239,7 +247,6 @@ pipeline {
sh 'mkdir $ZENTAO_RELEASE_PATH'
sh '${ZENTAO_BUILD_PATH}/package.sh zip'
sh 'mkdir $OUTPUT_PKG_PATH'
- sh 'env | grep GIT_TAG'
}
}
}
@@ -250,7 +257,7 @@ pipeline {
nexusVersion: 'nexus3',
protocol: env.ARTIFACT_PROTOCOL,
nexusUrl: env.ARTIFACT_HOST,
- groupId: 'zentao.base' + '.' + env.GIT_TAG_BUILD_GROUP,
+ groupId: 'zentao.pmsPack' + '.' + env.GIT_TAG_BUILD_GROUP,
version: env.PMS_VERSION,
repository: env.ARTIFACT_REPOSITORY,
credentialsId: env.ARTIFACT_CRED_ID,
@@ -265,7 +272,7 @@ pipeline {
nexusVersion: 'nexus3',
protocol: env.ARTIFACT_PROTOCOL,
nexusUrl: env.ARTIFACT_HOST,
- groupId: 'zentao.biz' + '.' + env.GIT_TAG_BUILD_GROUP,
+ groupId: 'zentao.bizPack' + '.' + env.GIT_TAG_BUILD_GROUP,
version: env.BIZ_VERSION,
repository: env.ARTIFACT_REPOSITORY,
credentialsId: env.ARTIFACT_CRED_ID,
@@ -284,7 +291,7 @@ pipeline {
nexusVersion: 'nexus3',
protocol: env.ARTIFACT_PROTOCOL,
nexusUrl: env.ARTIFACT_HOST,
- groupId: 'zentao.max' + '.' + env.GIT_TAG_BUILD_GROUP,
+ groupId: 'zentao.maxPack' + '.' + env.GIT_TAG_BUILD_GROUP,
version: env.MAX_VERSION,
repository: env.ARTIFACT_REPOSITORY,
credentialsId: env.ARTIFACT_CRED_ID,
@@ -301,18 +308,18 @@ pipeline {
)
sh 'mkdir ${OUTPUT_PKG_PATH}/${PMS_VERSION} ${OUTPUT_PKG_PATH}/${BIZ_VERSION} ${OUTPUT_PKG_PATH}/${MAX_VERSION}'
- sh 'cp ${ZENTAO_RELEASE_PATH}/base.zip ${OUTPUT_PKG_PATH}/${PMS_VERSION}/${ARTIFACT_NAME}-${PMS_VERSION}-${PHPVERSION}.zip'
- sh 'mv ${ZENTAO_RELEASE_PATH}/biz.zip ${OUTPUT_PKG_PATH}/${BIZ_VERSION}/${ARTIFACT_NAME}-${BIZ_VERSION}-${PHPVERSION}.zip'
- sh 'mv ${ZENTAO_RELEASE_PATH}/biz.update.zip ${OUTPUT_PKG_PATH}/${BIZ_VERSION}/${ARTIFACT_NAME}.update-${BIZ_VERSION}-${PHPVERSION}.zip'
- sh 'mv ${ZENTAO_RELEASE_PATH}/max.zip ${OUTPUT_PKG_PATH}/${MAX_VERSION}/${ARTIFACT_NAME}-${MAX_VERSION}-${PHPVERSION}.zip'
- sh 'mv ${ZENTAO_RELEASE_PATH}/max.update.zip ${OUTPUT_PKG_PATH}/${MAX_VERSION}/${ARTIFACT_NAME}.update-${MAX_VERSION}-${PHPVERSION}.zip'
+ sh 'cp ${ZENTAO_RELEASE_PATH}/base.zip ${OUTPUT_PKG_PATH}/${PMS_VERSION}/${ARTIFACT_NAME}.${PMS_VERSION}.${INT_FLAG}${PHPVERSION}.zip'
+ sh 'mv ${ZENTAO_RELEASE_PATH}/biz.zip ${OUTPUT_PKG_PATH}/${BIZ_VERSION}/${ARTIFACT_NAME}.${BIZ_VERSION}.${INT_FLAG}${PHPVERSION}.zip'
+ sh 'mv ${ZENTAO_RELEASE_PATH}/biz.update.zip ${OUTPUT_PKG_PATH}/${BIZ_VERSION}/${ARTIFACT_NAME}.${BIZ_VERSION}.${INT_FLAG}update.${PHPVERSION}.zip'
+ sh 'mv ${ZENTAO_RELEASE_PATH}/max.zip ${OUTPUT_PKG_PATH}/${MAX_VERSION}/${ARTIFACT_NAME}.${MAX_VERSION}.${INT_FLAG}${PHPVERSION}.zip'
+ sh 'mv ${ZENTAO_RELEASE_PATH}/max.update.zip ${OUTPUT_PKG_PATH}/${MAX_VERSION}/${ARTIFACT_NAME}.${MAX_VERSION}.${INT_FLAG}update.${PHPVERSION}.zip'
}
} // End upload zip
stage("syspack") {
when {
- buildingTag()
- // environment name: 'GIT_TAG_BUILD_TYPE', value: 'release'
+ // buildingTag()
+ environment name: 'GIT_TAG_BUILD_TYPE', value: 'release'
}
steps{
sh 'env | grep GIT_TAG'
@@ -329,28 +336,8 @@ pipeline {
}
steps {
- nexusArtifactUploader(
- nexusVersion: 'nexus3',
- protocol: env.ARTIFACT_PROTOCOL,
- nexusUrl: env.ARTIFACT_HOST,
- groupId: 'zentao.pms' + '.' + env.GIT_TAG_BUILD_GROUP,
- version: env.PMS_VERSION,
- repository: env.ARTIFACT_REPOSITORY,
- credentialsId: env.ARTIFACT_CRED_ID,
- artifacts: [
- [artifactId: env.ARTIFACT_NAME,
- classifier: env.PHPVERSION + '-1.noarch',
- file: env.ZENTAO_RELEASE_PATH + '/zentao.rpm',
- type: 'rpm'],
- [artifactId: env.ARTIFACT_NAME,
- classifier: env.PHPVERSION + '.1.all',
- file: env.ZENTAO_RELEASE_PATH + '/zentao.deb',
- type: 'deb']
- ]
- )
-
- sh 'mv ${ZENTAO_RELEASE_PATH}/zentao.rpm ${OUTPUT_PKG_PATH}/${PMS_VERSION}/${ARTIFACT_NAME}-${PMS_VERSION}-${PHPVERSION}-1.noarch.rpm'
- sh 'mv ${ZENTAO_RELEASE_PATH}/zentao.deb ${OUTPUT_PKG_PATH}/${PMS_VERSION}/${ARTIFACT_NAME}-${PMS_VERSION}-${PHPVERSION}.1.all.deb'
+ sh 'mv ${ZENTAO_RELEASE_PATH}/zentao.rpm ${OUTPUT_PKG_PATH}/${PMS_VERSION}/${ARTIFACT_NAME}.${PMS_VERSION}.${PHPVERSION}.1.noarch.rpm'
+ sh 'mv ${ZENTAO_RELEASE_PATH}/zentao.deb ${OUTPUT_PKG_PATH}/${PMS_VERSION}/${ARTIFACT_NAME}.${PMS_VERSION}.${PHPVERSION}.1.all.deb'
}
} // End upload syspack cn
@@ -360,7 +347,7 @@ pipeline {
}
environment {
- QINIU_BUCKET = "qisytest"
+ QINIU_BUCKET = "download"
OBJECT_KEY_PREFIX = "zentao/"
QINIU_ACCESS_KEY = credentials('qiniu-upload-ak')
QINIU_SECRET_KEY = credentials('qiniu-upload-sk')
@@ -368,10 +355,10 @@ pipeline {
steps {
sh 'ls -l ${OUTPUT_PKG_PATH}'
- container('qiniu') {
- sh "qshell account $QINIU_ACCESS_KEY $QINIU_SECRET_KEY uploader"
- sh "qshell qupload2 --bucket ${QINIU_BUCKET} --overwrite --src-dir ${OUTPUT_PKG_PATH} --key-prefix ${OBJECT_KEY_PREFIX}"
- }
+ container('jnlp') {
+ sh 'qshell account $QINIU_ACCESS_KEY $QINIU_SECRET_KEY uploader'
+ sh 'qshell qupload2 --bucket $QINIU_BUCKET --overwrite --src-dir $OUTPUT_PKG_PATH --key-prefix $OBJECT_KEY_PREFIX'
+ }
}
}
@@ -383,15 +370,246 @@ pipeline {
} // End Merge and Upload Max
- stage("Notice") {
+ stage("Notice ZIP") {
steps {
container('xuanimbot') {
+ sh 'env | grep GIT'
sh 'git config --global --add safe.directory $(pwd)'
- //sh '/usr/local/bin/xuanimbot --users "qishiyao" --title "zentao build with tag ${TAG_NAME} success" --url ""${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/#browse/browse:${ARTIFACT_REPOSITORY}:zentao"" --content "zentaopms build success, click buttom below for browse artifacts" --debug --custom'
- sh '/usr/local/bin/xuanimbot --users "qishiyao" --groups "fced7fb3-0d48-449f-b408-ecae52a50f89" --title "zentao build with tag ${TAG_NAME} success" --url ""${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/#browse/browse:${ARTIFACT_REPOSITORY}:zentao"" --content "zentaopms build success, click buttom below for browse artifacts" --debug --custom'
+ sh './misc/gen_build_report.sh > /tmp/success.md'
+ sh '/usr/local/bin/xuanimbot --groups 84be4c6e-02e3-4fdc-b081-318c0c1eca02 --groups 31a0008b-6e3e-4b7f-9b7b-396a46b1f8f4 --title "zentaopms package success" --url "${RUN_DISPLAY_URL}" --content-file /tmp/success.md --debug --custom'
}
}
}
+
+ stage("Docker Image") {
+ agent {
+ kubernetes {
+ inheritFrom "dind xuanim"
+ }
+ }
+ stages() {
+ stage("prepare") {
+ steps {
+ checkout scmGit(branches: [[name: "master"]],
+ extensions: [cloneOption(depth: 2, noTags: false, reference: '', shallow: true)],
+ userRemoteConfigs: [[credentialsId: 'git-zcorp-cc-jenkins-bot-http', url: 'https://git.zcorp.cc/app/zentao.git']]
+ )
+ container('docker') {
+ sh "sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories"
+ sh "apk --no-cache add make bash jq git"
+ sh "docker run --privileged --rm tonistiigi/binfmt --install all"
+ sh "docker buildx create --name mybuilder --driver docker-container --bootstrap"
+ sh "docker buildx use mybuilder"
+ sh "make markdown-init"
+ }
+ }
+ }
+ stage("docker pms") {
+ environment {
+ ZENTAO_URL = """${sh(
+ returnStdout: true,
+ script: "echo ${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/repository/${ARTIFACT_REPOSITORY}/zentao/pmsPack/`echo ${GIT_TAG_BUILD_GROUP} | tr . /`/ZenTaoPMS"
+ ).trim()}"""
+ }
+ steps {
+ container('docker') {
+ sh 'env | grep ZENTAO'
+ sh 'make build'
+ }
+ }
+ }
+
+ stage("docker biz") {
+ environment {
+ ZENTAO_URL = """${sh(
+ returnStdout: true,
+ script: "echo ${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/repository/${ARTIFACT_REPOSITORY}/zentao/bizPack/`echo ${GIT_TAG_BUILD_GROUP} | tr . /`/ZenTaoPMS"
+ ).trim()}"""
+ }
+ steps {
+ container('docker') {
+ sh 'make build-biz'
+ sh 'make build-biz-k8s'
+ }
+ }
+ }
+
+ stage("docker max") {
+ environment {
+ ZENTAO_URL = """${sh(
+ returnStdout: true,
+ script: "echo ${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/repository/${ARTIFACT_REPOSITORY}/zentao/maxPack/`echo ${GIT_TAG_BUILD_GROUP} | tr . /`/ZenTaoPMS"
+ ).trim()}"""
+ }
+ steps {
+ container('docker') {
+ sh 'make build-max'
+ sh 'make build-max-k8s'
+ }
+ }
+ }
+
+ stage("Image Notice") {
+ steps {
+ container('docker') {
+ sh 'make markdown-render > ./report.md'
+ }
+ container('xuanimbot') {
+ sh 'git config --global --add safe.directory $(pwd)'
+ sh '/usr/local/bin/xuanimbot --groups 84be4c6e-02e3-4fdc-b081-318c0c1eca02 --groups 31a0008b-6e3e-4b7f-9b7b-396a46b1f8f4 --title "zentaopms build image success" --url "${RUN_DISPLAY_URL}" --content-file ./report.md --debug --custom'
+ }
+ }
+ }
+
+ }
+ } // End Docker Image
+
+ stage("Zbox") {
+ agent {
+ kubernetes {
+ containerTemplate {
+ name "docker"
+ image "docker:23.0.6-dind-alpine3.17"
+ command "sleep"
+ args "99d"
+ }
+ inheritFrom "dind xuanim"
+ }
+ }
+
+ stages() {
+ stage("Prepare") {
+ steps {
+ checkout scmGit(branches: [[name: "main"]],
+ extensions: [cloneOption(depth: 2, noTags: false, reference: '', shallow: true)],
+ userRemoteConfigs: [[credentialsId: 'git-zcorp-cc-jenkins-bot-http', url: 'https://git.zcorp.cc/devops/zbox-builder.git']]
+ )
+ container('docker') {
+ sh "sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories"
+ sh "apk --no-cache add make bash jq git curl wget libarchive-tools p7zip mariadb-client"
+ sh "docker run --privileged --rm tonistiigi/binfmt --install all"
+ sh "docker buildx create --name mybuilder --driver docker-container --bootstrap"
+ sh "docker buildx use mybuilder"
+ sh 'curl https://pkg.qucheng.com/files/stacksmith/render-template-1.0.1-10-debian-11-amd64.tar.gz | tar zxf - -C /'
+ }
+ }
+ }
+
+ stage("Build Zbox") {
+ environment {
+ // printf "$PKG_URL_FORMATTER" pmsPack ZenTaoPMS 18.5 ZenTaoPMS-18.5-php8.1.zip
+ PKG_URL_FORMATTER = """${sh(
+ returnStdout: true,
+ script: "echo ${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/repository/${ARTIFACT_REPOSITORY}/zentao/%s/`echo ${GIT_TAG_BUILD_GROUP} | tr . /`/%s/%s/%s"
+ ).trim()}"""
+ }
+ steps {
+ container('docker') {
+ sh 'bash build-zbox.sh zh-cn linux $PMS_VERSION $BIZ_VERSION $MAX_VERSION ipd1.0'
+ sh 'bash build-zbox.sh en linux $PMS_VERSION $BIZ_VERSION $MAX_VERSION ipd1.0'
+ sh 'ls -l release'
+ }
+
+ nexusArtifactUploader(
+ nexusVersion: 'nexus3',
+ protocol: env.ARTIFACT_PROTOCOL,
+ nexusUrl: env.ARTIFACT_HOST,
+ groupId: 'zentao.pmsPack' + '.' + env.GIT_TAG_BUILD_GROUP,
+ version: env.PMS_VERSION,
+ repository: env.ARTIFACT_REPOSITORY,
+ credentialsId: env.ARTIFACT_CRED_ID,
+ artifacts: [
+ [artifactId: 'ZenTaoPMS',
+ classifier: 'zbox_64',
+ file: './release/zh-cn/' + PMS_VERSION + '/ZenTaoPMS.' + PMS_VERSION + '.zbox_64.tar.gz',
+ type: 'tar.gz'],
+ [artifactId: 'ZenTaoALM',
+ classifier: 'zbox_64',
+ file: './release/en/' + PMS_VERSION + '/ZenTaoALM.' + PMS_VERSION + '.int.zbox_64.tar.gz',
+ type: 'tar.gz']
+ ]
+ )
+
+ nexusArtifactUploader(
+ nexusVersion: 'nexus3',
+ protocol: env.ARTIFACT_PROTOCOL,
+ nexusUrl: env.ARTIFACT_HOST,
+ groupId: 'zentao.bizPack' + '.' + env.GIT_TAG_BUILD_GROUP,
+ version: env.BIZ_VERSION,
+ repository: env.ARTIFACT_REPOSITORY,
+ credentialsId: env.ARTIFACT_CRED_ID,
+ artifacts: [
+ [artifactId: 'ZenTaoPMS',
+ classifier: 'zbox_64',
+ file: './release/zh-cn/' + BIZ_VERSION + '/ZenTaoPMS.' + BIZ_VERSION + '.zbox_64.tar.gz',
+ type: 'tar.gz'],
+ [artifactId: 'ZenTaoALM',
+ classifier: 'zbox_64',
+ file: './release/en/' + BIZ_VERSION + '/ZenTaoALM.' + BIZ_VERSION + '.int.zbox_64.tar.gz',
+ type: 'tar.gz']
+ ]
+ )
+
+ nexusArtifactUploader(
+ nexusVersion: 'nexus3',
+ protocol: env.ARTIFACT_PROTOCOL,
+ nexusUrl: env.ARTIFACT_HOST,
+ groupId: 'zentao.maxPack' + '.' + env.GIT_TAG_BUILD_GROUP,
+ version: env.MAX_VERSION,
+ repository: env.ARTIFACT_REPOSITORY,
+ credentialsId: env.ARTIFACT_CRED_ID,
+ artifacts: [
+ [artifactId: 'ZenTaoPMS',
+ classifier: 'zbox_64',
+ file: './release/zh-cn/' + MAX_VERSION + '/ZenTaoPMS.' + MAX_VERSION + '.zbox_64.tar.gz',
+ type: 'tar.gz'],
+ [artifactId: 'ZenTaoALM',
+ classifier: 'zbox_64',
+ file: './release/en/' + MAX_VERSION + '/ZenTaoALM.' + MAX_VERSION + '.int.zbox_64.tar.gz',
+ type: 'tar.gz']
+ ]
+ )
+
+ sh 'script/lib/gen_report.sh > zbox-success.md'
+ container('xuanimbot') {
+ sh 'git config --global --add safe.directory $(pwd)'
+ sh '/usr/local/bin/xuanimbot --groups 84be4c6e-02e3-4fdc-b081-318c0c1eca02 --groups 31a0008b-6e3e-4b7f-9b7b-396a46b1f8f4 --title "zentaopms build zbox success" --url "${RUN_DISPLAY_URL}" --content-file zbox-success.md --debug --custom'
+ }
+ }
+ }
+
+ stage("Upload Zbox to Qiniu") {
+ when {
+ environment name: 'GIT_TAG_BUILD_TYPE', value: 'release'
+ }
+
+ environment {
+ QINIU_BUCKET = "download"
+ OBJECT_KEY_PREFIX = "zentao/"
+ QINIU_ACCESS_KEY = credentials('qiniu-upload-ak')
+ QINIU_SECRET_KEY = credentials('qiniu-upload-sk')
+ }
+
+ steps {
+ container('jnlp') {
+ sh 'qshell account $QINIU_ACCESS_KEY $QINIU_SECRET_KEY uploader'
+ sh 'qshell qupload2 --bucket $QINIU_BUCKET --overwrite --src-dir ./release/zh-cn --key-prefix $OBJECT_KEY_PREFIX'
+ sh 'qshell qupload2 --bucket $QINIU_BUCKET --overwrite --src-dir ./release/en --key-prefix $OBJECT_KEY_PREFIX'
+ }
+ }
+ } // End Upload Zbox to Qiniu
+ }
+ } // End Zbox
+
+ }
+
+ post {
+ failure {
+ container('xuanimbot') {
+ sh 'git config --global --add safe.directory $(pwd)'
+ sh '/usr/local/bin/xuanimbot --users "${GIT_TAGGER_NAME}" --groups 31a0008b-6e3e-4b7f-9b7b-396a46b1f8f4 --title "zentaopms build failed" --url "${BUILD_URL}" --content "" --debug --custom'
+ }
+ }
}
} // end publish
}
diff --git a/api/v1/entries/builds.php b/api/v1/entries/builds.php
index ccec1ba9a7..a771211c26 100644
--- a/api/v1/entries/builds.php
+++ b/api/v1/entries/builds.php
@@ -23,8 +23,8 @@ class buildsEntry extends entry
if(empty($projectID)) $projectID = $this->param('project', 0);
if(empty($projectID)) return $this->sendError(400, "Need project id.");
- $control = $this->loadController('project', 'build');
- $control->build($projectID, $this->param('type', 'all'), $this->param('param', 0), $this->param('order', 't1.date_desc,t1.id_desc'));
+ $control = $this->loadController('projectbuild', 'browse');
+ $control->browse($projectID, $this->param('type', 'all'), $this->param('param', 0), $this->param('order', 't1.date_desc,t1.id_desc'));
$data = $this->getData();
if(!isset($data->status)) return $this->sendError(400, 'error');
diff --git a/api/v1/entries/ztfsubmit.php b/api/v1/entries/ztfsubmit.php
index 5fbd3d2a3e..b1e1c25c76 100644
--- a/api/v1/entries/ztfsubmit.php
+++ b/api/v1/entries/ztfsubmit.php
@@ -64,6 +64,24 @@ class ztfSubmitEntry extends baseEntry
->set('ZTFResult')->eq(json_encode($post))
->where('id')->eq($post->task)
->exec();
+
+ $result = $this->dao->select('*')->from(TABLE_TESTRESULT)
+ ->where('id')->eq($post->task)
+ ->fetch();
+
+ if($result->run)
+ {
+ $runStatus = $result->caseResult == 'blocked' ? 'blocked' : 'normal';
+ $this->dao->update(TABLE_TESTRUN)
+ ->set('lastRunResult')->eq($result->caseResult)
+ ->set('status')->eq($runStatus)
+ ->set('lastRunner')->eq($result->lastRunner)
+ ->set('lastRunDate')->eq($result->date)
+ ->where('id')->eq($result->run)
+ ->exec();
+ }
+
+ $this->dao->update(TABLE_CASE)->set('lastRunner')->eq($result->lastRunner)->set('lastRunDate')->eq($result->date)->set('lastRunResult')->eq($result->caseResult)->where('id')->eq($result->case)->exec();
}
else
{
diff --git a/config/config.php b/config/config.php
index 44ba014531..df30f0a033 100644
--- a/config/config.php
+++ b/config/config.php
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* 基本设置。Basic settings. */
-$config->version = '18.5'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
+$config->version = '18.6'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->liteVersion = '1.2'; // 迅捷版版本。 The version of Lite.
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
diff --git a/config/routes.php b/config/routes.php
index a7c5e18de4..a0cece5526 100644
--- a/config/routes.php
+++ b/config/routes.php
@@ -34,6 +34,7 @@ $routes['/configurations/:name'] = 'config';
$routes['/programs/:id/products'] = 'products';
$routes['/products'] = 'products';
$routes['/products/:id'] = 'product';
+$routes['/product/:id'] = 'product';
$routes['/productlines'] = 'productLines';
$routes['/productlines/:id'] = 'productLine';
diff --git a/db/update18.5.sql b/db/update18.5.sql
new file mode 100644
index 0000000000..4ea8c8e48c
--- /dev/null
+++ b/db/update18.5.sql
@@ -0,0 +1,2 @@
+UPDATE `zt_chart` SET `sql` = 'SELECT IF(t3.id IS NOT NULL, t3.`name`, \"空\") AS deptName,count(1) as count, \r\nIF(t3.id IS NOT NULL, t3.`order`, 9999) AS deptOrder \r\nFROM zt_user AS t1 \r\nLEFT JOIN zt_dept AS t2 ON t1.dept = t2.id\r\nLEFT JOIN zt_dept AS t3 ON FIND_IN_SET(TRIM(\',\' FROM t3.path), TRIM(\',\' FROM t2.path)) AND t3.grade = \'1\'\r\nWHERE t1.deleted = \'0\'\r\nGROUP BY deptName, deptOrder \r\nORDER BY deptOrder ASC'
+WHERE `id` = 1049;
diff --git a/db/zentao.sql b/db/zentao.sql
index 7a9fd60b80..519e4514bf 100644
--- a/db/zentao.sql
+++ b/db/zentao.sql
@@ -15047,26 +15047,26 @@ INSERT INTO `zt_pivot`(`id`, `dimension`, `group`, `name`, `desc`, `sql`, `field
(1005, 1, '59', '{\"zh-cn\":\"\\u4ea7\\u54c1\\u9700\\u6c42\\u9636\\u6bb5\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u7522\\u54c1\\u9700\\u6c42\\u968e\\u6bb5\\u5206\\u5e03\\u8868\",\"en\":\"Story Stage\",\"de\":\"Story Stage\",\"fr\":\"Story Stage\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u4ea7\\u54c1\\u5217\\u51fa\\u9700\\u6c42\\u603b\\u6570\\uff0c\\u7814\\u53d1\\u9636\\u6bb5\\u7684\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u7522\\u54c1\\u5217\\u51fa\\u9700\\u6c42\\u7e3d\\u6578\\uff0c\\u7814\\u767c\\u968e\\u6bb5\\u7684\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"Total number and stage distribution of stories \",\"de\":\"Total number and stage distribution of stories \",\"fr\":\"Total number and stage distribution of stories \"}', 'select t1.*,t2.name from zt_story as t1\r\n left join zt_product as t2 on t1.product=t2.id \r\nleft join zt_project as t3 on t2.program=t3.id \r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\'\r\norder by t3.`order` asc, t2.line desc, t2.`order` asc', '{\"id\":{\"object\":\"story\",\"field\":\"id\",\"type\":\"string\"},\"vision\":{\"object\":\"project\",\"field\":\"vision\",\"type\":\"string\"},\"parent\":{\"object\":\"story\",\"field\":\"parent\",\"type\":\"string\"},\"product\":{\"object\":\"story\",\"field\":\"product\",\"type\":\"string\"},\"branch\":{\"object\":\"story\",\"field\":\"branch\",\"type\":\"string\"},\"module\":{\"object\":\"story\",\"field\":\"module\",\"type\":\"string\"},\"plan\":{\"object\":\"story\",\"field\":\"plan\",\"type\":\"string\"},\"source\":{\"object\":\"story\",\"field\":\"source\",\"type\":\"string\"},\"sourceNote\":{\"object\":\"story\",\"field\":\"sourceNote\",\"type\":\"string\"},\"fromBug\":{\"object\":\"story\",\"field\":\"fromBug\",\"type\":\"string\"},\"feedback\":{\"object\":\"story\",\"field\":\"feedback\",\"type\":\"string\"},\"title\":{\"object\":\"story\",\"field\":\"title\",\"type\":\"string\"},\"keywords\":{\"object\":\"story\",\"field\":\"keywords\",\"type\":\"string\"},\"type\":{\"object\":\"story\",\"field\":\"type\",\"type\":\"string\"},\"category\":{\"object\":\"story\",\"field\":\"category\",\"type\":\"string\"},\"pri\":{\"object\":\"story\",\"field\":\"pri\",\"type\":\"string\"},\"estimate\":{\"object\":\"story\",\"field\":\"estimate\",\"type\":\"string\"},\"status\":{\"object\":\"story\",\"field\":\"status\",\"type\":\"string\"},\"subStatus\":{\"object\":\"story\",\"field\":\"subStatus\",\"type\":\"string\"},\"color\":{\"object\":\"story\",\"field\":\"color\",\"type\":\"string\"},\"stage\":{\"object\":\"story\",\"field\":\"stage\",\"type\":\"string\"},\"stagedBy\":{\"object\":\"story\",\"field\":\"stagedBy\",\"type\":\"string\"},\"mailto\":{\"object\":\"story\",\"field\":\"mailto\",\"type\":\"string\"},\"lib\":{\"object\":\"project\",\"field\":\"lib\",\"type\":\"string\"},\"fromStory\":{\"object\":\"project\",\"field\":\"fromStory\",\"type\":\"string\"},\"fromVersion\":{\"object\":\"project\",\"field\":\"fromVersion\",\"type\":\"string\"},\"openedBy\":{\"object\":\"story\",\"field\":\"openedBy\",\"type\":\"string\"},\"openedDate\":{\"object\":\"story\",\"field\":\"openedDate\",\"type\":\"string\"},\"assignedTo\":{\"object\":\"story\",\"field\":\"assignedTo\",\"type\":\"string\"},\"assignedDate\":{\"object\":\"story\",\"field\":\"assignedDate\",\"type\":\"string\"},\"approvedDate\":{\"object\":\"project\",\"field\":\"approvedDate\",\"type\":\"string\"},\"lastEditedBy\":{\"object\":\"story\",\"field\":\"lastEditedBy\",\"type\":\"string\"},\"lastEditedDate\":{\"object\":\"story\",\"field\":\"lastEditedDate\",\"type\":\"string\"},\"changedBy\":{\"object\":\"story\",\"field\":\"changedBy\",\"type\":\"string\"},\"changedDate\":{\"object\":\"story\",\"field\":\"changedDate\",\"type\":\"string\"},\"reviewedBy\":{\"object\":\"story\",\"field\":\"reviewedBy\",\"type\":\"string\"},\"reviewedDate\":{\"object\":\"story\",\"field\":\"reviewedDate\",\"type\":\"string\"},\"closedBy\":{\"object\":\"story\",\"field\":\"closedBy\",\"type\":\"string\"},\"closedDate\":{\"object\":\"story\",\"field\":\"closedDate\",\"type\":\"string\"},\"closedReason\":{\"object\":\"story\",\"field\":\"closedReason\",\"type\":\"string\"},\"activatedDate\":{\"object\":\"story\",\"field\":\"activatedDate\",\"type\":\"string\"},\"toBug\":{\"object\":\"story\",\"field\":\"toBug\",\"type\":\"string\"},\"childStories\":{\"object\":\"story\",\"field\":\"childStories\",\"type\":\"string\"},\"linkStories\":{\"object\":\"story\",\"field\":\"linkStories\",\"type\":\"string\"},\"linkRequirements\":{\"object\":\"story\",\"field\":\"linkRequirements\",\"type\":\"string\"},\"twins\":{\"object\":\"story\",\"field\":\"twins\",\"type\":\"string\"},\"duplicateStory\":{\"object\":\"story\",\"field\":\"duplicateStory\",\"type\":\"string\"},\"version\":{\"object\":\"story\",\"field\":\"version\",\"type\":\"string\"},\"storyChanged\":{\"object\":\"project\",\"field\":\"storyChanged\",\"type\":\"string\"},\"feedbackBy\":{\"object\":\"story\",\"field\":\"feedbackBy\",\"type\":\"string\"},\"notifyEmail\":{\"object\":\"story\",\"field\":\"notifyEmail\",\"type\":\"string\"},\"URChanged\":{\"object\":\"story\",\"field\":\"URChanged\",\"type\":\"string\"},\"deleted\":{\"object\":\"story\",\"field\":\"deleted\",\"type\":\"string\"},\"name\":{\"object\":\"product\",\"field\":\"name\",\"type\":\"string\"}}', '', '', NULL, '{\"group1\":\"name\",\"group2\":\"\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"stage\",\"slice\":\"stage\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '', 4, 'published', '0', 'admin', '2015-07-21 15:38:34', '', NULL, '0'),
(1006, 1, '59', '{\"zh-cn\":\"\\u4ea7\\u54c1\\u53d1\\u5e03\\u6570\\u91cf\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u7522\\u54c1\\u767c\\u5e03\\u6578\\u91cf\\u7d71\\u8a08\\u8868\",\"en\":\"Product Release\",\"de\":\"Product Release\",\"fr\":\"Product Release\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u4ea7\\u54c1\\u5217\\u51fa\\u53d1\\u5e03\\u7684\\u6570\\u91cf\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u7522\\u54c1\\u5217\\u51fa\\u767c\\u5e03\\u7684\\u6578\\u91cf\\u3002\",\"en\":\"Product Release.\",\"de\":\"Product Release.\",\"fr\":\"Product Release.\"}', 'select t2.name, 1 as releases from zt_release as t1 \r\nleft join zt_product as t2 on t1.product=t2.id \r\nleft join zt_project as t3 on t2.program=t3.id \r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\'\r\norder by t3.`order` asc, t2.line desc, t2.`order` asc', '{\"name\":{\"object\":\"release\",\"field\":\"name\",\"type\":\"string\"},\"releases\":{\"object\":\"product\",\"field\":\"releases\",\"type\":\"string\"}}', '{\"count\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"done\":{\"zh-cn\":\"\\u5b8c\\u6210\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u6570\",\"en\":\"Done\"}}', '', NULL, '{\"group1\":\"name\",\"group2\":\"\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"releases\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '', 4, 'published', '0', 'admin', '2015-07-21 16:00:52', '', NULL, '0'),
(1007, 1, '60', '{\"zh-cn\":\"\\u4efb\\u52a1\\u72b6\\u6001\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u4efb\\u52d9\\u72c0\\u614b\\u7d71\\u8a08\\u8868\",\"en\":\"Task Status Report\",\"de\":\"Task Status Report\",\"fr\":\"Task Status Report\",\"vi\":\"Task Status Report\",\"ja\":\"Task Status Report\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u6267\\u884c\\u7edf\\u8ba1\\u4efb\\u52a1\\u7684\\u72b6\\u6001\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u57f7\\u884c\\u7d71\\u8a08\\u4efb\\u52d9\\u7684\\u72c0\\u614b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,t1.name,t2.status,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t2.id as taskID, t1.status as projectstatus, (case when t2.deadline < CURDATE() and t2.deadline != \'0000-00-00\' and t2.status != \'closed\' and t2.status != \'done\' and t2.status != \'cancel\' then 1 else 0 end) as timeout from zt_project as t1\r\n left join zt_task as t2 on t1.id=t2.execution\r\n left join zt_project as t3 on t3.id=t1.project\r\n where t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and t2.deleted=\'0\' and if($project=\'\',1,t3.id=$project) and if($status=\'\',1,t1.status=$status) and if($beginDate=\'\',1,t1.begin>=$beginDate) and if($endDate=\'\',1,t1.end<=$endDate)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"name\":{\"object\":\"project\",\"field\":\"name\",\"type\":\"string\"},\"status\":{\"object\":\"project\",\"field\":\"status\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"taskID\":{\"object\":\"task\",\"field\":\"taskID\",\"type\":\"string\"},\"projectstatus\":{\"object\":\"task\",\"field\":\"projectstatus\",\"type\":\"string\"},\"timeout\":{\"object\":\"task\",\"field\":\"timeout\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"status\",\"beginDate\",\"endDate\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\",\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\"],\"requestType\":[\"select\",\"select\",\"date\",\"date\"],\"selectList\":[\"project\",\"project.status\",\"user\",\"user\"],\"default\":[\"\",\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"status\",\"slice\":\"status\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"beginDate\",\"name\":\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-22 11:28:33', '', NULL, '0'),
-(1008, 1, '60', '{\"zh-cn\":\"\\u4efb\\u52a1\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u4efb\\u52d9\\u985e\\u578b\\u7d71\\u8a08\\u8868\",\"en\":\"Task Type Report\",\"de\":\"Task Type Report\",\"fr\":\"Task Type Report\",\"vi\":\"Task Type Report\",\"ja\":\"Task Type Report\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u4efb\\u52a1\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u4efb\\u52d9\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t2.type,t2.id as taskID, t1.status as projectstatus from zt_project as t1 \r\nleft join zt_task as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and t2.deleted=\'0\' and if($project=\'\',1,t3.id=$project) and if($status=\'\',1,t1.status=$status) and if($beginDate=\'\',1,t1.begin>=$beginDate) and if($endDate=\'\',1,t1.end<=$endDate)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"type\":{\"object\":\"project\",\"field\":\"type\",\"type\":\"string\"},\"taskID\":{\"object\":\"task\",\"field\":\"taskID\",\"type\":\"string\"},\"projectstatus\":{\"object\":\"task\",\"field\":\"projectstatus\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"status\",\"beginDate\",\"endDate\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\",\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\"],\"requestType\":[\"select\",\"select\",\"date\",\"date\"],\"selectList\":[\"project\",\"project.status\",\"user\",\"user\"],\"default\":[\"\",\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"type\",\"slice\":\"type\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"beginDate\",\"name\":\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-22 13:06:46', '', NULL, '0'),
+(1008, 1, '60', '{\"zh-cn\":\"\\u4efb\\u52a1\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u4efb\\u52d9\\u985e\\u578b\\u7d71\\u8a08\\u8868\",\"en\":\"Task Type Report\",\"de\":\"Task Type Report\",\"fr\":\"Task Type Report\",\"vi\":\"Task Type Report\",\"ja\":\"Task Type Report\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u4efb\\u52a1\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u4efb\\u52d9\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t2.type,t2.id as taskID, t1.status as projectstatus from zt_project as t1 \r\nleft join zt_task as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and t2.deleted=\'0\' and if($project=\'\',1,t3.id=$project) and if($status=\'\',1,t1.status=$status) and if($beginDate=\'\',1,t1.begin>=$beginDate) and if($endDate=\'\',1,t1.end<=$endDate)', '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"project","field":"project","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"type":{"object":"task","field":"type","type":"option"},"taskID":{"object":"task","field":"taskID","type":"string"},"projectstatus":{"object":"task","field":"projectstatus","type":"string"}}', '{"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"type":{"zh-cn":"\\u4efb\\u52a1\\u7c7b\\u578b","zh-tw":"","en":"","de":"","fr":""},"taskID":{"zh-cn":"taskID","zh-tw":"","en":"","de":"","fr":""},"projectstatus":{"zh-cn":"projectstatus","zh-tw":"","en":"","de":"","fr":""}}', '{\"varName\":[\"project\",\"status\",\"beginDate\",\"endDate\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\",\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\"],\"requestType\":[\"select\",\"select\",\"date\",\"date\"],\"selectList\":[\"project\",\"project.status\",\"user\",\"user\"],\"default\":[\"\",\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"type\",\"slice\":\"type\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"beginDate\",\"name\":\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-22 13:06:46', '', NULL, '0'),
(1009, 1, '60', '{\"zh-cn\":\"\\u9879\\u76ee\\u4efb\\u52a1\\u6307\\u6d3e\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u4efb\\u52d9\\u6307\\u6d3e\\u7d71\\u8a08\\u8868\",\"en\":\"Task Assign Report\",\"de\":\"Task Assign Report\",\"fr\":\"Task Assign Report\",\"vi\":\"Task Assign Report\",\"ja\":\"Task Assign Report\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u4efb\\u52a1\\u7684\\u6307\\u6d3e\\u7ed9\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u4efb\\u52d9\\u7684\\u6307\\u6d3e\\u7d66\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t4.name as project,IF(t4.multiple=\"1\",t1.name,\"\") as execution,if(t3.account is not null, t3.account,t2.assignedTo) as assignedTo,t2.id as taskID, t1.status as projectstatus from zt_project as t1\r\n left join zt_task as t2 on t1.id=t2.execution\r\n left join zt_team as t3 on t3.type=\'task\' && t3.root=t2.id \r\nleft join zt_project as t4 on t1.project=t4.id\r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and t2.deleted=\'0\' and if($project=\'\',1,t4.id=$project) and if($status=\'\',1,t1.status=$status) and if($beginDate=\'\',1,t1.begin>=$beginDate) and if($endDate=\'\',1,t1.end<=$endDate)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"assignedTo\":{\"object\":\"task\",\"field\":\"assignedTo\",\"type\":\"string\"},\"taskID\":{\"object\":\"team\",\"field\":\"taskID\",\"type\":\"string\"},\"projectstatus\":{\"object\":\"team\",\"field\":\"projectstatus\",\"type\":\"string\"}}', '{\"assignedTo\":{\"zh-cn\":\"\\u6307\\u6d3e\\u7ed9\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"status\",\"beginDate\",\"endDate\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\",\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\"],\"requestType\":[\"select\",\"select\",\"date\",\"date\"],\"selectList\":[\"project\",\"project.status\",\"user\",\"user\"],\"default\":[\"\",\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"assignedTo\",\"slice\":\"assignedTo\",\"stat\":\"count\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"beginDate\",\"name\":\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-22 13:13:28', '', NULL, '0'),
(1010, 1, '60', '{\"zh-cn\":\"\\u9879\\u76ee\\u4efb\\u52a1\\u5b8c\\u6210\\u8005\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u4efb\\u52d9\\u5b8c\\u6210\\u8005\\u7d71\\u8a08\\u8868\",\"en\":\"Task Finish Report\",\"de\":\"Task Finish Report\",\"fr\":\"Task Finish Report\",\"vi\":\"Task Finish Report\",\"ja\":\"Task Finish Report\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u4efb\\u52a1\\u7684\\u5b8c\\u6210\\u8005\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u4efb\\u52d9\\u7684\\u5b8c\\u6210\\u8005\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t2.finishedBy,t2.id as taskID, t1.status as projectstatus from zt_project as t1 \r\nleft join zt_task as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t1.project=t3.id \r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and t2.deleted=\'0\' and t2.finishedBy!=\'\' and if($project=\'\',1,t3.id=$project) and if($status=\'\',1,t1.status=$status) and if($beginDate=\'\',1,t1.begin>=$beginDate) and if($endDate=\'\',1,t1.end<=$endDate)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"finishedBy\":{\"object\":\"task\",\"field\":\"finishedBy\",\"type\":\"string\"},\"taskID\":{\"object\":\"task\",\"field\":\"taskID\",\"type\":\"string\"},\"projectstatus\":{\"object\":\"task\",\"field\":\"projectstatus\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"status\",\"beginDate\",\"endDate\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\",\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\"],\"requestType\":[\"select\",\"select\",\"date\",\"date\"],\"selectList\":[\"project\",\"project.status\",\"user\",\"user\"],\"default\":[\"\",\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"finishedBy\",\"slice\":\"finishedBy\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"beginDate\",\"name\":\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-22 13:16:21', '', NULL, '0'),
(1011, 1, '60', '{\"zh-cn\":\"\\u9879\\u76ee\\u6295\\u5165\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u6295\\u5165\\u7d71\\u8a08\\u8868\",\"en\":\"Project Invest Report\",\"de\":\"Project Invest Report\",\"fr\":\"Project Invest Report\",\"vi\":\"Project Invest Report\",\"ja\":\"Project Invest Report\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u5217\\u51fa\\uff1a\\u4efb\\u52a1\\u6570\\uff0c\\u9700\\u6c42\\u6570\\uff0c\\u4eba\\u6570\\uff0c\\u603b\\u6d88\\u8017\\u5de5\\u65f6\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u5217\\u51fa\\uff1a\\u4efb\\u52d9\\u6578\\uff0c\\u9700\\u6c42\\u6578\\uff0c\\u4eba\\u6578\\uff0c\\u7e3d\\u6d88\\u8017\\u5de5\\u6642\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t5.name as project,IF(t5.multiple=\"1\",t1.name,\"\") as execution,CONCAT(t1.begin,\' ~ \',t1.end) as timeLimit,t2.teams,t3.stories,round(t4.consumed,1) as consumed,t4.number, t1.status as projectstatus \r\nfrom zt_project as t1\r\n left join ztv_projectteams as t2 on t1.id=t2.execution\r\nleft join ztv_projectstories as t3 on t1.id=t3.execution\r\n left join ztv_executionsummary as t4 on t1.id=t4.execution \r\nleft join zt_project as t5 on t1.project=t5.id \r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and if($project=\'\',1,t5.id=$project) and if($status=\'\',1,t1.status=$status) and if($beginDate=\'\',1,t1.begin>=$beginDate) and if($endDate=\'\',1,t1.end<=$endDate)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"timeLimit\":{\"object\":\"project\",\"field\":\"timeLimit\",\"type\":\"string\"},\"teams\":{\"object\":\"project\",\"field\":\"teams\",\"type\":\"string\"},\"stories\":{\"object\":\"project\",\"field\":\"stories\",\"type\":\"string\"},\"consumed\":{\"object\":\"project\",\"field\":\"consumed\",\"type\":\"string\"},\"number\":{\"object\":\"project\",\"field\":\"number\",\"type\":\"string\"},\"projectstatus\":{\"object\":\"project\",\"field\":\"projectstatus\",\"type\":\"string\"}}', '{\"timeLimit\":{\"zh-cn\":\"\\u5de5\\u671f\"},\"teams\":{\"zh-cn\":\"\\u4eba\\u6570\"},\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\"},\"consumed\":{\"zh-cn\":\"\\u603b\\u6d88\\u8017\"},\"number\":{\"zh-cn\":\"\\u4efb\\u52a1\\u6570\"},\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"status\",\"beginDate\",\"endDate\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\",\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\"],\"requestType\":[\"select\",\"select\",\"date\",\"date\"],\"selectList\":[\"project\",\"project.status\",\"user\",\"user\"],\"default\":[\"\",\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"number\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"stories\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"teams\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"consumed\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"beginDate\",\"name\":\"\\u6267\\u884c\\u8d77\\u59cb\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u6267\\u884c\\u7ed3\\u675f\\u65e5\\u671f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-22 16:37:38', '', NULL, '0'),
-(1012, 1, '60', '{\"zh-cn\":\"\\u9879\\u76ee\\u9700\\u6c42\\u72b6\\u6001\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u9700\\u6c42\\u72c0\\u614b\\u5206\\u5e03\\u8868\",\"en\":\"Project Story Status\",\"de\":\"Project Story Status\",\"fr\":\"Project Story Status\",\"vi\":\"Project Story Status\",\"ja\":\"Project Story Status\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u9700\\u6c42\\u7684\\u72b6\\u6001\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u9700\\u6c42\\u7684\\u72c0\\u614b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t2.id, t4.name as project,IF(t4.multiple=\"1\",t2.name,\"\") as execution,t3.status from zt_projectstory as t1 \r\nleft join zt_project as t2 on t1.project=t2.id \r\nleft join zt_story as t3 on t1.story=t3.id \r\nleft join zt_project as t4 on t4.id=t2.project\r\nwhere t2.deleted=\'0\' and t2.type in(\'sprint\', \'stage\') and if($project=\'\',1,t4.id=$project) and if($execution=\'\',1,t2.id=$execution) and if($status=\'\',1,t2.status=$status)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"projectstory\",\"field\":\"project\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"status\":{\"object\":\"project\",\"field\":\"status\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\",\"status\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\"],\"requestType\":[\"select\",\"select\",\"select\"],\"selectList\":[\"project\",\"execution\",\"project.status\"],\"default\":[\"\",\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"status\",\"slice\":\"status\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 15:35:08', '', NULL, '0'),
-(1013, 1, '60', '{\"zh-cn\":\"\\u9879\\u76ee\\u9700\\u6c42\\u9636\\u6bb5\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u9700\\u6c42\\u968e\\u6bb5\\u5206\\u5e03\\u8868\",\"en\":\"Project Stage Report\",\"de\":\"Project Stage Report\",\"fr\":\"Project Stage Report\",\"vi\":\"Project Stage Report\",\"ja\":\"Project Stage Report\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u9700\\u6c42\\u9636\\u6bb5\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u9700\\u6c42\\u968e\\u6bb5\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t2.id, t4.name as project,IF(t4.multiple=\"1\",t2.name,\"\") as execution,t3.stage from zt_projectstory as t1 \r\nleft join zt_project as t2 on t1.project=t2.id \r\nleft join zt_story as t3 on t1.story=t3.id \r\nleft join zt_project as t4 on t4.id=t2.project\r\nwhere t2.deleted=\'0\' and t2.type in(\'sprint\', \'stage\') and if($project=\'\',1,t4.id=$project) and if($execution=\'\',1,t2.id=$execution) and if($status=\'\',1,t2.status=$status)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"projectstory\",\"field\":\"project\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"stage\":{\"object\":\"project\",\"field\":\"stage\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\",\"status\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\"],\"requestType\":[\"select\",\"select\",\"select\"],\"selectList\":[\"project\",\"execution\",\"project.status\"],\"default\":[\"\",\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"stage\",\"slice\":\"stage\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 15:38:18', '', NULL, '0'),
+(1012, 1, '60', '{\"zh-cn\":\"\\u9879\\u76ee\\u9700\\u6c42\\u72b6\\u6001\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u9700\\u6c42\\u72c0\\u614b\\u5206\\u5e03\\u8868\",\"en\":\"Project Story Status\",\"de\":\"Project Story Status\",\"fr\":\"Project Story Status\",\"vi\":\"Project Story Status\",\"ja\":\"Project Story Status\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u9700\\u6c42\\u7684\\u72b6\\u6001\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u9700\\u6c42\\u7684\\u72c0\\u614b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t2.id, t4.name as project,IF(t4.multiple=\"1\",t2.name,\"\") as execution,t3.status from zt_projectstory as t1 \r\nleft join zt_project as t2 on t1.project=t2.id \r\nleft join zt_story as t3 on t1.story=t3.id \r\nleft join zt_project as t4 on t4.id=t2.project\r\nwhere t2.deleted=\'0\' and t2.type in(\'sprint\', \'stage\') and if($project=\'\',1,t4.id=$project) and if($execution=\'\',1,t2.id=$execution) and if($status=\'\',1,t2.status=$status)', '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"projectstory","field":"project","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"status":{"object":"story","field":"status","type":"option"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\",\"status\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\"],\"requestType\":[\"select\",\"select\",\"select\"],\"selectList\":[\"project\",\"execution\",\"project.status\"],\"default\":[\"\",\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"status\",\"slice\":\"status\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 15:35:08', '', NULL, '0'),
+(1013, 1, '60', '{\"zh-cn\":\"\\u9879\\u76ee\\u9700\\u6c42\\u9636\\u6bb5\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u9700\\u6c42\\u968e\\u6bb5\\u5206\\u5e03\\u8868\",\"en\":\"Project Stage Report\",\"de\":\"Project Stage Report\",\"fr\":\"Project Stage Report\",\"vi\":\"Project Stage Report\",\"ja\":\"Project Stage Report\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1\\u9700\\u6c42\\u9636\\u6bb5\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08\\u9700\\u6c42\\u968e\\u6bb5\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t2.id, t4.name as project,IF(t4.multiple=\"1\",t2.name,\"\") as execution,t3.stage from zt_projectstory as t1 \r\nleft join zt_project as t2 on t1.project=t2.id \r\nleft join zt_story as t3 on t1.story=t3.id \r\nleft join zt_project as t4 on t4.id=t2.project\r\nwhere t2.deleted=\'0\' and t2.type in(\'sprint\', \'stage\') and if($project=\'\',1,t4.id=$project) and if($execution=\'\',1,t2.id=$execution) and if($status=\'\',1,t2.status=$status)', '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"projectstory","field":"project","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"stage":{"object":"story","field":"stage","type":"option"}}', '{"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"stage":{"zh-cn":"\\u9636\\u6bb5","zh-tw":"","en":"","de":"","fr":""}}', '{\"varName\":[\"project\",\"execution\",\"status\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\"],\"requestType\":[\"select\",\"select\",\"select\"],\"selectList\":[\"project\",\"execution\",\"project.status\"],\"default\":[\"\",\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"stage\",\"slice\":\"stage\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 15:38:18', '', NULL, '0'),
(1014, 1, '60,61', '{\"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\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u89e3\\u51b3\\u65b9\\u6848\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u89e3\\u6c7a\\u65b9\\u6848\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,t3.id as projectID,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t1.id as bugID,t2.resolution from zt_project as t1 \r\nleft join zt_bug as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t3.id=t1.project\r\n where t1.deleted=\'0\' and t2.deleted=\'0\' and t2.resolution!=\'\' having bugID!=\'\' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"t3id\":{\"object\":\"project\",\"field\":\"t3id\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"bugID\":{\"object\":\"bug\",\"field\":\"bugID\",\"type\":\"string\"},\"resolution\":{\"object\":\"bug\",\"field\":\"resolution\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"resolution\",\"slice\":\"resolution\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 16:04:46', '', NULL, '0'),
-(1015, 1, '60,61', '{\"zh-cn\":\"\\u9879\\u76eeBug\\u72b6\\u6001\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u72c0\\u614b\\u5206\\u5e03\\u8868\",\"en\":\"Project Bug Status\",\"de\":\"Project Bug Status\",\"fr\":\"Project Bug Status\",\"vi\":\"Project Bug Status\",\"ja\":\"Project Bug Status\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u72b6\\u6001\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u72c0\\u614b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,t3.id as projectID,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t1.id as bugID,t2.status from zt_project as t1 \r\nleft join zt_bug as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\' having bugID!=\' \' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"t3id\":{\"object\":\"project\",\"field\":\"t3id\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"bugID\":{\"object\":\"bug\",\"field\":\"bugID\",\"type\":\"string\"},\"status\":{\"object\":\"project\",\"field\":\"status\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"status\",\"slice\":\"status\",\"stat\":\"count\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 15:48:03', '', NULL, '0'),
+(1015, 1, '60,61', '{\"zh-cn\":\"\\u9879\\u76eeBug\\u72b6\\u6001\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u72c0\\u614b\\u5206\\u5e03\\u8868\",\"en\":\"Project Bug Status\",\"de\":\"Project Bug Status\",\"fr\":\"Project Bug Status\",\"vi\":\"Project Bug Status\",\"ja\":\"Project Bug Status\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u72b6\\u6001\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u72c0\\u614b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,t3.id as projectID,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t1.id as bugID,t2.status from zt_project as t1 \r\nleft join zt_bug as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\' having bugID!=\' \' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"project","field":"project","type":"string"},"t3id":{"object":"project","field":"t3id","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"bugID":{"object":"bug","field":"bugID","type":"string"},"status":{"object":"bug","field":"status","type":"option"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"status\",\"slice\":\"status\",\"stat\":\"count\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 15:48:03', '', NULL, '0'),
(1016, 1, '60,61', '{\"zh-cn\":\"\\u9879\\u76eeBug\\u521b\\u5efa\\u8005\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u5275\\u5efa\\u8005\\u5206\\u5e03\\u8868\",\"en\":\"Project Bug Opened\",\"de\":\"Project Bug Opened\",\"fr\":\"Project Bug Opened\",\"vi\":\"Project Bug Opened\",\"ja\":\"Project Bug Opened\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u521b\\u5efa\\u8005\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u5275\\u5efa\\u8005\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,t3.id as projectID,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t1.id as bugID,t2.openedBy from zt_project as t1 \r\nleft join zt_bug as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\' having bugID!=\'\' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"t3id\":{\"object\":\"project\",\"field\":\"t3id\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"bugID\":{\"object\":\"bug\",\"field\":\"bugID\",\"type\":\"string\"},\"openedBy\":{\"object\":\"project\",\"field\":\"openedBy\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"openedBy\",\"slice\":\"openedBy\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 16:08:10', '', NULL, '0'),
(1017, 1, '60,61', '{\"zh-cn\":\"\\u9879\\u76eeBug\\u89e3\\u51b3\\u8005\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u89e3\\u6c7a\\u8005\\u5206\\u5e03\\u8868\",\"en\":\"Project Bug Resolve\",\"de\":\"Project Bug Resolve\",\"fr\":\"Project Bug Resolve\",\"vi\":\"Project Bug Resolve\",\"ja\":\"Project Bug Resolve\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u89e3\\u51b3\\u8005\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u89e3\\u6c7a\\u8005\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,t3.id as projectID,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t1.id as bugID,t2.resolvedBy from zt_project as t1 \r\nleft join zt_bug as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\' and t2.status!=\'active\' and t2.resolvedBy!=\'\' having bugID!=\'\' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"t3id\":{\"object\":\"project\",\"field\":\"t3id\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"bugID\":{\"object\":\"bug\",\"field\":\"bugID\",\"type\":\"string\"},\"resolvedBy\":{\"object\":\"bug\",\"field\":\"resolvedBy\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"resolvedBy\",\"slice\":\"resolvedBy\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 16:13:16', '', NULL, '0'),
(1018, 1, '60,61', '{\"zh-cn\":\"\\u9879\\u76eeBug\\u6307\\u6d3e\\u7ed9\\u5206\\u5e03\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u6307\\u6d3e\\u7d66\\u5206\\u5e03\\u8868\",\"en\":\"Project Bug Assign\",\"de\":\"Project Bug Assign\",\"fr\":\"Project Bug Assign\",\"vi\":\"Project Bug Assign\",\"ja\":\"Project Bug Assign\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u6307\\u6d3e\\u7ed9\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u6307\\u6d3e\\u7d66\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,t3.id as projectID,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t1.id as bugID,t2.assignedTo from zt_project as t1 \r\nleft join zt_bug as t2 on t1.id=t2.execution \r\nleft join zt_project as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\' having bugID!=\'\' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"t3id\":{\"object\":\"project\",\"field\":\"t3id\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"bugID\":{\"object\":\"bug\",\"field\":\"bugID\",\"type\":\"string\"},\"assignedTo\":{\"object\":\"bug\",\"field\":\"assignedTo\",\"type\":\"string\"}}', '{\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"assignedTo\",\"slice\":\"assignedTo\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 16:29:10', '', NULL, '0'),
(1019, 1, '60', '{\"zh-cn\":\"\\u9879\\u76ee\\u8d28\\u91cf\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u8cea\\u91cf\\u8868\",\"en\":\"Project Quality Report\",\"de\":\"Project Quality Report\",\"fr\":\"Project Quality Report\",\"vi\":\"Project Quality Report\",\"ja\":\"Project Quality Report\"}', '{\"zh-cn\":\"\\u5217\\u51fa\\u9879\\u76ee\\u7684\\u9700\\u6c42\\u603b\\u6570\\uff0c\\u5b8c\\u6210\\u9700\\u6c42\\u6570\\uff0c\\u4efb\\u52a1\\u603b\\u6570\\uff0c\\u5b8c\\u6210\\u7684\\u4efb\\u52a1\\u6570\\uff0cBug\\u6570\\uff0c\\u89e3\\u51b3\\u7684Bug\\u6570\\uff0cBug\\/\\u9700\\u6c42\\uff0cBug\\/\\u4efb\\u52a1\\uff0c\\u91cd\\u8981Bug\\u6570\\u91cf(\\u4e25\\u91cd\\u7a0b\\u5ea6\\u4e0d\\u5927\\u4e8e3\\uff09\\u3002\",\"zh-tw\":\"\\u5217\\u51fa\\u9805\\u76ee\\u7684\\u9700\\u6c42\\u7e3d\\u6578\\uff0c\\u5b8c\\u6210\\u9700\\u6c42\\u6578\\uff0c\\u4efb\\u52d9\\u7e3d\\u6578\\uff0c\\u5b8c\\u6210\\u7684\\u4efb\\u52d9\\u6578\\uff0cBug\\u6578\\uff0c\\u89e3\\u6c7a\\u7684Bug\\u6578\\uff0cBug\\/\\u9700\\u6c42\\uff0cBug\\/\\u4efb\\u52d9\\uff0c\\u91cd\\u8981Bug\\u6578\\u91cf(\\u56b4\\u91cd\\u7a0b\\u5ea6\\u4e0d\\u5927\\u65bc3\\uff09\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id, t5.name as project,IF(t5.multiple=\"1\",t1.name,\"\") as execution,t2.stories,(t2.stories-t2.undone) as doneStory,t3.number,(t3.number-t3.undone) as doneTask,t4.bugs,t4.resolutions, round(t4.bugs/(t2.stories-t2.undone),2) as bugthanstory,round(t4.bugs/(t3.number-t3.undone),2) as bugthantask,t4.seriousBugs from zt_project as t1 \r\nleft join ztv_projectstories as t2 on t1.id=t2.execution\r\nleft join ztv_executionsummary as t3 on t1.id=t3.execution\r\nleft join ztv_projectbugs as t4 on t1.id=t4.execution\r\nleft join zt_project as t5 on t5.id=t1.project\r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and t1.grade=\'1\' and if($project=\'\',1,t5.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"t5id\":{\"object\":\"project\",\"field\":\"t5id\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"stories\":{\"object\":\"project\",\"field\":\"stories\",\"type\":\"string\"},\"doneStory\":{\"object\":\"project\",\"field\":\"doneStory\",\"type\":\"string\"},\"number\":{\"object\":\"project\",\"field\":\"number\",\"type\":\"string\"},\"doneTask\":{\"object\":\"project\",\"field\":\"doneTask\",\"type\":\"string\"},\"bugs\":{\"object\":\"project\",\"field\":\"bugs\",\"type\":\"string\"},\"resolutions\":{\"object\":\"project\",\"field\":\"resolutions\",\"type\":\"string\"},\"bugthanstory\":{\"object\":\"project\",\"field\":\"bugthanstory\",\"type\":\"string\"},\"bugthantask\":{\"object\":\"project\",\"field\":\"bugthantask\",\"type\":\"string\"},\"seriousBugs\":{\"object\":\"project\",\"field\":\"seriousBugs\",\"type\":\"string\"}}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u603b\\u6570\"},\"doneStory\":{\"zh-cn\":\"\\u5b8c\\u6210\\u9700\\u6c42\\u6570\"},\"number\":{\"zh-cn\":\"\\u4efb\\u52a1\\u603b\\u6570\"},\"doneTask\":{\"zh-cn\":\"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570\"},\"bugs\":{\"zh-cn\":\"Bug\\u6570\"},\"resolutions\":{\"zh-cn\":\"\\u89e3\\u51b3Bug\\u6570\"},\"bugthanstory\":{\"zh-cn\":\"Bug\\/\\u5b8c\\u6210\\u9700\\u6c42\"},\"bugthantask\":{\"zh-cn\":\"Bug\\/\\u5b8c\\u6210\\u4efb\\u52a1\"},\"seriousBugs\":{\"zh-cn\":\"\\u91cd\\u8981Bug\\u6570\"},\"seriousBugsPercent\":{\"zh-cn\":\"\\u4e25\\u91cdBug\\u6bd4\\u7387\"},\"project\":{\"zh-cn\":\"\\u9879\\u76ee\\u540d\\u79f0\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"stories\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"doneStory\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"number\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"doneTask\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"bugs\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"resolutions\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"bugthanstory\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"bugthantask\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"seriousBugs\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 17:03:10', '', NULL, '0'),
-(1020, 1, '59,61', '{\"zh-cn\":\"\\u4ea7\\u54c1Bug\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u7522\\u54c1Bug\\u985e\\u578b\\u7d71\\u8a08\\u8868\",\"en\":\"Bug Type of Product\",\"de\":\"Bug Type of Product\",\"fr\":\"Bug Type of Product\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u4ea7\\u54c1\\u7edf\\u8ba1Bug\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u7522\\u54c1\\u7d71\\u8a08Bug\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"Type distribution of Bugs.\",\"de\":\"Type distribution of Bugs.\",\"fr\":\"Type distribution of Bugs.\"}', 'select t1.id,t1.name,t2.id as bugID,t2.type from zt_product as t1 \r\nleft join zt_bug as t2 on t1.id=t2.product \r\nleft join zt_project as t3 on t1.program=t3.id \r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\'\r\norder by t3.`order` asc, t1.line desc, t1.`order` asc', '{\"id\":{\"object\":\"product\",\"field\":\"id\",\"type\":\"string\"},\"name\":{\"object\":\"product\",\"field\":\"name\",\"type\":\"string\"},\"bugID\":{\"object\":\"project\",\"field\":\"bugID\",\"type\":\"string\"},\"type\":{\"object\":\"product\",\"field\":\"type\",\"type\":\"string\"}}', '{\"count\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"done\":{\"zh-cn\":\"\\u5b8c\\u6210\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u6570\",\"en\":\"Done\"}}', '', NULL, '{\"group1\":\"name\",\"group2\":\"\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"type\",\"slice\":\"type\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '', 4, 'published', '0', 'admin', '2015-07-24 13:48:22', '', NULL, '0'),
+(1020, 1, '59,61', '{\"zh-cn\":\"\\u4ea7\\u54c1Bug\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u7522\\u54c1Bug\\u985e\\u578b\\u7d71\\u8a08\\u8868\",\"en\":\"Bug Type of Product\",\"de\":\"Bug Type of Product\",\"fr\":\"Bug Type of Product\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u4ea7\\u54c1\\u7edf\\u8ba1Bug\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u7522\\u54c1\\u7d71\\u8a08Bug\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"Type distribution of Bugs.\",\"de\":\"Type distribution of Bugs.\",\"fr\":\"Type distribution of Bugs.\"}', 'select t1.id,t1.name,t2.id as bugID,t2.type from zt_product as t1 \r\nleft join zt_bug as t2 on t1.id=t2.product \r\nleft join zt_project as t3 on t1.program=t3.id \r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\'\r\norder by t3.`order` asc, t1.line desc, t1.`order` asc', '{"id":{"object":"product","field":"id","type":"string"},"name":{"object":"product","field":"name","type":"string"},"bugID":{"object":"project","field":"bugID","type":"string"},"type":{"object":"bug","field":"type","type":"option"}}', '{"count":{"zh-cn":"\\u9700\\u6c42\\u6570","zh-tw":"\\u9700\\u6c42\\u6570","en":"Stories"},"done":{"zh-cn":"\\u5b8c\\u6210\\u6570","zh-tw":"\\u5b8c\\u6210\\u6570","en":"Done"},"id":{"zh-cn":"\\u7f16\\u53f7","zh-tw":"","en":"","de":"","fr":""},"name":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"type":{"zh-cn":"Bug\\u7c7b\\u578b","zh-tw":"","en":"","de":"","fr":""}}', '', NULL, '{\"group1\":\"name\",\"group2\":\"\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"type\",\"slice\":\"type\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '', 4, 'published', '0', 'admin', '2015-07-24 13:48:22', '', NULL, '0'),
(1021, 1, '59', '{\"zh-cn\":\"\\u4ea7\\u54c1\\u8d28\\u91cf\\u8868\",\"zh-tw\":\"\\u7522\\u54c1\\u8cea\\u91cf\\u8868\",\"en\":\"Product Quality\",\"de\":\"Product Quality\",\"fr\":\"Product Quality\"}', '{"zh-cn":"\\u5217\\u51fa\\u4ea7\\u54c1\\u7684\\u9700\\u6c42\\u6570\\uff0c\\u5b8c\\u6210\\u7684\\u9700\\u6c42\\u603b\\u6570\\uff0cBug\\u6570\\uff0c\\u89e3\\u51b3\\u7684Bug\\u603b\\u6570\\uff0cBug\\/\\u9700\\u6c42\\uff0c\\u91cd\\u8981Bug\\u6570\\u91cf(\\u4e25\\u91cd\\u7a0b\\u5ea6\\u5c0f\\u4e8e3)\\u3002","zh-tw":"\\u5217\\u51fa\\u7522\\u54c1\\u7684\\u9700\\u6c42\\u6578\\uff0c\\u5b8c\\u6210\\u7684\\u9700\\u6c42\\u7e3d\\u6578\\uff0cBug\\u6578\\uff0c\\u89e3\\u6c7a\\u7684Bug\\u7e3d\\u6578\\uff0cBug\\/\\u9700\\u6c42\\uff0c\\u91cd\\u8981Bug\\u6578\\u91cf(\\u56b4\\u91cd\\u7a0b\\u5ea6\\u5c0f\\u65bc3)\\u3002","en":"Serious Bug (severity is less than 3).","de":"Serious Bug (severity is less than 3).","fr":"Serious Bug (severity is less than 3)."}', 'select t1.id,t1.name,t2.stories,(t2.stories-t2.undone) as doneStory,t3.bugs,t3.resolutions,round(t3.bugs/(t2.stories-t2.undone),2) as bugthanstory,t3.seriousBugs from zt_product as t1 \r\nleft join ztv_productstories as t2 on t1.id=t2.product \r\nleft join ztv_productbugs as t3 on t1.id=t3.product \r\nleft join zt_project as t4 on t1.program=t4.id \r\nwhere t1.deleted=\'0\'\r\norder by t4.`order` asc, t1.line desc, t1.`order` asc', '{\"id\":{\"object\":\"product\",\"field\":\"id\",\"type\":\"string\"},\"name\":{\"object\":\"product\",\"field\":\"name\",\"type\":\"string\"},\"stories\":{\"object\":\"project\",\"field\":\"stories\",\"type\":\"string\"},\"doneStory\":{\"object\":\"project\",\"field\":\"doneStory\",\"type\":\"string\"},\"bugs\":{\"object\":\"product\",\"field\":\"bugs\",\"type\":\"string\"},\"resolutions\":{\"object\":\"project\",\"field\":\"resolutions\",\"type\":\"string\"},\"bugthanstory\":{\"object\":\"project\",\"field\":\"bugthanstory\",\"type\":\"string\"},\"seriousBugs\":{\"object\":\"project\",\"field\":\"seriousBugs\",\"type\":\"string\"}}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u603b\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u603b\\u6570\",\"en\":\"Stories\"},\"doneStory\":{\"zh-cn\":\"\\u5b8c\\u6210\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u9700\\u6c42\\u6570\",\"en\":\"Finished Stories\"},\"bugs\":{\"zh-cn\":\"Bug\\u6570\",\"zh-tw\":\"Bug\\u6570\",\"en\":\"Bugs\"},\"resolutions\":{\"zh-cn\":\"\\u89e3\\u51b3Bug\\u6570\",\"zh-tw\":\"\\u89e3\\u51b3Bug\\u6570\",\"en\":\"Solved Bugs\"},\"bugthanstory\":{\"zh-cn\":\"Bug\\/\\u5b8c\\u6210\\u9700\\u6c42\",\"zh-tw\":\"Bug\\/\\u5b8c\\u6210\\u9700\\u6c42\",\"en\":\"Bug\\/Finished Story\"},\"seriousBugs\":{\"zh-cn\":\"\\u91cd\\u8981Bug\\u6570\",\"zh-tw\":\"\\u91cd\\u8981Bug\\u6570\",\"en\":\"Serious Bugs\"},\"seriousBugsPercent\":{\"zh-cn\":\"\\u4e25\\u91cdbug\\u6bd4\\u7387\",\"zh-tw\":\"\\u4e25\\u91cdbug\\u6bd4\\u7387\",\"en\":\"Serious Bugs %\"}}', '', NULL, '{\"group1\":\"name\",\"group2\":\"\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"stories\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"doneStory\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"bugs\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"resolutions\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"bugthanstory\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"seriousBugs\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"1\"}]}', '', 4, 'published', '0', 'admin', '2015-07-23 17:17:40', '', NULL, '0'),
(1022, 1, '62', '{\"zh-cn\":\"\\u5458\\u5de5\\u767b\\u5f55\\u6b21\\u6570\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u54e1\\u5de5\\u767b\\u9304\\u6b21\\u6578\\u7d71\\u8a08\\u8868\",\"en\":\"Login Times\",\"de\":\"Login Times\",\"fr\":\"Login Times\"}', '{\"zh-cn\":\"\\u5b9e\\u73b0\\u5458\\u5de5\\u767b\\u5f55\\u6b21\\u6570\\u7edf\\u8ba1\\u62a5\\u8868\\uff0c\\u6309\\u7167\\u5929\\u7edf\\u8ba1\\u6bcf\\u5929\\u6bcf\\u4e2a\\u4eba\\u7684\\u767b\\u5f55\\u6b21\\u6570\\uff0c\\u4ee5\\u53ca\\u603b\\u6570\\u3002\",\"zh-tw\":\"\\u5be6\\u73fe\\u54e1\\u5de5\\u767b\\u9304\\u6b21\\u6578\\u7d71\\u8a08\\u5831\\u8868\\uff0c\\u6309\\u7167\\u5929\\u7d71\\u8a08\\u6bcf\\u5929\\u6bcf\\u500b\\u4eba\\u7684\\u767b\\u9304\\u6b21\\u6578\\uff0c\\u4ee5\\u53ca\\u7e3d\\u6578\\u3002\",\"en\":\"The summary of user login times.\",\"de\":\"The summary of user login times.\",\"fr\":\"The summary of user login times.\"}', 'select actor,LEFT(`date`,10) as `day` from zt_action where `action`=\'login\' and if($startDate=\'\',1,`date`>=$startDate) and if($endDate=\'\',1,`date`<=$endDate) order by `date` asc, actor asc', '{\"actor\":{\"object\":\"action\",\"field\":\"actor\",\"type\":\"string\"},\"day\":{\"object\":\"action\",\"field\":\"day\",\"type\":\"string\"}}', '{\"count\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"done\":{\"zh-cn\":\"\\u5b8c\\u6210\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u6570\",\"en\":\"Done\"}}', '{\"varName\":[\"startDate\",\"endDate\"],\"showName\":[\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"\\u7ed3\\u675f\\u65f6\\u95f4\"],\"requestType\":[\"date\",\"date\"],\"selectList\":[\"user\",\"user\"],\"default\":[\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"actor\",\"group2\":\"\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"day\",\"slice\":\"day\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"startDate\",\"name\":\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u7ed3\\u675f\\u65f6\\u95f4\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-24 14:28:11', '', NULL, '0'),
(1023, 1, '62', '{\"zh-cn\":\"\\u65e5\\u5fd7\\u6c47\\u603b\\u8868\",\"zh-tw\":\"\\u65e5\\u8a8c\\u532f\\u7e3d\\u8868\",\"en\":\"Effort Summary\",\"de\":\"Effort Summary\",\"fr\":\"Effort Summary\"}', '{\"zh-cn\":\"\\u67e5\\u770b\\u67d0\\u4e2a\\u65f6\\u95f4\\u6bb5\\u5185\\u7684\\u65e5\\u5fd7\\u60c5\\u51b5\\uff0c\\u53ef\\u4ee5\\u6309\\u7167\\u90e8\\u95e8\\u9009\\u62e9\\u3002\",\"zh-tw\":\"\\u67e5\\u770b\\u67d0\\u500b\\u6642\\u9593\\u6bb5\\u5167\\u7684\\u65e5\\u8a8c\\u60c5\\u6cc1\\uff0c\\u53ef\\u4ee5\\u6309\\u7167\\u90e8\\u9580\\u9078\\u64c7\\u3002\",\"en\":\"Effort summary of users.\",\"de\":\"Effort summary of users\",\"fr\":\"Effort summary of users\"}', 'select t1.account, t1.consumed, t1.`date`, if($dept=\'\', 0, t2.dept) as dept from zt_effort as t1 left join zt_user as t2 on t1.account = t2.account left join zt_dept as t3 on t2.dept = t3.id where t1.`deleted` = \'0\' and if($startDate=\'\', 1, t1.`date` >= $startDate) and if($endDate=\'\', 1, t1.`date` <= $endDate) and (t3.path like concat((select path from zt_dept where id=$dept), \'%\') or $dept=0) order by t1.`date` asc', '{\"account\":{\"object\":\"effort\",\"field\":\"account\",\"type\":\"string\"},\"consumed\":{\"object\":\"effort\",\"field\":\"consumed\",\"type\":\"string\"},\"date\":{\"object\":\"effort\",\"field\":\"date\",\"type\":\"string\"},\"dept\":{\"object\":\"effort\",\"field\":\"dept\",\"type\":\"string\"}}', '{\"date\":{\"zh-cn\":\"\\u65e5\\u671f\",\"zh-tw\":\"\\u65e5\\u671f\",\"en\":\"Date\"},\"consumed\":{\"zh-cn\":\"\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost\"}}', '{\"varName\":[\"dept\",\"startDate\",\"endDate\"],\"showName\":[\"\\u90e8\\u95e8\",\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"\\u7ed3\\u675f\\u65f6\\u95f4\"],\"requestType\":[\"select\",\"date\",\"date\"],\"selectList\":[\"dept\",\"user\",\"user\"],\"default\":[\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"account\",\"group2\":\"\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"consumed\",\"slice\":\"date\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"dept\",\"name\":\"\\u90e8\\u95e8\",\"type\":\"select\",\"typeOption\":\"dept\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"startDate\",\"name\":\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u7ed3\\u675f\\u65f6\\u95f4\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-27 13:53:32', '', NULL, '0'),
(1024, 1, '62', '{\"zh-cn\":\"\\u516c\\u53f8\\u52a8\\u6001\\u6c47\\u603b\\u8868\",\"zh-tw\":\"\\u516c\\u53f8\\u52d5\\u614b\\u532f\\u7e3d\\u8868\",\"en\":\"Company Dynamics\",\"de\":\"Company Dynamics\",\"fr\":\"Company Dynamics\"}', '{\"zh-cn\":\"\\u53ef\\u4ee5\\u6307\\u5b9a\\u4e00\\u4e2a\\u65f6\\u671f\\uff0c\\u5217\\u51fa\\u76f8\\u5e94\\u7684\\u6570\\u636e\\uff1a1. \\u6bcf\\u5929\\u7684\\u767b\\u5f55\\u6b21\\u6570\\u30022. \\u6bcf\\u5929\\u7684\\u65e5\\u5fd7\\u5de5\\u65f6\\u91cf\\u30023. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u9700\\u6c42\\u6570\\u30024. \\u6bcf\\u5929\\u5173\\u95ed\\u7684\\u9700\\u6c42\\u6570\\u30025. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u4efb\\u52a1\\u6570\\u30026. \\u6bcf\\u5929\\u5b8c\\u6210\\u7684\\u4efb\\u52a1\\u6570\\u30027. \\u6bcf\\u5929\\u65b0\\u589e\\u7684Bug\\u6570\\u30028. \\u6bcf\\u5929\\u89e3\\u51b3\\u7684Bug\\u6570\\u30029. \\u6bcf\\u5929\\u7684\\u52a8\\u6001\\u6570\\u3002\",\"zh-tw\":\"\\u53ef\\u4ee5\\u6307\\u5b9a\\u4e00\\u500b\\u6642\\u671f\\uff0c\\u5217\\u51fa\\u76f8\\u61c9\\u7684\\u6578\\u64da\\uff1a1. \\u6bcf\\u5929\\u7684\\u767b\\u9304\\u6b21\\u6578\\u30022. \\u6bcf\\u5929\\u7684\\u65e5\\u8a8c\\u5de5\\u6642\\u91cf\\u30023. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u9700\\u6c42\\u6578\\u30024. \\u6bcf\\u5929\\u95dc\\u9589\\u7684\\u9700\\u6c42\\u6578\\u30025. \\u6bcf\\u5929\\u65b0\\u589e\\u7684\\u4efb\\u52d9\\u6578\\u30026. \\u6bcf\\u5929\\u5b8c\\u6210\\u7684\\u4efb\\u52d9\\u6578\\u30027. \\u6bcf\\u5929\\u65b0\\u589e\\u7684Bug\\u6578\\u30028. \\u6bcf\\u5929\\u89e3\\u6c7a\\u7684Bug\\u6578\\u30029. \\u6bcf\\u5929\\u7684\\u52d5\\u614b\\u6578\\u3002\",\"en\":\"The summary of company dynamics\",\"de\":\"The summary of company dynamics\",\"fr\":\"The summary of company dynamics\"}', 'select t1.day,t2.userlogin,t3.consumed,t4.storyopen,t5.storyclose,t6.taskopen,t7.taskfinish,t8.bugopen,t9.bugresolve,t1.actions from ztv_dayactions as t1 left join ztv_dayuserlogin as t2 on t1.day=t2.day left join ztv_dayeffort as t3 on t1.day=t3.date left join ztv_daystoryopen as t4 on t1.day=t4.day left join ztv_daystoryclose as t5 on t1.day=t5.day left join ztv_daytaskopen as t6 on t1.day=t6.day left join ztv_daytaskfinish as t7 on t1.day=t7.day left join ztv_daybugopen as t8 on t1.day=t8.day left join ztv_daybugresolve as t9 on t1.day=t9.day where if($startDate=\'\',1,t1.day>=$startDate) and if($endDate=\'\',1,t1.day<=$endDate)', '{\"day\":{\"object\":false,\"field\":\"day\",\"type\":\"string\"},\"userlogin\":{\"object\":false,\"field\":\"userlogin\",\"type\":\"string\"},\"consumed\":{\"object\":false,\"field\":\"consumed\",\"type\":\"string\"},\"storyopen\":{\"object\":false,\"field\":\"storyopen\",\"type\":\"string\"},\"storyclose\":{\"object\":false,\"field\":\"storyclose\",\"type\":\"string\"},\"taskopen\":{\"object\":false,\"field\":\"taskopen\",\"type\":\"string\"},\"taskfinish\":{\"object\":false,\"field\":\"taskfinish\",\"type\":\"string\"},\"bugopen\":{\"object\":false,\"field\":\"bugopen\",\"type\":\"string\"},\"bugresolve\":{\"object\":false,\"field\":\"bugresolve\",\"type\":\"string\"},\"actions\":{\"object\":false,\"field\":\"actions\",\"type\":\"string\"}}', '{\"day\":{\"zh-cn\":\"\\u65e5\\u671f\",\"zh-tw\":\"\\u65e5\\u671f\",\"en\":\"Date\"},\"userlogin\":{\"zh-cn\":\"\\u767b\\u5f55\\u6b21\\u6570\",\"zh-tw\":\"\\u767b\\u9304\\u6b21\\u6578\",\"en\":\"Login\"},\"consumed\":{\"zh-cn\":\"\\u65e5\\u5fd7\\u5de5\\u65f6\",\"zh-tw\":\"\\u65e5\\u8a8c\\u5de5\\u6642\",\"en\":\"Cost(h)\"},\"storyopen\":{\"zh-cn\":\"\\u65b0\\u589e\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u65b0\\u589e\\u9700\\u6c42\\u6578\",\"en\":\"Open Story\"},\"storyclose\":{\"zh-cn\":\"\\u5173\\u95ed\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u95dc\\u9589\\u9700\\u6c42\\u6578\",\"en\":\"Closed Story\"},\"taskopen\":{\"zh-cn\":\"\\u65b0\\u589e\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u65b0\\u589e\\u4efb\\u52d9\\u6578\",\"en\":\"Open Task\"},\"taskfinish\":{\"zh-cn\":\"\\u5b8c\\u6210\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u4efb\\u52d9\\u6578\",\"en\":\"Finished Task\"},\"bugopen\":{\"zh-cn\":\"\\u65b0\\u589eBug\\u6570\",\"zh-tw\":\"\\u65b0\\u589eBug\\u6578\",\"en\":\"Open Bug\"},\"bugresolve\":{\"zh-cn\":\"\\u89e3\\u51b3Bug\\u6570\",\"zh-tw\":\"\\u89e3\\u51b3Bug\\u6578\",\"en\":\"Resolved bug\"},\"actions\":{\"zh-cn\":\"\\u52a8\\u6001\\u6570\",\"zh-tw\":\"\\u52d5\\u614b\\u6578\",\"en\":\"Dynamics\"}}', '{\"varName\":[\"startDate\",\"endDate\"],\"showName\":[\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"\\u7ed3\\u675f\\u65f6\\u95f4\"],\"requestType\":[\"date\",\"date\"],\"selectList\":[\"user\",\"user\"],\"default\":[\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"day\",\"group2\":\"\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"userlogin\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"consumed\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"storyopen\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"storyclose\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"taskopen\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"taskfinish\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"bugopen\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"bugresolve\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"actions\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"startDate\",\"name\":\"\\u8d77\\u59cb\\u65f6\\u95f4\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u7ed3\\u675f\\u65f6\\u95f4\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-27 15:09:42', '', NULL, '0'),
(1025, 1, '61', '{\"zh-cn\":\"Bug\\u89e3\\u51b3\\u8868\",\"zh-tw\":\"Bug\\u89e3\\u6c7a\\u8868\",\"en\":\"Solved Bugs\",\"de\":\"Solved Bugs\",\"fr\":\"Solved Bugs\"}', '{\"zh-cn\":\"\\u5217\\u51fa\\u89e3\\u51b3\\u7684Bug\\u603b\\u6570\\uff0c\\u89e3\\u51b3\\u65b9\\u6848\\u7684\\u5206\\u5e03\\uff0c\\u5360\\u7684\\u6bd4\\u4f8b\\uff08\\u8be5\\u7528\\u6237\\u89e3\\u51b3\\u7684Bug\\u7684\\u6570\\u91cf\\u5360\\u6240\\u6709\\u7684\\u89e3\\u51b3\\u7684Bug\\u7684\\u6570\\u91cf)\\u3002\",\"zh-tw\":\"\\u5217\\u51fa\\u89e3\\u6c7a\\u7684Bug\\u7e3d\\u6578\\uff0c\\u89e3\\u6c7a\\u65b9\\u6848\\u7684\\u5206\\u5e03\\uff0c\\u5360\\u7684\\u6bd4\\u4f8b\\uff08\\u8a72\\u7528\\u6236\\u89e3\\u6c7a\\u7684Bug\\u7684\\u6578\\u91cf\\u5360\\u6240\\u6709\\u7684\\u89e3\\u6c7a\\u7684Bug\\u7684\\u6578\\u91cf)\\u3002\",\"en\":\"percentage:self resolved \\/ all resolved\",\"de\":\"percentage:self resolved \\/ all resolved\",\"fr\":\"percentage:self resolved \\/ all resolved\"}', 'select t1.*,if($product=\'\',0,t1.product) as customproduct from zt_bug as t1 left join zt_product as t2 on t1.product = t2.id where t1.deleted=\'0\' and t2.deleted=\'0\' and t1.resolution!=\'\' and if($startDate=\'\',1,t1.resolvedDate>=$startDate) and if($endDate=\'\',1,t1.resolvedDate<=$endDate) having customproduct=$product', '{\"id\":{\"object\":\"bug\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"bug\",\"field\":\"project\",\"type\":\"string\"},\"product\":{\"object\":\"bug\",\"field\":\"product\",\"type\":\"string\"},\"injection\":{\"object\":\"bug\",\"field\":\"injection\",\"type\":\"string\"},\"identify\":{\"object\":\"bug\",\"field\":\"identify\",\"type\":\"string\"},\"branch\":{\"object\":\"bug\",\"field\":\"branch\",\"type\":\"string\"},\"module\":{\"object\":\"bug\",\"field\":\"module\",\"type\":\"string\"},\"execution\":{\"object\":\"bug\",\"field\":\"execution\",\"type\":\"string\"},\"plan\":{\"object\":\"bug\",\"field\":\"plan\",\"type\":\"string\"},\"story\":{\"object\":\"bug\",\"field\":\"story\",\"type\":\"string\"},\"storyVersion\":{\"object\":\"bug\",\"field\":\"storyVersion\",\"type\":\"string\"},\"task\":{\"object\":\"bug\",\"field\":\"task\",\"type\":\"string\"},\"toTask\":{\"object\":\"bug\",\"field\":\"toTask\",\"type\":\"string\"},\"toStory\":{\"object\":\"bug\",\"field\":\"toStory\",\"type\":\"string\"},\"title\":{\"object\":\"bug\",\"field\":\"title\",\"type\":\"string\"},\"keywords\":{\"object\":\"bug\",\"field\":\"keywords\",\"type\":\"string\"},\"severity\":{\"object\":\"bug\",\"field\":\"severity\",\"type\":\"string\"},\"pri\":{\"object\":\"bug\",\"field\":\"pri\",\"type\":\"string\"},\"type\":{\"object\":\"bug\",\"field\":\"type\",\"type\":\"string\"},\"os\":{\"object\":\"bug\",\"field\":\"os\",\"type\":\"string\"},\"browser\":{\"object\":\"bug\",\"field\":\"browser\",\"type\":\"string\"},\"hardware\":{\"object\":\"bug\",\"field\":\"hardware\",\"type\":\"string\"},\"found\":{\"object\":\"bug\",\"field\":\"found\",\"type\":\"string\"},\"steps\":{\"object\":\"bug\",\"field\":\"steps\",\"type\":\"string\"},\"status\":{\"object\":\"bug\",\"field\":\"status\",\"type\":\"string\"},\"subStatus\":{\"object\":\"bug\",\"field\":\"subStatus\",\"type\":\"string\"},\"color\":{\"object\":\"bug\",\"field\":\"color\",\"type\":\"string\"},\"confirmed\":{\"object\":\"bug\",\"field\":\"confirmed\",\"type\":\"string\"},\"activatedCount\":{\"object\":\"bug\",\"field\":\"activatedCount\",\"type\":\"string\"},\"activatedDate\":{\"object\":\"bug\",\"field\":\"activatedDate\",\"type\":\"string\"},\"feedbackBy\":{\"object\":\"bug\",\"field\":\"feedbackBy\",\"type\":\"string\"},\"notifyEmail\":{\"object\":\"bug\",\"field\":\"notifyEmail\",\"type\":\"string\"},\"mailto\":{\"object\":\"bug\",\"field\":\"mailto\",\"type\":\"string\"},\"openedBy\":{\"object\":\"bug\",\"field\":\"openedBy\",\"type\":\"string\"},\"openedDate\":{\"object\":\"bug\",\"field\":\"openedDate\",\"type\":\"string\"},\"openedBuild\":{\"object\":\"bug\",\"field\":\"openedBuild\",\"type\":\"string\"},\"assignedTo\":{\"object\":\"bug\",\"field\":\"assignedTo\",\"type\":\"string\"},\"assignedDate\":{\"object\":\"bug\",\"field\":\"assignedDate\",\"type\":\"string\"},\"deadline\":{\"object\":\"bug\",\"field\":\"deadline\",\"type\":\"string\"},\"resolvedBy\":{\"object\":\"bug\",\"field\":\"resolvedBy\",\"type\":\"string\"},\"resolution\":{\"object\":\"bug\",\"field\":\"resolution\",\"type\":\"string\"},\"resolvedBuild\":{\"object\":\"bug\",\"field\":\"resolvedBuild\",\"type\":\"string\"},\"resolvedDate\":{\"object\":\"bug\",\"field\":\"resolvedDate\",\"type\":\"string\"},\"closedBy\":{\"object\":\"bug\",\"field\":\"closedBy\",\"type\":\"string\"},\"closedDate\":{\"object\":\"bug\",\"field\":\"closedDate\",\"type\":\"string\"},\"duplicateBug\":{\"object\":\"bug\",\"field\":\"duplicateBug\",\"type\":\"string\"},\"linkBug\":{\"object\":\"bug\",\"field\":\"linkBug\",\"type\":\"string\"},\"case\":{\"object\":\"bug\",\"field\":\"case\",\"type\":\"string\"},\"caseVersion\":{\"object\":\"bug\",\"field\":\"caseVersion\",\"type\":\"string\"},\"feedback\":{\"object\":\"bug\",\"field\":\"feedback\",\"type\":\"string\"},\"result\":{\"object\":\"bug\",\"field\":\"result\",\"type\":\"string\"},\"repo\":{\"object\":\"bug\",\"field\":\"repo\",\"type\":\"string\"},\"mr\":{\"object\":\"bug\",\"field\":\"mr\",\"type\":\"string\"},\"entry\":{\"object\":\"bug\",\"field\":\"entry\",\"type\":\"string\"},\"lines\":{\"object\":\"bug\",\"field\":\"lines\",\"type\":\"string\"},\"v1\":{\"object\":\"bug\",\"field\":\"v1\",\"type\":\"string\"},\"v2\":{\"object\":\"bug\",\"field\":\"v2\",\"type\":\"string\"},\"repoType\":{\"object\":\"bug\",\"field\":\"repoType\",\"type\":\"string\"},\"issueKey\":{\"object\":\"bug\",\"field\":\"issueKey\",\"type\":\"string\"},\"testtask\":{\"object\":\"bug\",\"field\":\"testtask\",\"type\":\"string\"},\"lastEditedBy\":{\"object\":\"bug\",\"field\":\"lastEditedBy\",\"type\":\"string\"},\"lastEditedDate\":{\"object\":\"bug\",\"field\":\"lastEditedDate\",\"type\":\"string\"},\"deleted\":{\"object\":\"bug\",\"field\":\"deleted\",\"type\":\"string\"},\"customproduct\":{\"object\":\"bug\",\"field\":\"customproduct\",\"type\":\"string\"}}', '{\"count\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"done\":{\"zh-cn\":\"\\u5b8c\\u6210\\u6570\",\"zh-tw\":\"\\u5b8c\\u6210\\u6570\",\"en\":\"Done\"}}', '{\"varName\":[\"product\",\"startDate\",\"endDate\"],\"showName\":[\"\\u4ea7\\u54c1\",\"\\u89e3\\u51b3\\u65e5\\u671f\\u5f00\\u59cb\",\"\\u89e3\\u51b3\\u65e5\\u671f\\u7ed3\\u675f\"],\"requestType\":[\"select\",\"date\",\"date\"],\"selectList\":[\"product\",\"user\",\"user\"],\"default\":[\"\",\"$MONTHBEGIN\",\"$MONTHEND\"]}', NULL, '{\"group1\":\"resolvedBy\",\"group2\":\"\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"resolution\",\"slice\":\"resolution\",\"stat\":\"count\",\"showTotal\":\"sum\",\"showMode\":\"total\",\"monopolize\":\"1\"}]}', '[{\"from\":\"query\",\"field\":\"product\",\"name\":\"\\u4ea7\\u54c1\",\"type\":\"select\",\"typeOption\":\"product\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"startDate\",\"name\":\"\\u89e3\\u51b3\\u65e5\\u671f\\u5f00\\u59cb\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHBEGIN\"},{\"from\":\"query\",\"field\":\"endDate\",\"name\":\"\\u89e3\\u51b3\\u65e5\\u671f\\u7ed3\\u675f\",\"type\":\"date\",\"typeOption\":\"\",\"default\":\"$MONTHEND\"}]', 4, 'published', '0', 'admin', '2015-07-24 13:44:25', '', NULL, '0'),
(1026, 1, '60', '{\"zh-cn\":\"\\u9879\\u76ee\\u8fdb\\u5c55\\u8868\",\"zh-tw\":\"\\u9805\\u76ee\\u9032\\u5c55\\u8868\",\"en\":\"Project Progress Report\",\"de\":\"Project Progress Report\",\"fr\":\"Project Progress Report\",\"vi\":\"Project Progress Report\",\"ja\":\"Project Progress Report\"}', '{\"zh-cn\":\"\\u9879\\u76ee\\u7684\\u9700\\u6c42\\u6570\\uff0c\\u4efb\\u52a1\\u6570\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u5de5\\u65f6\\uff0c\\u5269\\u4f59\\u9700\\u6c42\\u6570\\uff0c\\u5269\\u4f59\\u4efb\\u52a1\\u6570\\uff0c\\u8fdb\\u5ea6\\u3002\",\"zh-tw\":\"\\u9805\\u76ee\\u7684\\u9700\\u6c42\\u6578\\uff0c\\u4efb\\u52d9\\u6578\\uff0c\\u5df2\\u6d88\\u8017\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u5de5\\u6642\\uff0c\\u5269\\u9918\\u9700\\u6c42\\u6578\\uff0c\\u5269\\u9918\\u4efb\\u52d9\\u6578\\uff0c\\u9032\\u5ea6\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t4.name as project,IF(t4.multiple=\"1\",t1.name,\"\") as execution,t1.status,t2.number as tasks,round(t2.consumed,2) as consumed,round(t2.`left`,2) as `left`,t3.stories,t2.undone as undoneTask,t3.undone as undoneStory,t2.totalReal from zt_project as t1 \r\nleft join ztv_executionsummary as t2 on t1.id=t2.execution\r\nleft join ztv_projectstories as t3 on t1.id=t3.execution\r\nleft join zt_project as t4 on t4.id=t1.project\r\nwhere t1.deleted=\'0\' and t1.type in (\'sprint\',\'stage\') and if($project=\'\',1,t4.id=$project) and if($execution=\'\',1,t1.id=$execution) and if($status=\'\',1,t1.status=$status)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"t4id\":{\"object\":\"project\",\"field\":\"t4id\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"status\":{\"object\":\"project\",\"field\":\"status\",\"type\":\"string\"},\"tasks\":{\"object\":\"project\",\"field\":\"tasks\",\"type\":\"string\"},\"consumed\":{\"object\":\"project\",\"field\":\"consumed\",\"type\":\"string\"},\"left\":{\"object\":\"project\",\"field\":\"left\",\"type\":\"string\"},\"stories\":{\"object\":\"project\",\"field\":\"stories\",\"type\":\"string\"},\"undoneTask\":{\"object\":\"project\",\"field\":\"undoneTask\",\"type\":\"string\"},\"undoneStory\":{\"object\":\"project\",\"field\":\"undoneStory\",\"type\":\"string\"},\"totalReal\":{\"object\":\"project\",\"field\":\"totalReal\",\"type\":\"string\"}}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"tasks\":{\"zh-cn\":\"\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u4efb\\u52a1\\u6570\",\"en\":\"Tasks\"},\"undoneStory\":{\"zh-cn\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"en\":\"Undone Story\"},\"undoneTask\":{\"zh-cn\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"en\":\"Undone Task\"},\"consumed\":{\"zh-cn\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost(h)\"},\"left\":{\"zh-cn\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"zh-tw\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"en\":\"Left(h)\"},\"consumedPercent\":{\"zh-cn\":\"\\u8fdb\\u5ea6\",\"zh-tw\":\"\\u8fdb\\u5ea6\",\"en\":\"Process\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\",\"status\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\",\"\\u6267\\u884c\\u72b6\\u6001\"],\"requestType\":[\"select\",\"select\",\"select\"],\"selectList\":[\"project\",\"execution\",\"project.status\"],\"default\":[\"\",\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"stories\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"undoneStory\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"tasks\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"undoneTask\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"left\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"},{\"field\":\"consumed\",\"slice\":\"noSlice\",\"stat\":\"sum\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"1\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"status\",\"name\":\"\\u6267\\u884c\\u72b6\\u6001\",\"type\":\"select\",\"typeOption\":\"project.status\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-07-23 14:03:06', '', NULL, '0'),
-(1027, 1, '60,61', '{\"zh-cn\":\"\\u9879\\u76eeBug\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u985e\\u578b\\u7d71\\u8a08\\u8868\",\"en\":\"Project Bug Type\",\"de\":\"Project Bug Type\",\"fr\":\"Project Bug Type\",\"vi\":\"Project Bug Type\",\"ja\":\"Project Bug Type\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t2.id as bugID,t2.type from zt_project as t1 \r\nleft join zt_bug as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{\"id\":{\"object\":\"project\",\"field\":\"id\",\"type\":\"string\"},\"project\":{\"object\":\"project\",\"field\":\"project\",\"type\":\"string\"},\"t3id\":{\"object\":\"project\",\"field\":\"t3id\",\"type\":\"string\"},\"execution\":{\"object\":\"project\",\"field\":\"execution\",\"type\":\"string\"},\"bugID\":{\"object\":\"bug\",\"field\":\"bugID\",\"type\":\"string\"},\"type\":{\"object\":\"project\",\"field\":\"type\",\"type\":\"string\"}}', '{\"stories\":{\"zh-cn\":\"\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u9700\\u6c42\\u6570\",\"en\":\"Stories\"},\"tasks\":{\"zh-cn\":\"\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u4efb\\u52a1\\u6570\",\"en\":\"Tasks\"},\"undoneStory\":{\"zh-cn\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u9700\\u6c42\\u6570\",\"en\":\"Undone Story\"},\"undoneTask\":{\"zh-cn\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"zh-tw\":\"\\u5269\\u4f59\\u4efb\\u52a1\\u6570\",\"en\":\"Undone Task\"},\"consumed\":{\"zh-cn\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"zh-tw\":\"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6\",\"en\":\"Cost(h)\"},\"left\":{\"zh-cn\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"zh-tw\":\"\\u5269\\u4f59\\u5de5\\u65f6\",\"en\":\"Left(h)\"},\"consumedPercent\":{\"zh-cn\":\"\\u8fdb\\u5ea6\",\"zh-tw\":\"\\u8fdb\\u5ea6\",\"en\":\"Process\"},\"execution\":{\"zh-cn\":\"\\u6267\\u884c\\u540d\\u79f0\"}}', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"type\",\"slice\":\"type\",\"stat\":\"count\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-08-04 13:54:22', '', NULL, '0');
+(1027, 1, '60,61', '{\"zh-cn\":\"\\u9879\\u76eeBug\\u7c7b\\u578b\\u7edf\\u8ba1\\u8868\",\"zh-tw\":\"\\u9805\\u76eeBug\\u985e\\u578b\\u7d71\\u8a08\\u8868\",\"en\":\"Project Bug Type\",\"de\":\"Project Bug Type\",\"fr\":\"Project Bug Type\",\"vi\":\"Project Bug Type\",\"ja\":\"Project Bug Type\"}', '{\"zh-cn\":\"\\u6309\\u7167\\u9879\\u76ee\\u7edf\\u8ba1Bug\\u7684\\u7c7b\\u578b\\u5206\\u5e03\\u60c5\\u51b5\\u3002\",\"zh-tw\":\"\\u6309\\u7167\\u9805\\u76ee\\u7d71\\u8a08Bug\\u7684\\u985e\\u578b\\u5206\\u5e03\\u60c5\\u6cc1\\u3002\",\"en\":\"\",\"de\":\"\",\"fr\":\"\",\"vi\":\"\",\"ja\":\"\"}', 'select t1.id,t3.name as project,IF(t3.multiple=\"1\",t1.name,\"\") as execution,t2.id as bugID,t2.type from zt_project as t1 \r\nleft join zt_bug as t2 on t1.id=t2.execution\r\nleft join zt_project as t3 on t3.id=t1.project\r\nwhere t1.deleted=\'0\' and t2.deleted=\'0\' and if($project=\'\',1,t3.id=$project) and if($execution=\'\',1,t1.id=$execution)', '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"project","field":"project","type":"string"},"t3id":{"object":"project","field":"t3id","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"bugID":{"object":"bug","field":"bugID","type":"string"},"type":{"object":"bug","field":"type","type":"option"}}', '{"stories":{"zh-cn":"\\u9700\\u6c42\\u6570","zh-tw":"\\u9700\\u6c42\\u6570","en":"Stories"},"tasks":{"zh-cn":"\\u4efb\\u52a1\\u6570","zh-tw":"\\u4efb\\u52a1\\u6570","en":"Tasks"},"undoneStory":{"zh-cn":"\\u5269\\u4f59\\u9700\\u6c42\\u6570","zh-tw":"\\u5269\\u4f59\\u9700\\u6c42\\u6570","en":"Undone Story"},"undoneTask":{"zh-cn":"\\u5269\\u4f59\\u4efb\\u52a1\\u6570","zh-tw":"\\u5269\\u4f59\\u4efb\\u52a1\\u6570","en":"Undone Task"},"consumed":{"zh-cn":"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6","zh-tw":"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6","en":"Cost(h)"},"left":{"zh-cn":"\\u5269\\u4f59\\u5de5\\u65f6","zh-tw":"\\u5269\\u4f59\\u5de5\\u65f6","en":"Left(h)"},"consumedPercent":{"zh-cn":"\\u8fdb\\u5ea6","zh-tw":"\\u8fdb\\u5ea6","en":"Process"},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"type":{"zh-cn":"Bug\\u7c7b\\u578b","zh-tw":"","en":"","de":"","fr":""}}', '{\"varName\":[\"project\",\"execution\"],\"showName\":[\"\\u9879\\u76ee\\u5217\\u8868\",\"\\u6267\\u884c\\u5217\\u8868\"],\"requestType\":[\"select\",\"select\"],\"selectList\":[\"project\",\"execution\"],\"default\":[\"\",\"\"]}', NULL, '{\"group1\":\"project\",\"group2\":\"execution\",\"columnTotal\":\"sum\",\"columns\":[{\"field\":\"type\",\"slice\":\"type\",\"stat\":\"count\",\"showTotal\":\"noShow\",\"showMode\":\"default\",\"monopolize\":\"0\"}]}', '[{\"from\":\"query\",\"field\":\"project\",\"name\":\"\\u9879\\u76ee\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"project\",\"default\":\"\"},{\"from\":\"query\",\"field\":\"execution\",\"name\":\"\\u6267\\u884c\\u5217\\u8868\",\"type\":\"select\",\"typeOption\":\"execution\",\"default\":\"\"}]', 4, 'published', '0', 'admin', '2015-08-04 13:54:22', '', NULL, '0');
INSERT INTO `zt_chart`(`id`, `name`, `dimension`, `type`, `group`, `dataset`, `desc`, `settings`, `filters`, `step`, `fields`, `langs`, `sql`, `stage`, `builtin`, `objects`, `createdBy`, `createdDate`, `editedBy`, `editedDate`, `deleted`) VALUES
(1001, '年度总结-登录次数', 1, 'card', '0', '', '', '{\"value\": {\"type\": \"agg\", \"field\": \"login\", \"agg\": \"sum\"}, \"title\": {\"type\": \"text\", \"name\": \"\"},\r\n\"type\": \"value\"\r\n}', '[]', 0, '', NULL, 'SELECT sum(t2.login) AS login, `year`, account, realname\r\nFROM zt_user t1 \r\nLEFT JOIN (SELECT count(1) as login, actor, YEAR(`date`) as \'year\' FROM zt_action GROUP BY actor, `year`) t2 on t1.account = t2.actor \r\nWHERE t1.deleted = \'0\'\r\nGROUP BY `year`, account, realname', 'published', 1, '', 'admin', '2022-12-07 14:59:41', '', '2022-12-07 14:59:41', 0),
@@ -15116,7 +15116,7 @@ INSERT INTO `zt_chart`(`id`, `name`, `dimension`, `type`, `group`, `dataset`, `d
(1045, '宏观数据-产品数据概览', 1, 'table', '63', '', '', '{\"group\":[],\"column\":[\r\n{\"field\":\"program\",\"valOrAgg\":\"value\",\"name\":\"一级项目集\"},{\"field\":\"productLine\",\"valOrAgg\":\"value\",\"name\":\"产品线\"},\r\n{\"field\":\"product\",\"valOrAgg\":\"value\",\"name\":\"产品\"},\r\n{\"field\":\"story\",\"valOrAgg\":\"value\",\"name\":\"需求数\"},\r\n{\"field\":\"bug\",\"valOrAgg\":\"value\",\"name\":\"Bug数\"},\r\n{\"field\":\"plan\",\"valOrAgg\":\"value\",\"name\":\"计划数\"},\r\n{\"field\":\"release\",\"valOrAgg\":\"value\",\"name\":\"发布数\"}],\"filter\":[]}', '[]', 0, '', NULL, 'SELECT \r\n t1.name AS product, \r\n IFNULL(t2.name, \'/\') AS program, \r\n IFNULL(t3.name, \'/\') AS productLine, \r\n IFNULL(t4.plan, 0) AS plan, \r\n IFNULL(t5.release, 0) AS `release`, \r\n IFNULL(t6.story, 0) AS story, \r\n IFNULL(t7.bug, 0) AS bug \r\nFROM \r\n zt_product AS t1 \r\n LEFT JOIN zt_project AS t2 ON t1.program = t2.id AND t2.type = \'program\' AND t2.grade = 1 \r\n LEFT JOIN zt_module AS t3 ON t1.line = t3.id AND t3.type = \'line\' \r\n LEFT JOIN (SELECT product, COUNT(1) AS plan FROM zt_productplan WHERE deleted = \'0\' GROUP BY product) AS t4 ON t1.id = t4.product \r\n LEFT JOIN (SELECT product, COUNT(1) AS `release` FROM zt_release WHERE deleted = \'0\' GROUP BY product) AS t5 ON t1.id = t5.product \r\n LEFT JOIN (SELECT product, COUNT(1) AS story FROM zt_story WHERE deleted = \'0\' GROUP BY product) AS t6 ON t1.id = t6.product \r\n LEFT JOIN (SELECT product, COUNT(1) AS bug FROM zt_bug WHERE deleted = \'0\' GROUP BY product) AS t7 ON t1.id = t7.product \r\nWHERE t1.deleted = \'0\' AND t1.status != \'closed\' AND t1.shadow = \'0\'AND t1.vision = \'rnd\'\r\nORDER BY t1.order', 'published', 1, '', 'admin', '2022-12-07 14:59:41', '', '2022-12-07 14:59:41', 0),
(1046, '宏观数据-产品需求完成率', 1, 'bar', '36', '', '', '{\r\n\"xaxis\":[{\"field\":\"product\",\"name\":\"产品\"}],\r\n\"yaxis\":[\r\n {\"type\":\"value\",\"field\":\"closedRate\",\"agg\":\"value\",\"name\":\"需求完成率\",\"valOrAgg\":\"value\"}\r\n]}', '[]', 0, '', NULL, 'SELECT\r\n t1.name AS product,\r\n IFNULL(t2.name, \'/\') AS program, \r\n IFNULL(t3.name, \'/\') AS productLine, \r\n IFNULL(t4.story, 0) AS closedStory, \r\n t5.story AS totalStory, \r\n ROUND(IFNULL(t4.story, 0) / t5.story * 100, 2) AS closedRate \r\nFROM zt_product AS t1 \r\nLEFT JOIN zt_project AS t2 ON t1.program = t2.id AND t2.type = \'program\' AND t2.grade = 1 \r\nLEFT JOIN zt_module AS t3 ON t1.line = t3.id AND t3.type = \'line\' \r\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 \r\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 \r\nWHERE t1.deleted = \'0\' AND t1.status != \'closed\' AND t1.shadow = \'0\' AND t1.vision = \'rnd\' AND t5.story IS NOT NULL \r\nORDER BY t1.order DESC', 'published', 1, '', 'admin', '2022-12-07 14:59:41', '', '2022-12-07 14:59:41', 0),
(1047, '宏观数据-产品Bug修复率', 1, 'bar', '44', '', '', '{\r\n\"xaxis\":[{\"field\":\"product\",\"name\":\"产品\"}],\r\n\"yaxis\":[\r\n {\"type\":\"value\",\"field\":\"fixedRate\",\"agg\":\"value\",\"name\":\"Bug修复率\",\"valOrAgg\":\"value\"}\r\n]}', '[]', 0, '', NULL, 'SELECT \r\n t1.name AS product,\r\n IFNULL(t2.name, \'/\') AS program,\r\n IFNULL(t3.name, \'/\') AS productLine,\r\n IFNULL(t4.bug, 0) AS fixedBug,\r\n t5.bug AS totalBug,\r\n ROUND(IFNULL(t4.bug, 0) / t5.bug * 100, 2) AS fixedRate\r\nFROM zt_product AS t1\r\nLEFT JOIN zt_project AS t2 ON t1.program = t2.id AND t2.type = \'program\' AND t2.grade = 1\r\nLEFT JOIN zt_module AS t3 ON t1.line = t3.id AND t3.type = \'line\'\r\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\r\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\r\nWHERE t1.deleted = \'0\' AND t1.status != \'closed\' AND t1.shadow = \'0\' AND t1.vision = \'rnd\' AND t5.bug IS NOT NULL\r\nORDER BY t1.order DESC', 'published', 1, '', 'admin', '2022-12-07 14:59:41', '', '2022-12-07 14:59:41', 0),
-(1049, '宏观数据-部门人员分布图', 1, 'bar', '56', '', '', '{\r\n\"xaxis\":[{\"field\":\"deptName\",\"name\":\"部门\"}],\r\n\"yaxis\":[\r\n {\"type\":\"value\",\"field\":\"count\",\"agg\":\"value\",\"name\":\"部门人数\",\"valOrAgg\":\"value\"}\r\n]}', '[]', 0, '', NULL, 'SELECT IF(t3.id IS NOT NULL, t3.`name`, \"空\") AS deptName,count(1) as count, \r\nIF(t3.id IS NOT NULL, t3.`order`, 9999) AS deptOrder \r\nFROM `zt_user` AS t1 \r\nLEFT JOIN `zt_dept` AS t2 ON t1.dept = t2.id\r\nLEFT JOIN `zt_dept` AS t3 ON FIND_IN_SET(TRIM(\',\' FROM t3.path), TRIM(\',\' FROM t2.path)) AND t3.grade = \'1\'\r\nWHERE t1.deleted = \'0\'\r\nGROUP BY deptName, deptOrder \r\nORDER BY deptOrder ASC', 'published', 1, '', 'admin', '2022-12-07 14:59:41', '', '2022-12-07 14:59:41', 0),
+(1049, '宏观数据-部门人员分布图', 1, 'bar', '56', '', '', '{\r\n\"xaxis\":[{\"field\":\"deptName\",\"name\":\"部门\"}],\r\n\"yaxis\":[\r\n {\"type\":\"value\",\"field\":\"count\",\"agg\":\"value\",\"name\":\"部门人数\",\"valOrAgg\":\"value\"}\r\n]}', '[]', 0, '', NULL, 'SELECT IF(t3.id IS NOT NULL, t3.`name`, \"空\") AS deptName,count(1) as count, \r\nIF(t3.id IS NOT NULL, t3.`order`, 9999) AS deptOrder \r\nFROM zt_user AS t1 \r\nLEFT JOIN zt_dept AS t2 ON t1.dept = t2.id\r\nLEFT JOIN zt_dept AS t3 ON FIND_IN_SET(TRIM(\',\' FROM t3.path), TRIM(\',\' FROM t2.path)) AND t3.grade = \'1\'\r\nWHERE t1.deleted = \'0\'\r\nGROUP BY deptName, deptOrder \r\nORDER BY deptOrder ASC', 'published', 1, '', 'admin', '2022-12-07 14:59:41', '', '2022-12-07 14:59:41', 0),
(1050, '宏观数据-公司角色分布图', 1, 'pie', '56', '', '', '{\"group\":[{\"field\":\"role\",\"name\":\"类型\"}],\"metric\":[{\"type\":\"agg\",\"field\":\"account\",\"agg\":\"count\",\"name\":\"人数\",\"valOrAgg\":\"count\"}]}', '[]', 0, '', NULL, 'SELECT\n account,\nCASE\n ROLE \n WHEN \'dev\' THEN\n \"研发\" \n WHEN \'qa\' THEN\r\n \"测试\"\r\n WHEN \'pm\' THEN\r\n \"项目经理\"\r\n WHEN \'others\' THEN\r\n \"其他\"\r\n WHEN \'td\' THEN\r\n \"研发主管\"\r\n WHEN \'pd\' THEN\r\n \"产品主管\"\r\n WHEN \'po\' THEN\r\n \"产品经理\"\r\n WHEN \'qd\' THEN\r\n \"测试主管\"\r\n WHEN \'top\' THEN\r\n \"高层管理\"\r\n ELSE\r\n \"未知\"\r\n END\r\n role\n FROM\n `zt_user` \n WHERE\n deleted = \'0\' ', 'published', 1, '', 'admin', '2022-12-07 14:59:41', '', '2022-12-07 14:59:41', 0),
(1051, '宏观数据-人员工龄分布图', 1, 'bar', '56', '', '', '{\r\n\"xaxis\":[{\"field\":\"joinDate\",\"name\":\"工龄\"}],\r\n\"yaxis\":[\r\n {\"type\":\"value\",\"field\":\"count\",\"agg\":\"value\",\"name\":\"人数\",\"valOrAgg\":\"value\"}\r\n]}', '[]', 0, '', NULL, 'SELECT count(1) as count, \"0-1年\" as joinDate FROM `zt_user` WHERE deleted = \'0\' AND `join` > DATE_SUB(NOW(), INTERVAL 1 YEAR)\r\nunion\r\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)\r\nunion\r\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)\r\nunion\r\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)\r\nunion\r\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\'\r\nunion \r\nSELECT count(1) as count, \"未知\" as joinDate FROM `zt_user` WHERE deleted = \'0\' AND LEFT(`join`, 4) = \'0000\'', 'published', 1, '', 'admin', '2022-12-07 14:59:41', '', '2022-12-07 14:59:41', 0),
(1055, '年度新增-一级项目集个数', 1, 'card', '45', '', '', '{\"value\": {\"type\": \"agg\", \"field\": \"id\", \"agg\": \"count\"}, \"title\": {\"type\": \"text\", \"name\": \"\"},\n\"type\": \"value\"\n}', '', 0, NULL, NULL, 'SELECT\r\n t1.`year`,\r\n t2.id,\r\n t2.name\r\nFROM\r\n ( SELECT DISTINCT YEAR ( `date` ) AS \"year\" FROM zt_action ) AS t1\r\n LEFT JOIN (\r\n SELECT\r\n id, name,\r\n YEAR ( openedDate ) AS `year` \r\n FROM\r\n zt_project \r\n WHERE\r\n `type` = \'program\' \r\n AND deleted = \'0\' \r\n AND grade = \'1\' \r\n ) t2 ON t1.`year` = t2.`year` \r\n WHERE t2.id IS NOT NULL', 'published', 1, '', 'admin', NULL, '', NULL, 0),
diff --git a/dependency.json b/dependency.json
index 97951d37a6..f6b52a754c 100644
--- a/dependency.json
+++ b/dependency.json
@@ -1,8 +1,8 @@
{
"pkg": {
"xuanxuan": {
- "gitVersion": "4786a9a7555ef5cdc6f8b84049d44e2add643a23",
- "version": "7.1"
+ "gitVersion": "v7.2.1-rc.4",
+ "version": "7.2.1"
},
"zentaoext": {
"gitVersion": "18.x"
diff --git a/misc/gen_build_report.sh b/misc/gen_build_report.sh
new file mode 100755
index 0000000000..ab41b24784
--- /dev/null
+++ b/misc/gen_build_report.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+finishTime=$(date '+%Y-%m-%d %H:%M:%S')
+
+blankLine() {
+ echo
+}
+
+outputFrame() {
+ printf "$1"
+}
+
+outputLine() {
+ echo "$1"
+}
+
+outputLine "构建日期 **$finishTime**"
+blankLine
+
+outputLine "#### Git 信息"
+
+outputLine "* 触发 Tag: $TAG_NAME"
+
+outputLine "* CommitId: ${GIT_COMMIT:0:7}"
+
+outputLine "* 触发人: ${GIT_TAGGER_NAME}"
+
+blankLine
+
+
+# 触发人: qishiyao
+subGroupPath=`echo $GIT_TAG_BUILD_GROUP | sed 's/\./\//'`
+
+outputLine "#### 下载地址"
+outputLine "##### 开源版"
+outputFrame "[${PMS_VERSION} (中文)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/pmsPack/$subGroupPath/ZenTaoPMS/${PMS_VERSION}/)"
+outputFrame "\t\t"
+outputLine "[${PMS_VERSION} (English)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/pmsPack/$subGroupPath/ZenTaoALM/${PMS_VERSION}/)"
+
+outputLine "##### 企业版"
+
+outputFrame "[${BIZ_VERSION:3} (中文)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/bizPack/$subGroupPath/ZenTaoPMS/${BIZ_VERSION}/)"
+outputFrame "\t\t"
+outputLine "[${BIZ_VERSION:3} 升级包 (中文)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/bizPack/$subGroupPath/ZenTaoPMS.update/${BIZ_VERSION}/)"
+
+outputFrame "[${BIZ_VERSION:3} (English)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/bizPack/$subGroupPath/ZenTaoALM/${BIZ_VERSION}/)"
+outputFrame "\t"
+outputLine "[${BIZ_VERSION:3} 升级包 (English)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/bizPack/$subGroupPath/ZenTaoALM.update/${BIZ_VERSION}/)"
+
+outputLine "##### 旗舰版"
+
+outputFrame "[${MAX_VERSION:3} (中文)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/maxPack/$subGroupPath/ZenTaoPMS/${MAX_VERSION}/)"
+outputFrame "\t\t"
+outputLine "[${MAX_VERSION:3} 升级包 (中文)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/maxPack/$subGroupPath/ZenTaoPMS.update/${MAX_VERSION}/)"
+
+outputFrame "[${MAX_VERSION:3} (English)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/maxPack/$subGroupPath/ZenTaoALM/${MAX_VERSION}/)"
+outputFrame "\t"
+outputLine "[${MAX_VERSION:3} 升级包 (English)](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/service/rest/repository/browse/${ARTIFACT_REPOSITORY}/zentao/maxPack/$subGroupPath/ZenTaoALM.update/${MAX_VERSION}/)"
+
+outputLine "##### 历史版本"
+outputLine "[查看历史版本](${ARTIFACT_PROTOCOL}://${ARTIFACT_HOST}/#browse/browse:easycorp-snapshot)"
diff --git a/module/action/model.php b/module/action/model.php
index 3a72608264..a7e202e100 100755
--- a/module/action/model.php
+++ b/module/action/model.php
@@ -812,7 +812,7 @@ class actionModel extends model
$trashQuery = $this->session->trashQuery;
$trashQuery = str_replace(array('`objectID`', '`actor`', '`date`'), array('t1.`objectID`', 't1.`actor`', 't1.`date`'), $trashQuery);
$table = $this->config->objectTables[$objectType];
- $nameField = isset($this->config->action->objectNameFields[$objectType]) ? 't2.' . "`{$this->config->action->objectNameFields[$objectType]}`" : '';
+ $nameField = isset($this->config->action->objectNameFields[$objectType]) ? 't2.' . '`' . $this->config->action->objectNameFields[$objectType] . '`' : '';
if($nameField) $trashQuery = preg_replace("/`objectName`/", $nameField, $trashQuery);
@@ -1513,7 +1513,7 @@ class actionModel extends model
elseif($objectType == 'stakeholder')
{
$objectName = $this->dao->select("t1.id, t2.realname")->from($table)->alias('t1')
- ->leftJoin(TABLE_USER)->alias('t2')->on("t1.`{$field}` = t2.account")
+ ->leftJoin(TABLE_USER)->alias('t2')->on("t1.`$field` = t2.account")
->where('t1.id')->in($objectIdList)
->fetchPairs();
}
diff --git a/module/dataview/css/browse.css b/module/dataview/css/browse.css
index 42eb36a121..5c47b3a8c4 100644
--- a/module/dataview/css/browse.css
+++ b/module/dataview/css/browse.css
@@ -4,7 +4,7 @@
.side-col {width: 240px;}
#sidebar> .cell {width: 220px;}
-#data {overflow: scroll;}
+#datas {overflow: scroll;}
#data th, #data td, #schema td, #modules li > strong {overflow: hidden; text-overflow: unset; white-space: nowrap;}
#dataContent {margin: 0px; padding: 0px;}
#dataContent .detail {margin: 0px; padding: 0px;}
diff --git a/module/dataview/js/browse.js b/module/dataview/js/browse.js
index 0939e5da92..bc7b13b228 100644
--- a/module/dataview/js/browse.js
+++ b/module/dataview/js/browse.js
@@ -17,6 +17,22 @@ $(function()
if(dataview.used) result = confirm(warningDesign);
if(result) window.location.href = url;
});
+
+ initPager(pageID, recPerPage, recTotal, fieldCount);
+
+ $('.first-page,.left-page,.last-page,.right-page').click(function()
+ {
+ pageID = $(this).data('page');
+ queryTableData();
+ });
+
+ $('.dropup li a').click(function()
+ {
+ pageID = 1;
+ recPerPage = $(this).data('size');
+ queryTableData();
+ })
+
});
/**
@@ -33,3 +49,118 @@ function locate(module, method, params)
var link = createLink(module, method, params);
window.location.href = link;
}
+
+/**
+ * Query table data.
+ *
+ * @return void
+ */
+function queryTableData()
+{
+ var params = {};
+ params.pageID = pageID;
+ params.recPerPage = recPerPage;
+ params.recTotal = recTotal;
+ params.table = table;
+ params.type = type;
+ $.post(createLink('dataview', 'ajaxGetTableData'), params,function(resp)
+ {
+ resp = JSON.parse(resp);
+ buildTable(resp);
+
+ recTotal = resp.recTotal;
+ fieldCount = resp.fieldCount;
+ initPager(pageID, recPerPage, recTotal, fieldCount);
+ });
+}
+
+/**
+ * Build dataview data table.
+ *
+ * @param object resp
+ * @return void
+ */
+function buildTable(resp)
+{
+ var dataview = resp.dataview;
+ var clientLang = resp.clientLang;
+ var minWidth = resp.fieldCount * 100 + 'px';
+
+ var html = "
";
+ html += "";
+ for(var field in resp.fields)
+ {
+ var fieldName = dataview?.fieldSettings?.[field]?.name ? dataview.fieldSettings[field].name : field;
+ if(dataview?.langs)
+ {
+ var langs = JSON.parse(dataview.langs);
+ if(langs) fieldName = langs?.[field]?.[clientLang] ? langs[field][clientLang] : fieldName;
+ }
+
+ html += "| " + fieldName + " | ";
+ }
+ html += "
";
+ html += "";
+
+ for(var index in resp.datas)
+ {
+ var data = resp.datas[index];
+
+ html += '';
+ for(var field in resp.fields)
+ {
+ var tdValue = data?.[field] ? data[field] : 'null';
+ html += "| " + tdValue + " | ";
+ }
+ html += '
';
+ }
+ html += '';
+ html += '
';
+
+ $('#datas').empty();
+ $('#datas').append(html);
+}
+
+/**
+ * Init pager.
+ *
+ * @param int pageID
+ * @param int recPerPage
+ * @param int recTotal
+ * @access public
+ * @return void
+ */
+function initPager(pageID, recPerPage, recTotal, fieldCount)
+{
+ var pageID = parseInt(pageID);
+ var recPerPage = parseInt(recPerPage);
+ var recTotal = parseInt(recTotal);
+ var pageTotal = parseInt(Math.ceil(recTotal / recPerPage));
+
+ $('.recTotal').html(recTotalTip.replace('%s', recTotal));
+ $('.recPerPage').html(recPerPageTip.replace('%s', recPerPage));
+
+ $('.dropup li').removeClass('active');
+ $('.dropup li a').each(function()
+ {
+ if($(this).data('size') == recPerPage)
+ {
+ $(this).parent().addClass('active');
+ return;
+ }
+ });
+
+ $('.page-number').html('' + pageID + '/' + pageTotal + '');
+
+ $('.first-page').data('page', 1);
+ $('.left-page').data('page', pageID - 1);
+ $('.right-page').data('page', pageID + 1);
+ $('.last-page').data('page', pageTotal);
+
+ $('.first-page,.left-page,.last-page,.right-page').removeClass('disabled');
+ if(pageID == 1) $('.first-page,.left-page').addClass('disabled');
+ if(pageID == pageTotal) $('.last-page,.right-page').addClass('disabled');
+
+ $('#queryResult').html(viewResult.replace('%s', recTotal).replace('%s', fieldCount));
+}
+
diff --git a/module/dataview/js/querybase.js b/module/dataview/js/querybase.js
index 9bc1cb383d..74f05637af 100644
--- a/module/dataview/js/querybase.js
+++ b/module/dataview/js/querybase.js
@@ -140,6 +140,7 @@ function saveSettings()
{
var fieldSettings = DataStorage.clone('fieldSettings');
var relatedObject = DataStorage.relatedObject;
+ var objectFields = DataStorage.objectFields;
for(let index in DataStorage.fields)
{
var relatedTable = $('#relatedTable' + index).val();
@@ -147,7 +148,11 @@ function saveSettings()
fieldSettings[index].object = relatedTable;
fieldSettings[index].field = relatedField;
- if(relatedTable != relatedObject[index]) fieldSettings[index].type = 'object';
+ if(relatedTable != relatedObject[index])
+ {
+ fieldSettings[index].type = 'object';
+ if(typeof(objectFields) != 'undefined' && typeof(objectFields[relatedTable]) != 'undefined' && typeof(objectFields[relatedTable][index]) != 'undefined') fieldSettings[index].type = objectFields[relatedTable][index].type == 'object' ? 'string' : objectFields[relatedTable][index].type;
+ }
if(relatedTable == relatedObject[index] && fieldSettings[index].type == 'object') fieldSettings[index].type = 'string';
}
diff --git a/module/dataview/lang/de.php b/module/dataview/lang/de.php
index b670e719e4..7d2216d867 100644
--- a/module/dataview/lang/de.php
+++ b/module/dataview/lang/de.php
@@ -158,6 +158,7 @@ $lang->dataview->error->warningDelete = 'The custom table has been referenced. D
$lang->dataview->querying = 'Querying, please wait...';
$lang->dataview->queryResult = 'Query data in row %s x %s column';
+$lang->dataview->viewResult = '%s x %s rows of data';
$lang->dataview->recTotalTip = ' %s items in total';
$lang->dataview->recPerPageTip = " %s items per page ";
diff --git a/module/dataview/lang/en.php b/module/dataview/lang/en.php
index b670e719e4..7d2216d867 100644
--- a/module/dataview/lang/en.php
+++ b/module/dataview/lang/en.php
@@ -158,6 +158,7 @@ $lang->dataview->error->warningDelete = 'The custom table has been referenced. D
$lang->dataview->querying = 'Querying, please wait...';
$lang->dataview->queryResult = 'Query data in row %s x %s column';
+$lang->dataview->viewResult = '%s x %s rows of data';
$lang->dataview->recTotalTip = ' %s items in total';
$lang->dataview->recPerPageTip = " %s items per page ";
diff --git a/module/dataview/lang/fr.php b/module/dataview/lang/fr.php
index b670e719e4..7d2216d867 100644
--- a/module/dataview/lang/fr.php
+++ b/module/dataview/lang/fr.php
@@ -158,6 +158,7 @@ $lang->dataview->error->warningDelete = 'The custom table has been referenced. D
$lang->dataview->querying = 'Querying, please wait...';
$lang->dataview->queryResult = 'Query data in row %s x %s column';
+$lang->dataview->viewResult = '%s x %s rows of data';
$lang->dataview->recTotalTip = ' %s items in total';
$lang->dataview->recPerPageTip = " %s items per page ";
diff --git a/module/dataview/lang/zh-cn.php b/module/dataview/lang/zh-cn.php
index 0fe9e9f99e..166747c3a6 100644
--- a/module/dataview/lang/zh-cn.php
+++ b/module/dataview/lang/zh-cn.php
@@ -158,6 +158,7 @@ $lang->dataview->error->warningDelete = '中间表已被引用,删除会导致
$lang->dataview->querying = '正在查询,请稍后...';
$lang->dataview->queryResult = '查询到 %s行 x %s列数据';
+$lang->dataview->viewResult = '共 %s行 x %s列数据';
$lang->dataview->recTotalTip = '共 %s 项';
$lang->dataview->recPerPageTip = "每页 %s 项 ";
diff --git a/module/dataview/model.php b/module/dataview/model.php
index 5909ff9f75..8cb23001d4 100644
--- a/module/dataview/model.php
+++ b/module/dataview/model.php
@@ -61,16 +61,52 @@ class dataviewModel extends model
return $moduleNames;
}
+ /**
+ * Get alias names.
+ *
+ * @param object $statement
+ * @param array $moduleNames
+ * @access public
+ * @return array
+ */
+ public function getAliasNames($statement, $moduleNames)
+ {
+ $aliasNames = array();
+ if(isset($statement->from))
+ {
+ foreach($statement->from as $from)
+ {
+ if(isset($moduleNames[$from->table]))
+ {
+ $aliasNames[$from->alias] = $from->table;
+ }
+ }
+ }
+ if(isset($statement->join))
+ {
+ foreach($statement->join as $join)
+ {
+ if(isset($moduleNames[$join->expr->table]))
+ {
+ $aliasNames[$join->expr->alias] = $join->expr->table;
+ }
+ }
+ }
+
+ return $aliasNames;
+ }
+
/**
* Merge fields.
*
- * @param int $dataFields
- * @param int $sqlFields
- * @param int $moduleNames
+ * @param array $dataFields
+ * @param array $sqlFields
+ * @param array $moduleNames
+ * @param array $aliasNames
* @access public
* @return void
*/
- public function mergeFields($dataFields, $sqlFields, $moduleNames)
+ public function mergeFields($dataFields, $sqlFields, $moduleNames, $aliasNames = array())
{
$mergeFields = array();
$relatedObject = array();
@@ -94,6 +130,14 @@ class dataviewModel extends model
$relatedObject[$field] = $moduleName;
continue;
}
+ elseif(isset($aliasNames[$table]))
+ {
+ $moduleName = $aliasNames[$table];
+ if(strpos($moduleName, 'flow_') !== false) $moduleName = substr($moduleName, 5);
+ $mergeFields[$field] = isset($this->lang->$moduleName->$fieldName) ? $this->lang->$moduleName->$fieldName : $field;
+ $relatedObject[$field] = $moduleName;
+ continue;
+ }
}
if(strpos(join(',', $sqlFields), '.*') !== false)
diff --git a/module/dataview/view/browse.html.php b/module/dataview/view/browse.html.php
index 8d0a9f7176..877ca42aed 100644
--- a/module/dataview/view/browse.html.php
+++ b/module/dataview/view/browse.html.php
@@ -12,8 +12,18 @@
?>
getModuleRoot() . 'common/view/header.html.php';?>
+
+
dataview->error->warningDesign);?>
+dataview->viewResult);?>
+
+
+
+
+dataview->recTotalTip);?>
+dataview->recPerPageTip);?>
+
@@ -83,32 +93,77 @@
-
-
-
- $field):?>
- fieldSettings->$key->name) ? $dataview->fieldSettings->$key->name : $key;
- if(!empty($dataview->langs))
- {
- $langs = json_decode($dataview->langs, true);
- if(!empty($langs)) $fieldName = $langs[$key][$clientLang] ? $langs[$key][$clientLang] : $fieldName;
- }
- ?>
- |
-
-
-
-
+
+
+
+
+ $field):?>
+ fieldSettings->$key->name) ? $dataview->fieldSettings->$key->name : $key;
+ if(!empty($dataview->langs))
+ {
+ $langs = json_decode($dataview->langs, true);
+ if(!empty($langs)) $fieldName = $langs[$key][$clientLang] ? $langs[$key][$clientLang] : $fieldName;
+ }
+ ?>
+ |
+
+
+
+
';?>
$field):?>
- '>$key) ? $value->$key : 'null';?> |
+ $key) ? $value->$key : 'null';?>
+ |
';?>
-
-
+
+
+
+
+
diff --git a/module/pivot/control.php b/module/pivot/control.php
index d11a3d9d47..228ada1933 100644
--- a/module/pivot/control.php
+++ b/module/pivot/control.php
@@ -72,7 +72,14 @@ class pivot extends control
$processSqlData = $this->loadModel('chart')->getTables($sql);
$sql = $processSqlData['sql'];
- list($data, $configs) = $this->pivot->genSheet(json_decode(json_encode($pivot->fieldSettings), true), $pivot->settings, $sql, $filterFormat, json_decode($pivot->langs, true));
+ if(isset($pivot->settings['summary']) and $pivot->settings['summary'] =='notuse')
+ {
+ list($data, $configs) = $this->pivot->genOriginSheet(json_decode(json_encode($pivot->fieldSettings), true), $pivot->settings, $sql, $filterFormat, json_decode($pivot->langs, true));
+ }
+ else
+ {
+ list($data, $configs) = $this->pivot->genSheet(json_decode(json_encode($pivot->fieldSettings), true), $pivot->settings, $sql, $filterFormat, json_decode($pivot->langs, true));
+ }
$this->view->data = $data;
$this->view->configs = $configs;
}
@@ -298,7 +305,14 @@ class pivot extends control
$processSqlData = $this->loadModel('chart')->getTables($sql);
$sql = $processSqlData['sql'];
- list($data, $configs) = $this->pivot->genSheet($fields, $settings, $sql, $filterFormat, $langs);
+ if(isset($settings['summary']) and $settings['summary'] == 'notuse')
+ {
+ list($data, $configs) = $this->pivot->genOriginSheet($fields, $settings, $sql, $filterFormat, $langs);
+ }
+ else
+ {
+ list($data, $configs) = $this->pivot->genSheet($fields, $settings, $sql, $filterFormat, $langs);
+ }
$this->pivot->buildPivotTable($data, $configs, $fields, $sql);
}
diff --git a/module/pivot/css/preview.css b/module/pivot/css/preview.css
index ad70a4a69b..91d59bf0c1 100644
--- a/module/pivot/css/preview.css
+++ b/module/pivot/css/preview.css
@@ -5,10 +5,11 @@
.parent-position {padding-right: 160px;}
.datagrid {overflow: auto;}
.heading-padding, .datagrid-padding {padding-left: 6px; padding-right: 6px;}
+.datagrid-padding {padding-top: 2px;}
.filter-items > .table-row{display: table!important;}
.filter-items .filter-item:first-child {padding-left: 0!important;}
-.filterBox {display: flex; margin-bottom: 20px; margin-left: 6px; margin-right: 6px;}
+.filterBox {display: flex; margin-bottom: 5px; margin-left: 6px; margin-right: 6px; margin-top: 8px;}
.filter-items {display: flex; flex: 1; flex-wrap: wrap;}
.filter-item {padding: 0 16px 5px 0;}
.filter-item-grow {flex-grow: 1;}
@@ -17,3 +18,15 @@
#filterItems .picker-selections {overflow: hidden; text-overflow: clip; white-space: nowrap;}
#filterItems .picker .picker-selections {width: auto !important;}
+.content-border {padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid #F1F5F9;}
+.flex-between {display:flex; justify-content: space-between;}
+.flex-start {display:flex; justify-content: flex-start;}
+
+.query-after {padding-right: 8px; padding-top: 1px;}
+.query-pseudo {position: relative; padding-right: 24px; padding-top: 1px;}
+.query-pseudo::after {content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background-color: #F1F5F9;}
+
+#filterMargin {padding-top: 8px; padding-bottom: 5px;}
+.pivot-design {padding-left: 24px; padding-right: 12px;}
+.pivot-edit {padding-left: 12px; padding-right: 12px;}
+.pivot-delete {padding-left: 12px; padding-right: 8px;}
diff --git a/module/pivot/js/common.js b/module/pivot/js/common.js
index 484d42150a..c6b07cd6bf 100644
--- a/module/pivot/js/common.js
+++ b/module/pivot/js/common.js
@@ -139,10 +139,15 @@ function checkFormSetting()
*/
function validate(showError = false)
{
- var pivot = DataStorage.pivot;
+ var pivot = DataStorage.pivot;
var formSettings = pivot.settings;
- /* Code for temporary */
- var isReady = true;
+ var isReady = true;
+
+ if("summary" in formSettings && formSettings.summary == 'notuse')
+ {
+ if(isReady) $('#datagrid-tip').addClass('hidden');
+ return true;
+ }
/* check group settings. */
var exist = false;
diff --git a/module/pivot/js/preview.js b/module/pivot/js/preview.js
index 1a2f92d925..b4373f1e43 100644
--- a/module/pivot/js/preview.js
+++ b/module/pivot/js/preview.js
@@ -5,6 +5,7 @@ $(function()
expandTree();
renderFilters(pivot);
initQueryBtn();
+ initOriginQueryBtn();
$('body').resize(() => {calcPreviewGrowFilter();});
@@ -20,17 +21,14 @@ function expandTree()
tree.expand($('.pivot-' + pivotID).parents('li'));
}
-/*$('.btn-export').click(function()
-{
- if(typeof pivotID == 'undefined' || !pivotID) return;
- pivot = getQueryInfo();
-});
-*/
-
function getQueryInfo()
{
- var pivotInfo = pivot;
+ // if not use JSON.parse(JSON.stringify()), edit pivotInfo also affects pivot. If click btn-query-origin, pivot setting also have summary field.
+ var pivotInfo = JSON.parse(JSON.stringify(pivot));
pivotInfo.searchFilters = JSON.parse(JSON.stringify(pivotInfo.filters));
+ pivotInfo.step = 4;
+
+ if(!pivotInfo.searchFilters) return pivotInfo;
if(isQueryFilter(pivotInfo.filters))
{
@@ -70,7 +68,6 @@ function getQueryInfo()
});
}
- pivotInfo.step = 4;
return pivotInfo;
}
@@ -84,17 +81,55 @@ function initQueryBtn()
{
$('.btn-query').click(function()
{
- pivotInfo = getQueryInfo();
- $.post(createLink('pivot', 'ajaxGetPivot'), pivotInfo,function(resp)
- {
- var myDatagrid = $('#datagirdInfo');
- myDatagrid.find('.reportData').remove();
- myDatagrid.append(resp);
- });
-
+ var pivotInfo = getQueryInfo();
+ refreshPivot(pivotInfo);
});
}
+/**
+ * Init origin query button.
+ *
+ * @access public
+ * @return void
+ */
+function initOriginQueryBtn()
+{
+ $('.btn-query-origin').click(function()
+ {
+ var pivotInfo = getQueryInfo();
+ pivotInfo.settings['summary'] = 'notuse';
+ refreshPivot(pivotInfo, true);
+ });
+}
+
+function refreshPivot(pivotInfo, isOrigin = false)
+{
+ $.post(createLink('pivot', 'ajaxGetPivot'), pivotInfo,function(resp)
+ {
+ var myDatagrid = $('#datagirdInfo');
+ myDatagrid.find('.reportData').remove();
+ myDatagrid.append(resp);
+
+ if(isOrigin)
+ {
+ $('#filterItems').addClass('hidden');
+ $('#filterMargin').removeClass('hidden');
+
+ $('#pivot-query').removeClass('hidden');
+ $('#origin-query').addClass('hidden');
+ }
+ else
+ {
+ $('#filterItems').removeClass('hidden');
+ $('#filterMargin').addClass('hidden');
+
+ $('#pivot-query').addClass('hidden');
+ $('#origin-query').removeClass('hidden');
+ }
+ });
+}
+
+
function calcPreviewGrowFilter()
{
if(pivot.filters.length <= 0) return;
@@ -280,3 +315,9 @@ function isQueryFilter(filters)
{
return filters.length > 0 && filters[0].from == 'query';
}
+
+function locate(module, method, params)
+{
+ var link = createLink(module, method, params);
+ window.location.href = link;
+}
diff --git a/module/pivot/lang/de.php b/module/pivot/lang/de.php
index d3da4af322..19826e8b7b 100644
--- a/module/pivot/lang/de.php
+++ b/module/pivot/lang/de.php
@@ -20,6 +20,7 @@ $lang->pivot->design = 'Design pivot';
$lang->pivot->export = 'Export pivot';
$lang->pivot->query = 'Query';
$lang->pivot->browseAction = 'Design in Pivot Table';
+$lang->pivot->designAB = 'Design';
$lang->pivot->id = 'ID';
$lang->pivot->name = 'Name';
@@ -71,6 +72,8 @@ $lang->pivot->percent = '%';
$lang->pivot->undefined = 'Undefiniert';
$lang->pivot->project = $lang->projectCommon;
$lang->pivot->PO = 'PO';
+$lang->pivot->showPivot = 'Show Pivot';
+$lang->pivot->showOrigin = 'Show Origin Data';
$lang->pivot->colors[] = 'AFD8F8';
$lang->pivot->colors[] = 'AFD8F8';
@@ -261,7 +264,7 @@ $lang->pivot->noChartSelected = 'Please select one pivot.';
$lang->pivot->beginGtEnd = 'Begin time should not be >= end time.';
$lang->pivot->resetSettings = 'The configuration of the query data has been modified, requiring redesign of the pivot, whether to continue.';
$lang->pivot->clearSettings = 'The configuration of the query data has been modified, whether to clear the pivot and save.';
-$lang->pivot->draftSave = 'Released content is edited, will be overwritten, whether to continue?';
+$lang->pivot->draftSave = 'The pivot table has been published and will be in draft state. Do you want to continue?';
$lang->pivot->cannotAddQuery = 'Result filter has been added, query filter cannot be added.';
$lang->pivot->cannotAddResult = 'Query filter has been added, result filter cannot be added.';
@@ -332,6 +335,7 @@ $lang->pivot->typeOptions['dept'] = 'Dept';
$lang->pivot->step2 = new stdclass();
$lang->pivot->step2->group = 'Row Grouping';
+$lang->pivot->step2->summary = 'Summary Setting';
$lang->pivot->step2->column = 'Column Settings';
$lang->pivot->step2->groupTip = 'Select Field';
$lang->pivot->step2->groupNum = array('One', 'Two', 'Three');
@@ -344,6 +348,7 @@ $lang->pivot->step2->columnField = 'Field';
$lang->pivot->step2->calcMode = 'Calc Mode';
$lang->pivot->step2->moreThanOne = 'Select at least one group field.';
+$lang->pivot->step2->summaryTip = 'After this parameter is selected, you can configure Row Grouping, Column Settings, and Show column totals';
$lang->pivot->step2->groupsTip = 'By selecting a grouping field, the data of the SQL query is grouped and displayed hierarchically in the pivot table.';
$lang->pivot->step2->columnsTip = 'Add 1 column to the pivot table and set it.';
diff --git a/module/pivot/lang/en.php b/module/pivot/lang/en.php
index 85e68b46ca..04bb815b3c 100644
--- a/module/pivot/lang/en.php
+++ b/module/pivot/lang/en.php
@@ -20,6 +20,7 @@ $lang->pivot->design = 'Design pivot';
$lang->pivot->export = 'Export pivot';
$lang->pivot->query = 'Query';
$lang->pivot->browseAction = 'Design in Pivot Table';
+$lang->pivot->designAB = 'Design';
$lang->pivot->id = 'ID';
$lang->pivot->name = 'Name';
@@ -71,6 +72,8 @@ $lang->pivot->percent = '%';
$lang->pivot->undefined = 'Undefiniert';
$lang->pivot->project = $lang->projectCommon;
$lang->pivot->PO = 'PO';
+$lang->pivot->showPivot = 'Show Pivot';
+$lang->pivot->showOrigin = 'Show Origin Data';
$lang->pivot->colors[] = 'AFD8F8';
$lang->pivot->colors[] = 'AFD8F8';
@@ -261,7 +264,7 @@ $lang->pivot->noChartSelected = 'Please select one pivot.';
$lang->pivot->beginGtEnd = 'Begin time should not be >= end time.';
$lang->pivot->resetSettings = 'The configuration of the query data has been modified, requiring redesign of the pivot, whether to continue.';
$lang->pivot->clearSettings = 'The configuration of the query data has been modified, whether to clear the pivot and save.';
-$lang->pivot->draftSave = 'Released content is edited, will be overwritten, whether to continue?';
+$lang->pivot->draftSave = 'The pivot table has been published and will be in draft state. Do you want to continue?';
$lang->pivot->cannotAddQuery = 'Result filter has been added, query filter cannot be added.';
$lang->pivot->cannotAddResult = 'Query filter has been added, result filter cannot be added.';
@@ -332,6 +335,7 @@ $lang->pivot->typeOptions['dept'] = 'Dept';
$lang->pivot->step2 = new stdclass();
$lang->pivot->step2->group = 'Row Grouping';
+$lang->pivot->step2->summary = 'Summary Setting';
$lang->pivot->step2->column = 'Column Settings';
$lang->pivot->step2->groupTip = 'Select Field';
$lang->pivot->step2->groupNum = array('One', 'Two', 'Three');
@@ -344,6 +348,7 @@ $lang->pivot->step2->columnField = 'Field';
$lang->pivot->step2->calcMode = 'Calc Mode';
$lang->pivot->step2->moreThanOne = 'Select at least one group field.';
+$lang->pivot->step2->summaryTip = 'After this parameter is selected, you can configure Row Grouping, Column Settings, and Show column totals';
$lang->pivot->step2->groupsTip = 'By selecting a grouping field, the data of the SQL query is grouped and displayed hierarchically in the pivot table.';
$lang->pivot->step2->columnsTip = 'Add 1 column to the pivot table and set it.';
diff --git a/module/pivot/lang/fr.php b/module/pivot/lang/fr.php
index ad86ede4b4..38aeea7ead 100644
--- a/module/pivot/lang/fr.php
+++ b/module/pivot/lang/fr.php
@@ -20,6 +20,7 @@ $lang->pivot->design = 'Design pivot';
$lang->pivot->export = 'Export pivot';
$lang->pivot->query = 'Query';
$lang->pivot->browseAction = 'Design in Pivot Table';
+$lang->pivot->designAB = 'Design';
$lang->pivot->id = 'ID';
$lang->pivot->name = 'Name';
@@ -71,6 +72,8 @@ $lang->pivot->percent = '%';
$lang->pivot->undefined = 'Undefiniert';
$lang->pivot->project = $lang->projectCommon;
$lang->pivot->PO = 'PO';
+$lang->pivot->showPivot = 'Show Pivot';
+$lang->pivot->showOrigin = 'Show Origin Data';
$lang->pivot->colors[] = 'AFD8F8';
$lang->pivot->colors[] = 'AFD8F8';
@@ -261,7 +264,7 @@ $lang->pivot->noChartSelected = 'Please select one pivot.';
$lang->pivot->beginGtEnd = 'Begin time should not be >= end time.';
$lang->pivot->resetSettings = 'The configuration of the query data has been modified, requiring redesign of the pivot, whether to continue.';
$lang->pivot->clearSettings = 'The configuration of the query data has been modified, whether to clear the pivot and save.';
-$lang->pivot->draftSave = 'Released content is edited, will be overwritten, whether to continue?';
+$lang->pivot->draftSave = 'The pivot table has been published and will be in draft state. Do you want to continue?';
$lang->pivot->cannotAddQuery = 'Result filter has been added, query filter cannot be added.';
$lang->pivot->cannotAddResult = 'Query filter has been added, result filter cannot be added.';
@@ -332,6 +335,7 @@ $lang->pivot->typeOptions['dept'] = 'Dept';
$lang->pivot->step2 = new stdclass();
$lang->pivot->step2->group = 'Row Grouping';
+$lang->pivot->step2->summary = 'Summary Setting';
$lang->pivot->step2->column = 'Column Settings';
$lang->pivot->step2->groupTip = 'Select Field';
$lang->pivot->step2->groupNum = array('One', 'Two', 'Three');
@@ -344,6 +348,7 @@ $lang->pivot->step2->columnField = 'Field';
$lang->pivot->step2->calcMode = 'Calc Mode';
$lang->pivot->step2->moreThanOne = 'Select at least one group field.';
+$lang->pivot->step2->summaryTip = 'After this parameter is selected, you can configure Row Grouping, Column Settings, and Show column totals';
$lang->pivot->step2->groupsTip = 'By selecting a grouping field, the data of the SQL query is grouped and displayed hierarchically in the pivot table.';
$lang->pivot->step2->columnsTip = 'Add 1 column to the pivot table and set it.';
diff --git a/module/pivot/lang/vi.php b/module/pivot/lang/vi.php
index 1ca0c34fdd..509e12df66 100644
--- a/module/pivot/lang/vi.php
+++ b/module/pivot/lang/vi.php
@@ -10,6 +10,7 @@ $lang->pivot->design = 'Design pivot';
$lang->pivot->export = 'Export pivot';
$lang->pivot->query = 'Query';
$lang->pivot->browseAction = 'Design in Pivot Table';
+$lang->pivot->designAB = 'Design';
$lang->pivot->id = 'ID';
$lang->pivot->name = 'Name';
@@ -61,6 +62,8 @@ $lang->pivot->percent = '%';
$lang->pivot->undefined = 'Undefiniert';
$lang->pivot->project = $lang->projectCommon;
$lang->pivot->PO = 'PO';
+$lang->pivot->showPivot = 'Show Pivot';
+$lang->pivot->showOrigin = 'Show Origin Data';
$lang->pivot->colors[] = 'AFD8F8';
$lang->pivot->colors[] = 'AFD8F8';
@@ -251,7 +254,7 @@ $lang->pivot->noChartSelected = 'Please select one pivot.';
$lang->pivot->beginGtEnd = 'Begin time should not be >= end time.';
$lang->pivot->resetSettings = 'The configuration of the query data has been modified, requiring redesign of the pivot, whether to continue.';
$lang->pivot->clearSettings = 'The configuration of the query data has been modified, whether to clear the pivot and save.';
-$lang->pivot->draftSave = 'Released content is edited, will be overwritten, whether to continue?';
+$lang->pivot->draftSave = 'The pivot table has been published and will be in draft state. Do you want to continue?';
$lang->pivot->cannotAddQuery = 'Result filter has been added, query filter cannot be added.';
$lang->pivot->cannotAddResult = 'Query filter has been added, result filter cannot be added.';
@@ -322,6 +325,7 @@ $lang->pivot->typeOptions['dept'] = 'Dept';
$lang->pivot->step2 = new stdclass();
$lang->pivot->step2->group = 'Row Grouping';
+$lang->pivot->step2->summary = 'Summary Setting';
$lang->pivot->step2->column = 'Column Settings';
$lang->pivot->step2->groupTip = 'Select Field';
$lang->pivot->step2->groupNum = array('One', 'Two', 'Three');
@@ -334,6 +338,7 @@ $lang->pivot->step2->columnField = 'Field';
$lang->pivot->step2->calcMode = 'Calc Mode';
$lang->pivot->step2->moreThanOne = 'Select at least one group field.';
+$lang->pivot->step2->summaryTip = 'After this parameter is selected, you can configure Row Grouping, Column Settings, and Show column totals';
$lang->pivot->step2->groupsTip = 'By selecting a grouping field, the data of the SQL query is grouped and displayed hierarchically in the pivot table.';
$lang->pivot->step2->columnsTip = 'Add 1 column to the pivot table and set it.';
diff --git a/module/pivot/lang/zh-cn.php b/module/pivot/lang/zh-cn.php
index 4542f3dc2a..473d9d364a 100644
--- a/module/pivot/lang/zh-cn.php
+++ b/module/pivot/lang/zh-cn.php
@@ -20,6 +20,7 @@ $lang->pivot->design = '设计透视表';
$lang->pivot->export = '导出透视表';
$lang->pivot->query = '查询';
$lang->pivot->browseAction = '进入透视表设计';
+$lang->pivot->designAB = '设计';
$lang->pivot->id = 'ID';
$lang->pivot->name = '名称';
@@ -71,6 +72,8 @@ $lang->pivot->percent = '百分比';
$lang->pivot->undefined = '未设定';
$lang->pivot->project = $lang->projectCommon;
$lang->pivot->PO = 'PO';
+$lang->pivot->showPivot = '查看透视表';
+$lang->pivot->showOrigin = '查看原始数据';
$lang->pivot->colors[] = 'AFD8F8';
$lang->pivot->colors[] = 'F6BD0F';
@@ -261,7 +264,7 @@ $lang->pivot->noChartSelected = '请选择至少一个图表。';
$lang->pivot->beginGtEnd = '开始时间不得大于结束时间。';
$lang->pivot->resetSettings = '查询数据的配置已修改,是否清空透视表设计,并重新设计。';
$lang->pivot->clearSettings = '查询数据的配置已修改,是否清空透视表设计并保存。';
-$lang->pivot->draftSave = '已发布的内容被编辑,将覆盖,是否继续?';
+$lang->pivot->draftSave = '该透视表已发布,将变为草稿态,是否继续?';
$lang->pivot->cannotAddQuery = '已添加结果筛选器,无法添加查询筛选器';
$lang->pivot->cannotAddResult = '已添加查询筛选器,无法添加结果筛选器';
@@ -332,6 +335,7 @@ $lang->pivot->typeOptions['dept'] = '部门';
$lang->pivot->step2 = new stdclass();
$lang->pivot->step2->group = '行分组';
+$lang->pivot->step2->summary = '汇总设置';
$lang->pivot->step2->column = '列设置';
$lang->pivot->step2->groupTip = '选择字段';
$lang->pivot->step2->groupNum = array('一', '二', '三');
@@ -344,6 +348,7 @@ $lang->pivot->step2->columnField = '字段';
$lang->pivot->step2->calcMode = '计算方式';
$lang->pivot->step2->moreThanOne = '至少选择一个分组字段。';
+$lang->pivot->step2->summaryTip = '勾选后,可配置行分组、列设置、显示列的汇总。';
$lang->pivot->step2->groupsTip = '通过选择分组字段,对SQL查询的数据进行分组,并分层级显示在透视表中。';
$lang->pivot->step2->columnsTip = '在透视表中添加1列并对其进行设置。';
diff --git a/module/pivot/model.php b/module/pivot/model.php
index a953a0f60e..65384db443 100644
--- a/module/pivot/model.php
+++ b/module/pivot/model.php
@@ -2162,8 +2162,7 @@ class pivotModel extends model
*/
public function buildPivotTable($data, $configs, $fields = array(), $sql = '')
{
- $clientLang = $this->app->getClientLang();
- $width = 128;
+ $width = 128;
/* Init table. */
$table = "
";
@@ -2259,6 +2258,77 @@ class pivotModel extends model
return $sql;
}
+ /**
+ * replace defined table names.
+ *
+ * @param string $sql
+ * @access public
+ * @return string
+ */
+ public function genOriginSheet($fields, $settings, $sql, $filters, $langs = array())
+ {
+ $sql = $this->initVarFilter($filters, $sql);
+
+ /* Create sql. */
+ $sql = str_replace(';', '', $sql);
+
+ if(preg_match_all("/[\$]+[a-zA-Z0-9]+/", $sql, $out))
+ {
+ foreach($out[0] as $match) $sql = str_replace($match, "''", $sql);
+ }
+
+ /* Process rows. */
+ $connectSQL = '';
+ if(!empty($filters) && !isset($filters[0]['from']))
+ {
+ $wheres = array();
+ foreach($filters as $field => $filter)
+ {
+ $wheres[] = "tt.`$field` {$filter['operator']} {$filter['value']}";
+ }
+
+ $whereStr = implode(' and ', $wheres);
+ $connectSQL .= " where $whereStr";
+ }
+
+ $columnSQL = "select * from ($sql) tt" . $connectSQL;
+ $rows = $this->dao->query($columnSQL)->fetchAll();
+
+ $cols = array();
+ $clientLang = $this->app->getClientLang();
+ /* Build cols. */
+ foreach($fields as $field)
+ {
+ $key = $field['field'];
+
+ $col = new stdclass();
+ $col->name = $key;
+ $col->isGroup = true;
+
+ $fieldObject = $field['object'];
+ $relatedField = $field['field'];
+
+ $colLabel = $key;
+ if($fieldObject)
+ {
+ $this->app->loadLang($fieldObject);
+ if(isset($this->lang->$fieldObject->$relatedField)) $colLabel = $this->lang->$fieldObject->$relatedField;
+ }
+
+ if(isset($langs[$key]) and !empty($langs[$key][$clientLang])) $colLabel = $langs[$key][$clientLang];
+ $col->label = $colLabel;
+
+ $cols[0][] = $col;
+ }
+
+ $data = new stdclass();
+ $data->cols = $cols;
+ $data->array = json_decode(json_encode($rows), true);
+
+ $configs = array_fill(0, count($rows), array_fill(0, count($fields), 1));
+
+ return array($data, $configs);
+ }
}
/**
diff --git a/module/pivot/view/show.html.php b/module/pivot/view/show.html.php
index 2d688e3073..7e6a7d34aa 100644
--- a/module/pivot/view/show.html.php
+++ b/module/pivot/view/show.html.php
@@ -17,6 +17,7 @@
pivot->widthDate);?>
bi->pickerHeight);?>
lang->datepicker->dpText);?>
+pivot->confirm->design);?>
";?>
@@ -30,21 +31,37 @@
-
+
+
+ pivot->isClickable($pivot, 'design');?>
+
+ pivot->showOrigin}", '', "id='origin-query' class='$showLine btn-query-origin' title='{$lang->pivot->showOrigin}'");?>
+ pivot->showPivot}", '', "id='pivot-query' class='$showLine btn-query hidden' title='{$lang->pivot->showPivot}'");?>
+
+ dimension&groupID=$pivot->group&pivotID=$pivot->id");
+ $class = !empty($pivot->used) ? "btn-design" : '';
+
+ if(common::hasPriv('pivot', 'design') and $clickable) echo html::a($this->createLink('pivot', 'design', "id=$pivot->id&from=preview¶m=$params"), " {$lang->pivot->designAB}", '', "class='pivot-design $class' title='{$lang->pivot->designAB}'");
+ if(common::hasPriv('pivot', 'edit') and $clickable) echo html::a($this->createLink('pivot', 'edit', "id=$pivot->id&from=preview¶ms=$params", '', true), " {$lang->edit}", '', "class='iframe pivot-edit' title='{$lang->edit}' data-width='600'");
+ if(common::hasPriv('pivot', 'delete') and $clickable) echo html::a($this->createLink('pivot', 'delete', "id=$pivot->id&confirm=no&from=preview"), " {$lang->delete}", 'hiddenwin', "class='pivot-delete' title='{$lang->delete}'");
+ ?>
+
filters)):?>
-
pivot->query, "", 'btn btn-primary btn-query');?>
+
pivot->query, "", 'btn btn-primary btn-query');?>
+
loadModel('chart')->parseSqlVars($pivot->sql, $pivot->filters);?>
pivot->buildPivotTable($data, $configs, json_decode(json_encode($pivot->fieldSettings), true), $sql);?>
@@ -84,3 +101,13 @@
+
diff --git a/module/pivot/zen.php b/module/pivot/zen.php
index 8ba31b2794..8764780bd5 100644
--- a/module/pivot/zen.php
+++ b/module/pivot/zen.php
@@ -31,6 +31,10 @@ class pivotZen extends pivot
$this->view->method = $method;
$this->view->params = $params;
+ /* This session is used to pivot-preview page, when design edit or delete a pivot in pivot-preview, use session to back current dimension and group. */
+ $this->session->set('backDimension', $dimension);
+ $this->session->set('backGroup', $groupID);
+
if(empty($this->view->title)) $this->view->title = $this->lang->pivot->list;
}
diff --git a/module/product/model.php b/module/product/model.php
index 7109b6c8be..2238ba1f0d 100755
--- a/module/product/model.php
+++ b/module/product/model.php
@@ -1778,7 +1778,7 @@ class productModel extends model
* @access public
* @return void
*/
- public function refreshStats()
+ public function refreshStats($refreshAll = false)
{
$updateTime = zget($this->app->config->global, 'productStatsTime', '');
$now = helper::now();
@@ -1788,21 +1788,25 @@ class productModel extends model
* Else only refresh the latest products in action table.
*/
$productActions = array();
- if($updateTime > date('Y-m-d', strtotime('-14 days')))
+ $products = array();
+ if($updateTime < date('Y-m-d', strtotime('-14 days')) or $refreshAll)
+ {
+ $products = $this->dao->select('id')->from(TABLE_PRODUCT)->fetchPairs('id');
+ }
+ else
{
$productActions = $this->dao->select('distinct product')->from(TABLE_ACTION)
->where('date')->ge($updateTime)
->andWhere('product')->notin(array(',0,', ',,'))
->fetchPairs('product');
if(empty($productActions)) return;
- }
- $products = array();
- foreach($productActions as $productAction)
- {
- foreach(explode(',', trim($productAction, ',')) as $product)
+ foreach($productActions as $productAction)
{
- $products[$product] = $product;
+ foreach(explode(',', trim($productAction, ',')) as $product)
+ {
+ $products[$product] = $product;
+ }
}
}
diff --git a/module/program/model.php b/module/program/model.php
index 05ff7a7284..cf2ca47f2a 100644
--- a/module/program/model.php
+++ b/module/program/model.php
@@ -1301,7 +1301,7 @@ class programModel extends model
* @access public
* @return void
*/
- public function refreshStats()
+ public function refreshStats($refreshAll = false)
{
$updateTime = zget($this->app->config->global, 'projectStatsTime', '');
$now = helper::now();
@@ -1311,7 +1311,11 @@ class programModel extends model
* Else only refresh the latest executions in action table.
*/
$projects = array();
- if($updateTime > date('Y-m-d', strtotime('-14 days')))
+ if($updateTime < date('Y-m-d', strtotime('-14 days')) or $refreshAll)
+ {
+ $projects = $this->dao->select('id,project,model')->from(TABLE_PROJECT)->fetchAll('id');
+ }
+ else
{
$projects = $this->dao->select('distinct t1.project,t2.model')->from(TABLE_ACTION)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
@@ -1324,6 +1328,7 @@ class programModel extends model
$summary = $this->dao->select('execution, SUM(t1.estimate) AS totalEstimate, SUM(t1.consumed) AS totalConsumed, SUM(t1.`left`) AS totalLeft')->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project=t2.id')
->where('t1.deleted')->eq(0)
+ ->andWhere('t1.parent')->le(0) // Ignore child task.
->beginIF(!empty($projects))->andWhere('t1.project')->in(array_keys($projects))->fi()
->groupBy('execution')
->fetchAll();
diff --git a/module/screen/model.php b/module/screen/model.php
index 092f9014b8..1eaf5ec920 100644
--- a/module/screen/model.php
+++ b/module/screen/model.php
@@ -564,10 +564,18 @@ class screenModel extends model
$settings = json_decode($chart->settings, true);
$fields = json_decode($chart->fields, true);
$langs = json_decode($chart->langs, true);
- list($options, $config) = $this->loadModel('pivot')->genSheet($fields, $settings, $chart->sql, $filters, $langs);
+
+ if(isset($settings['summary']) and $settings['summary'] == 'notuse')
+ {
+ list($options, $config) = $this->loadModel('pivot')->genOriginSheet($fields, $settings, $chart->sql, $filters, $langs);
+ }
+ else
+ {
+ list($options, $config) = $this->loadModel('pivot')->genSheet($fields, $settings, $chart->sql, $filters, $langs);
+ }
$colspan = array();
- if($options->columnTotal and $options->columnTotal == 'sum' and !empty($options->array))
+ if(isset($options->columnTotal) and $options->columnTotal == 'sum' and !empty($options->array))
{
$optionsData = $options->array;
$count = count($optionsData);
diff --git a/module/search/model.php b/module/search/model.php
index d1f463d6e2..1b9f20b3c9 100644
--- a/module/search/model.php
+++ b/module/search/model.php
@@ -428,7 +428,7 @@ class searchModel extends model
->skipSpecial('sql,form')
->remove('onMenuBar')
->get();
- if($this->post->onMenuBar) $query->shortcut = 1;
+ if($this->post->onMenuBar) $query->shortcut = '1';
$this->dao->insert(TABLE_USERQUERY)->data($query)->autoCheck()->check('title', 'notempty')->exec();
if(!dao::isError())
diff --git a/module/story/model.php b/module/story/model.php
index a177779dcd..08b73d7a09 100644
--- a/module/story/model.php
+++ b/module/story/model.php
@@ -578,7 +578,7 @@ class storyModel extends model
{
if(empty($title)) continue;
- $stories->reviewer[$i] = array_filter($stories->reviewer[$i]);
+ $stories->reviewer[$i] = is_array($stories->reviewer[$i]) ? array_filter($stories->reviewer[$i]) : array();
if(empty($stories->reviewer[$i]) and empty($stories->reviewerDitto[$i])) $stories->reviewer[$i] = array();
$reviewers = (isset($stories->reviewDitto[$i])) ? $reviewers : $stories->reviewer[$i];
$stories->reviewer[$i] = $reviewers;
diff --git a/module/testtask/model.php b/module/testtask/model.php
index 39d9b0e915..0eb3db4ebf 100755
--- a/module/testtask/model.php
+++ b/module/testtask/model.php
@@ -1341,7 +1341,7 @@ class testtaskModel extends model
$postReals = $postData->reals[$caseID];
$caseResult = $result ? $result : 'pass';
- if($postData->node) $caseResult = '';
+ if(!empty($postData->node)) $caseResult = '';
$stepResults = array();
if($dbSteps)
{
@@ -2230,17 +2230,21 @@ class testtaskModel extends model
$case = new stdclass();
if(!empty($caseResult->id)) $case->id = $caseResult->id;
- $case->product = $productID;
- if(empty($caseResult->id)) $case->title = $caseResult->title;
- $case->pri = 3;
- $case->type = 'unit';
- $case->stage = 'unittest';
- $case->status = 'normal';
- $case->openedBy = $this->app->user->account;
- $case->openedDate = $now;
- $case->version = 1;
- if(empty($caseResult->id)) $case->auto = 'unit';
- $case->frame = $frame;
+ $case->status = 'normal';
+ $case->frame = $frame;
+
+ if(empty($caseResult->id))
+ {
+ $case->type = 'unit';
+ $case->stage = 'unittest';
+ $case->product = $productID;
+ $case->title = $caseResult->title;
+ $case->pri = 3;
+ $case->openedBy = $this->app->user->account;
+ $case->openedDate = $now;
+ $case->version = 1;
+ $case->auto = 'unit';
+ }
$result = new stdclass();
$result->case = 0;
@@ -2298,19 +2302,22 @@ class testtaskModel extends model
if(!isset($suites[$suiteIndex])) $suites[$suiteIndex] = $suite;
$case = new stdclass();
- if(isset($caseResult->id)) $case->id = $caseResult->id;
- if(!isset($caseResult->id)) $case->product = $productID;
- $case->title = $caseResult->title;
- $case->pri = 3;
- $case->type = 'feature';
- $case->stage = 'feature';
- $case->status = 'normal';
- $case->openedBy = $this->app->user->account;
- $case->openedDate = $now;
- $case->version = 1;
- $case->auto = 'func';
- $case->frame = $frame;
- $case->steps = array();
+ if(!empty($caseResult->id)) $case->id = $caseResult->id;
+ $case->title = $caseResult->title;
+ $case->frame = $frame;
+ $case->status = 'normal';
+ $case->steps = array();
+ $case->auto = 'func';
+ if(empty($caseResult->id))
+ {
+ $case->product = $productID;
+ $case->pri = 3;
+ $case->type = 'feature';
+ $case->stage = 'feature';
+ $case->openedBy = $this->app->user->account;
+ $case->openedDate = $now;
+ $case->version = 1;
+ }
$result = new stdclass();
$result->case = 0;
diff --git a/module/testtask/view/cases.html.php b/module/testtask/view/cases.html.php
index dc221d2424..b8dbf9b595 100644
--- a/module/testtask/view/cases.html.php
+++ b/module/testtask/view/cases.html.php
@@ -18,6 +18,7 @@
+
id : 0);?>
app->loadLang('zanode');?>
zanode->runCaseConfirm);?>
@@ -177,7 +178,7 @@ function runAutocase()
runIDList.push(case2RunMap[$(this).val()]);
});
- var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=' + automation)
+ var url = createLink('zanode', 'ajaxRunZTFScript', 'scriptID=' + automation + "&taskID=" + taskID)
var postData = {'caseIDList' : caseIDList.join(','), 'runIDList' : runIDList.join(',')};
diff --git a/module/upgrade/config.php b/module/upgrade/config.php
index 809d6c633b..76878f18b7 100644
--- a/module/upgrade/config.php
+++ b/module/upgrade/config.php
@@ -38,7 +38,8 @@ $config->upgrade->maxVersion['max4_3'] = '18_3';
$config->upgrade->maxVersion['max4_4_alpha1'] = '18_4_alpha1';
$config->upgrade->maxVersion['max4_4_beta1'] = '18_4_beta1';
$config->upgrade->maxVersion['max4_4'] = '18_4';
-$config->upgrade->maxVersion['max4_5'] = '18_5'; // max insert position.
+$config->upgrade->maxVersion['max4_5'] = '18_5';
+$config->upgrade->maxVersion['max4_6'] = '18_6'; // max insert position.
$config->upgrade->bizVersion = array();
$config->upgrade->bizVersion['biz1_0'] = '9_5_1';
@@ -115,7 +116,8 @@ $config->upgrade->bizVersion['biz8_3'] = '18_3';
$config->upgrade->bizVersion['biz8_4_alpha1'] = '18_4_alpha1';
$config->upgrade->bizVersion['biz8_4_beta1'] = '18_4_beta1';
$config->upgrade->bizVersion['biz8_4'] = '18_4';
-$config->upgrade->bizVersion['biz8_5'] = '18_5'; // biz insert position.
+$config->upgrade->bizVersion['biz8_5'] = '18_5';
+$config->upgrade->bizVersion['biz8_6'] = '18_6'; // biz insert position.
$config->upgrade->proVersion = array();
$config->upgrade->proVersion['pro1_0'] = '3_1';
diff --git a/module/upgrade/lang/version.php b/module/upgrade/lang/version.php
index bacb44a50c..614512a091 100644
--- a/module/upgrade/lang/version.php
+++ b/module/upgrade/lang/version.php
@@ -179,7 +179,8 @@ $lang->upgrade->fromVersions['18_3'] = '18.3';
$lang->upgrade->fromVersions['18_4_alpha1'] = '18.4.alpha1';
$lang->upgrade->fromVersions['18_4_beta1'] = '18.4.beta1';
$lang->upgrade->fromVersions['18_4'] = '18.4';
-$lang->upgrade->fromVersions['18_5'] = '18.5'; // pms insert position.
+$lang->upgrade->fromVersions['18_5'] = '18.5';
+$lang->upgrade->fromVersions['18_6'] = '18.6'; // pms insert position.
global $config;
/* Lite. */
@@ -363,7 +364,8 @@ $lang->upgrade->fromVersions['biz8_3'] = 'Biz8.3';
$lang->upgrade->fromVersions['biz8_4_alpha1'] = 'Biz8.4.alpha1';
$lang->upgrade->fromVersions['biz8_4_beta1'] = 'Biz8.4.beta1';
$lang->upgrade->fromVersions['biz8_4'] = 'Biz8.4';
-$lang->upgrade->fromVersions['biz8_5'] = 'Biz8.5'; // biz insert position.
+$lang->upgrade->fromVersions['biz8_5'] = 'Biz8.5';
+$lang->upgrade->fromVersions['biz8_6'] = 'Biz8.6'; // biz insert position.
/* Max. */
$lang->upgrade->fromVersions['max2_0_beta4'] = 'Max2.0.beta4';
@@ -408,4 +410,4 @@ $lang->upgrade->fromVersions['max4_4'] = 'Max4.4';
$lang->upgrade->fromVersions['max4_5'] = 'Max4.5'; // max insert position.
/* Ipd */
-$lang->upgrade->fromVersions['ipd1_0_beta1'] = 'Ipd1.0.beta1';
+$lang->upgrade->fromVersions['ipd1_0_beta1'] = 'Ipd1.0.beta1'; // ipd insert position.
diff --git a/module/upgrade/model.php b/module/upgrade/model.php
index 1656cc694a..75e84f591d 100644
--- a/module/upgrade/model.php
+++ b/module/upgrade/model.php
@@ -676,6 +676,11 @@ class upgradeModel extends model
if(strpos($fromVersion, 'ipd') === false) $this->execSQL($this->getUpgradeFile('ipdinstall'));
if($fromVersion == 'ipd1.0.beta1') $this->execSQL($this->getUpgradeFile('ipd1.0.beta1'));
if($this->config->edition == 'ipd' and strpos($fromVersion, 'ipd') === false) $this->addORPriv();
+
+ $this->loadModel('product')->refreshStats(true);
+ $this->loadModel('program')->refreshStats(true);
+ $this->updatePivotFieldsType();
+
break;
}
@@ -1488,7 +1493,7 @@ class upgradeModel extends model
try
{
$tableExists = true;
- $stmt = $this->dbh->query("show fields from `{$table}`");
+ $stmt = $this->dbh->query("show fields from `$table`");
while($row = $stmt->fetch()) $fields[$row->Field] = $row->Field;
}
catch(PDOException $e)
@@ -1514,11 +1519,11 @@ class upgradeModel extends model
if(stripos($line, 'auto_increment') !== false) $line .= ' primary key';
try
{
- $this->dbh->exec("ALTER TABLE `{$table}` ADD $line");
+ $this->dbh->exec("ALTER TABLE `$table` ADD $line");
}
catch(PDOException $e)
{
- $alterSQL .= "ALTER TABLE `{$table}` ADD $line;\n";
+ $alterSQL .= "ALTER TABLE `$table` ADD $line;\n";
}
}
}
@@ -9263,8 +9268,18 @@ class upgradeModel extends model
$columns[] = $column;
- $data->stage = 'draft';
- $data->step = 1;
+ $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
+ $stmt = $this->dbh->query($data->sql);
+
+ if(!$stmt)
+ {
+ $data->stage = 'draft';
+ $data->step = 1;
+ }
+ else
+ {
+ $settings->summary = 'notuse';
+ }
}
$settings->columns = $columns;
@@ -9603,4 +9618,47 @@ class upgradeModel extends model
}
}
+
+ /**
+ * Update pivot fields type, pivotID maybe is 1008,1012,1013,1015,1020,1027.
+ *
+ * @access public
+ * @return void
+ */
+ public function updatePivotFieldsType()
+ {
+ $fieldsPairs = array();
+ $fieldsPairs[] = array('maybeID' => 1008, 'beforefields' => '"execution":{"object":"project","field":"execution","type":"string"},"type":{"object":"project","field":"type","type":"string"}',
+ 'fields' => '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"project","field":"project","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"type":{"object":"task","field":"type","type":"option"},"taskID":{"object":"task","field":"taskID","type":"string"},"projectstatus":{"object":"task","field":"projectstatus","type":"string"}}',
+ 'langs' => '{"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"type":{"zh-cn":"\\u4efb\\u52a1\\u7c7b\\u578b","zh-tw":"","en":"","de":"","fr":""},"taskID":{"zh-cn":"taskID","zh-tw":"","en":"","de":"","fr":""},"projectstatus":{"zh-cn":"projectstatus","zh-tw":"","en":"","de":"","fr":""}}');
+ $fieldsPairs[] = array('maybeID' => 1012, 'beforefields' => '"project":{"object":"projectstory","field":"project","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"status":{"object":"project","field":"status","type":"string"}',
+ 'fields' => '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"projectstory","field":"project","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"status":{"object":"story","field":"status","type":"option"}}',
+ );
+ $fieldsPairs[] = array('maybeID' => 1013, 'beforefields' => '"execution":{"object":"project","field":"execution","type":"string"},"stage":{"object":"project","field":"stage","type":"string"}}',
+ 'fields' => '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"projectstory","field":"project","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"stage":{"object":"story","field":"stage","type":"option"}}',
+ 'langs' => '{"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"stage":{"zh-cn":"\\u9636\\u6bb5","zh-tw":"","en":"","de":"","fr":""}}');
+ $fieldsPairs[] = array('maybeID' => 1015, 'beforefields' => '"bugID":{"object":"bug","field":"bugID","type":"string"},"status":{"object":"project","field":"status","type":"string"}',
+ 'fields' => '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"project","field":"project","type":"string"},"t3id":{"object":"project","field":"t3id","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"bugID":{"object":"bug","field":"bugID","type":"string"},"status":{"object":"bug","field":"status","type":"option"}}',
+ );
+ $fieldsPairs[] = array('maybeID' => 1020, 'beforefields' => '"bugID":{"object":"project","field":"bugID","type":"string"},"type":{"object":"product","field":"type","type":"string"}',
+ 'fields' => '{"id":{"object":"product","field":"id","type":"string"},"name":{"object":"product","field":"name","type":"string"},"bugID":{"object":"project","field":"bugID","type":"string"},"type":{"object":"bug","field":"type","type":"option"}}',
+ 'langs' => '{"count":{"zh-cn":"\\u9700\\u6c42\\u6570","zh-tw":"\\u9700\\u6c42\\u6570","en":"Stories"},"done":{"zh-cn":"\\u5b8c\\u6210\\u6570","zh-tw":"\\u5b8c\\u6210\\u6570","en":"Done"},"id":{"zh-cn":"\\u7f16\\u53f7","zh-tw":"","en":"","de":"","fr":""},"name":{"zh-cn":"\\u4ea7\\u54c1\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"type":{"zh-cn":"Bug\\u7c7b\\u578b","zh-tw":"","en":"","de":"","fr":""}}');
+ $fieldsPairs[] = array('maybeID' => 1027, 'beforefields' => '"bugID":{"object":"bug","field":"bugID","type":"string"},"type":{"object":"project","field":"type","type":"string"}',
+ 'fields' => '{"id":{"object":"project","field":"id","type":"string"},"project":{"object":"project","field":"project","type":"string"},"t3id":{"object":"project","field":"t3id","type":"string"},"execution":{"object":"project","field":"execution","type":"string"},"bugID":{"object":"bug","field":"bugID","type":"string"},"type":{"object":"bug","field":"type","type":"option"}}',
+ 'langs' => '{"stories":{"zh-cn":"\\u9700\\u6c42\\u6570","zh-tw":"\\u9700\\u6c42\\u6570","en":"Stories"},"tasks":{"zh-cn":"\\u4efb\\u52a1\\u6570","zh-tw":"\\u4efb\\u52a1\\u6570","en":"Tasks"},"undoneStory":{"zh-cn":"\\u5269\\u4f59\\u9700\\u6c42\\u6570","zh-tw":"\\u5269\\u4f59\\u9700\\u6c42\\u6570","en":"Undone Story"},"undoneTask":{"zh-cn":"\\u5269\\u4f59\\u4efb\\u52a1\\u6570","zh-tw":"\\u5269\\u4f59\\u4efb\\u52a1\\u6570","en":"Undone Task"},"consumed":{"zh-cn":"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6","zh-tw":"\\u5df2\\u6d88\\u8017\\u5de5\\u65f6","en":"Cost(h)"},"left":{"zh-cn":"\\u5269\\u4f59\\u5de5\\u65f6","zh-tw":"\\u5269\\u4f59\\u5de5\\u65f6","en":"Left(h)"},"consumedPercent":{"zh-cn":"\\u8fdb\\u5ea6","zh-tw":"\\u8fdb\\u5ea6","en":"Process"},"execution":{"zh-cn":"\\u6267\\u884c\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"id":{"zh-cn":"\\u9879\\u76eeID","zh-tw":"","en":"","de":"","fr":""},"project":{"zh-cn":"\\u9879\\u76ee\\u540d\\u79f0","zh-tw":"","en":"","de":"","fr":""},"bugID":{"zh-cn":"bugID","zh-tw":"","en":"","de":"","fr":""},"type":{"zh-cn":"Bug\\u7c7b\\u578b","zh-tw":"","en":"","de":"","fr":""}}');
+
+ foreach($fieldsPairs as $field)
+ {
+ $pivot = $this->dao->select('*')->from(TABLE_PIVOT)->where('fields')->like("%{$field['beforefields']}%")->fetchAll();
+ if(count($pivot) > 1 or count($pivot) == 0) continue;
+
+ $pivot = reset($pivot);
+
+ $data = new stdclass();
+ if(isset($field['fields'])) $data->fields = $field['fields'];
+ if(isset($field['langs'])) $data->langs = $field['langs'];
+
+ $this->dao->update(TABLE_PIVOT)->data($data)->where('id')->eq($pivot->id)->exec();
+ }
+ }
}
diff --git a/module/zanode/control.php b/module/zanode/control.php
index 24e7b2fd56..810e5759d7 100644
--- a/module/zanode/control.php
+++ b/module/zanode/control.php
@@ -609,23 +609,33 @@ class zanode extends control
* Ajax: run ZTF script.
*
* @param int $scriptID
+ * @param string $taskID
* @access public
* @return void
*/
- public function ajaxRunZTFScript($scriptID = 0)
+ public function ajaxRunZTFScript($scriptID = 0, $taskID = 0)
{
if($_POST)
{
$caseIDList = $_POST['caseIDList'];
- $runIDList = $_POST['runIDList'];
+ $runIDList = empty($_POST['runIDList']) ? array() : $_POST['runIDList'];
$script = $this->zanode->getAutomationByID($scriptID);
- $cases = $this->loadModel('testcase')->getByList($caseIDList);
+ $cases = $this->loadModel('testcase')->getByList($caseIDList);
+
+ $runs = array();
+ if($taskID)
+ {
+ $runs = $this->dao->select('id, `case`')->from(TABLE_TESTRUN)
+ ->where('`case`')->in($caseIDList)
+ ->andWhere('task')->eq($taskID)->fi()
+ ->fetchPairs('case', 'id');
+ }
$caseIDListArray = explode(',', $caseIDList);
$runIDListArray = explode(',', $runIDList);
$case2RunMap = array();
- foreach($caseIDListArray as $index => $caseID) $case2RunMap[$caseID] = $runIDListArray[$index];
+ foreach($caseIDListArray as $index => $caseID) $case2RunMap[$caseID] = empty($runIDListArray[$index]) ? 0 : $runIDListArray[$index];
foreach($cases as $id => $case)
{
diff --git a/xuanxuan/XUANVERSION b/xuanxuan/XUANVERSION
deleted file mode 100644
index db17e22b08..0000000000
--- a/xuanxuan/XUANVERSION
+++ /dev/null
@@ -1 +0,0 @@
-v7.2.1-rc.4
diff --git a/xuanxuan/XVERSION b/xuanxuan/XVERSION
deleted file mode 100644
index b26a34e470..0000000000
--- a/xuanxuan/XVERSION
+++ /dev/null
@@ -1 +0,0 @@
-7.2.1