Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing min/max to BoardConfigurationColumn #430

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions board.go
Expand Up @@ -117,6 +117,8 @@ type BoardConfigurationColumnConfig struct {
type BoardConfigurationColumn struct {
Name string `json:"name"`
Status []BoardConfigurationColumnStatus `json:"statuses"`
Min int `json:"min,omitempty"`
Max int `json:"max,omitempty"`
}

// BoardConfigurationColumnStatus represents a status in the column configuration
Expand Down
15 changes: 15 additions & 0 deletions board_test.go
Expand Up @@ -248,4 +248,19 @@ func TestBoardService_GetBoardConfigoration(t *testing.T) {
t.Errorf("Expected 6 columns. go %d", len(boardConfiguration.ColumnConfig.Columns))
}

backlogColumn := boardConfiguration.ColumnConfig.Columns[0]
if backlogColumn.Min != 5 {
t.Errorf("Expected a min of 5 issues in backlog. Got %d", backlogColumn.Min)
}
if backlogColumn.Max != 30 {
t.Errorf("Expected a max of 30 issues in backlog. Got %d", backlogColumn.Max)
}

inProgressColumn := boardConfiguration.ColumnConfig.Columns[2]
if inProgressColumn.Min != 0 {
t.Errorf("Expected a min of 0 issues in progress. Got %d", inProgressColumn.Min)
}
if inProgressColumn.Max != 0 {
t.Errorf("Expected a max of 0 issues in progress. Got %d", inProgressColumn.Max)
}
}
4 changes: 3 additions & 1 deletion mocks/board_configuration.json
Expand Up @@ -26,7 +26,9 @@
"id": "10005",
"self": "https://test.jira.org/rest/api/2/status/10005"
}
]
],
"min": 5,
"max": 30
},
{
"name": "Selected for development",
Expand Down