A board displays issues from one or more projects, giving you a flexible way of viewing, managing, and reporting on work in progress.
Get issues for backlog
GET /rest/agile/1.0/board/{boardId}/backlog
Returns all issues from the board's backlog, for the given board ID.
This only includes issues that the user has permission to view.
The backlog contains incomplete issues that are not assigned to any future or active sprint.
Note, if the user does not have permission to view the board, no issues will be returned at all.
Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank.
Creates a new board. Board name, type ,and filter ID is required
package main
import (
"context"
"github.com/ctreminiom/go-atlassian/jira/agile"
"github.com/ctreminiom/go-atlassian/pkg/infra/models"
"log"
"os"
)
func main() {
var (
host = os.Getenv("HOST")
mail = os.Getenv("MAIL")
token = os.Getenv("TOKEN")
)
atlassian, err := agile.New(nil, host)
if err != nil {
return
}
atlassian.Auth.SetBasicAuth(mail, token)
atlassian.Auth.SetUserAgent("curl/7.54.0")
newBoard := &models.BoardPayloadScheme{
Name: "DUMMY Board Name",
Type: "scrum", //scrum or kanban
FilterID: 10016,
// Omit the Location if you want to the board to yourself (location)
Location: &models.BoardPayloadLocationScheme{
ProjectKeyOrID: "KP",
Type: "project",
},
}
board, response, err := atlassian.Board.Create(context.Background(), newBoard)
if err != nil {
if response != nil {
log.Println("Response HTTP Response", response.Bytes.String())
}
log.Fatal(err)
}
log.Println("Response HTTP Code", response.Code)
log.Println("HTTP Endpoint Used", response.Endpoint)
log.Println(board)
}
Get epics
GET /rest/agile/1.0/board/{boardId}/epic
Returns all epics from the board, for the given board ID. This only includes epics that the user has permission to view. Note, if the user does not have permission to view the board, no epics will be returned at all.
Returns any boards which use the provided filter id. This method can be executed by users without a valid software license in order to find which boards are using a particular filter.
Returns all issues from a board, for a given board ID.
This only includes issues that the user has permission to view.
An issue belongs to the board if its status is mapped to the board's column.
Epic issues do not belongs to the scrum boards.
Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank.
Note, if the user does not have permission to view the board, no issues will be returned at all.
GET /rest/agile/1.0/board/{boardId}/epic/{epicId}/issue
Returns all issues that belong to an epic on the board, for the given epic ID and the board ID.
This only includes issues that the user has permission to view.
Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank.
GET /rest/agile/1.0/board/{boardId}/sprint/{sprintId}/issue
Get all issues you have access to that belong to the sprint from the board.
Issue returned from this resource contains additional fields like: sprint, closedSprints, flagged and epic. Issues are returned ordered by rank. JQL order has higher priority than default rank.
GET /rest/agile/1.0/board/{boardId}/epic/none/issue
Returns all issues that do not belong to any epic on a board, for a given board ID. This only includes issues that the user has permission to view. Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank.
Move issues to the backlog of a particular board (if they are already on that board).
This operation is equivalent to remove future and active sprints from a given set of issues if the board has sprints If the board does not have sprints this will put the issues back into the backlog from the board. At most 50 issues may be moved at once.
Returns all projects that are associated with the board, for the given board ID. If the user does not have permission to view the board, no projects will be returned at all. Returned projects are ordered by the name.
Returns all versions from a board, for a given board ID. This only includes versions that the user has permission to view. Note, if the user does not have permission to view the board, no versions will be returned at all. Returned versions are ordered by the name of the project from which they belong and then by sequence defined by user.
package main
import (
"context"
"fmt"
"github.com/ctreminiom/go-atlassian/jira/agile"
"log"
"os"
)
func main() {
var (
host = os.Getenv("HOST")
mail = os.Getenv("MAIL")
token = os.Getenv("TOKEN")
)
atlassian, err := agile.New(nil, host)
if err != nil {
return
}
atlassian.Auth.SetBasicAuth(mail, token)
atlassian.Auth.SetUserAgent("curl/7.54.0")
var (
boardID = 4
startAt = 0
maxResults = 50
released = false
)
versionsPage, response, err := atlassian.Board.Versions(context.Background(), boardID, startAt, maxResults, released)
if err != nil {
if response != nil {
log.Println("Response HTTP Response", response.Bytes.String())
}
log.Fatal(err)
}
log.Println("Response HTTP Code", response.Code)
log.Println("HTTP Endpoint Used", response.Endpoint)
for _, version := range versionsPage.Values {
log.Println(version)
}
fmt.Println(response.Bytes.String())
}
Delete Board
DELETE /rest/agile/1.0/board/{boardId}
Delete deletes the board. Admin without the view permission can still remove the board.