Index: app/controllers/application_controller.rb =================================================================== --- app/controllers/application_controller.rb (revision 19958) +++ app/controllers/application_controller.rb (working copy) @@ -564,8 +564,13 @@ end def render_feed(items, options={}) + @type = options[:type] @items = (items || []).to_a - @items.sort! {|x,y| y.event_datetime <=> x.event_datetime } + if @type == :issues + @items.sort! {|x,y| y.updated_on <=> x.updated_on } + else + @items.sort! {|x,y| y.event_datetime <=> x.event_datetime } + end @items = @items.slice(0, Setting.feeds_limit.to_i) @title = options[:title] || Setting.app_title render :template => "common/feed", :formats => [:atom], :layout => false, Index: app/controllers/issues_controller.rb =================================================================== --- app/controllers/issues_controller.rb (revision 19958) +++ app/controllers/issues_controller.rb (working copy) @@ -63,7 +63,8 @@ format.atom do @issues = @query.issues(:limit => Setting.feeds_limit.to_i) render_feed(@issues, - :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}") + :title => "#{@project || Setting.app_title}: #{l(:label_issue_plural)}", + :type => :issues) end format.csv do @issues = @query.issues(:limit => Setting.issues_export_limit.to_i) Index: app/views/common/feed.atom.builder =================================================================== --- app/views/common/feed.atom.builder (revision 19958) +++ app/views/common/feed.atom.builder (working copy) @@ -9,7 +9,7 @@ xml.link "rel" => "alternate", "href" => url_for(:params => request.query_parameters.merge(:format => nil, :key => nil), :only_path => false, :protocol => protocol, :host => host) xml.id home_url xml.icon favicon_url - xml.updated((@items.first ? @items.first.event_datetime : Time.now).xmlschema) + xml.updated((@items.first ? (@type == :issues ? @items.first.updated_on : @items.first.event_datetime) : Time.now).xmlschema) xml.author { xml.name "#{Setting.app_title}" } xml.generator(:uri => Redmine::Info.url) { xml.text! Redmine::Info.app_name; } @items.each do |item| @@ -22,7 +22,7 @@ end xml.link "rel" => "alternate", "href" => url xml.id url - xml.updated item.event_datetime.xmlschema + xml.updated (@type == :issues ? item.updated_on : item.event_datetime).xmlschema author = item.event_author if item.respond_to?(:event_author) xml.author do xml.name(author)