Defect #13777
openREST API for issues with included changesets does not include which repository the revision is from
0%
Description
(Not sure if this is a defect or a possible feature request)
Redmine 1.4.5 ================================================= Ruby version 1.8.7 (x86_64-linux) RubyGems version 1.8.24 Rack version 1.1.3 Rails version 2.3.15 Active Record version 2.3.15 Active Resource version 2.3.15 Action Mailer version 2.3.15 Active Support version 2.3.15 Application root /var/lib/redmine Environment production Database adapter mysql Database schema version 20120301153455 About your Redmine plugins Redmine ChangeAuthor plugin 0.0.2 Smart issues sort plugin 0.3.1 Redmine plugin views revisions plugin 0.0.1 Redmine Vendor Display plugin 1.0 Extra query operators plugin 0.1.1 Redmine RPPS customization plugin 0.1.0 Redmine Groups plugin 1.0.0 Mylyn Connector plugin 2.7.6.stable Project Subscription 0.0.1b Redmine hidesidebar plugin 0.1.0 Redmine Better Gantt Chart plugin 0.6.5 Issue query operators plugin 0.0.2 ==========================================================
Problem description.
REST API.
GET /issues/[id].xml?include=changesets
The response does not include information identifying the changeset repository, just the revision number.
Looking at app/views/issues/show.api.rsb it appears that the code only returns the revision number (I checked current redmine trunk and it does the same).
The problem was "discovered" when a user used the REST API to retrieve an issue that contained a revision reference from another project.
Updated by Toshi MARUYAMA over 11 years ago
- Category changed from Issues to REST API
Updated by Cheyenne Wills almost 9 years ago
We have a user requesting this feature. Any possibility of someone looking into this?
Updated by Rafal Jezaraf over 8 years ago
This repository id would be very useful in changeset object.
Updated by Jan Catrysse over 3 years ago
I added this in a plugin, but it's in alpha stage and should be tested.
https://github.com/jcatrysse/redmine_view_issue_description
https://www.redmine.org/plugins/redmine_view_issue_description
But one could patch app/views/issues/show.api.rsb
api.array :changesets do @changesets.each do |changeset| api.changeset :revision => changeset.revision do api.user(:id => changeset.user_id, :name => changeset.user.name) unless changeset.user.nil? api.comments changeset.comments api.committed_on changeset.committed_on api.repository changeset.repository end end end if include_in_api_response?('changesets')