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 1 commit
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"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the omitempty tag to the json config for these new fields as well as tests with omitted min/max

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick reply! Made the changes. 馃榾

Max int `json:"max"`
}

// BoardConfigurationColumnStatus represents a status in the column configuration
Expand Down
7 changes: 7 additions & 0 deletions board_test.go
Expand Up @@ -248,4 +248,11 @@ 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)
}
}
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