diff --git a/board.go b/board.go index 0a3960f..3072edf 100644 --- a/board.go +++ b/board.go @@ -100,7 +100,7 @@ func (s *BoardService) GetBoard(boardID int) (*Board, *Response, error) { return board, resp, nil } -// Create creates a new board. Board name, type and filter Id is required. +// CreateBoard creates a new board. Board name, type and filter Id is required. // name - Must be less than 255 characters. // type - Valid values: scrum, kanban // filterId - Id of a filter that the user has permissions to view. @@ -124,7 +124,7 @@ func (s *BoardService) CreateBoard(board *Board) (*Board, *Response, error) { return responseBoard, resp, nil } -// Delete will delete an agile board. +// DeleteBoard will delete an agile board. // // JIRA API docs: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-deleteBoard func (s *BoardService) DeleteBoard(boardID int) (*Board, *Response, error) { diff --git a/issue.go b/issue.go index cfcfb66..7056b92 100644 --- a/issue.go +++ b/issue.go @@ -183,7 +183,7 @@ type Time time.Time // Wrapper struct for search result type transitionResult struct { - Transitions []Transition `json:transitions` + Transitions []Transition `json:"transitions"` } // Transition represents an issue transition in JIRA @@ -193,15 +193,17 @@ type Transition struct { Fields map[string]TransitionField `json:"fields"` } +// TransitionField represents the value of one Transistion type TransitionField struct { Required bool `json:"required"` } -// CreatePayload is used for creating new issue transitions +// CreateTransitionPayload is used for creating new issue transitions type CreateTransitionPayload struct { Transition TransitionPayload `json:"transition"` } +// TransitionPayload represents the request payload of Transistion calls like DoTransition type TransitionPayload struct { ID string `json:"id"` } diff --git a/issue_test.go b/issue_test.go index cd6f498..4d10505 100644 --- a/issue_test.go +++ b/issue_test.go @@ -452,7 +452,7 @@ func TestIssueService_DoTransition(t *testing.T) { var payload CreateTransitionPayload err := decoder.Decode(&payload) if err != nil { - t.Error("Got error: %v", err) + t.Errorf("Got error: %v", err) } if payload.Transition.ID != transitionID { @@ -462,6 +462,6 @@ func TestIssueService_DoTransition(t *testing.T) { _, err := testClient.Issue.DoTransition("123", transitionID) if err != nil { - t.Error("Got error: %v", err) + t.Errorf("Got error: %v", err) } } diff --git a/sprint_test.go b/sprint_test.go index 1d394e9..8045b79 100644 --- a/sprint_test.go +++ b/sprint_test.go @@ -22,7 +22,7 @@ func TestSprintService_MoveIssuesToSprint(t *testing.T) { var payload IssuesWrapper err := decoder.Decode(&payload) if err != nil { - t.Error("Got error: %v", err) + t.Errorf("Got error: %v", err) } if payload.Issues[0] != issuesToMove[0] { @@ -32,6 +32,6 @@ func TestSprintService_MoveIssuesToSprint(t *testing.T) { _, err := testClient.Sprint.MoveIssuesToSprint(123, issuesToMove) if err != nil { - t.Error("Got error: %v", err) + t.Errorf("Got error: %v", err) } }