Verified Commit 8899bacb authored by Heidi Berry's avatar Heidi Berry Committed by GitLab
Browse files

Merge branch 'add-missing-properties-to-boards' into 'main'

feat: Add hide backlog and closed list properties to IssueBoards

Closes #2231

See merge request !2780
parents 1dd2358e a66984ee
Loading
Loading
Loading
Loading
Loading
+17 −13
Original line number Diff line number Diff line
@@ -112,6 +112,8 @@ type IssueBoard struct {
	Lists           []*BoardList    `json:"lists"`
	Weight          int64           `json:"weight"`
	Labels          []*LabelDetails `json:"labels"`
	HideBacklogList bool            `json:"hide_backlog_list"`
	HideClosedList  bool            `json:"hide_closed_list"`
}

func (b IssueBoard) String() string {
@@ -174,6 +176,8 @@ type UpdateIssueBoardOptions struct {
	MilestoneID     *int64        `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
	Labels          *LabelOptions `url:"labels,omitempty" json:"labels,omitempty"`
	Weight          *int64        `url:"weight,omitempty" json:"weight,omitempty"`
	HideBacklogList *bool         `url:"hide_backlog_list,omitempty" json:"hide_backlog_list,omitempty"`
	HideClosedList  *bool         `url:"hide_closed_list,omitempty" json:"hide_closed_list,omitempty"`
}

func (s *IssueBoardsService) UpdateIssueBoard(pid any, board int64, opt *UpdateIssueBoardOptions, options ...RequestOptionFunc) (*IssueBoard, *Response, error) {
+7 −3
Original line number Diff line number Diff line
@@ -98,7 +98,9 @@ func TestIssueBoardsService_UpdateIssueBoard(t *testing.T) {
				"milestone": null,
				"assignee" : null,
				"labels" : [],
				"weight" : null
				"weight" : null,
				"hide_backlog_list": true,
				"hide_closed_list": false
			  }
		`)
	})
@@ -117,6 +119,8 @@ func TestIssueBoardsService_UpdateIssueBoard(t *testing.T) {
		},
		Lists:           []*BoardList{},
		Labels:          []*LabelDetails{},
		HideBacklogList: true,
		HideClosedList:  false,
	}

	ib, resp, err := client.Boards.UpdateIssueBoard(5, 1, nil, nil)