Defect #13777

REST API for issues with included changesets does not include which repository the revision is from

Added by Cheyenne Wills over 9 years ago. Updated about 1 year ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Category:REST API
Target version:-
Resolution: Affected version:


(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.


 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.


#1 Updated by Toshi MARUYAMA over 9 years ago

  • Category changed from Issues to REST API

#2 Updated by Cheyenne Wills over 6 years ago

We have a user requesting this feature. Any possibility of someone looking into this?

#3 Updated by Rafal Jezaraf about 6 years ago

This repository id would be very useful in changeset object.

#4 Updated by Jan Catrysse about 1 year ago

I added this in a plugin, but it's in alpha stage and should be tested.

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 => unless changeset.user.nil?
        api.comments changeset.comments
        api.committed_on changeset.committed_on
        api.repository changeset.repository
  end if include_in_api_response?('changesets')

Also available in: Atom PDF