Edit default priorities


  • Used Zammad version: 5.0.x

Found this issue on Github but the cli option is not working for me.

I used powershell to edit the priorities via api.
Tested on Windows 10 with Powershell Core 7.1.4

Befor you execute the script you need to add your zammad url, token and maybe change the settings or names of the priorities.
See: Priorities — Zammad documentation

  change default ticket_priorities

  This code is made available "as-is" without warranty of any kind.
  The entire risk of the use or the results from the use of this code remains with the user.

$apitoken = "<your token>"
$baseurl = "https://<zammad url>/api/v1/"
$headers = @{ "Authorization" = "Token $apitoken"}

$url = $baseurl + "ticket_priorities/1"
$body = @{
    id= 1
    name= "Prio 1 - hoch"
    active= $true
    ui_icon= "important"
    ui_color= "high-priority"
Invoke-RestMethod -Uri $url -Body ($body|ConvertTo-Json) -ContentType 'application/json' -Headers $headers -Method PUT

$url = $baseurl + "ticket_priorities/2"
$body = @{
    id= 2
    name= "Prio 2 - normal"
    default_create = $false
    active= $true
Invoke-RestMethod -Uri $url -Body ($body|ConvertTo-Json) -ContentType 'application/json' -Headers $headers -Method PUT

$url = $baseurl + "ticket_priorities/3"
$body = @{
    id= 3
    name= "Prio 3 - niedrig"
    active= $true
    ui_icon= "low-priority"
    ui_color= "low-priority"
Invoke-RestMethod -Uri $url -Body ($body|ConvertTo-Json) -ContentType 'application/json' -Headers $headers -Method PUT

I just want to share the script. I do not need any help here.

Cannot confirm.
The commands are correct and should be working, whatever issue you had there.

Glad you could fix it any way.

I think i was using the console the wrong way.
Used “rails c” instead of “zammad run rails c”.

Could you share an example?

Sorry you lost me?
An example for what?

I meant how to properly get into the console to set these settings.
We use zammad on Ubuntu via package installation with Postgres DB.

This documentation page should be able to answer your questions:

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