Defect #28204

Too large avatar breaks gantt when assignee is a group

Added by Go MAEDA 3 months ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Gantt
Target version:3.3.7
Resolution:Fixed Affected version:3.3.6

Description

A 128px wide avatar icon breaks gantt view when the assignee of an issue is a group and "Use Gravatar user icons" setting is enabled.

The problem is introduced in Redmine 3.3.6 and 3.4.4 by #26699. The cause is that the HTML doesn't include "width" and "height" option because image_tag in Rails 4 doesn't accept an integer value for ":size" option (Rails 5 accepts both integer and string value, so the current trunk is not affected).

Redmine 3.4 (img element doesn't have "width" and "height" attributes):

<img alt="" title="Assignee: A Team" class="gravatar icon-gravatar" default="default" src="/images/anonymous.png?1518850381">

The current trunk (img element has "width" and "height" attributes):

<img alt="" title="Assignee: A Team" class="gravatar icon-gravatar" default="default" src="/images/anonymous.png?1517405352" width="13" height="13">

too-large-icon@2x.png (36.1 KB) Go MAEDA, 2018-02-17 10:33

test_size_option_for_avatar_should_accept_integer_value.diff Magnifier - test to catch this issue (529 Bytes) Go MAEDA, 2018-02-18 00:35

size_option_for_avatar_should_accept_integer_value.diff Magnifier - fix for this issue (no need to apply this fix to the trunk) (537 Bytes) Go MAEDA, 2018-02-18 00:36


Related issues

Related to Redmine - Defect #26699: Anonymous user should have their icon Closed
Related to Redmine - Defect #28208: Anonymous icon is wrongly displayed when assignee is a group Closed

Associated revisions

Revision 17201
Added by Go MAEDA 3 months ago

Test that "img" tag for an avatar of AnonymousUser has "width" and "height" attributes (#28204).

Patch by Go MAEDA.

Revision 17202
Added by Go MAEDA 3 months ago

3.4-stable: Too large avatar breaks gantt when assignee is a group (#28204).

Patch by Go MAEDA.

Revision 17203
Added by Go MAEDA 3 months ago

3.3-stable: Too large avatar breaks gantt when assignee is a group (#28204).

Patch by Go MAEDA.

History

#1 Updated by Go MAEDA 3 months ago

  • Related to Defect #26699: Anonymous user should have their icon added

#2 Updated by Go MAEDA 3 months ago

#4 Updated by Mischa The Evil 3 months ago

  • Target version set to 3.3.7

#5 Updated by Go MAEDA 3 months ago

  • Related to Defect #28208: Anonymous icon is wrongly displayed when assignee is a group added

#6 Updated by Go MAEDA 3 months ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the fix to 3.4-stable and 3.3-stable branch.

Mischa, thank you for reviewing the patch.

Also available in: Atom PDF