1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-01-30 04:30:51 +02:00

use agile api for getting issue

This commit is contained in:
zenixhuang 2017-11-21 20:14:00 +09:00
parent 9f1498acb6
commit ce5e0c2cf2

View File

@ -127,6 +127,7 @@ type IssueFields struct {
Subtasks []*Subtasks `json:"subtasks,omitempty" structs:"subtasks,omitempty"`
Attachments []*Attachment `json:"attachment,omitempty" structs:"attachment,omitempty"`
Epic *Epic `json:"epic,omitempty" structs:"epic,omitempty"`
Sprint *Sprint `json:"sprint,omitempty" struct:"sprint,omitempty"`
Parent *Parent `json:"parent,omitempty" structs:"parent,omitempty"`
Unknowns tcontainer.MarshalMap
}
@ -479,7 +480,7 @@ type CustomFields map[string]string
//
// JIRA API docs: https://docs.atlassian.com/jira/REST/latest/#api/2/issue-getIssue
func (s *IssueService) Get(issueID string, options *GetQueryOptions) (*Issue, *Response, error) {
apiEndpoint := fmt.Sprintf("rest/api/2/issue/%s", issueID)
apiEndpoint := fmt.Sprintf("rest/agile/1.0/issue/%s", issueID)
req, err := s.client.NewRequest("GET", apiEndpoint, nil)
if err != nil {
return nil, nil, err