diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-03-03 17:18:58 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-03-03 17:18:58 +0000 |
commit | 331c1f674dc2a8b17062a1422e14189d116f4277 (patch) | |
tree | 41c19b3a7feb8eb755d05da1291bc5540ac3d8c5 /app | |
parent | 3faa3693d16207a0398adb389f244c6de396e271 (diff) | |
download | redmine-331c1f674dc2a8b17062a1422e14189d116f4277.tar.gz redmine-331c1f674dc2a8b17062a1422e14189d116f4277.zip |
Add attachment information to issues.xml in REST API (#12181).
git-svn-id: http://svn.redmine.org/redmine/trunk@16360 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/views/issues/index.api.rsb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/issues/index.api.rsb b/app/views/issues/index.api.rsb index 7660ccbd5..4bba32549 100644 --- a/app/views/issues/index.api.rsb +++ b/app/views/issues/index.api.rsb @@ -26,6 +26,12 @@ api.array :issues, api_meta(:total_count => @issue_count, :offset => @offset, :l api.updated_on issue.updated_on api.closed_on issue.closed_on + api.array :attachments do + issue.attachments.each do |attachment| + render_api_attachment(attachment, api) + end + end if include_in_api_response?('attachments') + api.array :relations do issue.relations.each do |relation| api.relation(:id => relation.id, :issue_id => relation.issue_from_id, :issue_to_id => relation.issue_to_id, :relation_type => relation.relation_type, :delay => relation.delay) |