@journals.each_with_index {|j,i| j.indice = i+1}
@journals.reverse! if User.current.wants_comments_in_reverse_order?
- if User.current.allowed_to?(:view_changesets, @project)
- @changesets = @issue.changesets.visible.all
- @changesets.reverse! if User.current.wants_comments_in_reverse_order?
- end
+ @changesets = @issue.changesets.visible.all
+ @changesets.reverse! if User.current.wants_comments_in_reverse_order?
@relations = @issue.relations.select {|r| r.other_issue(@issue) && r.other_issue(@issue).visible? }
@allowed_statuses = @issue.new_statuses_allowed_to(User.current)
:time_entries,
:journals,
:journal_details,
- :queries
+ :queries,
+ :repositories,
+ :changesets
include Redmine::I18n
assert_no_tag 'a', :content => /Next/
end
+ def test_show_should_display_visible_changesets_from_other_projects
+ project = Project.find(2)
+ issue = project.issues.first
+ issue.changeset_ids = [102]
+ issue.save!
+ project.disable_module! :repository
+
+ @request.session[:user_id] = 2
+ get :show, :id => issue.id
+ assert_tag 'a', :attributes => {:href => "/projects/ecookbook/repository/revisions/3"}
+ end
+
def test_show_with_multi_custom_field
field = CustomField.find(1)
field.update_attribute :multiple, true