Project

General

Profile

Actions

Defect #10433

closed

REST API Create Subproject not working

Added by Justin Da Silva about 12 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

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: #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'
));
Actions #1

Updated by Justin Da Silva about 12 years 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.

Actions #2

Updated by Go MAEDA over 7 years ago

  • Category set to REST API
  • Status changed from Resolved to Closed
  • Resolution set to Invalid
Actions #3

Updated by Toshi MARUYAMA over 7 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF