Defect #10433
REST API Create Subproject not working
| Status: | Resolved | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% | |
| Category: | - | |||
| Target version: | - | |||
| Affected version: | Resolution: |
Description
I am using the REST API in PHP. I have been successful in creating projects, but unsuccessful in creating subprojects.
I used the "parent_id" parameter as shown here: http://www.redmine.org/issues/7404
Here is the code I am using:
$rm_project = new Redmine_Project(array(
'name' => 'Project',
'identifier' => 'project1',
'description' => 'desc'
));
$rm_project->save();
$rm_sub_project = new Redmine_Project(array(
'name' => 'Sub Project',
'parent_id' => $rm_project->id,
'identifier' => 'subproject1',
'description' => 'testing'
));
History
#1 Updated by Justin Da Silva about 1 year ago
- Status changed from New to Resolved
Sorry, my mistake... I forgot to run the save method on the subproject...
$rm_sub_project->save();
I have verified that the "parent_id" attribute does in fact work.