Merge branch 'master' into sprint/220
This commit is contained in:
+45
-9
@@ -1,4 +1,13 @@
|
||||
sonarqube:
|
||||
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
|
||||
@@ -11,19 +20,46 @@ sonarqube:
|
||||
allow_failure: true
|
||||
only:
|
||||
- master # or the name of your main branch
|
||||
packages:
|
||||
|
||||
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
|
||||
#notify:
|
||||
# script:
|
||||
# - 'curl --location --request POST ''http://api.lf.oop.cc/api/v1/xuan/chatMessage'' --header ''Content-Type: application/json'' --data-raw ''{"gid": "84be4c6e-02e3-4fdc-b081-318c0c1eca02", "title": "开源包下载地址", "content": "点击查看详情链接", "url": "http://10.0.7.242:8080/allpacks/"}'''
|
||||
# when: on_success
|
||||
# only:
|
||||
# - master
|
||||
cleanup_packages:
|
||||
|
||||
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
|
||||
@@ -102,6 +102,14 @@ zentaoxx:
|
||||
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 "s/\$$sysAdmins = \$$this->dao->select('id')->from(TABLE_USER)->where('admin')->eq('super')->fetchPairs();/\$$account = \$$this->loadModel('user')->getById(\$$userID);\n\$$admins = \$$this->dao->select('admins')->from(TABLE_COMPANY)->where('id')->eq(\$$this->app->company->id)->fetch('admins');\n\$$adminArray = explode(',', \$$admins);\nreturn in_array(\$$account, \$$adminArray);\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/\$$user = \$$this->user->login(\$$account, \$$user->password);/\$$user = \$$this->user->login(\$$user);\n\$$url .= \$$this->config->requestType == 'GET' ? '\&' : '?';\n\$$url .= \"{\$$this->config->sessionVar}={\$$this->app->sessionID}\";\n/" zentaoxx/extension/xuan/im/control.php
|
||||
sed -i "s/\$$file->fullURL/\$$file->webPath/" zentaoxx/extension/xuan/im/control.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/extension/xuan/im/model/user.php
|
||||
|
||||
@@ -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
@@ -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>
|
||||
|
||||
@@ -16,7 +16,7 @@ class bugEntry extends entry
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($bugID)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ class bugEntry extends entry
|
||||
$bug->preAndNext['pre'] = $preAndNext->pre ? $preAndNext->pre->id : '';
|
||||
$bug->preAndNext['next'] = $preAndNext->next ? $preAndNext->next->id : '';
|
||||
|
||||
$this->send(200, $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'));
|
||||
return $this->send(200, $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'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -86,7 +86,7 @@ class bugEntry extends entry
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($bugID)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ class bugEntry extends entry
|
||||
if(!isset($data->status)) return $this->sendError(400, 'error');
|
||||
|
||||
$bug = $this->bug->getByID($bugID);
|
||||
$this->send(200, $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'));
|
||||
return $this->send(200, $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'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,7 +114,7 @@ class bugEntry extends entry
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($bugID)
|
||||
{
|
||||
@@ -122,6 +122,6 @@ class bugEntry extends entry
|
||||
$control->delete($bugID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class bugActiveEntry extends Entry
|
||||
class bugActiveEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class bugActiveEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class bugAssignEntry extends Entry
|
||||
class bugAssignEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class bugAssignEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class bugCloseEntry extends Entry
|
||||
class bugCloseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class bugCloseEntry extends Entry
|
||||
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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class bugConfirmEntry extends Entry
|
||||
class bugConfirmEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
**/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class bugConfirmEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class bugRecordEstimateEntry extends Entry
|
||||
class bugRecordEstimateEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($bugID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class bugRecordEstimateEntry extends Entry
|
||||
|
||||
$effort = $data->data->efforts;
|
||||
|
||||
$this->send(200, array('effort' => $effort));
|
||||
return $this->send(200, array('effort' => $effort));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ class bugRecordEstimateEntry extends Entry
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
@@ -56,6 +56,6 @@ class bugRecordEstimateEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,17 +9,17 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class bugResolveEntry extends Entry
|
||||
class bugResolveEntry extends entry
|
||||
{
|
||||
/**
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $bugID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($bugID)
|
||||
{
|
||||
{
|
||||
$fields = 'resolution,resolvedBuild,resolvedDate,duplicateBug,assignedTo,uid,comment';
|
||||
$this->batchSetPost($fields);
|
||||
|
||||
@@ -32,7 +32,7 @@ class bugResolveEntry extends Entry
|
||||
|
||||
$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'));
|
||||
}
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class bugsEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ class bugsEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($productID = 0)
|
||||
{
|
||||
@@ -111,6 +111,6 @@ class bugsEntry extends entry
|
||||
|
||||
$bug = $this->loadModel('bug')->getByID($data->id);
|
||||
|
||||
$this->send(200, $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'));
|
||||
return $this->send(200, $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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class buildEntry extends Entry
|
||||
class buildEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $buildID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($buildID)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ class buildEntry extends Entry
|
||||
/* Exception handling. */
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$this->sendError(400, 'error');
|
||||
return $this->sendError(400, 'error');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,7 @@ class buildEntry extends Entry
|
||||
*
|
||||
* @param int $buildID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($buildID)
|
||||
{
|
||||
@@ -55,7 +55,7 @@ class buildEntry extends Entry
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$build = $this->build->getByID($buildID);
|
||||
$this->send(200, $this->format($build, 'builder:user,stories:idList,bugs:idList,deleted:bool'));
|
||||
return $this->send(200, $this->format($build, 'builder:user,stories:idList,bugs:idList,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,7 +63,7 @@ class buildEntry extends Entry
|
||||
*
|
||||
* @param int $buildID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($buildID)
|
||||
{
|
||||
@@ -71,6 +71,6 @@ class buildEntry extends Entry
|
||||
$control->delete($buildID, 'true');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class buildsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -44,7 +44,7 @@ class buildsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -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');
|
||||
@@ -67,6 +67,6 @@ class buildsEntry extends entry
|
||||
|
||||
$build = $this->loadModel('build')->getByID($data->id);
|
||||
|
||||
$this->send(201, $build);
|
||||
return $this->send(201, $build);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class ciresultsEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -25,6 +25,6 @@ class ciresultsEntry extends entry
|
||||
$data = $this->getData();
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$this->send(201, array());
|
||||
return $this->send(201, array());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class configEntry extends baseEntry
|
||||
*
|
||||
* @param int $name language,version,timezone etc.
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($name)
|
||||
{
|
||||
@@ -40,10 +40,9 @@ class configEntry extends baseEntry
|
||||
$config['value'] = $this->config->systemMode;
|
||||
break;
|
||||
default:
|
||||
$this->sendError(400, 'No configuration.');
|
||||
return;
|
||||
return $this->sendError(400, 'No configuration.');
|
||||
}
|
||||
|
||||
$this->send(200, $config);
|
||||
return $this->send(200, $config);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class configsEntry extends baseEntry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
@@ -30,6 +30,6 @@ class configsEntry extends baseEntry
|
||||
$configs[] = array('key' => 'CRProduct', 'value' => $this->config->CRProduct);
|
||||
$configs[] = array('key' => 'CRExecution', 'value' => $this->config->CRExecution);
|
||||
|
||||
$this->send(200, $configs);
|
||||
return $this->send(200, $configs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class departmentEntry extends Entry
|
||||
class departmentEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $departmentID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($departmentID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class departmentEntry extends Entry
|
||||
*
|
||||
* @param int $departmentID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($departmentID)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ class departmentEntry extends Entry
|
||||
|
||||
$this->getData();
|
||||
$department = $this->dept->getByID($departmentID);
|
||||
$this->send(200, $department);
|
||||
return $this->send(200, $department);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ class departmentEntry extends Entry
|
||||
*
|
||||
* @param int $departmentID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($departmentID)
|
||||
{
|
||||
@@ -65,6 +65,6 @@ class departmentEntry extends Entry
|
||||
$data = $this->getData();
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class docEntry extends entry
|
||||
*
|
||||
* @param int $docID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($docID)
|
||||
{
|
||||
@@ -43,7 +43,7 @@ class docEntry extends entry
|
||||
$doc->preAndNext['pre'] = $preAndNext->pre ? $preAndNext->pre->id : '';
|
||||
$doc->preAndNext['next'] = $preAndNext->next ? $preAndNext->next->id : '';
|
||||
|
||||
$this->send(200, $this->format($doc, 'addedBy:user,addedDate:time,assignedTo:user,assignedDate:date,editedBy:user,editedDate:time,mailto:userList'));
|
||||
return $this->send(200, $this->format($doc, 'addedBy:user,addedDate:time,assignedTo:user,assignedDate:date,editedBy:user,editedDate:time,mailto:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -51,7 +51,7 @@ class docEntry extends entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($storyID)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ class docEntry extends entry
|
||||
|
||||
$this->getData();
|
||||
$story = $this->story->getByID($storyID);
|
||||
$this->sendSuccess(200, $this->format($story, 'openedDate:time,assignedDate:time,reviewedDate:time,lastEditedDate:time,closedDate:time,deleted:bool'));
|
||||
return $this->sendSuccess(200, $this->format($story, 'openedDate:time,assignedDate:time,reviewedDate:time,lastEditedDate:time,closedDate:time,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -75,7 +75,7 @@ class docEntry extends entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($storyID)
|
||||
{
|
||||
@@ -83,6 +83,6 @@ class docEntry extends entry
|
||||
$control->delete($storyID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class doclibsEntry extends Entry
|
||||
class doclibsEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class docsEntry extends Entry
|
||||
class docsEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($libID = 0)
|
||||
{
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class errorEntry extends Entry
|
||||
class errorEntry extends entry
|
||||
{
|
||||
/**
|
||||
* 404 Not Found.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function notFound()
|
||||
{
|
||||
$this->send(404, array('error' => 'not found'));
|
||||
return $this->send(404, array('error' => 'not found'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,20 +9,19 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class executionEntry extends Entry
|
||||
class executionEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID)
|
||||
{
|
||||
$fields = $this->param('fields');
|
||||
$productID = $this->param('productID');
|
||||
$status = $this->param('status', 'all');
|
||||
$fields = $this->param('fields');
|
||||
$status = $this->param('status', 'all');
|
||||
|
||||
$control = $this->loadController('execution', 'view');
|
||||
$control->view($executionID);
|
||||
@@ -47,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;
|
||||
@@ -114,7 +113,7 @@ class executionEntry extends Entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($executionID)
|
||||
{
|
||||
@@ -137,7 +136,7 @@ class executionEntry extends Entry
|
||||
if(!isset($data->result)) return $this->sendError(400, 'error');
|
||||
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
$this->send(200, $this->format($execution, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,PM:user,PO:user,RD:user,QD:user,whitelist:userList,begin:date,end:date,realBegan:date,realEnd:date,deleted:bool'));
|
||||
return $this->send(200, $this->format($execution, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,PM:user,PO:user,RD:user,QD:user,whitelist:userList,begin:date,end:date,realBegan:date,realEnd:date,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -145,7 +144,7 @@ class executionEntry extends Entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($executionID)
|
||||
{
|
||||
@@ -153,6 +152,6 @@ class executionEntry extends Entry
|
||||
$control->delete($executionID, 'true');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionBugsEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID = 0)
|
||||
{
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionBuildsEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID = 0)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionCasesEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID = 0)
|
||||
{
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -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');
|
||||
@@ -57,7 +57,7 @@ class executionsEntry extends entry
|
||||
{
|
||||
foreach($execution->hours as $field => $value) $execution->$field = $value;
|
||||
|
||||
$execution = $this->filterFields($execution, 'id,name,project,code,type,parent,begin,end,status,openedBy,openedDate,delay,progress,' . $appendFields);
|
||||
$execution = $this->filterFields($execution, 'id,name,project,code,type,parent,begin,end,status,openedBy,openedDate,delay,progress,children,' . $appendFields);
|
||||
$result[] = $this->format($execution, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,PM:user,PO:user,RD:user,QD:user,whitelist:userList,begin:date,end:date,realBegan:date,realEnd:date,deleted:bool');
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class executionsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -102,14 +102,14 @@ class executionsEntry extends entry
|
||||
|
||||
$execution = $this->loadModel('execution')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($execution, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,PM:user,PO:user,RD:user,QD:user,whitelist:userList,begin:date,end:date,realBegan:date,realEnd:date,deleted:bool'));
|
||||
return $this->send(201, $this->format($execution, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,PM:user,PO:user,RD:user,QD:user,whitelist:userList,begin:date,end:date,realBegan:date,realEnd:date,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -148,6 +148,6 @@ class executionsEntry extends entry
|
||||
}
|
||||
}
|
||||
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class executionStoriesEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class feedbackEntry extends Entry
|
||||
class feedbackEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($feedbackID)
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class feedbackEntry extends Entry
|
||||
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'));
|
||||
return $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'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,7 +45,7 @@ class feedbackEntry extends Entry
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($feedbackID)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ class feedbackEntry extends Entry
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($feedbackID)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ class feedbackEntry extends Entry
|
||||
$control->delete($feedbackID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class feedbackAssignToEntry extends Entry
|
||||
class feedbackAssignToEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($feedbackID)
|
||||
{
|
||||
@@ -34,6 +34,6 @@ class feedbackAssignToEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class feedbackCloseEntry extends Entry
|
||||
class feedbackCloseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $feedbackID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($feedbackID)
|
||||
{
|
||||
@@ -36,6 +36,6 @@ class feedbackCloseEntry extends Entry
|
||||
|
||||
$feedback = $this->loadModel('feedback')->getById($feedbackID);
|
||||
|
||||
$this->send(200, $feedback);
|
||||
return $this->send(200, $feedback);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,14 +15,14 @@ class feedbacksEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
if(strpos(strtolower($this->param('fields')), 'moduleandproduct') !== false) return $this->getModuleAndProduct();
|
||||
|
||||
$control = $this->loadController('feedback', 'admin');
|
||||
$control->admin($this->param('solution', 'unclosed'), 0, $this->param('orderBy', 'id_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
|
||||
$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');
|
||||
@@ -50,7 +50,7 @@ class feedbacksEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -68,14 +68,14 @@ class feedbacksEntry extends entry
|
||||
|
||||
$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'));
|
||||
return $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
|
||||
* @return string
|
||||
*/
|
||||
public function getModuleAndProduct()
|
||||
{
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class fileEntry extends Entry
|
||||
class fileEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($fileID)
|
||||
{
|
||||
@@ -26,13 +26,13 @@ class fileEntry 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, $data);
|
||||
return $this->send(200, $data);
|
||||
}
|
||||
/**
|
||||
* PUT method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($fileID)
|
||||
{
|
||||
@@ -40,6 +40,6 @@ class fileEntry extends Entry
|
||||
$action = $this->param('action', '');
|
||||
if($action == 'remove') unset($_SESSION['album']['used'][$uid][$fileID]);
|
||||
|
||||
$this->send(200, array('id' => $fileID));
|
||||
return $this->send(200, array('id' => $fileID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class filesEntry extends Entry
|
||||
class filesEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -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, 'url' => $data->url));
|
||||
return $this->send(200, array('id' => $data->id, 'url' => $data->url));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class gitlabWebhookEntry extends baseEntry
|
||||
* Repo webhook.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class groupsEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class issueEntry extends Entry
|
||||
class issueEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int|string $issueID. Issues id for Gitlab has '-', such as task-1, bug-1.
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($issueID)
|
||||
{
|
||||
@@ -40,7 +40,7 @@ class issueEntry extends Entry
|
||||
*
|
||||
* @param int $issueID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($issueID)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ class issueEntry extends Entry
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$issue = $this->issue->getByID($issueID);
|
||||
$this->send(200, $this->format($issue, 'createdDate:time,editedDate:time,assignedDate:time'));
|
||||
return $this->send(200, $this->format($issue, 'createdDate:time,editedDate:time,assignedDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,7 +66,7 @@ class issueEntry extends Entry
|
||||
*
|
||||
* @param int $issueID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($issueID)
|
||||
{
|
||||
@@ -74,6 +74,6 @@ class issueEntry extends Entry
|
||||
$control->delete($issueID, 'true');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class issuesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ class issuesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
private function getProjectIssues($projectID)
|
||||
{
|
||||
@@ -74,7 +74,7 @@ class issuesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -95,6 +95,6 @@ class issuesEntry extends entry
|
||||
|
||||
$issue = $this->loadModel('issue')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($issue, 'createdDate:time,editedDate:time,assignedDate:time'));
|
||||
return $this->send(201, $this->format($issue, 'createdDate:time,editedDate:time,assignedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class jobsEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class langsEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class meetingsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ class meetingsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -75,6 +75,6 @@ class meetingsEntry extends entry
|
||||
|
||||
$risk = $this->loadModel('risk')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
return $this->send(201, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class modulesEntry extends Entry
|
||||
class modulesEntry extends entry
|
||||
{
|
||||
/**
|
||||
* Get method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ class mrEntry extends baseEntry
|
||||
* Create mr.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -28,6 +28,6 @@ class mrEntry extends baseEntry
|
||||
if(dao::isError()) $this->sendError(400, dao::getError());
|
||||
|
||||
$MR = $this->mr->getByID($MRID);
|
||||
$this->send(201, $MR);
|
||||
return $this->send(201, $MR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class optionsEntry extends entry
|
||||
*
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($type = '')
|
||||
{
|
||||
|
||||
@@ -15,10 +15,10 @@ class pingEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
$this->send(200, array('token' => session_id(), 'tokenLife' => ini_get('session.gc_maxlifetime')));
|
||||
return $this->send(200, array('token' => session_id(), 'tokenLife' => ini_get('session.gc_maxlifetime')));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class pipelinesEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class productEntry extends Entry
|
||||
class productEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID)
|
||||
{
|
||||
@@ -103,7 +103,7 @@ class productEntry extends Entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($productID)
|
||||
{
|
||||
@@ -120,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'));
|
||||
return $this->send(200, $this->format($product, 'createdDate:time,whitelist:userList,createdBy:user,PO:user,RD:user,QD:user'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,7 +128,7 @@ class productEntry extends Entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($productID)
|
||||
{
|
||||
@@ -136,6 +136,6 @@ class productEntry extends Entry
|
||||
$control->delete($productID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class productIssueEntry extends entry
|
||||
*
|
||||
* @param string $issueID, such as task-1, story-1, bug-1
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($issueID)
|
||||
{
|
||||
@@ -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();
|
||||
@@ -142,7 +142,7 @@ class productIssueEntry extends entry
|
||||
}
|
||||
$issue->openedBy = $profileList[$issue->openedBy];
|
||||
|
||||
$this->send(200, array('issue' => $this->format($issue, 'openedDate:time,lastEditedDate:time')));
|
||||
return $this->send(200, array('issue' => $this->format($issue, 'openedDate:time,lastEditedDate:time')));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,7 +17,7 @@ class productIssuesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID)
|
||||
{
|
||||
@@ -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';
|
||||
@@ -166,7 +166,7 @@ class productIssuesEntry extends entry
|
||||
$issues = $page < 1 ? array() : array_slice($issues, ($page-1) * $limit, $limit);
|
||||
|
||||
$result = $this->processIssues($issues);
|
||||
$this->send(200, array('page' => $page, 'total' => $total, 'limit' => $limit, 'issues' => $result));
|
||||
return $this->send(200, array('page' => $page, 'total' => $total, 'limit' => $limit, 'issues' => $result));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class productplanEntry extends Entry
|
||||
class productplanEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($planID)
|
||||
{
|
||||
@@ -43,7 +43,7 @@ class productplanEntry extends Entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($planID)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ class productplanEntry extends Entry
|
||||
$plan->stories = $data->data->planStories;
|
||||
$plan->bugs = $data->data->planBugs;
|
||||
|
||||
$this->send(200, $this->format($plan, 'begin:date,end:date,deleted:bool,stories:array,bugs:array'));
|
||||
return $this->send(200, $this->format($plan, 'begin:date,end:date,deleted:bool,stories:array,bugs:array'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,7 +79,7 @@ class productplanEntry extends Entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($planID)
|
||||
{
|
||||
@@ -87,6 +87,6 @@ class productplanEntry extends Entry
|
||||
$control->delete($planID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplanLinkBugsEntry extends entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($planID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplanLinkStoriesEntry extends entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($planID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplansEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class productplansEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($productID = 0)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplanUnlinkBugsEntry extends entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($planID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productplanUnlinkStoriesEntry extends entry
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($planID)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ class productProjectsEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -25,7 +25,7 @@ class productProjectsEntry extends entry
|
||||
$appendFields = $this->param('fields', '');
|
||||
|
||||
$control = $this->loadController('product', 'project');
|
||||
$control->project($this->param('status', 'all'), $productID, $this->param('branch', 0), $this->param('involved', 0), $this->param('order', 'order_desc'));
|
||||
$control->project($this->param('status', 'all'), $productID, $this->param('branch', 0), $this->param('involved', 0), $this->param('order', 'order_desc'), 0, $this->param('limit', 20), $this->param('page', 1));
|
||||
$data = $this->getData();
|
||||
|
||||
if(isset($data->status) and $data->status == 'success')
|
||||
@@ -59,7 +59,7 @@ class productProjectsEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -84,14 +84,14 @@ class productProjectsEntry extends entry
|
||||
|
||||
$project = $this->loadModel('project')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($project, 'openedDate:time,lastEditedDate:time,closedDate:time,canceledDate:time'));
|
||||
return $this->send(201, $this->format($project, 'openedDate:time,lastEditedDate:time,closedDate:time,canceledDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -123,6 +123,6 @@ class productProjectsEntry extends entry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
+10
-11
@@ -16,7 +16,7 @@ class productsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($programID = 0)
|
||||
{
|
||||
@@ -24,7 +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);
|
||||
$projectID = $this->param('project', 0);
|
||||
$mergeChildren = $this->param('mergeChildren', '');
|
||||
|
||||
if($programID)
|
||||
@@ -55,7 +55,7 @@ class productsEntry extends entry
|
||||
else
|
||||
{
|
||||
$control = $this->loadController('product', 'all');
|
||||
$control->all($this->param('status', 'all'), $this->param('order', 'order_asc'), 0, 0, $this->param('limit', '20'), $this->param('page', '1') );
|
||||
$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();
|
||||
@@ -108,7 +108,7 @@ class productsEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -130,14 +130,14 @@ class productsEntry extends entry
|
||||
$product = $this->loadModel('product')->getByID($data->id);
|
||||
$product = $this->format($product, 'createdDate:time,whitelist:userList,createdBy:user,PO:user,RD:user,QD:user');
|
||||
|
||||
$this->send(200, $product);
|
||||
return $this->send(200, $product);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get dropmenu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -168,15 +168,15 @@ class productsEntry extends entry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge children products.
|
||||
*
|
||||
* @param array $products
|
||||
* @param array $products
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function mergeChildren($products)
|
||||
{
|
||||
@@ -192,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)
|
||||
|
||||
@@ -9,21 +9,21 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class programEntry extends Entry
|
||||
class programEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($programID)
|
||||
{
|
||||
$program = $this->loadModel('program')->getByID($programID);
|
||||
if(!$program) return $this->send404();
|
||||
|
||||
$this->send(200, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
return $this->send(200, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ class programEntry extends Entry
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($programID)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ class programEntry extends Entry
|
||||
|
||||
$this->getData();
|
||||
$program = $this->program->getByID($programID);
|
||||
$this->send(200, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
return $this->send(200, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,16 +55,16 @@ class programEntry extends Entry
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
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);
|
||||
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,20 +9,20 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class programsEntry extends Entry
|
||||
class programsEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
$_COOKIE['showClosed'] = $this->param('showClosed', 0);
|
||||
$mergeChildren = $this->param('mergeChildren', 0);
|
||||
|
||||
$this->config->systemMode = 'new';
|
||||
$this->config->systemMode = 'ALM';
|
||||
|
||||
$fields = $this->param('fields', '');
|
||||
if(stripos(strtolower(",{$fields},"), ",dropmenu,") !== false) return $this->getDropMenu();
|
||||
@@ -71,7 +71,7 @@ class programsEntry extends Entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -89,14 +89,14 @@ class programsEntry extends Entry
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$program = $this->loadModel('program')->getByID($data->id);
|
||||
$this->send(201, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
return $this->send(201, $this->format($program, 'begin:date,end:date,PO:user,PM:user,QD:user,RD:user,realBegan:date,realEnd:date,openedBy:user,openedDate:time,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,deleted:bool,whitelist:userList'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -122,6 +122,6 @@ class programsEntry extends Entry
|
||||
}
|
||||
}
|
||||
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ class projectEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($projectID)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ class projectEntry extends entry
|
||||
if(!isset($data->result)) return $this->sendError(400, 'error');
|
||||
|
||||
$project = $this->project->getByID($projectID);
|
||||
$this->send(200, $this->format($project, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,realBegan:date,realEnd:date,PM:user,whitelist:userList,deleted:bool'));
|
||||
return $this->send(200, $this->format($project, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,realBegan:date,realEnd:date,PM:user,whitelist:userList,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,7 +131,7 @@ class projectEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($projectID)
|
||||
{
|
||||
@@ -139,6 +139,6 @@ class projectEntry extends entry
|
||||
$control->delete($projectID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectBugsEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectCasesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
|
||||
@@ -16,15 +16,17 @@ class projectReleasesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
if(empty($projectID)) $projectID = $this->param('project');
|
||||
if(empty($projectID)) return $this->sendError(400, 'Need project id.');
|
||||
|
||||
$page = intval($this->param('page', 1));
|
||||
$limit = intval($this->param('limit', 20));
|
||||
$control = $this->loadController('projectrelease', 'browse');
|
||||
$control->browse($projectID, $this->param('execution', 0), $this->param('status', 'all'), $this->param('order', 't1.date_desc'));
|
||||
$control->browse($projectID, $this->param('execution', 0), $this->param('status', 'all'), $this->param('order', 't1.date_desc'), 0, $limit, $page);
|
||||
|
||||
/* Response */
|
||||
$data = $this->getData();
|
||||
@@ -47,7 +49,7 @@ class projectReleasesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -70,6 +72,6 @@ class projectReleasesEntry extends entry
|
||||
|
||||
$release = $this->loadModel('projectrelease')->getByID($data->id);
|
||||
|
||||
$this->send(201, $release);
|
||||
return $this->send(201, $release);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectsEntry extends entry
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($programID = 0)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class projectsEntry extends entry
|
||||
|
||||
$_COOKIE['involved'] = $this->param('involved', 0);
|
||||
|
||||
$this->config->systemMode = 'new';
|
||||
$this->config->systemMode = 'ALM';
|
||||
|
||||
if($programID)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ class projectsEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -99,14 +99,14 @@ class projectsEntry extends entry
|
||||
|
||||
$project = $this->loadModel('project')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($project, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,realBegan:date,realEnd:date,PM:user,whitelist:userList,deleted:bool'));
|
||||
return $this->send(201, $this->format($project, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,closedBy:user,closedDate:time,canceledBy:user,canceledDate:time,realBegan:date,realEnd:date,PM:user,whitelist:userList,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -138,6 +138,6 @@ class projectsEntry extends entry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class projectStoriesEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class releaseEntry extends Entry
|
||||
class releaseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $planID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($releaseID)
|
||||
{
|
||||
@@ -37,7 +37,7 @@ class releaseEntry extends Entry
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($releaseID)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ class releaseEntry extends Entry
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$release = $this->release->getByID($releaseID);
|
||||
$this->sendSuccess(200, $this->format($release, 'date:date,deleted:bool'));
|
||||
return $this->sendSuccess(200, $this->format($release, 'date:date,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,7 +62,7 @@ class releaseEntry extends Entry
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($releaseID)
|
||||
{
|
||||
@@ -70,6 +70,6 @@ class releaseEntry extends Entry
|
||||
$control->delete($releaseID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class releasesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -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();
|
||||
|
||||
@@ -15,7 +15,7 @@ class reportsEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
@@ -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();
|
||||
|
||||
@@ -15,7 +15,7 @@ class repoRulesEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
@@ -27,6 +27,6 @@ class repoRulesEntry 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, $data->rules);
|
||||
return $this->send(200, $data->rules);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class reposEntry extends entry
|
||||
* GET method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get()
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class riskEntry extends Entry
|
||||
class riskEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $riskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($riskID)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ class riskEntry extends Entry
|
||||
*
|
||||
* @param int $riskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($riskID)
|
||||
{
|
||||
@@ -54,7 +54,7 @@ class riskEntry extends Entry
|
||||
if(isset($data->status) and $data->status == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$risk = $this->risk->getByID($riskID);
|
||||
$this->send(200, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
return $this->send(200, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -62,7 +62,7 @@ class riskEntry extends Entry
|
||||
*
|
||||
* @param int $riskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($riskID)
|
||||
{
|
||||
@@ -70,6 +70,6 @@ class riskEntry extends Entry
|
||||
$control->delete($riskID, 'true');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class risksEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($projectID = 0)
|
||||
{
|
||||
@@ -56,7 +56,7 @@ class risksEntry extends entry
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($projectID = 0)
|
||||
{
|
||||
@@ -82,6 +82,6 @@ class risksEntry extends entry
|
||||
|
||||
$risk = $this->loadModel('risk')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
return $this->send(201, $this->format($risk, 'createdDate:time,editedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class stakeholdersEntry extends entry
|
||||
*
|
||||
* @param int $programID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($programID = 0)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ class stakeholdersEntry extends entry
|
||||
* POST method.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post()
|
||||
{
|
||||
@@ -88,14 +88,14 @@ class stakeholdersEntry extends entry
|
||||
|
||||
$project = $this->loadModel('project')->getByID($data->id);
|
||||
|
||||
$this->send(201, $this->format($project, 'openedDate:time,lastEditedDate:time,closedDate:time,canceledDate:time'));
|
||||
return $this->send(201, $this->format($project, 'openedDate:time,lastEditedDate:time,closedDate:time,canceledDate:time'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get drop menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getDropMenu()
|
||||
{
|
||||
@@ -127,6 +127,6 @@ class stakeholdersEntry extends entry
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->send(200, $dropMenu);
|
||||
return $this->send(200, $dropMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class storiesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -60,7 +60,7 @@ class storiesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($productID = 0)
|
||||
{
|
||||
@@ -68,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,parent,plan,module,moduleOptionMenu,source,sourceNote,category,pri,estimate,mailto,keywords,notifyemail,uid,URS';
|
||||
$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. */
|
||||
@@ -76,6 +76,7 @@ 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');
|
||||
@@ -87,6 +88,6 @@ class storiesEntry extends entry
|
||||
if(isset($data->result) and !isset($data->id)) return $this->sendError(400, $data->message);
|
||||
|
||||
$story = $this->loadModel('story')->getByID($data->id);
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyEntry extends Entry
|
||||
class storyEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($storyID)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ class storyEntry extends Entry
|
||||
$story->preAndNext['pre'] = $preAndNext->pre ? $preAndNext->pre->id : '';
|
||||
$story->preAndNext['next'] = $preAndNext->next ? $preAndNext->next->id : '';
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +89,7 @@ class storyEntry extends Entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($storyID)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ class storyEntry extends Entry
|
||||
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'));
|
||||
return $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'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,7 +116,7 @@ class storyEntry extends Entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($storyID)
|
||||
{
|
||||
@@ -124,6 +124,6 @@ class storyEntry extends Entry
|
||||
$control->delete($storyID, 'yes');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
|
||||
class storyActiveEntry extends Entry
|
||||
class storyActiveEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class storyActiveEntry extends Entry
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
|
||||
$this->send(200, $story);
|
||||
return $this->send(200, $story);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyAssignToEntry extends Entry
|
||||
class storyAssignToEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -32,6 +32,6 @@ class storyAssignToEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyChangeEntry extends Entry
|
||||
class storyChangeEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -45,6 +45,6 @@ class storyChangeEntry extends Entry
|
||||
|
||||
$story = $this->loadModel('story')->getByID($storyID);
|
||||
|
||||
$this->send(200, $this->format($story, 'openedDate:time,assignedDate:time,reviewedDate:time,lastEditedDate:time,closedDate:time'));
|
||||
return $this->send(200, $this->format($story, 'openedDate:time,assignedDate:time,reviewedDate:time,lastEditedDate:time,closedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyCloseEntry extends Entry
|
||||
class storyCloseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -32,6 +32,6 @@ class storyCloseEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyRecallEntry extends Entry
|
||||
class storyRecallEntry extends entry
|
||||
{
|
||||
/**
|
||||
* Delete method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($storyID)
|
||||
{
|
||||
@@ -24,7 +24,7 @@ class storyRecallEntry extends Entry
|
||||
$control->recall($storyID);
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class storyRecordEstimateEntry extends Entry
|
||||
class storyRecordEstimateEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($storyID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class storyRecordEstimateEntry extends Entry
|
||||
|
||||
$effort = $data->data->efforts;
|
||||
|
||||
$this->send(200, array('effort' => $effort));
|
||||
return $this->send(200, array('effort' => $effort));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ class storyRecordEstimateEntry extends Entry
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -56,6 +56,6 @@ class storyRecordEstimateEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
|
||||
class storyReviewEntry extends Entry
|
||||
class storyReviewEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($storyID)
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class storyReviewEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ class tabsEntry extends baseEntry
|
||||
*
|
||||
* @param string $moduleName work|
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($moduleName)
|
||||
{
|
||||
@@ -29,7 +29,7 @@ class tabsEntry extends baseEntry
|
||||
foreach($tabs as $menuKey)
|
||||
{
|
||||
if(!isset($this->lang->my->$menuKey)) continue;
|
||||
if(!common::hasPriv('my', $menuKey)) continue;
|
||||
if(!common::hasPriv('my', 'work')) continue;
|
||||
$label = $this->lang->my->$menuKey;
|
||||
if($menuKey == 'calendar') $label = $this->lang->my->calendarAction;
|
||||
|
||||
@@ -76,6 +76,6 @@ class tabsEntry extends baseEntry
|
||||
}
|
||||
}
|
||||
|
||||
$this->send(200, array('tabs' => $menus));
|
||||
return $this->send(200, array('tabs' => $menus));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskEntry extends Entry
|
||||
class taskEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($taskID)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ class taskEntry extends Entry
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,7 +98,7 @@ class taskEntry extends Entry
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($taskID)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ class taskEntry extends Entry
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -122,7 +122,7 @@ class taskEntry extends Entry
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($taskID)
|
||||
{
|
||||
@@ -130,6 +130,6 @@ class taskEntry extends Entry
|
||||
$control->delete(0, $taskID, 'true');
|
||||
|
||||
$this->getData();
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
**/
|
||||
class taskActiveEntry extends Entry
|
||||
class taskActiveEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -32,7 +32,7 @@ class taskActiveEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskAssignToEntry extends Entry
|
||||
class taskAssignToEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -36,6 +36,6 @@ class taskAssignToEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time'));
|
||||
return $this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskBatchCreateEntry extends Entry
|
||||
class taskBatchCreateEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($executionID = 0)
|
||||
{
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskCloseEntry extends Entry
|
||||
class taskCloseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -34,6 +34,6 @@ class taskCloseEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $task);
|
||||
return $this->send(200, $task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskComponentEntry extends Entry
|
||||
class taskComponentEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -35,7 +35,7 @@ class taskComponentEntry extends Entry
|
||||
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'));
|
||||
return $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)
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskFinishEntry extends Entry
|
||||
class taskFinishEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -38,9 +38,10 @@ class taskFinishEntry extends Entry
|
||||
$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(isset($data->result) and $data->result == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time'));
|
||||
return $this->send(200, $this->format($task, 'openedDate:time,assignedDate:time,realStarted:time,finishedDate:time,canceledDate:time,closedDate:time,lastEditedDate:time'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskPauseEntry extends Entry
|
||||
class taskPauseEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -34,6 +34,6 @@ class taskPauseEntry extends Entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $task);
|
||||
return $this->send(200, $task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskRecordEstimateEntry extends Entry
|
||||
class taskRecordEstimateEntry extends entry
|
||||
{
|
||||
/**
|
||||
* GET method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($taskID)
|
||||
{
|
||||
@@ -36,10 +36,10 @@ class taskRecordEstimateEntry extends Entry
|
||||
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();
|
||||
$effort = new stdclass();
|
||||
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));
|
||||
return $this->send(200, array('effort' => $effort));
|
||||
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ class taskRecordEstimateEntry extends Entry
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -73,6 +73,6 @@ class taskRecordEstimateEntry extends Entry
|
||||
|
||||
$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'));
|
||||
return $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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* The task start 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 Lu Fei <lufei@easycorp.ltd>
|
||||
* @package entries
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskRestartEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$fields = 'assignedTo,realStarted';
|
||||
$this->batchSetPost($fields, $task);
|
||||
|
||||
$fields = 'consumed,left,comment';
|
||||
$this->batchSetPost($fields);
|
||||
|
||||
$control = $this->loadController('task', 'restart');
|
||||
$this->requireFields('consumed,left');
|
||||
$control->restart($taskID);
|
||||
|
||||
$data = $this->getData();
|
||||
if(!$data) return $this->send400('error');
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
return $this->send(200, $task);
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ class tasksEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($executionID = 0)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ class tasksEntry extends entry
|
||||
*
|
||||
* @param int $executionID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($executionID)
|
||||
{
|
||||
@@ -78,6 +78,6 @@ class tasksEntry extends entry
|
||||
|
||||
$task = $this->loadModel('task')->getByID($data->id);
|
||||
|
||||
$this->send(201, $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'));
|
||||
return $this->send(201, $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'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
* @version 1
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
class taskStartEntry extends Entry
|
||||
class taskStartEntry extends entry
|
||||
{
|
||||
/**
|
||||
* POST method.
|
||||
*
|
||||
* @param int $taskID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($taskID)
|
||||
{
|
||||
@@ -32,9 +32,10 @@ class taskStartEntry extends Entry
|
||||
$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(isset($data->result) and $data->result == 'fail') return $this->sendError(zget($data, 'code', 400), $data->message);
|
||||
|
||||
$task = $this->loadModel('task')->getByID($taskID);
|
||||
|
||||
$this->send(200, $task);
|
||||
return $this->send(200, $task);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class testcaseEntry extends entry
|
||||
*
|
||||
* @param int $testcaseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($testcaseID)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ class testcaseEntry extends entry
|
||||
$case = $data->case;
|
||||
$case->steps = (isset($case->steps) and !empty($case->steps)) ? array_values(get_object_vars($case->steps)) : array();
|
||||
|
||||
$this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,steps:array,deleted:bool'));
|
||||
return $this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,steps:array,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ class testcaseEntry extends entry
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function put($caseID)
|
||||
{
|
||||
@@ -73,7 +73,7 @@ class testcaseEntry extends entry
|
||||
|
||||
$this->getData();
|
||||
$case = $this->testcase->getByID($caseID);
|
||||
$this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,steps:array,deleted:bool'));
|
||||
return $this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,steps:array,deleted:bool'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -81,7 +81,7 @@ class testcaseEntry extends entry
|
||||
*
|
||||
* @param int $testcaseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($testcaseID)
|
||||
{
|
||||
@@ -90,6 +90,6 @@ class testcaseEntry extends entry
|
||||
|
||||
$this->getData();
|
||||
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class testcasesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($productID = 0)
|
||||
{
|
||||
@@ -26,7 +26,7 @@ class testcasesEntry extends entry
|
||||
$this->app->cookie->caseModule = 0;
|
||||
$this->app->cookie->caseSuite = 0;
|
||||
|
||||
$type = 'all';
|
||||
$type = $this->param('status', 'all');
|
||||
$param = 0;
|
||||
$moduleID = $this->param('module', 0);
|
||||
if($moduleID)
|
||||
@@ -63,7 +63,7 @@ class testcasesEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($productID = 0)
|
||||
{
|
||||
@@ -106,6 +106,6 @@ class testcasesEntry extends entry
|
||||
$case = $this->loadModel('testcase')->getByID($data->id);
|
||||
$case->steps = (isset($case->steps) and !empty($case->steps)) ? array_values($case->steps) : array();
|
||||
|
||||
$this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,deleted:bool'));
|
||||
return $this->send(200, $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,deleted:bool'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class testresultsEntry extends entry
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($caseID = 0)
|
||||
{
|
||||
@@ -50,7 +50,7 @@ class testresultsEntry extends entry
|
||||
*
|
||||
* @param int $caseID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function post($caseID = 0)
|
||||
{
|
||||
@@ -60,18 +60,24 @@ class testresultsEntry extends entry
|
||||
$case = $this->loadModel('testcase')->getByID($caseID);
|
||||
$runID = $this->param('runID', 0);
|
||||
$version = $this->param('version', $case->version);
|
||||
$steps = $this->getStepIDList($runID, $caseID, $version);
|
||||
|
||||
$this->setPost('case', $caseID);
|
||||
$this->setPost('version', $version);
|
||||
|
||||
/* Set steps and expects. */
|
||||
if(isset($this->requestBody->steps))
|
||||
{
|
||||
$results = array();
|
||||
$reals = array();
|
||||
foreach($this->requestBody->steps as $step)
|
||||
foreach($this->requestBody->steps as $index => $step)
|
||||
{
|
||||
$results[] = $step->result;
|
||||
$reals[] = $step->real;
|
||||
/* When post data more than case steps, break after take useful data. */
|
||||
if($index + 1 > count($steps)) break;
|
||||
|
||||
$stepID = $steps[$index];
|
||||
$results[$stepID] = $step->result;
|
||||
$reals[$stepID] = $step->real;
|
||||
}
|
||||
$this->setPost('steps', $results);
|
||||
$this->setPost('reals', $reals);
|
||||
@@ -83,6 +89,37 @@ class testresultsEntry extends entry
|
||||
$data = $this->getData();
|
||||
if(isset($data->result) and $data->result == 'fail') return $this->sendError(400, $data->message);
|
||||
|
||||
$this->send(200, array());
|
||||
return $this->send(200, array());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get steps key.
|
||||
*
|
||||
* @param int $runID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStepIDList($runID, $caseID, $version)
|
||||
{
|
||||
if($runID)
|
||||
{
|
||||
$run = $this->testtask->getRunById($runID);
|
||||
}
|
||||
else
|
||||
{
|
||||
$run = new stdclass();
|
||||
$run->case = $this->loadModel('testcase')->getById($caseID, $version);
|
||||
}
|
||||
|
||||
foreach($run->case->steps as $key => $step)
|
||||
{
|
||||
/* Unset step if step is a group. */
|
||||
if($step->type == 'group')
|
||||
{
|
||||
unset($run->case->steps[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
return array_keys($run->case->steps);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class testsuiteEntry extends entry
|
||||
*
|
||||
* @param int $testsuiteID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function get($testsuiteID)
|
||||
{
|
||||
@@ -36,7 +36,7 @@ class testsuiteEntry extends entry
|
||||
$suite->testcases[] = $this->format($case, 'openedBy:user,openedDate:time,lastEditedBy:user,lastEditedDate:time,lastRunDate:time,scriptedDate:date,reviewedBy:user,reviewedDate:date,deleted:bool');
|
||||
}
|
||||
|
||||
$this->send(200, $suite);
|
||||
return $this->send(200, $suite);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -44,7 +44,7 @@ class testsuiteEntry extends entry
|
||||
*
|
||||
* @param int $testsuiteID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function delete($testsuiteID)
|
||||
{
|
||||
@@ -53,6 +53,6 @@ class testsuiteEntry extends entry
|
||||
|
||||
$this->getData();
|
||||
|
||||
$this->sendSuccess(200, 'success');
|
||||
return $this->sendSuccess(200, 'success');
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user