
๐ฃPriorities
An issue's priority defines its importance in relation to other issues, so it helps your users determine which issues should be tackled first. Jira comes with a set of default priorities, which you can modify or add to. You can also choose different priorities for your projects.

Get priorities
GET /rest/api/{2-3}/priority
Returns the list of all issue priorities, the method returns the following information:
package main
import (
"context"
"github.com/ctreminiom/go-atlassian/v2/jira/v2"
"log"
"os"
)
func main() {
var (
host = os.Getenv("HOST")
mail = os.Getenv("MAIL")
token = os.Getenv("TOKEN")
)
atlassian, err := v2.New(nil, host)
if err != nil {
return
}
atlassian.Auth.SetBasicAuth(mail, token)
priorities, response, err := atlassian.Issue.Priority.Gets(context.Background())
if err != nil {
log.Fatal(err)
}
log.Println("HTTP Endpoint Used", response.Endpoint)
for pos, priority := range priorities {
log.Println(pos, priority)
}
}
Get priority
GET /rest/api/{2-3}/priority/{id}
Returns an issue priority, the method returns the following information:
package main
import (
"context"
"github.com/ctreminiom/go-atlassian/v2/jira/v2"
"log"
"os"
)
func main() {
var (
host = os.Getenv("HOST")
mail = os.Getenv("MAIL")
token = os.Getenv("TOKEN")
)
atlassian, err := v2.New(nil, host)
if err != nil {
return
}
atlassian.Auth.SetBasicAuth(mail, token)
var priorityID = "1"
priority, response, err := atlassian.Issue.Priority.Get(context.Background(), priorityID)
if err != nil {
log.Fatal(err)
}
log.Println("HTTP Endpoint Used", response.Endpoint)
log.Println(priority)
}
Create priority
POST /rest/api/3/priority
Creates an issue priority.
No implemented, yet. Feel free to open a new PR or issue
Set default priority
PUT /rest/api/3/priority/default
Sets default issue priority.
No implemented, yet. Feel free to open a new PR or issue
Move priorities
PUT /rest/api/3/priority/move
Changes the order of issue priorities.
No implemented, yet. Feel free to open a new PR or issue
Search priorities
GET /rest/api/3/priority/search
Returns a paginated list of priorities. The list can contain all priorities or a subset determined by any combination of these criteria:
a list of priority IDs. Any invalid priority IDs are ignored.
whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, as there is no concept of default priorities in team-managed projects.
No implemented, yet. Feel free to open a new PR or issue
Update priority
PUT /rest/api/3/priority/{id}
Updates an issue priority.
No implemented, yet. Feel free to open a new PR or issue
Delete priority
DELETE /rest/api/3/priority/{id}
Deletes an issue priority.
No implemented, yet. Feel free to open a new PR or issue
Last updated
Was this helpful?