Comment on page
🏣
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 /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/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 /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/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)
}
POST /rest/api/3/priority
Creates an issue priority.
No implemented, yet. Feel free to open a new PR or issue
PUT /rest/api/3/priority/default
Sets default issue priority.
No implemented, yet. Feel free to open a new PR or issue
PUT /rest/api/3/priority/move
Changes the order of issue priorities.
No implemented, yet. Feel free to open a new PR or issue
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
PUT /rest/api/3/priority/{id}
Updates an issue priority.
No implemented, yet. Feel free to open a new PR or issue
DELETE /rest/api/3/priority/{id}
Deletes an issue priority.
This operation is asynchronous. Follow the
location
link in the response to determine the status of the task and use Get task to obtain subsequent updates.No implemented, yet. Feel free to open a new PR or issue
Last modified 4mo ago