Adding a priority with translation to your language and specific color

Open the rails console:

# zammad run rails c

Add a priority with an english name:

> Ticket::Priority.create(name: '4 critical', default_create: false, note: nil, active: true, updated_by_id: 1, created_by_id: 1, created_at: Time.now, updated_at: Time.now)

Create a translation into your language:

> Translation.create_if_not_exists( :locale => 'de-de', :source => "4 critical", :target => "4 kritisch", format: 'string', created_by_id: 1, updated_by_id: 1 )

Change priority’s icon and color:

>p = Ticket::Priority.find_by(name: "4 critical") 
>p.ui_icon = "important" 
>p.ui_color = "critical-priority" 
>p.save!

Create a custom.css in /opt/zammad/app/assets/stylesheets/custom:


$critical-priority-color: hsl(360,71%,60%);

.u-critical-priority-color {
  fill: $critical-priority-color;
}

.item {
  &--critical-priority {
    a {
      color: $critical-priority-color;
    }
  }
}

Run:

chown zammad:zammad custom.css 
zammad run rake assets:precompile 
systemctl restart zammad-web

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.