[solved] OTRS 6.X Colorize ticket state in TicketZoom

Moderator: crythias

Post Reply
gawkla
Znuny newbie
Posts: 69
Joined: 15 Jan 2015, 16:48
Znuny Version: 6.0.6

[solved] OTRS 6.X Colorize ticket state in TicketZoom

Post by gawkla »

hello Team. Can anybody help me?
I wolud like to colorize some fields (ticket state) in TicketZoom overview.

For example: "Opened" as green, "Closed" as red, "Pending*" as orange

Or any other idea how to easy differentiate tickets regarding state.
You do not have the required permissions to view the files attached to this post.
Last edited by gawkla on 08 Mar 2019, 01:25, edited 1 time in total.
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: OTRS 6.X Colorize ticket state in TicketZoom

Post by RStraub »

Hey there,

that's a new one :)

This can be done fairly easy. You need a small modification on the css files. You could either:
- Create a custom skin and make the modifications there (more initial work, but persistent through upgrades, see the manual for a how to)
- Change the existing default files (less initial work, but will be overwritten on upgrades)

Find the Core.Default.css file, as for the default skin, it's here:
~otrs/var/httpd/htdocs/skins/Agent/default/css/Core.Default.css

and add:

Code: Select all

[title=new] {
  color: red;
}
This uses the fact that OTRS renders the state-field with the title == value. Make sure to use the exact value as shown in your language. You should be able to use a wildcard like this:

Code: Select all

[title=~Pending]
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
gawkla
Znuny newbie
Posts: 69
Joined: 15 Jan 2015, 16:48
Znuny Version: 6.0.6

Re: OTRS 6.X Colorize ticket state in TicketZoom

Post by gawkla »

many thanks. So simple (if you know how and where to edit) :)
Post Reply