Merge branch 'master' into 'devops19'

# Conflicts:
#   test/model/mr/create.php
This commit is contained in:
李玉春
2022-10-08 03:21:38 +00:00
5242 changed files with 611683 additions and 39151 deletions
+6 -1
View File
@@ -12,8 +12,12 @@ tmp/log/*
tmp/model/*
tmp/cache/*
tmp/extension/*
extension/pro/*
extension/biz/*
extension/max/*
extension/xuan/*
extension/custom/*
test/data/sql/
.gitkeep
.bak
.idea
.vscode
@@ -27,3 +31,4 @@ composer.lock
CodeSniffer.conf
test/runtime/*
test/www
!/**/.gitkeep
+65
View File
@@ -0,0 +1,65 @@
stages:
- sonarqube
- unit-test
- ui-test
- package
- cleanup-packages
- notify
program-static-analysis:
stage: sonarqube
variables:
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
cache:
key: "${CI_JOB_NAME}"
paths:
- .sonar/cache
script:
- sonar-scanner -Dsonar.inclusions=$(git diff --name-only HEAD~1|tr '\n' ',')
allow_failure: true
only:
- master # or the name of your main branch
unit-test:
stage: unit-test
script:
- "/home/gitlab-runner/bin/zentao-unittest.sh ${CI_PROJECT_DIR}"
allow_failure: true
only:
- master
- merge_requests
ui-test:
stage: ui-test
script:
- "/home/gitlab-runner/bin/zentao-uitest.sh ${CI_PROJECT_DIR}"
allow_failure: true
only:
- master
- merge_requests
package:
stage: package
script:
- make cizip
allow_failure: true
only:
- master
cleanup-packages:
stage: cleanup-packages
script:
- make clean
when: on_failure
only:
- master
notify:
stage: notify
script:
- "/home/gitlab-runner/bin/ci-notify.php"
when: on_success
only:
- master
- merge_requests
+4 -203
View File
@@ -1,205 +1,6 @@
Z PUBLIC LICENSE 1.2
The source code of zentao is covered by the following dual licenses:
许可
(1) ZPL 1.2: http://zpl.pub/page/zplv12.html
(2) AGPL 3.0: https://www.gnu.org/licenses/agpl-3.0.en.html
Z PUBLIC LICENSE 由青岛易软天创网络科技有限公司(www.cnezsoft.com)起草,简称ZPL协议。
任何人均可使用该协议来发布开源软件,并可对下面协议正文中以下划线标注的空白部分做相应修改,
除此之外的任何内容不得做任何修改。青岛易软天创网络科技有限公司拥有对该协议条款的最终解释权。
前言:
禅道项目管理软件(以下简称该软件)由 青岛易软天创网络科技有限公司(www.cnezsoft.com)开发(以下简称我)。我依法拥有该软件的所有版权。
本着共享开放的角度,我以开放源代码的形式发布该软件。您可以在遵守该协议的前提下使用该软件。
自您安装该软件开始,您和我之间的合同关系自动成立。除非您停止使用该软件或与我有签署额外合同,
您须认真遵循该授权协议约定的每一条款。
我的联系方式:
联系人:徐先生
电话: 4006-8899-23
Email: co@cnezsoft.com
QQ: 1492153927
地址: 青岛开发区井冈山路东方银座 C座 1106
约定:
下述条款中所指该软件的标志包括如下方面:
该软件源代码及文档中关于该软件的版权提示、文字、图片和链接。
该软件运行时界面上呈现出来的有关该软件的文字、图片和链接。
不包括如下方面:
该软件提供的演示数据中关于该软件的文字、图片和链接。
一、免责
该软件是以开放源代码的方式发行,您使用该软件无需任何费用,因此在使用该软件前,您须知晓:
1.1 我没有对该软件提供任何技术支持的义务,您可联系我购买商业的技术支持。
1.2 我对因使用该软件而产生直接或间接的任何问题不负任何责任。
1.3 开源不等于免费,开源不等于无版权,开源软件的发展需要您我共同的努力。
二、自用该软件
2.1 您个人或您就职的公司(组织)可自由使用该软件,我不对您或您就职公司(组织)的性质做任何限制。
2.2 您可以在您个人或您就职公司(组织)任意数量的电脑上运行该软件,我不对电脑的数量做任何限制。
2.3 您可以对该软件源代码进行修改以适应您个人或您所在公司(组织)使用的要求,您做的改动无需对外发布。
2.4 您个人或您就职公司(组织)使用该软件时,必须保留该软件的所有标志,不得以任何方式隐藏或遮掩任一标志。
三、为用户定制
3.1 您可以使用该软件为您的用户部署各种形式的应用,我不对应用的性质做任何限制。
3.2 您可以使用该软件为您的用户部署任意数量的应用,我不对应用的数量做任何限制。
3.3 您可以对该软件源代码进行修改以适应您的用户的要求,您做的改动无需对外发布。
3.4 您对该软件源代码所做的修改可以源代码或二进制的方式提供给您的用户。
3.5 您使用该软件为您的任一用户部署的任一应用都必须保留该软件所有的标志。
3.6 您使用该软件为您的任一用户部署的任一应用都不得以任何方式隐藏或遮掩该软件任一标志。
四、提供在线服务
4.1 您可以使用该软件搭建在线服务,为您的用户提供服务,我不对该服务及该服务用户的性质做任何限制。
4.2 您可以使用该软件搭建在线服务,为您的用户提供服务,我不对该服务的用户数量做任何限制。
4.3 您可以对该软件源代码进行修改以适应在线服务的要求,您做的改动无需对外发布。
4.4 您使用该软件搭建在线服务时,必须以明确的方式告知您的用户该服务是基于该软件搭建的。
4.5 您使用该软件搭建在线服务为您的任一用户部署的任一应用必须保留该软件所有的标志。
4.6 您使用该软件搭建在线服务为您的任一用户部署的任一应用不得以任何方式隐藏或遮掩该软件任一标志。
4.7 您使用该软件搭建在线服务时,不得为您的用户提供去除、隐藏或遮掩该软件任一标志的功能。
五、无改动发布或集成该软件
5.1 我欢迎并感谢您将该软件发布在您的个人网站、企业官网或者其他的第三方网站。
5.2 我欢迎并感谢您将该软件集成在其他系统中一起发布,比如云服务镜像、操作系统发行版等。
5.3 您在发布或者集成该软件的时候,不得对该软件源码做任何改动。
5.4 您在发布或者集成该软件的时候,须保留该软件的所有标志。
六、发布基于该软件的衍生作品
6.1 我欢迎并感谢您为该软件开发衍生作品。
6.2 您开发的衍生作品中涉及到对该软件源代码改动的地方,须遵循如下条款:
6.2.1 如修改了该软件的源代码,须依据本协议发布修改后的源代码。
6.2.2 如修改了该软件的源代码,须保留代码里面该软件原有的所有标志。
6.2.3 您可以在代码中追加您自己的标志。
6.2.4 您可以对您开发的衍生作品进行收费。
6.2.5 第三方的用户可在遵循6.2所有条款下可继续在您开发的衍生作品基础上进行修改并发布。
6.3 您开发的衍生作品中独立于本软件开发的代码,可以源代码或二进制的方式进行发布,可免费或收费发布。
6.4 您开发的衍生作品不得以任何方式去除、隐藏或遮掩该软件的任一标志。
七、发布基于该软件API的应用
7.1 我欢迎并感谢您为该软件开发基于API的各种应用,比如客户端软件等。
7.2 您基于该软件API机制开发的应用,可以源代码或者二进制的方式进行发布,我对此没有任何限制。
7.3 您基于该软件API机制开发的应用,授权协议可以自行约定,我对此没有任何限制。
7.4 您基于该软件API机制开发的应用,可以免费或者收费发布,我对此没有任何限制。
八、授权例外
如果上述条款无法满足您使用该软件的要求,可联系我签署额外的合同以获得更灵活的授权许可。
九、合同约束
9.1 如果您违反了该协议的任一条款,该授权协议将自动终止,我保留通过法律手段追究责任的权利。
Z PUBLIC LICENSE 1.2
Authorization
Z PUBLIC LICENSE, also known as ZPL Agreement, is drafted by QingDao Nature Easy Soft Network Technology Co,LTD. (,www.cnezsoft.com).
Anyone can use the agreement to publish open source software, and modify the blank underlined part of the following text of the agreement accordingly.
No other text of the agreement shall be changed. QingDao Nature Easy Soft Network Technology Co,LTD has the final authority to interpret the terms of the agreement.
Preface
ZenTaoPMS (Hereinafter referred to as "the software") developed by Nature EasySoft Network Tecnology Co.ltd, QingDao, China (www.cnezsoft.com) (hereinafter referred to I). I'm entitled to all copyright of the software.
The software is released as open source software. You are authorized to use the software as long as you are in compliance with this agreement.
By installation of the software, you agree that a contractual relationship between you and me is automatically established.
You are obliged to fully comply with all the terms of this agreement unless you choose to stop using the software or you have signed additional contracts with me.
My Contact:
Contact: Mr. Xu
Phone: 4006-8899-23
Email: co@cnezsoft.com
QQ: 1492153927
Address: Qingdao Development Zone, the Oriental Kenzo C 1106
We agree:
Indications of the software include:
Notes, texts, pictures and links showing copyright attribution of the software in the source code and related documentation.
and texts, picture and links on the interface of the software when running.
Excluding
texts, picture and links on the interface of the demo versions of the software.
1. Disclaimer
The software is an open-source software, so you are authorized to use the software without paying a fee. Before you start to use it, please note:
1.1 I do not have any obligation to provide technical support for the software. You can contact me to purchase technical support service.
1.2 I'm not responsible for any liability caused by your using the software directly or indirectly.
1.3 Open source software does not mean it's free of charge, neither does it mean the software does not enjoy copyright.
2. For personal use
2.1 You or your company/organization are authorized to use the software for your internal use for both commercial and non-commercial purposes..
2.2 You or your company/organization are authorized to run the software on any number of computers.
2.3 You or your company/organization are authorized to modify the source code of the software to meet your requirements. You do not need to release the modified codes.
2.4 You or your company/organization must keep all the indications of the software when using it. None of the indications can be removed, hidden or obscured in any way.
3. For customized software
3.1 You are authorized to use the software to deploy various forms of application for your users in any way you like.
3.2 You are authorized to use the software to deploy any number of applications for your users.
3.3 You are authorized to modify the source code to meet your user's requirements without releasing the modified codes.
3.4 You are authorized to provide the modified codes to your users in either source code form or binary.
3.5 You must keep all the indications of the software when providing applications to your users.
3.6 None of the indications of the software may be removed, hidden or obscured in any way when you provide applications to your users.
4. Online service
4.1 You are authorized to use the software to build your online service for your users in any way you like.
4.2 You are authorized to use the software to build your online service for any number of your users.
4.3 You are authorized to modify the source codes of the software to meet your user's requirements on online service without releasing the modified codes.
4.4 You must notify your users clearly that your service is based on the software when you use it to build your online service.
4.5 You must keep all the indications of the software when providing online service to your users.
4.6 You must keep all the indications of the software in any application you make for your users. None of the indications can be hidden or obscured in any way.
4.7 You are forbidden from assisting your users by providing tools for your users to remove, hide or obscure any indication of the software when you use the software to build your online service.
5. Publish or integrate the software without modification
5.1 You are authorized to publish the software on your personal sites, corporate official website or other third-party sites.
5.2 You are authorized to integrate the software with other systems, such as cloud virtual machine images, operating system images and so on.
5.3 Do not modify the source code of the software when you publish or integrate it.
5.4 All indications of the software must be kept the same when you publish or integrate the software.
6. Publish derived work based on the software
6.1 You are authorized to develop derived work based on the software.
6.2 The modified codes of the software in your derived work must follow the following terms:
6.2.1 The source codes must be released if you make any modification to the software.
6.2.2 All indications of the software must be kept the same.
6.2.3 You are entitled to add your indications to the modified codes.
6.2.4 You are entitled to charge fees for the derived work you developed based on the software.
6.2.5 You agree to authorize third party users to modify and release the derived work in compliance with 6.2.
6.3 If the codes of the work are independently developed by yourself, You are authorized to release the work in either source code form or binary. You are entitled to charge your users or make it free.
6.4 None of the indications of the software can be removed, hidden or obscured in any way in the derived work you developed.
7. Publish applications based on API of the software
7.1 You are authorized to develop your applications based on the API of the software, for example, client software.
7.2 You are authorized to publish applications you developed based on the API in either source code form or binary.
7.3 You are authorized to use your own license to release applications you developed based on the API.
7.4 You are entitled to release applications you developed based on the API either free or with a charge.
8. Exceptions
If the terms above do not meet your requirements when using the software, please contact me for a more flexible license.
9. Termination
9.1 Violation of any of the terms of the agreement will result in immediate termination of this license. I reserve all rights to take legal actions in case of dispute.
You can choose ZPL or AGPL to use zentao.
+155 -66
View File
@@ -1,9 +1,18 @@
VERSION = $(shell head -n 1 VERSION)
XUANPATH = $(shell head -n 1 XUANPATH)
XUANVERSION = $(shell head -n 1 XUANVERSION)
XVERSION = $(shell head -n 1 XVERSION)
XUANVERSION = $(shell head -n 1 xuanxuan/XUANVERSION)
XVERSION = $(shell head -n 1 xuanxuan/XVERSION)
all: pms
#XUANPATH := $(XUANXUAN_SRC_PATH)
#BUILD_PATH := $(if $(ZENTAO_BUILD_PATH),$(ZENTAO_BUILD_PATH),$(shell pwd))
#RELEASE_PATH := $(if $(ZENTAO_RELEASE_PATH),$(ZENTAO_RELEASE_PATH),$(shell pwd))
XUANPATH := /home/gitlab-runner/ci/gitlab/xuan/
XUAN_WEB_PATH := /home/gitlab-runner/ci/packages/web
BUILD_PATH := /home/z/ci/pip_build/
RELEASE_PATH := /home/z/ci/pip_release/
all:
make clean
make ci
clean:
rm -fr zentaopms
rm -fr zentaostory
@@ -12,7 +21,12 @@ clean:
rm -fr *.tar.gz
rm -fr *.zip
rm -fr build/linux/lampp
rm -rf buildroot/
rm -fr lampp
rm -fr zentaoxx
rm -fr tmp/
rm -f *.sh
rm -f *.deb *.rpm
common:
mkdir zentaopms
cp -fr api zentaopms/
@@ -23,8 +37,9 @@ common:
cp -fr framework zentaopms/
cp -fr lib zentaopms/
cp -fr module zentaopms/
cp -fr extension zentaopms/
cp -fr sdk zentaopms/
cp -fr www zentaopms && rm -fr zentaopms/www/data/ && mkdir -p zentaopms/www/data/upload
cp -fr www zentaopms && rm -fr zentaopms/www/data/ && mkdir -p zentaopms/www/data/upload && mkdir zentaopms/www/data/course
mkdir zentaopms/tmp
mkdir zentaopms/tmp/cache/
mkdir zentaopms/tmp/extension/
@@ -41,7 +56,7 @@ common:
rm -fr zentaopms/tools
# create the restart file for svn.
# touch zentaopms/module/svn/restart
# delee the unused files.
# delete the unused files.
find zentaopms -name .gitkeep |xargs rm -fr
find zentaopms -name tests |xargs rm -fr
# notify.zip.
@@ -50,95 +65,107 @@ zentaoxx:
#xuanxuan
mkdir -p zentaoxx/config/ext
mkdir -p zentaoxx/lib
mkdir -p zentaoxx/module
mkdir -p zentaoxx/extension/xuan
mkdir -p zentaoxx/framework
mkdir -p zentaoxx/db
mkdir -p zentaoxx/www
mkdir -p zentaoxx/module/common/ext/model/
cd $(XUANPATH); git archive --format=zip --prefix=xuan/ $(XUANVERSION) > xuan.zip
mkdir -p zentaoxx/extension/xuan/common/ext/model/
cd $(XUANPATH); git pull; git archive --format=zip --prefix=xuan/ $(XUANVERSION) > xuan.zip
mv $(XUANPATH)/xuan.zip .
unzip xuan.zip
cp xuan/xxb/config/ext/_0_xuanxuan.php zentaoxx/config/ext/
cp -r xuan/xxb/lib/phpaes zentaoxx/lib/
cp -r xuan/xxb/framework/xuanxuan.class.php zentaoxx/framework/
cp -r xuan/xxb/db/*.sql zentaoxx/db/
cp -r xuan/xxb/module/im zentaoxx/module/
cp -r xuan/xxb/module/client zentaoxx/module/
cp -r xuan/xxb/module/license zentaoxx/module/
cp -r xuan/xxb/module/owt zentaoxx/module/
mkdir -p zentaoxx/module/common/view
cp -r xuan/xxb/module/common/view/header.modal.html.php zentaoxx/module/common/view
cp -r xuan/xxb/module/common/view/marked.html.php zentaoxx/module/common/view
cp -r xuan/xxb/module/common/view/footer.modal.html.php zentaoxx/module/common/view
cp -r xuan/xxb/module/common/view/version.html.php zentaoxx/module/common/view
cp -r xuan/xxb/module/license zentaoxx/module/
cp -r xuan/xxb/module/im zentaoxx/extension/xuan/
cp -r xuan/xxb/module/client zentaoxx/extension/xuan/
cp -r xuan/xxb/module/conference zentaoxx/extension/xuan/
cp -r xuan/xxb/module/integration zentaoxx/extension/xuan/
cp -r xuan/xxb/module/license zentaoxx/extension/xuan/
mkdir -p zentaoxx/extension/xuan/common/view
cp -r xuan/xxb/module/common/view/header.modal.html.php zentaoxx/extension/xuan/common/view
cp -r xuan/xxb/module/common/view/marked.html.php zentaoxx/extension/xuan/common/view
cp -r xuan/xxb/module/common/view/footer.modal.html.php zentaoxx/extension/xuan/common/view
cp -r xuan/xxb/module/common/view/version.html.php zentaoxx/extension/xuan/common/view
mkdir -p zentaoxx/www/js/
cp -r xuan/xxb/www/js/markedjs zentaoxx/www/js/
cp -r xuan/xxb/www/js/version.js zentaoxx/www/js/
cp -r xuan/xxb/www/x.php zentaoxx/www/
mkdir zentaoxx/module/action
cp -r xuan/xxb/module/action/ext zentaoxx/module/action
mkdir zentaoxx/extension/xuan/action
cp -r xuan/xxb/module/action/ext zentaoxx/extension/xuan/action
cp -r xuan/xxb/config/ext/_1_maps.php zentaoxx/config/ext/
cp -r xuanxuan/config/* zentaoxx/config/
cp -r xuanxuan/module/* zentaoxx/module/
cp -r xuanxuan/extension/xuan/* zentaoxx/extension/xuan/
cp -r xuanxuan/www/* zentaoxx/www/
cp -r $(XUAN_WEB_PATH) zentaoxx/www/data/xuanxuan/
mv zentaoxx/db/ zentaoxx/db_bak
mkdir zentaoxx/db/
cp zentaoxx/db_bak/upgradexuanxuan*.sql zentaoxx/db_bak/xuanxuan.sql zentaoxx/db/
rm -rf zentaoxx/db_bak/
sed -i "s/\$$accountAdmin = \$$this->dao->select('account, admin')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch();/\$$accountAdmin = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch();\n\$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$adminArray = explode(',', \$$admins);\n\$$accountAdmin->admin = in_array(\$$accountAdmin->account, \$$adminArray) ? 'super' : '';\n/" zentaoxx/extension/xuan/im/model/chat.php
sed -i "/->on('tc.ownedBy=tu.account')/{ N ; s/type/tc.type/}" zentaoxx/extension/xuan/im/model/chat.php
sed -i "s/\$$super = \$$this->dao->select('admin')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('admin');/\$$account = \$$this->dao->select('account')->from(TABLE_USER)->where('id')->eq(\$$userID)->fetch('account');\n\$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$adminArray = explode(',', \$$admins);\n\$$super = in_array(\$$account, \$$adminArray) ? 'super' : '';/g" zentaoxx/extension/xuan/im/control.php
sed -i "/foreach(\$$users as \$$user)/i \$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\$$adminArray = explode(',', \$$admins);" zentaoxx/extension/xuan/im/model/user.php
sed -i "/if(\!isset(\$$user->signed)) \$$user->signed = 0;/a \$$user->admin = in_array(\$$user->account, \$$adminArray) ? 'super' : '';" zentaoxx/extension/xuan/im/model/user.php
sed -i 's/XXBVERSION/$(XVERSION)/g' zentaoxx/config/ext/_0_xuanxuan.php
sed -i "/\$$config->xuanxuan->backend /c\\\$$config->xuanxuan->backend = 'zentao';" zentaoxx/config/ext/_0_xuanxuan.php
sed -i 's/site,//' zentaoxx/module/im/model/user.php
sed -i 's/admin, g/g/' zentaoxx/module/im/model/user.php
sed -i '/password = md5/d' zentaoxx/module/im/model/user.php
sed -i 's/md5(\$$user->password.*$$/\$$user->password;/g' zentaoxx/module/im/model/user.php
sed -i '/getSignedTime/d' zentaoxx/module/im/control.php
sed -i "/loadModel('push')/d" zentaoxx/module/im/control.php
sed -i "/this->push/d" zentaoxx/module/im/control.php
sed -i "s/(int)(microtime/(double)(microtime/" zentaoxx/module/im/control.php
sed -i "s/'yahoo', //g" zentaoxx/module/im/config.php
sed -i "s/'gtalk', //g" zentaoxx/module/im/config.php
sed -i "s/'wangwang', //g" zentaoxx/module/im/config.php
sed -i "s/'site', //g" zentaoxx/module/im/config.php
sed -i "s/'reload'/inlink('browse')/g" zentaoxx/module/client/control.php
sed -i 's/tree/dept/' zentaoxx/module/im/model.php
sed -i 's/tree/dept/' zentaoxx/module/im/control.php
sed -i 's/site,//' zentaoxx/extension/xuan/im/model/user.php
sed -i 's/admin, g/g/' zentaoxx/extension/xuan/im/model/user.php
sed -i '/password = md5/d' zentaoxx/extension/xuan/im/model/user.php
sed -i 's/md5(\$$user->password.*$$/\$$user->password;/g' zentaoxx/extension/xuan/im/model/user.php
sed -i '/getSignedTime/d' zentaoxx/extension/xuan/im/control.php
sed -i "/loadModel('push')/d" zentaoxx/extension/xuan/im/control.php
sed -i "/this->push/d" zentaoxx/extension/xuan/im/control.php
sed -i "s/(int)(microtime/(double)(microtime/" zentaoxx/extension/xuan/im/control.php
sed -i "s/'yahoo', //g" zentaoxx/extension/xuan/im/config.php
sed -i "s/'gtalk', //g" zentaoxx/extension/xuan/im/config.php
sed -i "s/'wangwang', //g" zentaoxx/extension/xuan/im/config.php
sed -i "s/'site', //g" zentaoxx/extension/xuan/im/config.php
sed -i "s/'reload'/inlink('browse')/g" zentaoxx/extension/xuan/client/control.php
sed -i 's/tree/dept/' zentaoxx/extension/xuan/im/model.php
sed -i 's/tree/dept/' zentaoxx/extension/xuan/im/control.php
sed -i 's/im_/zt_im_/g' zentaoxx/db/*.sql
sed -i 's/xxb_user/zt_user/g' zentaoxx/db/*.sql
sed -i 's/xxb_file/zt_file/g' zentaoxx/db/*.sql
sed -i '/xxb_entry/d' zentaoxx/db/*.sql
sed -i '/deviceToken/d' zentaoxx/db/*.sql
sed -i '/deviceType/d' zentaoxx/db/*.sql
sed -i "/fetch('push', 'pushMessage');/d" zentaoxx/module/im/control.php
#sed -i "s/marked\.html\.php';?>/marked\.html\.php';?>\n<div id='mainMenu' class='clearfix'><div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('xuanxuan');?><\/div><\/div>/g" zentaoxx/module/client/view/checkupgrade.html.php
sed -i '/var serverVersions/d' zentaoxx/module/client/js/checkupgrade.js
sed -i '/var currentVersion/d' zentaoxx/module/client/js/checkupgrade.js
sed -i '/setRequiredFields(/d' zentaoxx/module/common/view/header.modal.html.php
sed -i 's/header.html.php/header.lite.html.php/g' zentaoxx/module/common/view/header.modal.html.php
sed -i 's/footer.html.php/footer.lite.html.php/g' zentaoxx/module/common/view/footer.modal.html.php
sed -i 's/v\.//g' zentaoxx/module/im/js/debug.js
sed -i "/fetch('push', 'pushMessage');/d" zentaoxx/extension/xuan/im/control.php
#sed -i "s/marked\.html\.php';?>/marked\.html\.php';?>\n<div id='mainMenu' class='clearfix'><div class='btn-toolbar pull-left'><?php common::printAdminSubMenu('xuanxuan');?><\/div><\/div>/g" zentaoxx/extension/xuan/client/view/checkupgrade.html.php
sed -i '/var serverVersions/d' zentaoxx/extension/xuan/client/js/checkupgrade.js
sed -i '/var currentVersion/d' zentaoxx/extension/xuan/client/js/checkupgrade.js
sed -i '/setRequiredFields(/d' zentaoxx/extension/xuan/common/view/header.modal.html.php
sed -i 's/header.html.php/header.lite.html.php/g' zentaoxx/extension/xuan/common/view/header.modal.html.php
sed -i 's/footer.html.php/footer.lite.html.php/g' zentaoxx/extension/xuan/common/view/footer.modal.html.php
sed -i 's/v\.//g' zentaoxx/extension/xuan/im/js/debug.js
sed -i 's/helper::jsonEncode(/json_encode(/g' zentaoxx/framework/xuanxuan.class.php
sed -i "s/lang->goback,/lang->goback, '',/g" zentaoxx/module/im/view/debug.html.php
sed -i 's/v\.//g' zentaoxx/module/client/js/checkupgrade.js
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/module/im/control.php
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/module/im/model/conference.php
sed -i 's/moduleRoot/getExtensionRoot() . "xuan\/"/' zentaoxx/framework/xuanxuan.class.php
sed -i "s/lang->goback,/lang->goback, '',/g" zentaoxx/extension/xuan/im/view/debug.html.php
sed -i 's/v\.//g' zentaoxx/extension/xuan/client/js/checkupgrade.js
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/control.php
sed -i 's/commonModel::getLicensePropertyValue/extCommonModel::getLicensePropertyValue/g' zentaoxx/extension/xuan/im/model/conference.php
sed -i 's/xxb_/zt_/g' zentaoxx/db/*.sql
sed -i "s#\$this->app->getModuleRoot() . 'im/apischeme.json'#\$this->app->getExtensionRoot() . 'xuan/im/apischeme.json'#g" zentaoxx/extension/xuan/im/model.php
sed -i "s/'..\/..\/common\/view\/header.html.php'/\$$app->getModuleRoot() . 'common\/view\/header.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php
sed -i "s/'..\/..\/common\/view\/footer.html.php'/\$$app->getModuleRoot() . 'common\/view\/footer.html.php'/g" zentaoxx/extension/xuan/conference/view/admin.html.php
sed -i "s/\$$this->im->userGetChangedPassword()/array()/" zentaoxx/extension/xuan/im/control.php
echo "ALTER TABLE \`zt_user\` ADD \`pinyin\` varchar(255) NOT NULL DEFAULT '' AFTER \`realname\`;" >> zentaoxx/db/xuanxuan.sql
mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php
cp tools/en2de.php zentaoxx/tools; cd zentaoxx/tools; php en2de.php ../
cp tools/en2other.php zentaoxx/tools; cd zentaoxx/tools; php en2other.php ../
rm -rf zentaoxx/tools
zip -rqm -9 zentaoxx.$(VERSION).zip zentaoxx/*
rm -rf xuan.zip xuan zentaoxx
#zip -rqm -9 zentaoxx.$(VERSION).zip zentaoxx/*
#rm -rf xuan.zip xuan zentaoxx
rm -rf xuan.zip xuan
package:
# change mode.
chmod -R 777 zentaopms/tmp/
chmod -R 777 zentaopms/www/data
chmod -R 777 zentaopms/config
chmod -R 777 zentaopms/extension/custom
chmod 777 zentaopms/module
chmod 777 zentaopms/www
chmod a+rx zentaopms/bin/*
if [ ! -d "zentaopms/config/ext" ]; then mkdir zentaopms/config/ext; fi
for module in `ls zentaopms/module/`; do if [ ! -d "zentaopms/module/$$module/ext" ]; then mkdir zentaopms/module/$$module/ext; fi done
find zentaopms/ -name ext |xargs chmod -R 777
mkdir zentaopms/tools; cp tools/cn2tw.php zentaopms/tools; cd zentaopms/tools; php cn2tw.php
#rm -r zentaopms/module/misc/ext
@@ -148,7 +175,6 @@ pms:
make zentaoxx
unzip zentaoxx.*.zip
cp zentaoxx/* zentaopms/ -r
cat zentaoxx/db/xuanxuan.sql >> zentaopms/db/zentao.sql
make package
zip -rq -9 ZenTaoPMS.$(VERSION).zip zentaopms
rm -fr zentaopms zentaoxx zentaoxx.*.zip
@@ -162,7 +188,7 @@ deb:
cp ZenTaoPMS.${VERSION}.zip buildroot/opt
cd buildroot/opt; unzip ZenTaoPMS.${VERSION}.zip; mv zentaopms zentao; rm ZenTaoPMS.${VERSION}.zip
sed -i 's/index.php/\/zentao\/index.php/' buildroot/opt/zentao/www/.htaccess
sudo dpkg -b buildroot/ ZenTaoPMS_${VERSION}_1_all.deb
sudo dpkg -b buildroot/ ZenTaoPMS.${VERSION}.1.all.deb
rm -rf buildroot
rpm:
mkdir ~/rpmbuild/SPECS -p
@@ -184,14 +210,17 @@ en:
cd zentaopms/; grep -rl 'zentao.net'|xargs sed -i 's/zentao.net/zentao.pm/g';
cd zentaopms/; grep -rl 'http://www.zentao.pm'|xargs sed -i 's/http:\/\/www.zentao.pm/https:\/\/www.zentao.pm/g';
cd zentaopms/config/; echo >> config.php; echo '$$config->isINT = true;' >> config.php
make zentaoxx
unzip zentaoxx.*.zip
cp zentaoxx/* zentaopms/ -r
make package
mv zentaopms zentaoalm
zip -r -9 ZenTaoALM.$(VERSION).int.zip zentaoalm
rm -fr zentaoalm
echo $(VERSION).int > VERSION
make endeb
make enrpm
echo $(VERSION) > VERSION
#echo $(VERSION).int > VERSION
#make endeb
#make enrpm
#echo $(VERSION) > VERSION
endeb:
mkdir buildroot
cp -r build/debian/DEBIAN buildroot
@@ -220,10 +249,70 @@ enrpm:
rpmbuild -ba ~/rpmbuild/SPECS/zentaopms.spec
cp ~/rpmbuild/RPMS/noarch/zentaoalm-${VERSION}-1.noarch.rpm ./
rm -rf ~/rpmbuild
patchphpdoc:
sudo cp misc/doc/phpdoc/*.tpl /usr/share/php/data/PhpDocumentor/phpDocumentor/Converters/HTML/frames/templates/phphtmllib/templates/
phpdoc:
phpdoc -d bin,framework,config,lib,module,www -t api -o HTML:frames:phphtmllib -ti ZenTaoPMSAPI参考手册 -s on -pp on -i *test*
phpdoc -d bin,framework,config,lib,module,www -t api.chm -o chm:default:default -ti ZenTaoPMSAPI参考手册 -s on -pp on -i *test*
doxygen:
doxygen doc/doxygen/doxygen.conf
ciCommon:
git pull
make common
ifneq ($(XUANPATH), )
make zentaoxx
cp zentaoxx/* zentaopms/ -r
rm -rf zentaoxx
endif
make package
zip -rq -9 ZenTaoPMS.$(VERSION).zip zentaopms
# en
cd zentaopms/; grep -rl 'zentao.net'|xargs sed -i 's/zentao.net/zentao.pm/g';
cd zentaopms/; grep -rl 'http://www.zentao.pm'|xargs sed -i 's/http:\/\/www.zentao.pm/https:\/\/www.zentao.pm/g';
cd zentaopms/config/; echo >> config.php; echo '$$config->isINT = true;' >> config.php
mv zentaopms zentaoalm
zip -r -9 ZenTaoALM.$(VERSION).int.zip zentaoalm
rm -fr zentaoalm
# move pms zip to build and release path.
rm -f $(BUILD_PATH)/ZenTao*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION).int.zip
cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH)
cp ZenTaoPMS.$(VERSION).zip ZenTaoALM.$(VERSION).int.zip $(RELEASE_PATH)
cizip:
make common
ifneq ($(XUANPATH), )
make zentaoxx
cp zentaoxx/* zentaopms/ -r
rm -rf zentaoxx
endif
make package
zip -rq -9 ZenTaoPMS.$(VERSION).zip zentaopms
# en
cd zentaopms/; grep -rl 'zentao.net'|xargs sed -i 's/zentao.net/zentao.pm/g';
cd zentaopms/; grep -rl 'http://www.zentao.pm'|xargs sed -i 's/http:\/\/www.zentao.pm/https:\/\/www.zentao.pm/g';
cd zentaopms/config/; echo >> config.php; echo '$$config->isINT = true;' >> config.php
mv zentaopms zentaoalm
zip -r -9 ZenTaoALM.$(VERSION).int.zip zentaoalm
rm -fr zentaoalm
# move pms zip to build and release path.
rm -f $(BUILD_PATH)/ZenTao*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION).zip $(RELEASE_PATH)/ZenTaoALM.$(VERSION).int.zip
cp ZenTaoPMS.$(VERSION).zip $(BUILD_PATH)
cp ZenTaoPMS.$(VERSION).zip ZenTaoALM.$(VERSION).int.zip $(RELEASE_PATH)
# make zip packages.
php tools/packZip.php $(VERSION)
sh zip.sh
rm -rf tmp/ *.sh zentaobiz* zentaomax* $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/pmsPack/*.zip
mv ZenTaoPMS.$(VERSION).zip ZenTaoALM.$(VERSION).int.zip $(RELEASE_PATH)
mv ZenTaoALM.$(VERSION).int.php*.zip ZenTaoPMS.$(VERSION).php*.zip $(RELEASE_PATH)/pmsPack
ci:
make ciCommon
php tools/packZip.php $(VERSION)
sh zip.sh
rm -rf tmp/
php tools/packDeb.php $(VERSION)
sh deb.sh
rm -rf tmp/
php tools/packRpm.php $(VERSION)
sh rpm.sh
rm -rf tmp/
rm -rf zentaobiz* zentaomax* $(RELEASE_PATH)/ZenTaoALM.$(VERSION)*.zip $(RELEASE_PATH)/ZenTaoPMS.$(VERSION)*.zip $(RELEASE_PATH)/*.deb $(RELEASE_PATH)/*.rpm *.sh $(RELEASE_PATH)/pmsPack/*.zip $(RELEASE_PATH)/pmsPack/deb/* $(RELEASE_PATH)/pmsPack/rpm/*
mv ZenTaoPMS.$(VERSION).zip ZenTaoALM.$(VERSION).int.zip $(RELEASE_PATH)
mv ZenTaoALM.$(VERSION).int.php*.zip ZenTaoPMS.$(VERSION).php*.zip $(RELEASE_PATH)/pmsPack
mv *.deb $(RELEASE_PATH)/pmsPack/deb
mv *.rpm $(RELEASE_PATH)/pmsPack/rpm
+64 -30
View File
@@ -1,47 +1,81 @@
## 1. What is ZenTao?
English | [中文](Readme_zh.md)
ZenTao is an open source project management software, developed by Qingdao Nature Easy Soft Network Technology Co. Ltd. Combining product management, project management, QA management, document management, company management and todo management. It is a professional project management software, covering the core process of software development projects.
<p align="center"><a href="https://www.zentao.pm" target="_blank" rel="noopener noreferrer"><img src="doc/img/zentao-en.png" alt="ZenTao Logo"></a></p>
<p align="center">
<a href="https://www.php.net"><img src="https://img.shields.io/badge/php-%3E=5.6-brightgreen.svg?maxAge=2592000" alt="PHP Version"></a>
<a href="https://github.com/easysoft/zentaopms/releases/latest"><img src="https://img.shields.io/github/release/easysoft/zentaopms.svg" alt="Latest Version"></a>
<a href="mailto:chunsheng@easycorp.ltd"><img src="https://img.shields.io/badge/Email-chunsheng@easycorp.ltd-ea644a" alt="Email" /></a>
<a href="https://github.com/easysoft/zentaopms/blob/master/COPYING"><img src="https://img.shields.io/badge/License-AGPL%20or%20ZPL-blue" alt="ZenTao License"></a>
<a href="https://www.zentao.pm"><img src="https://img.shields.io/badge/Website-www.zentao.pm-blue" alt="ZenTao Website"></a>
</p>
ZenTao is practical and pragmatic. It has full features and beautiful interfaces, and is easy to use. ZenTao is well structured and can be flexibly extended. It also has powerful search features, various forms of statistical reports and complete API.
# Introduction
ZenTao is the first opensource project management software in China. It’s a comprehensive, all-in-one platform that covers the main PM process, from product and project management to quality management, documentation management, organization management, and office management.
ZenTao focuses on development project management!
Since its establishment in 2009, ZenTao has helped tens of thousands of teams and organizations improve their project management structures. Currently, ZenTao is being used by some of the largest companies in the world, ranging from those in the sectors of finance and telecoms to manufacturing and software development. They trust ZenTao for streamlining their processes, simplifying communication between clients and employees, increasing transparency, and improving productivity and efficiency.
## 2. Why is it called ZenTao?
# Design Philosophy
Zen(禅) and Tao(道) are the two Chinese characters that have rich meanings in both religion and culture. ZenTao Project Management Software takes the cultural meaning of Zen and Tao, and is expected to convey our understanding and thinking of management. Inspired by The Tao of Programming and The Zen of Programming, we named our software ZenTao.
The name ZenTao came from combining two Chinese characters, Zen(禅) and Tao(道), which have rich inspirations pertaining to culture and history. With its name referring to highly respected aspects of life, it’s only logical to convey their meaning in management by providing transparency, orderliness, and accessibility.
## 3. Design philosophy of ZenTao Project Management Software
ZenTao management concept is built on the 3 popular management methodologies: Scrum, Waterfall, and Kanban:
The main design philosophy of ZenTao Project Management Software is based on Scrum, an internationally popular Agile methodology. Scrum is very pragmatic and easy to operate, so it fits in the fast iterative development of software projects. However, Scrum only defines the core management framework. There are still many details and processes that have to be extended and developed. Based on the philosophy of Scrum and with the observation of the current development situations in China, ZenTao integrates bug management, test case management, release management and document management, and it completely covers the entire lifecycle of software development. In ZenTao, the concepts of product, project and test are clearly defined. Product team, development team and QA team coordinate and check with each other while they function differently. The three teams interact with each other through stories, tasks and bugs, and eventually deliver the product with quality.
- The Scrum model built-in ZenTao is adaptable and flexible, which perfectly matches the rapid iterations of software development projects.
- The Waterfall model built-in ZenTao lays emphasis on stages division and strict process control, which is ideal for projects that are well defined in advance and with fewer changes.
- The Kanban model built-in ZenTao pays more attention to value flow and visualization, which is suitable for the team with a transparent process and efficient transmission of information.
## 4. Why choose ZenTao Project Management Software?
ZenTao clearly defines the concepts of product, project, and QA to help the product owners, developers, and testers coordinate with each other while maintaining separate functionalities. Through stories, tasks, and bugs, the whole teams interact and track issues and improvements to ensure the delivery of quality products.
* ZenTao is a professional development project management software and cannot be replaced by any simple project management software.
* ZenTao has precise and pragmatic management philosphy, which will accelerate Agile development.
* ZenTao has full features as a project management software, so you don’t have to integrate several systems together, like mantisbt + trac + testlink.
* Open source codes and flexible extension mechanism. It is convenient to use and develop based on ZenTao.
* Underlying framework and frontend UI framework are developed independently; robust and stable with beautiful interface and friendly interaction.
* Perfect community mechanism; you can get technical support and help in time.
* Zero input, which means you have no risk for choosing ZenTao, compared with other commercial software that cost you thousands of dollars.
* Support various deployments, either private or cloud.
Besides, with ZenTao's feature-rich modules including data visualization, measurement, DevOps, Doc asset management, and automated testing, ZenTao offers flexible solutions to cover the entire process of software development, allows organizations to work efficiently and productivity, and helps them better control time, cost, and quality.
# Official Website
## 5. Features of ZenTao Project Management Software
- [Website](https://www.zentao.pm/)
- [Manual](https://www.zentao.pm/book/)
- [FAQ](https://www.zentao.pm/page/faq.html)
- [Extension](https://www.zentao.pm/extension-browse.html)
* Product management: including products, stories, plans, releases and roadmaps;
* Project management: including projects, tasks, teams, builds and burn-down charts;
* Quality management: including bugs, test cases, test tasks and test results;
* Document management: including product document library, project document library and customized document library;
* Work management: including to-do management and personal management, such as my tasks, my bugs, my story and my projects;
* Organization management: including department, users, groups and privileges;
* Statistics: various reports;
* Search: powerful search functions to help you find the data you need.
* Extension mechanism: extensible in almost any parts of ZenTao;
* API mechanism: convenient for integration with other systems.
# Demo
## 6. Website
- [ZenTao Opensource](https://demo15.zentao.pm)
- [ZenTao Biz](https://biz.demo15.zentao.pm)
- [ZenTao Max](https://max.demo15.zentao.pm)
Our website is: [www.zentao.pm](http://www.zentao.pm)
# Security Vulnerabilities
If you find any vulnerability in ZenTao system please feel free to contact us at chunsheng@easycorp.ltd. We do appreciate your time and effort.
# License
ZenTao is an opensource project management software licensed on [AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html) and [ZPL](http://zpl.pub/page/zplv12.html).
<details>
<summary><h1>Enhanced version<h1/></summary>
ZenTao Biz, ZenTao Max, and ZenTao Cloud are available for you if ZenTao Opensource can not meet your feature requirement.
> [Learn more about the comparison between ZenTao Opensource, ZenTao Biz, and ZenTao Max](https://www.zentao.pm/page/vs.html).
## ZenTao Biz
ZenTao Biz has more powerful functions based on the ZenTao Open Source. It also expands horizontally based on the project management process and covers more roles.
On the one hand, ZenTao Biz provides more complete services for enterprises and its enhanced functions are more suitable for the internal process management of the companies.
On the other hand, ZenTao Biz has more added functions such as operation and maintenance management, OA office management, feedback management, as well as document version management, and online preview. It can support the customer's related work more effectively outside the development process, and provide more comprehensive support for the project management process.
## ZenTao Max
ZenTao Max, the most advanced ZenTao version, allows users to easily monitor and track the entire process of project management. It also helps improve the robustness and maturity of enterprises to greatly increase the probability of project success.
The features such as process control, process definition, project measurement, issue management, risk management, quality assurance, and project reporting are strong enhanced in ZenTao Max. It's also supported the implementation of CMMI standards, help enterprises pass CMMI assessment.
## ZenTao Cloud
> Learn more about [ZenTao Cloud](https://www.zentao.pm/page/saas-pricing.html).
ZenTao Cloud provides a flexible solution for users who prefer the SaaS service and running businesses anywhere and anytime. It's easy to use and super convenient in that it only needs one click to activate an account. Besides, ZenTao Cloud requires no maintenance and will keep updating automatically. With HTTPS agreement, your data will keep safe and no worry about information disclosure. Even better, data on ZenTao Cloud will backup automatically and users can download the backup file at any time.
</details>
+77 -29
View File
@@ -1,41 +1,89 @@
一、什么是禅道项目管理软件?
[English](README.md) | 中文
禅道是第一款国产的开源项目管理软件。它集产品管理、项目管理、质量管理、文档管理、 组织管理和事务管理于一体,是一款专业的研发项目管理软件,完整地覆盖了项目管理的核心流程。禅道管理思想注重实效,软件架构合理,操作简洁高效,代码实现合理,内置灵活的扩展机制和api调用机制,支持多语言。
<p align="center"><a href="https://www.zentao.net" target="_blank" rel="noopener noreferrer"><img src="doc/img/zentao-cn.png" alt="ZenTao Logo"></a></p>
二、为什么用“禅道”这个名字?
<p align="center">
<a href="https://www.php.net"><img src="https://img.shields.io/badge/php-%3E=5.6-brightgreen.svg?maxAge=2592000" alt="PHP Version"></a>
<a href="https://github.com/easysoft/zentaopms/releases/latest"><img src="https://img.shields.io/github/release/easysoft/zentaopms.svg" alt="Latest Version"></a>
<a href="mailto:chunsheng@easycorp.ltd"><img src="https://img.shields.io/badge/Email-chunsheng@easycorp.ltd-ea644a" alt="Email" /></a>
<a href="https://github.com/easysoft/zentaopms/blob/master/COPYING"><img src="https://img.shields.io/badge/License-AGPL%20or%20ZPL-blue" alt="ZenTao License"></a>
<a href="https://www.zentao.net"><img src="https://img.shields.io/badge/Website-www.zentao.net-blue" alt="ZenTao Website"></a>
</p>
# 介绍
禅道是第一款国产的开源项目管理软件。它集产品管理、项目管理、质量管理、文档管理、 组织管理和事务管理于一体,是一款专业的研发项目管理软件,完整地覆盖了项目管理的核心流程。
禅道管理思想注重实效,功能完备丰富,操作简洁高效,界面美观大方,搜索功能强大,统计报表丰富多样,软件架构合理,扩展灵活,有完善的 API 可以调用。
# 设计理念
禅和道是中国文化中极具代表意义的两个字,是中国传统文化的结晶。我们之所以选用“禅道”作为我们软件的名字,是希望通过这两个字来传达我们对管理的理解和思考。我们希望通过禅道来进行的管理,可以摒弃繁文缛节,还原管理的本质!
三、禅道的设计理念
禅道项目管理软件的主要管理思想基于国际流行的`Scrum`模型、瀑布模型和看板模型三种项目管理方法:
禅道项目管理软件的主要管理思想基于国际流行的敏捷项目管理方 式——Scrum。scrum是一种注重实效的敏捷项目管理方式。它规定了核心的管理框架,但具体的细节还需要团队自行扩充。禅道在遵循其管理方式基础上,又融入了国内研发现状的很多需求,比如bug管理,测试用例管理,发布管理,文档管理等。因此禅道不仅仅是一款scrum敏捷项目管理工 具,更是一款完备的项目管理软件。基于scrum,又不局限于scrum。
- `Scrum`模型方法注重实效,操作性强,非常适合软件研发项目的快速迭代开发。
禅道还首次创造性的将产品、项目、测试这三者的概念明确分开,互相配合,又互相制约,通过需求、任务、bug来进行交相互动,终通过项目拿到合格的产品。
- 瀑布模型方法注重阶段清晰、流程严谨、范围可控,非常适合预先有明确定义且变动不大的产品研发管理。
四、选择禅道的八大理由:
1. 开源的软件,保证了您使用的放心和灵活。
2. 先进的管理思想,让您在竞争中拔得头筹。
3. 完备的管理功能,无需再整合其他多个系统。
4. 国产软件,中文支持,操作习惯更符合国人。
5. 灵活的扩展机制,可以保证您不局限于禅道自身的功能。
6. 日趋完善的社区机制,可以获得及时的技术支持和帮助,保证您无后顾之忧。
7. 几乎为零的投入,禅道作为开源软件,其投入几乎为零,相比动辄十几万的商业软件,您选择禅道没有任何风险。
8. 开发团队已经公司化运作,保证软件的持久发展。我们从04年从事开源软件开发以来,已经坚持了六年。
- 看板模型方式注重价值流转和可视化,非常适合流程公开透明和信息高效传递的团队。
五、禅道的功能列表:
禅道首次创造性的将产品、项目、测试这三者的概念明确分开,产品人员、开发团队、测试人员,三者分立,互相配合,又互相制约,通过需求、任务、`BUG` 来进行交相互动,终通过项目拿到合格的产品。
1. 产品管理:包括产品、需求、计划、发布、路线图等功能。
2. 项目管理:包括项目、任务、团队、build、燃尽图等功能。
3. 质量管理:包括bug、测试用例、测试任务、测试结果等功能。
4. 文档管理:包括产品文档库、项目文档库、自定义文档库等功能。
5. 事务管理:包括todo管理,我的任务、我的Bug、我的需求、我的项目等个人事务管理功能。
6. 组织管理:包括部门、用户、分组、权限等功能。
7. 统计功能:丰富的统计表。
8. 搜索功能:强大的搜索,帮助您找到相应的数据。
9. 灵活的扩展机制,几乎可以对禅道的任何地方进行扩展。
10. 强大的api机制,方便与其他系统集成。
在数据可视化、度量、`DevOPS`、文档资产管理和自动化测试等模块的加持下,禅道软件形成了项目流程管理、`DevOps`一体化、自动化测试等三大解决方案,完整的覆盖了产品研发的全生命周期管理,助力广大企业高效协作、降本提效。
也许您已经"众里寻她千百度",那么让禅道带给您“蓦然回首,那人却在灯火阑珊处”的惊喜吧!Let's zentao!
# 官方网站
禅道官方网站: [www.zentao.net](http://www.zentao.net)
- [官网](https://www.zentao.net)
- [文档](https://www.zentao.net/book/zentaopms.html)
- [常见问题](https://www.zentao.net/faq.html)
- [插件库](https://www.zentao.net/extension-browse.html)
## Demo
- [开源版](https://demo16.zentao.net)
- [企业版](https://biz.demo16.zentao.net)
- [旗舰版](http://zentaomax.demo.zentao.net)
# 安全漏洞
如果您发现禅道项目管理软件中存在安全漏洞,请发送电子邮件至禅道官方团队,电子邮件地址为 chunsheng@easycorp.ltd ,所有安全漏洞都会被及时的解决。
# 开源协议
禅道是一个基于 [AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html) 和 [ZPL](http://zpl.pub/page/zplv12.html) 双协议的开源项目管理软件。
----
也许您已经"众里寻她千百度",那么让禅道带给您"蓦然回首,那人却在灯火阑珊处"的惊喜吧!
<details>
<summary><h1>增强版本<h1/></summary>
如果开源版的功能不能满足您的需要,可以考虑禅道[企业版](https://www.zentao.net/page/enterprise.html)、[旗舰版](https://www.zentao.net/page/max.html)或[云禅道](https://www.chandao.net)。
## 企业版
> 前往查看[企业版和开源版的对比](https://www.zentao.net/page/enterprise.html#diff)。
禅道企业版是在禅道开源版的基础上增加增强功能的版本,该版本也基于项目管理的流程做了横向拓展,覆盖了更多的角色。
一方面,企业版可以企业提供更完善的服务;增强功能更加适合企业的内部流程化管理。
另一方面,企业版还增加了运维管理、OA办公管理、反馈管理,以及文档的版本管理及在线预览等功能,可以更有效地支持客户在研发管理流程之外的相关工作,为企业项目管理流程提供更全面的支撑。
## 旗舰版
> 前往查看[旗舰版功能对比](https://www.zentao.net/page/max.html#diff)。
旗舰版作为禅道最高的版本系列,可以完整覆盖项目管理的各个过程,帮助企业建立研发管理体系,提高企业管理流程的稳健性和项目管理成熟度,大大增加项目成功的概率。
旗舰版增强了流程控制、过程定义、项目度量、问题管理、风险管控、质量保证、项目报告等方面的功能,同时可以支持CMMI标准的落地实施,帮助企业通过CMMI评估,提升研发管理能力。
## 云禅道
> 前往了解和体验[云禅道](https://www.chandao.net)。
云禅道是禅道企业版和旗舰版的 SaaS 服务,使用便捷,一键即可开通,无需维护,禅道版本自动升级;资源与服务支持灵活扩容,资源按需购买;提供覆盖全国的CDN服务,访问更快;HTTPS协议加密,更加安全;数据自动备份,随时下载备份至本地。
</details>
+1 -1
View File
@@ -1 +1 @@
16.0
17.6.2
+5 -4
View File
@@ -3,7 +3,7 @@
* The bug entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -32,8 +32,9 @@ class bugEntry extends entry
$bug = $data->data->bug;
/* Set product name */
$bug->productName = $data->data->product->name;
/* Set product name and status */
$bug->productName = $data->data->product->name;
$bug->productStatus = $data->data->product->status;
/* Set module title */
$moduleTitle = '';
@@ -92,7 +93,7 @@ class bugEntry extends entry
$oldBug = $this->loadModel('bug')->getByID($bugID);
/* Set $_POST variables. */
$fields = 'title,project,execution,openedBuild,assignedTo,pri,severity,type,story,resolvedBy,closedBy,resolution,product,plan,task';
$fields = 'uid,title,project,execution,openedBuild,assignedTo,pri,severity,type,story,resolvedBy,closedBy,resolution,product,plan,task,module,steps,mailto,keywords';
$this->batchSetPost($fields, $oldBug);
$this->setPost('notifyEmail', implode(',', $this->request('notifyEmail', array())));
+38
View File
@@ -0,0 +1,38 @@
<?php
/**
* The bug active entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
**/
class bugActiveEntry extends Entry
{
/**
* POST method.
*
* @param int $bugID
* @access public
* @return void
*/
public function post($bugID)
{
$fields = 'assignedTo,uid,openedBuild,comment';
$this->batchSetPost($fields);
$control = $this->loadController('bug', 'activate');
$control->activate($bugID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$bug = $this->loadModel('bug')->getByID($bugID);
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
/**
* The bug assign entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
**/
class bugAssignEntry extends Entry
{
/**
* POST method.
*
* @param int $bugID
* @access public
* @return void
*/
public function post($bugID)
{
$fields = 'assignedTo,mailto,comment';
$this->batchSetPost($fields);
$control = $this->loadController('bug', 'assignTo');
$control->assignTo($bugID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$bug = $this->loadModel('bug')->getByID($bugID);
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
/**
* The bug close entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
**/
class bugCloseEntry extends Entry
{
/**
* POST method.
*
* @param int $bugID
* @access public
* @return void
*/
public function post($bugID)
{
$fields = 'comment';
$this->batchSetPost($fields);
$control = $this->loadController('bug', 'close');
$control->close($bugID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$bug = $this->loadModel('bug')->getByID($bugID);
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
/**
* The bug confirm entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class bugConfirmEntry extends Entry
{
/**
* POST method.
*
* @param int $bugID
* @access public
* @return void
**/
public function post($bugID)
{
$fields = 'assignedTo,mailto,comment,pri,type';
$this->batchSetPost($fields);
$control = $this->loadController('bug', 'confirmBug');
$control->confirmBug($bugID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$bug = $this->loadModel('bug')->getById($bugID);
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+61
View File
@@ -0,0 +1,61 @@
<?php
/**
* The bug recordEstimate entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class bugRecordEstimateEntry extends Entry
{
/**
* GET method.
*
* @param int $bugID
* @access public
* @return void
*/
public function get($bugID)
{
if($this->config->edition == 'open') return $this->send400('ZenTaoPMS does not have bug effort function.');
$control = $this->loadController('effort', 'createForObject');
$control->createForObject('bug', $bugID);
$data = $this->getData();
if(!$data) return $this->error('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$effort = $data->data->efforts;
$this->send(200, array('effort' => $effort));
}
/**
* POST method.
*
* @param int $bugID
* @access public
* @return void
*/
public function post($bugID)
{
if($this->config->edition == 'open') return $this->send400('ZenTaoPMS does not have bug effort function.');
$fields = 'id,dates,consumed,objectType,objectID,work';
$this->batchSetPost($fields);
$control = $this->loadController('effort', 'createForObject');
$control->createForObject('bug', $bugID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$bug = $this->loadModel('bug')->getByID($bugID);
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
/**
* The bug resolve entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
**/
class bugResolveEntry extends Entry
{
/**
* POST method.
*
* @param int $bugID
* @access public
* @return void
*/
public function post($bugID)
{
$fields = 'resolution,resolvedBuild,resolvedDate,duplicateBug,assignedTo,uid,comment';
$this->batchSetPost($fields);
$control = $this->loadController('bug', 'resolve');
$control->resolve($bugID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$bug = $this->loadModel('bug')->getByID($bugID);
$this->send(200, $this->format($bug, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,resolvedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+17 -2
View File
@@ -3,7 +3,7 @@
* The bugs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -33,6 +33,7 @@ class bugsEntry extends entry
$bugs = $data->data->bugs;
$pager = $data->data->pager;
$result = array();
$this->loadModel('product');
foreach($bugs as $bug)
{
$status = array('code' => $bug->status, 'name' => $this->lang->bug->statusList[$bug->status]);
@@ -42,6 +43,9 @@ class bugsEntry extends entry
$bug->status = $status['code'];
$bug->statusName = $status['name'];
$product = $this->product->getById($bug->product);
$bug->productStatus = $product->status;
$result[$bug->id] = $this->format($bug, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool');
}
@@ -79,9 +83,20 @@ class bugsEntry extends entry
if(!$productID and isset($this->requestBody->product)) $productID = $this->requestBody->product;
if(!$productID) return $this->sendError(400, 'Need product id.');
$fields = 'title,project,execution,openedBuild,assignedTo,pri,severity,type,story';
$fields = 'title,project,execution,openedBuild,assignedTo,pri,module,severity,type,story,task,mailto,keywords,steps,uid';
$this->batchSetPost($fields);
$caseID = $this->request('case', 0);
if($caseID)
{
$case = $this->loadModel('testcase')->getById($caseID);
if($case)
{
$this->setPost('case', $case->id);
$this->setPost('caseVersion', $case->version);
}
}
$this->setPost('product', $productID);
$this->setPost('notifyEmail', implode(',', $this->request('notifyEmail', array())));
+1 -1
View File
@@ -3,7 +3,7 @@
* The build entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+2 -2
View File
@@ -3,7 +3,7 @@
* The builds entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -53,7 +53,7 @@ class buildsEntry extends entry
$project = $this->loadModel('project')->getByID($projectID);
if(!$project) return $this->send404();
$fields = 'execution,product,name,builder,date,scmPath,filePath,desc';
$fields = 'execution,product,name,builder,date,scmPath,filePath,desc,branch';
$this->batchSetPost($fields);
$control = $this->loadController('build', 'create');
+30
View File
@@ -0,0 +1,30 @@
<?php
/**
* The ciresults entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class ciresultsEntry extends entry
{
/**
* POST method.
*
* @access public
* @return void
*/
public function post()
{
$control = $this->loadController('ci', 'commitResult');
$control->commitResult();
$data = $this->getData();
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
$this->send(201, array());
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
* The config entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+9 -6
View File
@@ -3,7 +3,7 @@
* The configs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -21,11 +21,14 @@ class configsEntry extends baseEntry
{
$configs = array();
$configs[] = array('key' => 'language', 'value' => $this->config->default->lang);
$configs[] = array('key' => 'version', 'value' => $this->config->version);
$configs[] = array('key' => 'charset', 'value' => $this->config->charset);
$configs[] = array('key' => 'timezone', 'value' => $this->config->timezone);
$configs[] = array('key' => 'systemMode', 'value' => $this->config->systemMode);
$configs[] = array('key' => 'language', 'value' => $this->config->default->lang);
$configs[] = array('key' => 'version', 'value' => $this->config->version);
$configs[] = array('key' => 'charset', 'value' => $this->config->charset);
$configs[] = array('key' => 'timezone', 'value' => $this->config->timezone);
$configs[] = array('key' => 'systemMode', 'value' => $this->config->systemMode);
$configs[] = array('key' => 'hourUnit', 'value' => $this->config->hourUnit);
$configs[] = array('key' => 'CRProduct', 'value' => $this->config->CRProduct);
$configs[] = array('key' => 'CRExecution', 'value' => $this->config->CRExecution);
$this->send(200, $configs);
}
+1 -1
View File
@@ -3,7 +3,7 @@
* The department entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The departments entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The doc entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The doclibs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The docs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The error entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+16 -4
View File
@@ -3,7 +3,7 @@
* The execution entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -21,6 +21,7 @@ class executionEntry extends Entry
public function get($executionID)
{
$fields = $this->param('fields');
$status = $this->param('status', 'all');
$control = $this->loadController('execution', 'view');
$control->view($executionID);
@@ -36,6 +37,8 @@ class executionEntry extends Entry
$execution->products = array();
foreach($data->data->products as $productID => $executionProduct)
{
if($status == 'noclosed' and $executionProduct->status == 'closed') continue;
$product = new stdclass();
$product->id = $executionProduct->id;
$product->name = $executionProduct->name;
@@ -43,8 +46,8 @@ class executionEntry extends Entry
foreach($executionProduct->plans as $planID)
{
$plan = new stdclass();
$plan->id = $planID;
$plan->name = $data->data->planGroups->{$productID}->{$planID};
$plan->id = trim($planID, ',');
$plan->name = $data->data->planGroups->{$productID}->{$plan->id};
$product->plans[] = $plan;
}
$execution->products[] = $product;
@@ -71,6 +74,8 @@ class executionEntry extends Entry
{
$execution->modules = $data->data->tree;
}
case 'builds':
$execution->builds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,noterminate,nodone', $executionID, 'execution');
break;
case 'moduleoptionmenu':
$execution->moduleOptionMenu = $this->loadModel('tree')->getTaskOptionMenu($executionID, 0, 0, 'allModule');
@@ -93,6 +98,10 @@ class executionEntry extends Entry
$dynamics = $data->data->dynamics;
$execution->dynamics = $this->loadModel('action')->processDynamicForAPI($dynamics);
break;
case 'chartdata':
list($dateList, $interval) = $this->loadModel('execution')->getDateList($execution->begin, $execution->end, 'noweekend', '0', 'Y-m-d');
$execution->chartData = $this->execution->buildBurnData($executionID, $dateList, 'noweekend', 'left');
break;
}
}
@@ -111,11 +120,14 @@ class executionEntry extends Entry
$oldExecution = $this->loadModel('execution')->getByID($executionID);
/* Set $_POST variables. */
$fields = 'project,code,name,begin,end,lifetime,desc,days,acl,status';
$fields = 'project,code,name,begin,end,lifetime,desc,days,acl,status,PO,PM,QD,RD';
$this->batchSetPost($fields, $oldExecution);
$this->setPost('whitelist', $this->request('whitelist', explode(',', $oldExecution->whitelist)));
$products = $this->loadModel('product')->getProducts($executionID);
$this->setPost('products', $this->request('products', array_keys($products)));
$control = $this->loadController('execution', 'edit');
$control->edit($executionID);
+6 -2
View File
@@ -3,7 +3,7 @@
* The execution bugs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -24,7 +24,7 @@ class executionBugsEntry extends entry
if(empty($executionID)) return $this->sendError(400, 'Need execution id.');
$control = $this->loadController('execution', 'bug');
$control->bug($executionID, $this->param('product', 0), $this->param('order', 'status,id_desc'), $this->param('build', 0), $this->param('status', 'all'), 0, 0, $this->param('limit', 20), $this->param('page', 1));
$control->bug($executionID, $this->param('product', 0), $this->param('branch', 0), $this->param('order', 'status,id_desc'), $this->param('build', 0), $this->param('status', 'all'), 0, 0, $this->param('limit', 20), $this->param('page', 1));
$data = $this->getData();
@@ -33,6 +33,7 @@ class executionBugsEntry extends entry
$bugs = $data->data->bugs;
$pager = $data->data->pager;
$result = array();
$this->loadModel('product');
foreach($bugs as $bug)
{
$status = array('code' => $bug->status, 'name' => $this->lang->bug->statusList[$bug->status]);
@@ -42,6 +43,9 @@ class executionBugsEntry extends entry
$bug->status = $status['code'];
$bug->statusName = $status['name'];
$product = $this->product->getById($bug->product);
$bug->productStatus = $product->status;
$result[$bug->id] = $this->format($bug, 'activatedDate:time,openedDate:time,assignedDate:time,resolvedDate:time,closedDate:time,lastEditedDate:time,deadline:date,deleted:bool');
}
+1 -1
View File
@@ -3,7 +3,7 @@
* The execution builds entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+3 -3
View File
@@ -3,7 +3,7 @@
* The execution cases entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -24,7 +24,7 @@ class executionCasesEntry extends entry
if(empty($executionID)) return $this->sendError(400, 'Need execution id.');
$control = $this->loadController('execution', 'testcase');
$control->testcase($executionID, $this->param('status', 'all'), $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
$control->testcase($executionID, $this->param('product', 0), $this->param('branch', 0), $this->param('status', 'all'), $this->param('module', 0), $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
$data = $this->getData();
@@ -35,7 +35,7 @@ class executionCasesEntry extends entry
$result = array();
foreach($cases as $case)
{
$case->statusName = 'name' => $this->lang->testcase->statusList[$case->status];
$case->statusName = $this->lang->testcase->statusList[$case->status];
$result[] = $this->format($case, 'openedDate:time,reviewedDate:date,lastEditedDate:time,lastRunDate:time');
}
+2 -2
View File
@@ -3,7 +3,7 @@
* The executions entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -41,7 +41,7 @@ class executionsEntry extends entry
else
{
$control = $this->loadController('execution', 'all');
$control->all($this->param('status', 'all'), $this->param('project', $projectID), $this->param('order', 'id_desc'), 0, 0, $this->param('limit', 20), $this->param('page', 1));
$control->all($this->param('status', 'all'), $this->param('order', 'id_desc'), 0, '', 0, $this->param('limit', 20), $this->param('page', 1));
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->sendError(400, 'error');
+5 -1
View File
@@ -3,7 +3,7 @@
* The execution entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package execution
* @version 1
@@ -32,8 +32,12 @@ class executionStoriesEntry extends entry
$stories = $data->data->stories;
$pager = $data->data->pager;
$result = array();
$this->loadModel('product');
foreach($stories as $story)
{
$product = $this->product->getById($story->product);
$story->productStatus = $product->status;
$result[] = $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList');
}
return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'stories' => $result));
+85
View File
@@ -0,0 +1,85 @@
<?php
/**
* The product entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class feedbackEntry extends Entry
{
/**
* GET method.
*
* @param int $feedbackID
* @access public
* @return void
*/
public function get($feedbackID)
{
$control = $this->loadController('feedback', 'adminView');
$control->adminView($feedbackID);
$data = $this->getData();
$feedback = $data->data->feedback;
$feedback->publicStatus = $feedback->public;
$feedback->productName = $data->data->product;
$feedback->moduleName = isset($data->data->modulePath[0]->name) ? $data->data->modulePath[0]->name : '/';
$feedback->resultType = $data->data->type;
if(isset($feedback->resultInfo) and $feedback->resultInfo->deleted == 0) $feedback->resultStatus = $this->loadModel('feedback')->processStatus($feedback->resultType, $feedback->resultInfo);
if(!$data or !isset($data->status)) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$feedback->actions = $this->loadModel('action')->processActionForAPI($data->data->actions, $data->data->users, $this->lang->feedback);
$this->send(200, $this->format($feedback, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
}
/**
* PUT method.
*
* @param int $feedbackID
* @access public
* @return void
*/
public function put($feedbackID)
{
$oldFeedback = $this->loadModel('feedback')->getById($feedbackID);
$fields = 'module,product,type,title,public,desc,status,feedbackBy,notifyEmail,notify,uid';
$this->batchSetPost($fields, $oldFeedback);
$control = $this->loadController('feedback', 'edit');
$control->edit($feedbackID, '');
$data = $this->getData();
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
if(!isset($data->result)) return $this->sendError(400, 'error');
$feedback = $this->feedback->getByID($feedbackID);
return $this->send(200, $this->format($feedback, 'openedBy:user,openedDate:time,reviewedBy:user,reviewedDate:time,processedBy:user,processedDate:time,closedBy:user,closedDate:time,editedBy:user,editedDate:time,mailto:userList,deleted:bool'));
}
/**
* DELETE method.
*
* @param int $feedbackID
* @access public
* @return void
*/
public function delete($feedbackID)
{
$control = $this->loadController('feedback', 'delete');
$control->delete($feedbackID, 'yes');
$this->getData();
$this->sendSuccess(200, 'success');
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
/**
* The feedback assignto entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class feedbackAssignToEntry extends Entry
{
/**
* POST method.
*
* @param int $feedbackID
* @access public
* @return void
*/
public function post($feedbackID)
{
$feedback = $this->loadModel('feedback')->getById($feedbackID);
$fields = 'assignedTo,comment,mailto';
$this->batchSetPost($fields);
$control = $this->loadController('feedback', 'assignTo');
$control->assignTo($feedbackID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$feedback = $this->loadModel('feedback')->getById($feedbackID);
$this->send(200, $this->format($feedback, 'activatedDate:time,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,mailto:userList,resolvedBy:user,resolvedDate:time,closedBy:user,closedDate:time,lastEditedBy:user,lastEditedDate:time,deadline:date,deleted:bool'));
}
}
+41
View File
@@ -0,0 +1,41 @@
<?php
/**
* The feedback close entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class feedbackCloseEntry extends Entry
{
/**
* POST method.
*
* @param int $feedbackID
* @access public
* @return void
*/
public function post($feedbackID)
{
$feedback = $this->loadModel('feedback')->getById($feedbackID);
$fields = 'closedReason,comment';
$this->batchSetPost($fields);
if(empty($_POST)) $this->setPost('status', 'closed');
$control = $this->loadController('feedback', 'close');
$control->close($feedbackID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$feedback = $this->loadModel('feedback')->getById($feedbackID);
$this->send(200, $feedback);
}
}
+97
View File
@@ -0,0 +1,97 @@
<?php
/**
* The executions entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class feedbacksEntry extends entry
{
/**
* GET method.
*
* @access public
* @return void
*/
public function get()
{
if(strpos(strtolower($this->param('fields')), 'moduleandproduct') !== false) return $this->getModuleAndProduct();
$control = $this->loadController('feedback', 'admin');
$control->admin($this->param('status', 'unclosed'), 0, $this->param('orderBy', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->sendError(400, 'error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(400, $data->message);
$feedbacks = $data->data->feedbacks;
$pager = $data->data->pager;
$result = array();
foreach($feedbacks as $feedback)
{
$result[] = $this->format($feedback, 'openedBy:user,openedDate:time,reviewedBy:user,reviewedDate:time,processedBy:user,processedDate:time,closedBy:user,closedDate:time,editedBy:user,editedDate:time,assignedTo:user,mailto:userList,deleted:bool');
}
$data = array();
$data['page'] = $pager->pageID;
$data['total'] = $pager->recTotal;
$data['limit'] = $pager->recPerPage;
$data['feedbacks'] = $result;
return $this->send(200, $data);
}
/**
* POST method.
*
* @access public
* @return void
*/
public function post()
{
$fields = 'module,product,type,title,public,desc,status,feedbackBy,notify,uid';
$this->batchSetPost($fields);
$this->setPost('notifyEmail', $this->request('notifyEmail', ''));
$control = $this->loadController('feedback', 'create');
$this->requireFields('title,product');
$control->create();
$data = $this->getData();
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
$feedback = $this->loadModel('feedback')->getById($data->id);
$this->send(201, $this->format($feedback, 'openedBy:user,openedDate:time,reviewedBy:user,reviewedDate:time,processedBy:user,processedDate:time,closedBy:user,closedDate:time,editedBy:user,editedDate:time,assignedTo:user,assignedDate:time,feedbackBy:user,mailto:userList,deleted:bool'));
}
/**
* GET method.
*
* @access public
* @return void
*/
public function getModuleAndProduct()
{
$control = $this->loadController('feedback', 'create');
$control->create();
$data = $this->getData();
$modules = $data->data->modules;
$products = $data->data->products;
$data = array();
$data['modules'] = $modules;
$data['products'] = $products;
return $this->send(200, $data);
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
* The file entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+2 -2
View File
@@ -3,7 +3,7 @@
* The files entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -29,6 +29,6 @@ class filesEntry extends Entry
if(!$data or !isset($data->status)) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$this->send(200, array('id' => $data->id));
$this->send(200, array('id' => $data->id, 'url' => $data->url));
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
* The repo entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author xiawenlong <xiawenlong@cnezsoft.com>
* @package repo
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The groups entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The issue entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The issues entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+52
View File
@@ -0,0 +1,52 @@
<?php
/**
* The jobs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yanyi Cao <caoyanyi@easycorp.ltd>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class jobsEntry extends entry
{
/**
* GET method.
*
* @access public
* @return void
*/
public function get()
{
$control = $this->loadController('job', 'browse');
$pipeline = $this->param('pipeline', '');
$orderBy = $this->param('order', 'id_desc');
if(empty($pipeline))
{
$control->browse($orderBy, 0, $this->param('limit', 100), $this->param('page', 1));
/* Response */
$data = $this->getData();
if(isset($data->status) and $data->status == 'success')
{
$result = array();
$pager = $data->data->pager;
$jobs = $data->data->jobList;
foreach($jobs as $job) $result[] = $this->format($job, 'deleted:bool,lastSync:datetime,synced:bool,product:idList');
return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'jobs' => $result));
}
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
}
else
{
$jobs = $this->loadModel('job')->getList($orderBy, null, $this->param('engine', 'jenkins'), $pipeline);
return $this->send(200, array('jobs' => array_values($jobs)));
}
return $this->sendError(400, 'error');
}
}
+34 -2
View File
@@ -3,7 +3,7 @@
* The langs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -28,22 +28,54 @@ class langsEntry extends entry
if(empty($language)) $language = 'zh-cn';
$this->app->setClientLang($language);
global $filter;
$rule = $filter->default->moduleName;
$modules = explode(',', $modules);
foreach($modules as $module)
{
if($module == 'all')
{
$loadedModule = array();
foreach(glob($this->app->getModuleRoot() . '*') as $modulePath)
{
if(!is_dir($modulePath)) continue;
$moduleName = basename($modulePath);
if(!validater::checkByRule($moduleName, $rule)) continue;
$this->app->loadLang($moduleName);
$loadedModule[$moduleName] = $moduleName;
}
foreach(glob($this->app->getExtensionRoot() . '*') as $extensionPath)
{
if(!is_dir($extensionPath)) continue;
$edition = basename($extensionPath);
if($edition == 'lite') continue;
if($edition == 'biz' or $edition == 'max')
{
if($this->config->edition == 'open') continue;
if($this->config->edition != 'open' and $this->config->edition != $edition) continue;
}
foreach(glob($extensionPath . '/*') as $modulePath)
{
if(!is_dir($modulePath)) continue;
$moduleName = basename($modulePath);
if(!validater::checkByRule($moduleName, $rule)) continue;
if(isset($loadedModule[$moduleName])) continue;
$this->app->loadLang($moduleName);
$loadedModule[$moduleName] = $moduleName;
}
}
break;
}
$this->app->loadLang($module);
if(validater::checkByRule($module, $rule)) $this->app->loadLang($module);
}
return $this->send(200, $this->lang);
+1 -1
View File
@@ -3,7 +3,7 @@
* The meetings entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+43
View File
@@ -0,0 +1,43 @@
<?php
/**
* The modules entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class modulesEntry extends Entry
{
/**
* Get method.
*
* @access public
* @return void
*/
public function get()
{
$objectType = $this->param('type', '');
$objectID = $this->param('id', '');
if(!$objectType or !$objectID) return $this->sendError(400, 'Need id and type.');
if(!in_array($objectType, array('story', 'task', 'bug', 'case'))) return $this->sendError(400, 'Type is not allowed');
if($objectType == 'task')
{
$control = $this->loadController('tree', 'browsetask');
$control->browseTask($objectID);
}
else
{
$control = $this->loadController('tree', 'browse');
$control->browse($objectID, $objectType);
}
$data = $this->getData();
if(isset($data->status) and $data->status == 'success') return $this->send(200, array('modules' => $data->data->tree));
return $this->send400(isset($data->message) ? $data->message: 'error');
}
}
+33
View File
@@ -0,0 +1,33 @@
<?php
/**
* The mr entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author liyuchun <liyuchun@easysoft.ltd>
* @package repo
* @version 1
* @link http://www.zentao.net
*/
class mrEntry extends baseEntry
{
/**
* Create mr.
*
* @access public
* @return void
*/
public function post()
{
$fields = 'repoID,jobID,sourceBranch,targetBranch,diffs,mergeStatus';
$this->batchSetPost($fields);
$postData = fixer::input('post')->get();
$this->loadController('mr', 'create');
$MRID = $this->loadModel('mr')->apiCreate();
if(dao::isError()) $this->sendError(400, dao::getError());
$MR = $this->mr->getByID($MRID);
$this->send(201, $MR);
}
}
+46
View File
@@ -0,0 +1,46 @@
<?php
/**
* The options entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class optionsEntry extends entry
{
/**
* GET method.
*
* @param string $type
* @access public
* @return void
*/
public function get($type = '')
{
if(!$type) return $this->sendError(400, 'error');
$options = array();
switch($type)
{
case 'bug':
$this->app->loadLang('bug');
$options['type'] = $this->lang->bug->typeList;
$options['pri'] = $this->lang->bug->priList;
$options['severity'] = $this->lang->bug->severityList;
$options['modules'] = new stdclass();
$product = $this->param('product', 0);
if($product) $options['modules'] = $this->loadModel('tree')->getOptionMenu($product, 'bug');
$execution = $this->param('execution', 0);
$options['build'] = $this->loadModel('build')->getBuildPairs($product, 'all', '', $execution, 'execution');
break;
}
return $this->send(200, array('options' => $options));
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
* The ping entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+33
View File
@@ -0,0 +1,33 @@
<?php
/**
* The pipeline entry point of ZenTaoPMS.
* It is only used by Zcli.
*
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yanyi Cao <caoyanyi@easycorp.ltd>
* @package pipeline
* @version 1
* @link http://www.zentao.net
*/
class pipelinesEntry extends entry
{
/**
* GET method.
*
* @access public
* @return void
*/
public function get()
{
$pipeline = $this->param('pipeline', '');
$repoUrl = $this->param('repoUrl', '');
if(empty($pipeline) and empty($repoUrl)) return $this->sendError(400, 'The parameter is incorrect!');
$repo = $this->loadModel('repo')->getRepoByUrl($repoUrl, $pipeline);
if(empty($repo['data'])) return $this->sendError(400, $repo['message']);
return $this->send(200, array('status' => 'success', 'repo' => $repo['data']));
}
}
+21 -3
View File
@@ -3,7 +3,7 @@
* The product entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -51,14 +51,32 @@ class productEntry extends Entry
$product->modules = $data->data->tree;
}
break;
case 'execution':
$product->execution = $this->loadModel('product')->getExecutionPairsByProduct($productID);
break;
case 'bugstatistic':
$product->bugStatistic = $this->loadModel('bug')->getStatistic($productID);
break;
case 'moduleoptionmenu':
$modules = $this->loadModel('tree')->getOptionMenu($productID, $this->param('moduleType', 'story'));
$product->moduleOptionMenu = array();
foreach($modules as $id => $name) $product->moduleOptionMenu[] = array('id' => $id, 'name' => $name);
break;
case 'parentstories':
$product->parentstories= $this->loadModel('story')->getParentStoryPairs($productID);
break;
case 'builds':
$product->builds = $this->loadModel('build')->getBuildPairs($productID, 'all', 'noempty,noterminate,nodone,withbranch', $this->param('object', 0), $this->param('objectType', 'execution'));
break;
case 'actions':
$product->addComment = common::hasPriv('action', 'comment') ? true : false;
$users = $this->loadModel('user')->getPairs();
$actions = $data->data->actions;
$product->actions = $this->loadModel('action')->processActionForAPI($actions, $users, $this->lang->product);
break;
case 'lastexecution':
$execution = $this->dao->select('t2.id,t2.name')->from(TABLE_PROJECTPRODUCT)->alias('t1')
$execution = $this->dao->select('t2.id,t2.name,t2.type')->from(TABLE_PROJECTPRODUCT)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t2.deleted')->eq(0)
->andWhere('t1.product')->eq($productID)
@@ -102,7 +120,7 @@ class productEntry extends Entry
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
$product = $this->product->getByID($productID);
$this->send(200, $this->format($product, 'createdDate:time'));
$this->send(200, $this->format($product, 'createdDate:time,whitelist:userList,createdBy:user,PO:user,RD:user,QD:user'));
}
/**
+2 -2
View File
@@ -4,7 +4,7 @@
* It is only used by Gitlab.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -34,7 +34,7 @@ class productIssueEntry extends entry
{
case 'story':
$this->app->loadLang('story');
$storyStatus = array('' => '', 'draft' => 'opened', 'active' => 'opened', 'changed' => 'opened', 'closed' => 'closed');
$storyStatus = array('' => '', 'draft' => 'opened', 'reviewing' => 'opened', 'active' => 'opened', 'changing' => 'opened', 'closed' => 'closed');
$story = $this->dao->select('*')->from(TABLE_STORY)->where('id')->eq($id)->fetch();
if(!$story) $this->send404();
+2 -2
View File
@@ -4,7 +4,7 @@
* It is only used by Gitlab.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -30,7 +30,7 @@ class productIssuesEntry extends entry
$storyFields = 'id,status';
$storyStatus = array('' => '');
$storyStatus['opened'] = 'draft,active,changed';
$storyStatus['opened'] = 'draft,reviewing,active,changing';
$storyStatus['closed'] = 'closed';
$bugFields = 'id,status';
+1 -1
View File
@@ -3,7 +3,7 @@
* The productplan entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The productplanlinkbugs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The productplanlinkstories entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+2 -2
View File
@@ -3,7 +3,7 @@
* The productplans entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -24,7 +24,7 @@ class productplansEntry extends entry
if(!$productID) return $this->sendError(400, 'No product id.');
$control = $this->loadController('productplan', 'browse');
$control->browse($productID, $this->param('branch', 0), $this->param('status', 'all'), $this->param('order', 'begin_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
$control->browse($productID, $this->param('branch', 0), $this->param('status', 'all'), $this->param('query', 0), $this->param('order', 'begin_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
/* Response */
$data = $this->getData();
+1 -1
View File
@@ -3,7 +3,7 @@
* The productplanunlinkbugs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The productplanunlinkstories entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The product projects entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+20 -10
View File
@@ -3,7 +3,7 @@
* The products entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -24,6 +24,7 @@ class productsEntry extends entry
if(strpos(strtolower(",{$fields},"), ',dropmenu,') !== false) return $this->getDropMenu();
if(!$programID) $programID = $this->param('program', 0);
$projectID = $this->param('project', 0);
$mergeChildren = $this->param('mergeChildren', '');
if($programID)
@@ -39,10 +40,22 @@ class productsEntry extends entry
$products = $data->data->products;
}
elseif($projectID)
{
$control = $this->loadController('project', 'manageProducts');
$control->manageProducts($projectID);
/* Response */
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->sendError(400, 'error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$products = $data->data->linkedProducts;
}
else
{
$control = $this->loadController('product', 'all');
$control->all($this->param('status', 'all'), $this->param('order', 'order_asc'));
$control->all($this->param('status', 'all'), $this->param('order', 'program_asc'), 0, 0, $this->param('limit', 100), $this->param('page', 1));
/* Response */
$data = $this->getData();
@@ -52,8 +65,9 @@ class productsEntry extends entry
$products = $data->data->productStats;
if($mergeChildren) $products = $data->data->productStructure;
}
$pager = $data->data->pager;
$result = array();
$result = array();
if($mergeChildren)
{
$programs = $this->mergeChildren($products);
@@ -82,10 +96,7 @@ class productsEntry extends entry
$result[] = $this->format($product, 'createdDate:time,whitelist:userList,createdBy:user,PO:user,RD:user,QD:user');
}
$data = array();
$data['total'] = count($result);
$data['products'] = $result;
$data = array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'products' => $result);
$withUser = $this->param('withUser', '');
if(!empty($withUser)) $data['users'] = $this->loadModel('user')->getListByAccounts($accounts, 'account');
@@ -163,7 +174,7 @@ class productsEntry extends entry
/**
* Merge children products.
*
* @param array $products
* @param array $products
* @access public
* @return void
*/
@@ -181,12 +192,11 @@ class productsEntry extends entry
}
$unclosedTotal = 0;
foreach($program as $field => $value)
foreach($program as $lineID => $value)
{
if(!isset($programs[$programID]->children)) $programs[$programID]->children = array();
if(isset($value->products))
{
$lineID = $field;
if(empty($lineID))
{
foreach($value->products as $product)
+2 -2
View File
@@ -3,7 +3,7 @@
* The program entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -60,7 +60,7 @@ class programEntry extends Entry
public function delete($programID)
{
$control = $this->loadController('program', 'delete');
$control->delete(0, $programID, 'true');
$control->delete($programID, 'true');
$data = $this->getData();
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
+2 -2
View File
@@ -3,7 +3,7 @@
* The programs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -48,7 +48,7 @@ class programsEntry extends Entry
unset($program->desc);
$program->end = $program->end == LONG_TIME ? $this->lang->program->longTime : $program->end;
$programBudget = in_array($this->app->getClientLang(), array('zh-cn','zh-tw')) ? round((float)$program->budget / 10000, 2) . $this->lang->project->tenThousand : round((float)$program->budget, 2);
$programBudget = $this->loadModel('project')->getBudgetWithUnit($program->budget);
$program->labelBudget = $program->budget != 0 ? zget($this->lang->project->currencySymbol, $program->budgetUnit) . ' ' . $programBudget : $this->lang->project->future;
if(empty($program->parent)) $result[$program->id] = $program;
+7 -2
View File
@@ -3,7 +3,7 @@
* The project entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -62,6 +62,11 @@ class projectEntry extends entry
$project->teams = $teams;
break;
case "products":
$project->products = array();
$productList = $this->loadModel('product')->getProducts($projectID, $this->param('status', 'all'));
foreach($productList as $product) $project->products[] = $product;
break;
case "stat":
$project->stat = $data->data->statData;
break;
@@ -97,7 +102,7 @@ class projectEntry extends entry
$linkedProducts = $this->loadModel('product')->getProducts($projectID);
/* Set $_POST variables. */
$fields = 'name,begin,end,acl,parent,desc,PM,whitelist';
$fields = 'name,code,begin,end,acl,parent,desc,PM,whitelist,model';
$this->batchSetPost($fields, $oldProject);
$products = array();
+6 -2
View File
@@ -3,7 +3,7 @@
* The project bugs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -24,7 +24,7 @@ class projectBugsEntry extends entry
if(empty($projectID)) return $this->sendError(400, 'Need project id.');
$control = $this->loadController('project', 'bug');
$control->bug($projectID, $this->param('product', 0), $this->param('order', 'status,id_desc'), $this->param('build', 0), $this->param('status', 'all'), 0, 0, $this->param('limit', 20), $this->param('page', 1));
$control->bug($projectID, $this->param('product', 0), $this->param('branch', 0), $this->param('order', 'status,id_desc'), $this->param('build', 0), $this->param('status', 'all'), 0, 0, $this->param('limit', 20), $this->param('page', 1));
$data = $this->getData();
@@ -33,6 +33,7 @@ class projectBugsEntry extends entry
$bugs = $data->data->bugs;
$pager = $data->data->pager;
$result = array();
$this->loadModel('product');
foreach($bugs as $bug)
{
$status = array('code' => $bug->status, 'name' => $this->lang->bug->statusList[$bug->status]);
@@ -42,6 +43,9 @@ class projectBugsEntry extends entry
$bug->status = $status['code'];
$bug->statusName = $status['name'];
$product = $this->product->getById($bug->product);
$bug->productStatus = $product->status;
$result[$bug->id] = $this->format($bug, 'activatedDate:time,openedDate:time,assignedDate:time,resolvedDate:time,closedDate:time,lastEditedDate:time,deadline:date,deleted:bool');
}
+1 -1
View File
@@ -3,7 +3,7 @@
* The project cases entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The projectreleases entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+2 -1
View File
@@ -3,7 +3,7 @@
* The project entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -86,6 +86,7 @@ class projectsEntry extends entry
$this->setPost('whitelist', $this->request('whitelist', array()));
$this->setPost('PM', $this->request('PM', ''));
$this->setPost('model', $this->request('model', 'scrum'));
$this->setPost('parent', $this->request('parent', 0));
$control = $this->loadController('project', 'create');
$this->requireFields('name,code,begin,end,products');
+5 -1
View File
@@ -3,7 +3,7 @@
* The project entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package project
* @version 1
@@ -32,8 +32,12 @@ class projectStoriesEntry extends entry
$stories = $data->data->stories;
$pager = $data->data->pager;
$result = array();
$this->loadModel('product');
foreach($stories as $story)
{
$product = $this->product->getById($story->product);
$story->productStatus = $product->status;
$result[] = $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList');
}
return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'stories' => $result));
+1 -1
View File
@@ -3,7 +3,7 @@
* The release entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+2 -2
View File
@@ -3,7 +3,7 @@
* The productplans entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -24,7 +24,7 @@ class releasesEntry extends entry
if(empty($productID)) return $this->sendError(400, 'Need product id.');
$control = $this->loadController('release', 'browse');
$control->browse($productID, $this->param('branch', 0), $this->param('status', 'all'), $this->param('order', 't1.date_desc'));
$control->browse($productID, $this->param('branch', 0), $this->param('status', 'all'), $this->param('order', 't1.date_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
/* Response */
$data = $this->getData();
+4 -5
View File
@@ -3,7 +3,7 @@
* The reports entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -176,7 +176,7 @@ class reportsEntry extends entry
foreach(array_keys($statusList) as $status)
{
$statusName = zget($this->lang->project->statusList, $status);
if($status == 'all') $statusName = $this->lang->project->featureBar['all'];
if($status == 'all') $statusName = $this->lang->project->featureBar['browse']['all'];
$statusList[$status]['code'] = $status;
$statusList[$status]['name'] = $statusName;
@@ -193,8 +193,7 @@ class reportsEntry extends entry
*/
public function executionProgress()
{
$executions = $this->loadModel('project')->getStats(0, 'all', 0, 0, 30, 'id_desc');
$this->app->loadLang('execution');
$executions = $this->loadModel('execution')->getStatData(0, 'all', 0, 0, false, '', 'id_desc');
$processedExecutions = array();
$statusList['all']['total'] = 0;
@@ -273,7 +272,7 @@ class reportsEntry extends entry
}
/* Set story status statistics integrate into product. */
$storyStatusList = array('draft' => array(), 'active' => array(), 'changed' => array(), 'closed' => array());
$storyStatusList = array('draft' => array(), 'reviewing' => array(), 'active' => array(), 'changing' => array(), 'closed' => array());
foreach($processedProducts as $productID => $product)
{
$product->storyStat = array();
+1 -1
View File
@@ -3,7 +3,7 @@
* The reporules entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Yidong Wang <yidong@cnezsoft.com>
* @package entries
* @version 1
+25 -9
View File
@@ -3,7 +3,7 @@
* The repos entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -20,18 +20,34 @@ class reposEntry extends entry
public function get()
{
$control = $this->loadController('repo', 'maintain');
$control->maintain(0, $this->param('order', 'id_desc'), 0, $this->param('limit', 100), $this->param('page', 1));
$repoUrl = $this->param('repoUrl', '');
if(empty($repoUrl))
{
$control->maintain(0, $this->param('order', 'id_desc'), 0, $this->param('limit', 100), $this->param('page', 1));
/* Response */
$data = $this->getData();
}
else
{
$data = (object)$this->loadModel('repo')->getRepoListByUrl($repoUrl);
}
/* Response */
$data = $this->getData();
if(isset($data->status) and $data->status == 'success')
{
$result = array();
$pager = $data->data->pager;
$repos = $data->data->repoList;
foreach($repos as $repo) $result[] = $this->format($repo, 'deleted:bool,lastSync:datetime,synced:bool,product:idList');
if(empty($repoUrl))
{
$result = array();
$pager = $data->data->pager;
$repos = $data->data->repoList;
foreach($repos as $repo) $result[] = $this->format($repo, 'deleted:bool,lastSync:datetime,synced:bool,product:idList');
return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'repos' => $result));
return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'repos' => $result));
}
else
{
return $this->send(200, array('repos' => $data->repos));
}
}
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
+1 -1
View File
@@ -3,7 +3,7 @@
* The risk entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The risks entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+1 -1
View File
@@ -3,7 +3,7 @@
* The stakeholder entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+23 -8
View File
@@ -3,7 +3,7 @@
* The stories entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -24,21 +24,35 @@ class storiesEntry extends entry
if(!$productID) return $this->sendError(400, 'Need product id.');
$control = $this->loadController('product', 'browse');
$control->browse($productID, $this->param('branch', ''), $this->param('status', 'unclosed'), 0, $this->param('type', 'story'), $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
$control->browse($productID, $this->param('branch', ''), $this->param('status', 'unclosed'), 0, $this->param('type', 'story'), $this->param('order', 'id_desc'), 0, $this->param('limit', 500), $this->param('page', 1));
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->sendError(400, 'error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$stories = $data->data->stories;
$pager = $data->data->pager;
$stories = $data->data->stories;
$pager = $data->data->pager;
$requirements = $this->loadModel('story')->getRequirements($productID);
$result = array();
$this->loadModel('product');
foreach($stories as $story)
{
if(isset($story->children)) $story->children = array_values((array)$story->children);
$product = $this->product->getById($story->product);
$story->productStatus = $product->status;
if(isset($story->children))
{
$story->children = array_values((array)$story->children);
foreach($story->children as $id => $children)
{
$childrenProduct = $this->product->getById($children->product);
$story->children[$id]->productStatus = $childrenProduct->status;
}
}
$result[] = $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList');
}
return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'stories' => $result));
return $this->send(200, array('page' => $pager->pageID, 'total' => $pager->recTotal, 'limit' => $pager->recPerPage, 'stories' => $result, 'requirements' => $requirements));
}
/**
@@ -54,7 +68,7 @@ class storiesEntry extends entry
if(!$productID and isset($this->requestBody->product)) $productID = $this->requestBody->product;
if(!$productID) return $this->sendError(400, 'Need product id.');
$fields = 'title,spec,verify,reviewer,type,plan,module,source,sourceNote,category,pri,estimate';
$fields = 'title,spec,verify,reviewer,type,parent,plan,module,moduleOptionMenu,source,sourceNote,category,pri,estimate,mailto,keywords,notifyemail,uid,URS,status';
$this->batchSetPost($fields);
/* If reviewer is not post, set needNotReview. */
@@ -62,11 +76,12 @@ class storiesEntry extends entry
if(empty($reviewer)) $this->setPost('needNotReview', 1);
$this->setPost('product', $productID);
$this->setPost('type', $this->param('type', 'story'));
$this->setPost('status', $this->param('status', 'draft'));
$control = $this->loadController('story', 'create');
$this->requireFields('title,spec,pri,category');
$control->create($productID);
$control->create($productID, $this->param('branch', 0), $this->param('moduleID', 0), $this->param('storyID', 0), $this->param('objectID', 0), $this->param('bugID', 0));
$data = $this->getData();
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
+14 -10
View File
@@ -3,7 +3,7 @@
* The story entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -36,8 +36,9 @@ class storyEntry extends Entry
if(isset($story->planTitle)) $story->planTitle = array_values((array)$story->planTitle);
if($story->parent > 0) $story->parentPri = $this->dao->select('pri')->from(TABLE_STORY)->where('id')->eq($story->parent)->fetch('pri');
/* Set product name */
$story->productName = $data->data->product->name;
/* Set product name and status*/
$story->productName = $data->data->product->name;
$story->productStatus = $data->data->product->status;
/* Set module title */
$moduleTitle = '';
@@ -59,16 +60,16 @@ class storyEntry extends Entry
foreach($executionTasks as $task)
{
if(!isset($data->data->executions->{$task->execution})) continue;
$storyTasks[] = $this->filterFields($task, 'id,name,type');
$storyTasks[] = $this->filterFields($task, 'id,name,type,status,assignedTo');
}
}
$story->tasks = $storyTasks;
$story->tasks = $this->format($storyTasks, 'assignedTo:user');
$story->bugs = array();
foreach($data->data->bugs as $bug) $story->bugs[] = $this->filterFields($bug, 'id,title');
foreach($data->data->bugs as $bug) $story->bugs[] = $this->filterFields($bug, 'id,title,status,pri,severity');
$story->cases = array();
foreach($data->data->cases as $case) $story->cases[] = $this->filterFields($case, 'id,title');
foreach($data->data->cases as $case) $story->cases[] = $this->filterFields($case, 'id,title,pri,status');
$story->requirements = array();
foreach($data->data->relations as $relation) $story->requirements[] = $this->filterFields($relation, 'id,title');
@@ -95,14 +96,17 @@ class storyEntry extends Entry
$oldStory = $this->loadModel('story')->getByID($storyID);
/* Set $_POST variables. */
$fields = 'type';
$fields = 'title,product,parent,reviewer,type,plan,module,source,sourceNote,category,pri,estimate,mailto,keywords,uid,stage,notifyEmail';
$this->batchSetPost($fields, $oldStory);
$this->setPost('parent', 0);
$control = $this->loadController('story', 'edit');
$control->edit($storyID);
$this->getData();
$data = $this->getData();
if(isset($data->status) and $data->status == 'fail') return $this->sendError(400, $data->message);
if(!isset($data->status)) return $this->sendError(400, 'error');
$story = $this->story->getByID($storyID);
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
+40
View File
@@ -0,0 +1,40 @@
<?php
/**
* The bug change point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
**/
class storyActiveEntry extends Entry
{
/**
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function post($storyID)
{
$fields = 'assignedTo,status,comment';
$this->batchSetPost($fields);
$control = $this->loadController('story', 'activate');
$control->activate($storyID);
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$story = $this->loadModel('story')->getByID($storyID);
$this->send(200, $story);
}
}
+37
View File
@@ -0,0 +1,37 @@
<?php
/**
* The story assignto entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class storyAssignToEntry extends Entry
{
/**
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function post($storyID)
{
$fields = 'assignedTo,comment';
$this->batchSetPost($fields);
$control = $this->loadController('story', 'assignTo');
$control->assignTo($storyID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$story = $this->loadModel('story')->getByID($storyID);
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+3 -3
View File
@@ -3,7 +3,7 @@
* The bug change point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -22,7 +22,7 @@ class storyChangeEntry extends Entry
{
$oldStory = $this->loadModel('story')->getByID($storyID);
$fields = 'reviewer,comment';
$fields = 'reviewer,comment,executions,bugs,cases,tasks,reviewedBy,uid';
$this->batchSetPost($fields);
$fields = 'title,spec,verify';
$this->batchSetPost($fields, $oldStory);
@@ -35,7 +35,7 @@ class storyChangeEntry extends Entry
}
$control = $this->loadController('story', 'change');
$this->requireFields('title,spec,verify');
$this->requireFields('title');
$control->change($storyID);
+37
View File
@@ -0,0 +1,37 @@
<?php
/**
* The story close entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class storyCloseEntry extends Entry
{
/**
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function post($storyID)
{
$fields = 'closedReason,duplicateStory,childStories,comment';
$this->batchSetPost($fields);
$control = $this->loadController('story', 'close');
$control->close($storyID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$story = $this->loadModel('story')->getByID($storyID);
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
/**
* The story recall entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class storyRecallEntry extends Entry
{
/**
* Delete method.
*
* @param int $storyID
* @access public
* @return void
*/
public function delete($storyID)
{
$control = $this->loadController('story', 'recall');
$control->recall($storyID);
$this->getData();
$this->sendSuccess(200, 'success');
}
}
+61
View File
@@ -0,0 +1,61 @@
<?php
/**
* The story recordEstimate entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class storyRecordEstimateEntry extends Entry
{
/**
* GET method.
*
* @param int $storyID
* @access public
* @return void
*/
public function get($storyID)
{
if($this->config->edition == 'open') return $this->send400('ZenTaoPMS does not have story effort function.');
$control = $this->loadController('effort', 'createForObject');
$control->createForObject('story', $storyID);
$data = $this->getData();
if(!$data) return $this->error('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$effort = $data->data->efforts;
$this->send(200, array('effort' => $effort));
}
/**
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function post($storyID)
{
if($this->config->edition == 'open') return $this->send400('ZenTaoPMS does not have story effort function.');
$fields = 'id,dates,consumed,objectType,objectID,work';
$this->batchSetPost($fields);
$control = $this->loadController('effort', 'createForObject');
$control->createForObject('story', $storyID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$story = $this->loadModel('story')->getById($storyID);
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+40
View File
@@ -0,0 +1,40 @@
<?php
/**
* The story review of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
**/
class storyReviewEntry extends Entry
{
/**
* POST method.
*
* @param int $storyID
* @access public
* @return void
*/
public function post($storyID)
{
$fields = 'reviewedDate,result,closedReason,pri,estimate,comment';
$this->batchSetPost($fields);
$control = $this->loadController('story', 'review');
$control->review($storyID);
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$story = $this->loadModel('story')->getByID($storyID);
$this->send(200, $this->format($story, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+7 -3
View File
@@ -3,7 +3,7 @@
* The tabs entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -28,7 +28,8 @@ class tabsEntry extends baseEntry
foreach($tabs as $menuKey)
{
if(!common::hasPriv('my', $menuKey)) continue;
if(!isset($this->lang->my->$menuKey)) continue;
if(!common::hasPriv('my', 'work')) continue;
$label = $this->lang->my->$menuKey;
if($menuKey == 'calendar') $label = $this->lang->my->calendarAction;
@@ -49,7 +50,10 @@ class tabsEntry extends baseEntry
if($menuKey == 'requirement' and empty($this->config->URAndSR)) continue;
if(isset($this->lang->product->menu->$menuKey))
{
list($label, $module, $method) = explode('|', $this->lang->product->menu->$menuKey['link']);
$menuName = $this->lang->product->menu->$menuKey;
if(!isset($menuName['link'])) continue;
list($label, $module, $method) = explode('|', $menuName['link']);
if(!common::hasPriv($module, $method)) continue;
}
else
+7 -3
View File
@@ -3,7 +3,7 @@
* The task entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -87,6 +87,9 @@ class taskEntry extends Entry
$task->preAndNext['pre'] = $preAndNext->pre ? $preAndNext->pre->id : '';
$task->preAndNext['next'] = $preAndNext->next ? $preAndNext->next->id : '';
$execution = $this->loadModel('project')->getByID($task->execution, 'execution');
$task->executionStatus = $execution->status;
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
}
@@ -102,13 +105,14 @@ class taskEntry extends Entry
$oldTask = $this->loadModel('task')->getByID($taskID);
/* Set $_POST variables. */
$fields = 'name,type,assignedTo,estimate,left,consumed,story,parent,execution,module,closedReason,status,estStarted,deadline';
$fields = 'name,type,desc,assignedTo,pri,estimate,left,consumed,story,parent,execution,module,closedReason,status,estStarted,deadline,team,teamEstimate,teamConsumed,teamLeft,multiple,mailto,uid';
$this->batchSetPost($fields, $oldTask);
$control = $this->loadController('task', 'edit');
$control->edit($taskID);
$this->getData();
$data = $this->getData();
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->task->getByID($taskID);
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
}
+38
View File
@@ -0,0 +1,38 @@
<?php
/**
* The task active entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
**/
class taskActiveEntry extends Entry
{
/**
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function post($taskID)
{
$fields = 'assignedTo,left,comment';
$this->batchSetPost($fields);
$control = $this->loadController('task', 'activate');
$control->activate($taskID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->loadModel('task')->getByID($taskID);
$this->send(200, $this->format($task, 'openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,reviewedBy:user,reviewedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,deleted:bool,mailto:userList'));
}
}
+2 -2
View File
@@ -3,7 +3,7 @@
* The task assignto entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -31,7 +31,7 @@ class taskAssignToEntry extends Entry
$control->assignTo($task->execution, $taskID);
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->send400('error');
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->loadModel('task')->getByID($taskID);
+86
View File
@@ -0,0 +1,86 @@
<?php
/**
* The task batch create entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class taskBatchCreateEntry extends Entry
{
/**
* POST method.
*
* @param int $executionID
* @access public
* @return void
*/
public function post($executionID = 0)
{
if(!$executionID) $executionID = $this->param('execution', 0);
if(!$executionID) return $this->send400('Need execution id.');
$storyID = $this->param('story', 0);
$moduleID = $this->param('module', 0);
$taskID = $this->param('task', 0);
if(!isset($this->requestBody->tasks))
{
return $this->send400('Need tasks.');
}
$modules = array();
$parents = array();
$names = array();
$colors = array();
$types = array();
$estimates = array();
$estStarted = array();
$deadlines = array();
$desc = array();
$pri = array();
$stories = array();
foreach($this->request('tasks') as $key => $task)
{
$number = $key + 1;
if(!isset($task->name) or !isset($task->type)) return $this->send400('Task must have name and type.');
$modules[$number] = isset($task->module) ? $task->module : $moduleID;
$parents[$number] = isset($task->parent) ? $task->parent : $taskID;
$names[$number] = $task->name;
$colors[$number] = isset($task->color) ? $task->color : '';
$types[$number] = $task->type;
$estimates[$number] = isset($task->estimate) ? $task->estimate : 0;
$estStarted[$number] = isset($task->estStarted) ? $task->estStarted : 0;
$deadlines[$number] = isset($task->deadline) ? $task->deadline : null;
$desc[$number] = isset($task->desc) ? $task->desc : '';
$pri[$number] = isset($task->pri) ? $task->pri : 0;
$stories[$number] = isset($task->story) ? $task->story : $storyID;
}
$this->setPost('module', $modules);
$this->setPost('parent', $parents);
$this->setPost('name', $names);
$this->setPost('color', $colors);
$this->setPost('type', $types);
$this->setPost('estimate', $estimates);
$this->setPost('estStarted', $estStarted);
$this->setPost('deadline', $deadlines);
$this->setPost('desc', $desc);
$this->setPost('pri', $pri);
$this->setPost('story', $stories);
$control = $this->loadController('task', 'batchCreate');
$control->batchCreate($executionID, $storyID, $moduleID, $taskID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
if(!$taskID) return $this->send(200, array());
$task = $this->loadModel('task')->getById($taskID);
return $this->send(200, array('task' => $task));
}
}
+39
View File
@@ -0,0 +1,39 @@
<?php
/**
* The task close entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class taskCloseEntry extends Entry
{
/**
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function post($taskID)
{
$task = $this->loadModel('task')->getByID($taskID);
$fields = 'comment';
$this->batchSetPost($fields);
$control = $this->loadController('task', 'close');
$control->close($taskID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->loadModel('task')->getByID($taskID);
$this->send(200, $task);
}
}
+45
View File
@@ -0,0 +1,45 @@
<?php
/**
* The task component entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class taskComponentEntry extends Entry
{
/**
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function post($taskID)
{
$fields = 'name,color,type,assignedTo,parent,estimate,story,module,pri,desc,estStarted,deadline';
$this->batchSetPost($fields);
$fields = explode(',', $fields);
foreach($fields as $field) $this->setArrayPost($field);
$task = $this->loadModel('task')->getById($taskID);
$control = $this->loadController('task', 'batchCreate');
$control->batchCreate($task->execution, 0, 0, $taskID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->task->getById($data->idList[0]);
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
}
public function setArrayPost($field)
{
$_POST[$field] = array('0' => $_POST[$field]);
}
}
+2 -2
View File
@@ -3,7 +3,7 @@
* The task finish entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -36,7 +36,7 @@ class taskFinishEntry extends Entry
$control->finish($taskID);
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->send400('error');
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->loadModel('task')->getByID($taskID);
+39
View File
@@ -0,0 +1,39 @@
<?php
/**
* The task pause entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class taskPauseEntry extends Entry
{
/**
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function post($taskID)
{
$task = $this->loadModel('task')->getByID($taskID);
$fields = 'comment';
$this->batchSetPost($fields);
$control = $this->loadController('task', 'pause');
$control->pause($taskID);
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->loadModel('task')->getByID($taskID);
$this->send(200, $task);
}
}
+78
View File
@@ -0,0 +1,78 @@
<?php
/**
* The task recordEstimate entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
* @link http://www.zentao.net
*/
class taskRecordEstimateEntry extends Entry
{
/**
* GET method.
*
* @param int $taskID
* @access public
* @return void
*/
public function get($taskID)
{
$issetEffort = $this->loadModel('effort') ? true : false;
if($issetEffort)
{
$control = $this->loadController('effort', 'createForObject');
$control->createForObject('task', $taskID);
}
else
{
$control = $this->loadController('task', 'recordEstimate');
$control->recordEstimate($taskID);
}
$data = $this->getData();
if(!$data) return $this->error('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$effort = array();
if($issetEffort and $data->data->efforts) $effort = $data->data->efforts;
if(!$issetEffort and $data->data->estimates) $effort = $data->data->estimates;
$this->send(200, array('effort' => $effort));
}
/**
* POST method.
*
* @param int $taskID
* @access public
* @return void
*/
public function post($taskID)
{
if($this->loadModel('effort'))
{
$fields = 'id,dates,consumed,left,objectType,objectID,work';
$this->batchSetPost($fields);
$control = $this->loadController('effort', 'createForObject');
$control->createForObject('task', $taskID);
}
else
{
$fields = 'id,dates,consumed,left,work';
$this->batchSetPost($fields);
$control = $this->loadController('task', 'recordEstimate');
$control->recordEstimate($taskID);
}
$data = $this->getData();
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->loadModel('task')->getById($taskID);
$this->send(200, $this->format($task, 'deadline:date,openedBy:user,openedDate:time,assignedTo:user,assignedDate:time,realStarted:time,finishedBy:user,finishedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,lastEditedBy:user,lastEditedDate:time,deleted:bool,mailto:userList'));
}
}
+2 -1
View File
@@ -3,7 +3,7 @@
* The tasks entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -66,6 +66,7 @@ class tasksEntry extends entry
$assignedTo = $this->request('assignedTo');
if($assignedTo and !is_array($assignedTo)) $this->setPost('assignedTo', array($assignedTo));
$this->setPost('execution', $executionID);
$control = $this->loadController('task', 'create');
$this->requireFields('name,assignedTo,type,estStarted,deadline');
+3 -3
View File
@@ -3,7 +3,7 @@
* The task start entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -22,7 +22,7 @@ class taskStartEntry extends Entry
{
$task = $this->loadModel('task')->getByID($taskID);
$fields = 'assignedTo,realStarted,comment,left';
$fields = 'assignedTo,realStarted,consumed,left,comment';
$this->batchSetPost($fields);
$control = $this->loadController('task', 'start');
@@ -30,7 +30,7 @@ class taskStartEntry extends Entry
$control->start($taskID);
$data = $this->getData();
if(!$data or !isset($data->status)) return $this->send400('error');
if(!$data) return $this->send400('error');
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
$task = $this->loadModel('task')->getByID($taskID);
+1 -1
View File
@@ -3,7 +3,7 @@
* The testcase entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
+18 -4
View File
@@ -3,7 +3,7 @@
* The testcases entry point of ZenTaoPMS.
*
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package entries
* @version 1
@@ -23,8 +23,20 @@ class testcasesEntry extends entry
if(empty($productID)) $productID = $this->param('product', 0);
if(empty($productID)) return $this->sendError(400, 'Need product id.');
$this->app->cookie->caseModule = 0;
$this->app->cookie->caseSuite = 0;
$type = $this->param('status', 'all');
$param = 0;
$moduleID = $this->param('module', 0);
if($moduleID)
{
$type = 'byModule';
$param = $moduleID;
}
$control = $this->loadController('testcase', 'browse');
$control->browse($productID, $this->param('branch', ''), $this->param('status', 'all'), 0, $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
$control->browse($productID, $this->param('branch', ''), $type, $param, $this->param('order', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
$data = $this->getData();
@@ -71,9 +83,11 @@ class testcasesEntry extends entry
$stepType = array();
foreach($this->requestBody->steps as $step)
{
$type = isset($step->type) ? $step->type : 'step';
$steps[] = $step->desc;
$expects[] = $step->expect;
$stepType[] = 'item';
$expects[] = $type == 'group' ? '' : $step->expect;
$stepType[] = $type;
}
$this->setPost('steps', $steps);
$this->setPost('expects', $expects);

Some files were not shown because too many files have changed in this diff Show More