Skip to content

Commit 6c76fac

Browse files
committed
On Premise: Add TODO comments to methods that need a double check
1 parent 5fccdb3 commit 6c76fac

21 files changed

+332
-0
lines changed

onpremise/board.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ type BoardConfigurationColumnStatus struct {
128128
// GetAllBoards will returns all boards. This only includes boards that the user has permission to view.
129129
//
130130
// Jira API docs: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getAllBoards
131+
//
132+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
133+
// This double check effort is done for v2 - Remove this two lines if this is completed.
131134
func (s *BoardService) GetAllBoards(ctx context.Context, opt *BoardListOptions) (*BoardsList, *Response, error) {
132135
apiEndpoint := "rest/agile/1.0/board"
133136
url, err := addOptions(apiEndpoint, opt)
@@ -153,6 +156,9 @@ func (s *BoardService) GetAllBoards(ctx context.Context, opt *BoardListOptions)
153156
// This board will only be returned if the user has permission to view it.
154157
//
155158
// Jira API docs: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-getBoard
159+
//
160+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
161+
// This double check effort is done for v2 - Remove this two lines if this is completed.
156162
func (s *BoardService) GetBoard(ctx context.Context, boardID int) (*Board, *Response, error) {
157163
apiEndpoint := fmt.Sprintf("rest/agile/1.0/board/%v", boardID)
158164
req, err := s.client.NewRequest(ctx, http.MethodGet, apiEndpoint, nil)
@@ -178,6 +184,9 @@ func (s *BoardService) GetBoard(ctx context.Context, boardID int) (*Board, *Resp
178184
// board will be created instead (remember that board sharing depends on the filter sharing).
179185
//
180186
// Jira API docs: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-createBoard
187+
//
188+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
189+
// This double check effort is done for v2 - Remove this two lines if this is completed.
181190
func (s *BoardService) CreateBoard(ctx context.Context, board *Board) (*Board, *Response, error) {
182191
apiEndpoint := "rest/agile/1.0/board"
183192
req, err := s.client.NewRequest(ctx, http.MethodPost, apiEndpoint, board)
@@ -199,6 +208,9 @@ func (s *BoardService) CreateBoard(ctx context.Context, board *Board) (*Board, *
199208
//
200209
// Jira API docs: https://docs.atlassian.com/jira-software/REST/cloud/#agile/1.0/board-deleteBoard
201210
// Caller must close resp.Body
211+
//
212+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
213+
// This double check effort is done for v2 - Remove this two lines if this is completed.
202214
func (s *BoardService) DeleteBoard(ctx context.Context, boardID int) (*Board, *Response, error) {
203215
apiEndpoint := fmt.Sprintf("rest/agile/1.0/board/%v", boardID)
204216
req, err := s.client.NewRequest(ctx, http.MethodDelete, apiEndpoint, nil)
@@ -217,6 +229,9 @@ func (s *BoardService) DeleteBoard(ctx context.Context, boardID int) (*Board, *R
217229
// This only includes sprints that the user has permission to view.
218230
//
219231
// Jira API docs: https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-rest-agile-1-0-board-boardid-sprint-get
232+
//
233+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
234+
// This double check effort is done for v2 - Remove this two lines if this is completed.
220235
func (s *BoardService) GetAllSprints(ctx context.Context, boardID int, options *GetAllSprintsOptions) (*SprintsList, *Response, error) {
221236
apiEndpoint := fmt.Sprintf("rest/agile/1.0/board/%d/sprint", boardID)
222237
url, err := addOptions(apiEndpoint, options)
@@ -239,6 +254,9 @@ func (s *BoardService) GetAllSprints(ctx context.Context, boardID int, options *
239254

240255
// GetBoardConfiguration will return a board configuration for a given board Id
241256
// Jira API docs:https://developer.atlassian.com/cloud/jira/software/rest/#api-rest-agile-1-0-board-boardId-configuration-get
257+
//
258+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
259+
// This double check effort is done for v2 - Remove this two lines if this is completed.
242260
func (s *BoardService) GetBoardConfiguration(ctx context.Context, boardID int) (*BoardConfiguration, *Response, error) {
243261
apiEndpoint := fmt.Sprintf("rest/agile/1.0/board/%d/configuration", boardID)
244262

onpremise/component.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ type CreateComponentOptions struct {
2222
}
2323

2424
// Create creates a new Jira component based on the given options.
25+
//
26+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
27+
// This double check effort is done for v2 - Remove this two lines if this is completed.
2528
func (s *ComponentService) Create(ctx context.Context, options *CreateComponentOptions) (*ProjectComponent, *Response, error) {
2629
apiEndpoint := "rest/api/2/component"
2730
req, err := s.client.NewRequest(ctx, http.MethodPost, apiEndpoint, options)

onpremise/customer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ type CustomerList struct {
3939
// Create creates a ServiceDesk customer.
4040
//
4141
// https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-customer/#api-rest-servicedeskapi-customer-post
42+
//
43+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
44+
// This double check effort is done for v2 - Remove this two lines if this is completed.
4245
func (c *CustomerService) Create(ctx context.Context, email, displayName string) (*Customer, *Response, error) {
4346
const apiEndpoint = "rest/servicedeskapi/customer"
4447

onpremise/field.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ type FieldSchema struct {
3535
// GetList gets all fields from Jira
3636
//
3737
// Jira API docs: https://developer.atlassian.com/cloud/jira/platform/rest/#api-api-2-field-get
38+
//
39+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
40+
// This double check effort is done for v2 - Remove this two lines if this is completed.
3841
func (s *FieldService) GetList(ctx context.Context) ([]Field, *Response, error) {
3942
apiEndpoint := "rest/api/2/field"
4043
req, err := s.client.NewRequest(ctx, http.MethodGet, apiEndpoint, nil)

onpremise/filter.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ type FilterSearchOptions struct {
120120
}
121121

122122
// GetList retrieves all filters from Jira
123+
//
124+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
125+
// This double check effort is done for v2 - Remove this two lines if this is completed.
123126
func (fs *FilterService) GetList(ctx context.Context) ([]*Filter, *Response, error) {
124127

125128
options := &GetQueryOptions{}
@@ -145,6 +148,9 @@ func (fs *FilterService) GetList(ctx context.Context) ([]*Filter, *Response, err
145148
}
146149

147150
// GetFavouriteList retrieves the user's favourited filters from Jira
151+
//
152+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
153+
// This double check effort is done for v2 - Remove this two lines if this is completed.
148154
func (fs *FilterService) GetFavouriteList(ctx context.Context) ([]*Filter, *Response, error) {
149155
apiEndpoint := "rest/api/2/filter/favourite"
150156
req, err := fs.client.NewRequest(ctx, http.MethodGet, apiEndpoint, nil)
@@ -161,6 +167,9 @@ func (fs *FilterService) GetFavouriteList(ctx context.Context) ([]*Filter, *Resp
161167
}
162168

163169
// Get retrieves a single Filter from Jira
170+
//
171+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
172+
// This double check effort is done for v2 - Remove this two lines if this is completed.
164173
func (fs *FilterService) Get(ctx context.Context, filterID int) (*Filter, *Response, error) {
165174
apiEndpoint := fmt.Sprintf("rest/api/2/filter/%d", filterID)
166175
req, err := fs.client.NewRequest(ctx, http.MethodGet, apiEndpoint, nil)
@@ -180,6 +189,9 @@ func (fs *FilterService) Get(ctx context.Context, filterID int) (*Filter, *Respo
180189
// GetMyFilters retrieves the my Filters.
181190
//
182191
// https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-filter-my-get
192+
//
193+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
194+
// This double check effort is done for v2 - Remove this two lines if this is completed.
183195
func (fs *FilterService) GetMyFilters(ctx context.Context, opts *GetMyFiltersQueryOptions) ([]*Filter, *Response, error) {
184196
apiEndpoint := "rest/api/3/filter/my"
185197
url, err := addOptions(apiEndpoint, opts)
@@ -203,6 +215,9 @@ func (fs *FilterService) GetMyFilters(ctx context.Context, opts *GetMyFiltersQue
203215
// Search will search for filter according to the search options
204216
//
205217
// Jira API docs: https://developer.atlassian.com/cloud/jira/platform/rest/v3/#api-rest-api-3-filter-search-get
218+
//
219+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
220+
// This double check effort is done for v2 - Remove this two lines if this is completed.
206221
func (fs *FilterService) Search(ctx context.Context, opt *FilterSearchOptions) (*FiltersList, *Response, error) {
207222
apiEndpoint := "rest/api/3/filter/search"
208223
url, err := addOptions(apiEndpoint, opt)

onpremise/group.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ type GroupSearchOptions struct {
6565
// Jira API docs: https://docs.atlassian.com/jira/REST/server/#api/2/group-getUsersFromGroup
6666
//
6767
// WARNING: This API only returns the first page of group members
68+
//
69+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
70+
// This double check effort is done for v2 - Remove this two lines if this is completed.
6871
func (s *GroupService) Get(ctx context.Context, name string, options *GroupSearchOptions) ([]GroupMember, *Response, error) {
6972
var apiEndpoint string
7073
if options == nil {
@@ -95,6 +98,9 @@ func (s *GroupService) Get(ctx context.Context, name string, options *GroupSearc
9598
// Add adds user to group
9699
//
97100
// Jira API docs: https://docs.atlassian.com/jira/REST/cloud/#api/2/group-addUserToGroup
101+
//
102+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
103+
// This double check effort is done for v2 - Remove this two lines if this is completed.
98104
func (s *GroupService) Add(ctx context.Context, groupname string, username string) (*Group, *Response, error) {
99105
apiEndpoint := fmt.Sprintf("/rest/api/2/group/user?groupname=%s", groupname)
100106
var user struct {
@@ -120,6 +126,9 @@ func (s *GroupService) Add(ctx context.Context, groupname string, username strin
120126
//
121127
// Jira API docs: https://docs.atlassian.com/jira/REST/cloud/#api/2/group-removeUserFromGroup
122128
// Caller must close resp.Body
129+
//
130+
// TODO Double check this method if this works as expected, is using the latest API and the response is complete
131+
// This double check effort is done for v2 - Remove this two lines if this is completed.
123132
func (s *GroupService) Remove(ctx context.Context, groupname string, username string) (*Response, error) {
124133
apiEndpoint := fmt.Sprintf("/rest/api/2/group/user?groupname=%s&username=%s", groupname, username)
125134
req, err := s.client.NewRequest(ctx, http.MethodDelete, apiEndpoint, nil)

0 commit comments

Comments
 (0)