From a259020e745ca09443b30529df14adbec2b2ab86 Mon Sep 17 00:00:00 2001 From: MAEDA Go Date: Fri, 11 Sep 2026 12:41:43 +0900 Subject: [PATCH] Show the assignee avatar next to the name on the issue page. --- app/assets/stylesheets/application.css | 1 + app/views/issues/show.html.erb | 2 +- test/functional/issues_controller_test.rb | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index bd78dadeb..676ee8c1a 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -921,6 +921,7 @@ div.issue .attributes {margin-block-start: 2em;} div.issue .attributes .attribute {padding-inline-start: 180px; clear: inline-start; min-block-size: 1.8em;} div.issue .attributes .attribute .label {inline-size: 170px; margin-inline-start: -180px; font-weight: bold; float: inline-start; overflow: clip visible; text-overflow: ellipsis;} div.issue .attribute .value {overflow:auto; text-overflow: ellipsis;} +div.issue .attribute .value .avatar {float: none; margin-block: 0; margin-inline: 0 4px;} div.issue .attribute.string_cf .value .wiki p {margin-block: 0;} div.issue .attribute.text_cf .value .wiki p:first-of-type {margin-block-start: 0;} div.issue.overdue .due-date .value { color: var(--oc-red-9); } diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 13d35cc82..d4ce56097 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -78,7 +78,7 @@ rows.left l(:field_priority), @issue.priority.name, :class => 'priority' end unless @issue.disabled_core_fields.include?('assigned_to_id') - rows.left l(:field_assigned_to), (@issue.assigned_to ? link_to_principal(@issue.assigned_to) : "-"), :class => 'assigned-to' + rows.left l(:field_assigned_to), (@issue.assigned_to ? safe_join([avatar(@issue.assigned_to, :size => "16"), link_to_principal(@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' diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index f039843c2..9d3380c43 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -2820,6 +2820,14 @@ class IssuesControllerTest < Redmine::ControllerTest end end + def test_show_should_display_avatar_of_the_assigned_user + get(:show, :params => {:id => 2}) + assert_response :success + assert_select '.assigned-to .value' do + assert_select '.avatar.s16 + a[href="/users/3"]' + end + end + def test_show_should_display_visible_changesets_from_other_projects project = Project.find(2) issue = project.issues.first -- 2.55.0