Project

General

Profile

Patch #22291 » 0001-Render-category-in-issue-page-as-a-link-to-all-open-.patch

Marius BĂLTEANU, 2018-08-21 23:42

View differences:

app/views/issues/show.html.erb
rows.left l(:field_assigned_to), (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
end
unless @issue.disabled_core_fields.include?('category_id') || (@issue.category.nil? && @issue.project.issue_categories.none?)
rows.left l(:field_category), (@issue.category ? @issue.category.name : "-"), :class => 'category'
rows.left l(:field_category), (@issue.category ? (link_to(@issue.category.name, project_issues_path(@issue.project, :status_id => 'o', :category_id => @issue.category.id, :set_filter => 1))) : "-"), :class => 'category'
end
unless @issue.disabled_core_fields.include?('fixed_version_id') || (@issue.fixed_version.nil? && @issue.assignable_versions.none?)
rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
test/functional/issues_controller_test.rb
assert_select 'table.attributes .category', 0
end
def test_show_should_display_category_as_link
get :show, :params => {
:id => 1
}
assert_response :success
assert_select '.attributes .category .value a[href=?]', '/projects/ecookbook/issues?category_id=1&set_filter=1&status_id=o', :text => "Printing"
end
def test_show_should_display_link_to_the_assignee
get :show, :params => {
:id => 2
(4-4/4)