kbsali/php-redmine-api — pull request #26 by yeah (2013-05-30 16:18:08+00:00)
Title: Handle attachments on Issue#create

This adds the ability to add attachments to new issues right when they are created. Without the patch, it's only possible to first create an issue and then add the attachment which is cumbersome since it pollutes the issue history and sends two emails to project members instead of one.

Using this patch, issues with new attachments can be created like in this example:

```php
$upload = json_decode( $client->api('attachment')->upload(file_get_contents('my_file.pdf')));

$issue = $client->api('issue')->create(array(
'project_id' => 'myproject',
'subject' => 'A test issue',
'description' => 'Here goes the issue description',
'uploads' => array(
array(
'token' => $upload->upload->token,
'filename' => 'my_file.pdf',
'description' => 'A description of the file could go here...',
'content_type'=> 'application/pdf'
)
)
));
```