- 1. API
- 2 Configuration
- 3. Department
-
4. User
- 4.1 Get Parameters of Add User
- 4.2 Add User
- 4.3 Get User List
- 5. Product
- 6. Project
-
7. Task
- 7.1 Get Task List
- 7.2 Get Task Optional Information
- 7.3 Add Task
- 7.4 Finish Task Optional Information
- 7.5 Finish Task
- 8. Bug
Add Project
- 2020-03-24 10:46:08
- John Ten
- 3093
- Last edited by Taotao on 2020-03-24 21:02:12
- Share links
Method Description |
This method is used to add a project. When adding a project, you can specify the person in charge and set the type and access control. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Notes | 1. If acl = custom, pass extra parameters, e.g. 'whitelist' => array(1, 2) means the IDs in privilege groups of the whitelist. 2. Extra fields of one or multiple products linked, , e.g. 'products' => array(4, 5) means to link Product ID=4 or 5. 3. Extra fields of one or multiple plans linked, e.g. 'plans' => array(5, 6) means to link Plan ID=5 to Product ID=4and to link Plan ID=6 to Product ID=5. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Example |
public function addProject() { include_once('../vendor/zentao/zentao.php'); $zentao = new \zentao(); $params = array( 'name' => 'ZenTao Dev', 'code' => 'zentao', 'begin' => '2020-01-01', 'end' => '2020-06-06', 'days' => '100', 'team' => 'Dev Team', 'type' => 'sprint', 'status' => 'wait', 'products[0]' => 0, 'plans[0]' => 0, 'desc' => 'ZenTao is a professional ALM tool.', 'acl' => 'custom', 'whitelist' => array(1, 2), 'products' => array(4, 5), 'plans' => array(5, 6) ); // request parameter $result = $zentao->addProject($params); return $result; } |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Request |
POST | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Method |
addProject |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameter |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Result |
success | error | ||||||||||||||||||||||||||||||||||||||||||||||||||||
{ "status": 1, "msg": "success", "result": "Saved" } |
{ "status": 0, "msg": "error", "result": { "name": [ "『Project name』 has 『ZenTao Dev』existed. Go to Admin->Data->Recycle to restore it if you have deleted it." ], "code": [ "『Project code』 has 『zentao』existed. Go to Admin->Data->Recycle to restore it if you have deleted it." ] } } |
Write a Comment
Support
- Book a Demo
- Tech Forum
- GitHub
- SourceForge
About Us
- Company
- Privacy Policy
- Term of Use
- Blogs
- Partners
Contact Us
- Leave a Message
- Email Us: [email protected]