Project

General

Profile

Actions

Defect #11880

closed

Alternate theme colors by issue priority in issue list is wrong

Added by amree woot about 12 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Wont fix
Affected version:

Description

The issue list is using priority-4 for the normal priority issue (fresh Redmine installation uses priority-2)

Is this a bug? I noticed it after upgrading to Redmine 2.1.0. Changing the theme to the default theme doesn't fix it. I'm also not using any plugin.


Ruby version              1.9.3 (i686-linux)
RubyGems version          1.8.19
Rack version              1.4
Rails version             3.2.8
Active Record version     3.2.8
Action Pack version       3.2.8
Active Resource version   3.2.8
Action Mailer version     3.2.8
Active Support version    3.2.8
Middleware                Rack::Cache, ActionDispatch::Static, Rack::Lock, #<ActiveSupport::Cache::Strategy::LocalCache::Middleware:0x861fc44>, Rack::Runtime, Rack::MethodOverride, ActionDispatch::RequestId, Rails::Rack::Logger, ActionDispatch::ShowExceptions, ActionDispatch::DebugExceptions, ActionDispatch::RemoteIp, ActionDispatch::Callbacks, ActiveRecord::ConnectionAdapters::ConnectionManagement, ActiveRecord::QueryCache, ActionDispatch::Cookies, ActionDispatch::Session::CookieStore, ActionDispatch::Flash, ActionDispatch::ParamsParser, ActionDispatch::Head, Rack::ConditionalGet, Rack::ETag, ActionDispatch::BestStandardsSupport, OpenIdAuthentication
Application root          /opt/redmine
Environment               production
Database adapter          mysql2
Database schema version   20120731164049

Files

screenshot.png (151 KB) screenshot.png screenshot using google dev tools amree woot, 2012-09-19 12:10
application.css (3.19 KB) application.css Julien Petit, 2012-09-22 11:04
css_classes_with_position.diff (524 Bytes) css_classes_with_position.diff Clemens Bergmann, 2013-01-03 22:25

Related issues

Related to Redmine - Defect #11869: Issue.css_classes set wrong priority numberClosed

Actions
Related to Redmine - Defect #2071: Reordering priority-enumerations breaks alternate-theme's issue-colouringClosedJean-Philippe Lang2008-10-22

Actions
Has duplicate Redmine - Defect #12057: CSS class about issue priority is possibly based on the enumeration ID field instead of positionClosed

Actions
Has duplicate Redmine - Defect #13840: Style issues by priority position, not idClosed

Actions
Actions #1

Updated by amree woot about 12 years ago

This is my current table for enumerations:

mysql> select * from enumerations;
+----+-------------------------+----------+------------+-------------------+--------+------------+-----------+
| id | name                    | position | is_default | type              | active | project_id | parent_id |
+----+-------------------------+----------+------------+-------------------+--------+------------+-----------+
|  1 | User documentation      |        1 |          0 | DocumentCategory  |      1 |       NULL |      NULL |
|  2 | Technical documentation |        2 |          0 | DocumentCategory  |      1 |       NULL |      NULL |
|  3 | Low                     |        1 |          0 | IssuePriority     |      1 |       NULL |      NULL |
|  4 | Normal                  |        2 |          1 | IssuePriority     |      1 |       NULL |      NULL |
|  5 | High                    |        3 |          0 | IssuePriority     |      1 |       NULL |      NULL |
|  6 | Urgent                  |        4 |          0 | IssuePriority     |      1 |       NULL |      NULL |
|  7 | Immediate               |        5 |          0 | IssuePriority     |      1 |       NULL |      NULL |
|  8 | Design                  |        1 |          0 | TimeEntryActivity |      1 |       NULL |      NULL |
|  9 | Development             |        2 |          0 | TimeEntryActivity |      1 |       NULL |      NULL |
+----+-------------------------+----------+------------+-------------------+--------+------------+-----------+
Actions #2

Updated by Etienne Massip about 12 years ago

  • Subject changed from Issue row list is generating wrong css class for the priority to Alternate theme colors by issue priority in issue list is wrong
  • Status changed from New to Confirmed
  • Priority changed from Low to Normal
  • Target version set to 2.1.1

CSS class is ok, see #11869.

But Julien is right: Alternate theme has not been updated according to change in #2071.

Actions #3

Updated by Julien Petit about 12 years ago

If it can be of use to someone, i've patched the css. It works on my installation with the same table that amree woot is sharing here.

Actions #4

Updated by amree woot about 12 years ago

Working good for me (I'm using basecamp theme)

Actions #5

Updated by Miklós Balázs about 12 years ago

The problem is that when generating the CSS class to use, it takes into account the ID of the enumeration instead of the position field.

Actions #6

Updated by Julien Petit about 12 years ago

Miklós Balázs wrote:

The problem is that when generating the CSS class to use, it takes into account the ID of the enumeration instead of the position field.

This is not a problem, this is a change in the last releases because re-ordering position add the effect of changing status colors. The id is less likely to change.

Actions #7

Updated by Jean-Philippe Lang about 12 years ago

  • Status changed from Confirmed to Closed
  • Target version deleted (2.1.1)
  • Resolution set to Wont fix

The theme is OK when creating default priorities with 2.1.0.
If you use this theme with priorities created previously, you'll have to adjust the css manually according to your priority ids.

Actions #8

Updated by John Reynolds about 12 years ago

I just saw this closed (suprised) and thought I should add that I've never once changed the order or setup of the issue priority enumerations and yet the problem exists for me. I guess if the statement is, 'adjust your css' then ok, but it's not a result of custom setup I think?

Actions #9

Updated by Anonymous about 12 years ago

I agree with John Reynolds, please see A1

Actions #10

Updated by Eric Platon about 12 years ago

I am also surprised that this ticket is closed. Comparing the code of 1.2.2 and 2.1.2, this appears to be a bug. Priorities were based on position before, and it seems a better choice than ID, which is just a default value set by the install script and may depend on the DB engine. My DB has been modified, after years of usage, and the match does not exist anymore.

Shifting the priority index in themes will work as long as priorities are not customized in Redmine.

For the record, I have tried 4 themes, and they all break consistently from 2.1.

Actions #11

Updated by Clemens Bergmann almost 12 years ago

hi,

for all that have this BUG i attach a patch against stable 2.1 which changes the behavior back. The rows now get the position and not the ID as css class.

Actions #12

Updated by Mischa The Evil about 11 years ago

  • Has duplicate Defect #13840: Style issues by priority position, not id added
Actions #13

Updated by Vaclav Fiser almost 10 years ago

Hi,

We're facing this issue again in Redmine version 2.6.0 with custom theme. Unfortunately provided patch isn't compatible with latest version.
Can someone please help us ? Thank you

Actions

Also available in: Atom PDF