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

Moderator: crythias

Post Reply
gawkla
OTRS expert
Posts: 52
Joined: 15 Jan 2015, 16:48
OTRS Version?: 6.0.6

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

Post by gawkla » 07 Mar 2019, 15:00

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
OTRS guru
Posts: 2162
Joined: 13 Mar 2014, 09:16
OTRS Version?: 6.0.14
Real Name: Rolf Straub

Re: OTRS 6.X Colorize ticket state in TicketZoom

Post by RStraub » 07 Mar 2019, 15:46

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
OTRS expert
Posts: 52
Joined: 15 Jan 2015, 16:48
OTRS Version?: 6.0.6

Re: OTRS 6.X Colorize ticket state in TicketZoom

Post by gawkla » 08 Mar 2019, 01:24

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

Post Reply