I want to add a note on a Redmine issue. I am using Drupal and PHP for this.
I can fetch data and post issues so I know connectivity to Redmine through the API is fine.
I have had a look at the documentation for the Redmine API at http://www.redmine.org/projects/redmine/wiki/Rest_api
At the bottom for issue creation it gives a format of the following:
PUT /issues/[id].json
{
"issue": {
"subject": "Example issue (was: Test issue)",
"notes": "Changing the subject"
}
}
Now when I create an issue for example, the array is a simple one dimensional one. What is the structure for the array of data which I need to pass for this issue updating process.
Example of my issue creation array:
$redmineIssueArray = array();
$redmineIssueArray['project_id'] = 2;
$redmineIssueArray['subject'] = $typeBug . " $date";
$redmineIssueArray['priority_id'] = 4;
$redmineIssueArray['description'] = $bugDesc;
$redmineIssueArray['assigned_to_id'] = 2;
Just a note, the function to update an issue from the redmine module in Drupal is:
redmine_rest_api_issue_update();
If you don’t have to use Drupal functions, use PHPActiveResource and updating an issue will be easy like: