Infos:
- 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
<#
.Description
change default ticket_priorities
!!!DISCLAIMER!!!
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.