mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-07-15 01:04:38 +02:00
Fix GetQueryOptions in issue.go to use projectKeys instead of projectKey
This commit is contained in:
2
issue.go
2
issue.go
@ -510,7 +510,7 @@ type GetQueryOptions struct {
|
|||||||
// FieldsByKeys if true then fields in issues will be referenced by keys instead of ids
|
// FieldsByKeys if true then fields in issues will be referenced by keys instead of ids
|
||||||
FieldsByKeys bool `url:"fieldsByKeys,omitempty"`
|
FieldsByKeys bool `url:"fieldsByKeys,omitempty"`
|
||||||
UpdateHistory bool `url:"updateHistory,omitempty"`
|
UpdateHistory bool `url:"updateHistory,omitempty"`
|
||||||
ProjectKey string `url:"projectKey,omitempty"`
|
ProjectKeys string `url:"projectKeys,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CustomFields represents custom fields of JIRA
|
// CustomFields represents custom fields of JIRA
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/trivago/tgo/tcontainer"
|
|
||||||
"github.com/google/go-querystring/query"
|
"github.com/google/go-querystring/query"
|
||||||
|
"github.com/trivago/tgo/tcontainer"
|
||||||
)
|
)
|
||||||
|
|
||||||
// CreateMetaInfo contains information about fields and their attributed to create a ticket.
|
// CreateMetaInfo contains information about fields and their attributed to create a ticket.
|
||||||
@ -43,8 +43,8 @@ type MetaIssueType struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetCreateMeta makes the api call to get the meta information required to create a ticket
|
// GetCreateMeta makes the api call to get the meta information required to create a ticket
|
||||||
func (s *IssueService) GetCreateMeta(projectkey string) (*CreateMetaInfo, *Response, error) {
|
func (s *IssueService) GetCreateMeta(projectkeys string) (*CreateMetaInfo, *Response, error) {
|
||||||
return s.GetCreateMetaWithOptions(&GetQueryOptions{ProjectKey: projectkey, Expand: "projects.issuetypes.fields"})
|
return s.GetCreateMetaWithOptions(&GetQueryOptions{ProjectKeys: projectkeys, Expand: "projects.issuetypes.fields"})
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetCreateMetaWithOptions makes the api call to get the meta information without requiring to have a projectKey
|
// GetCreateMetaWithOptions makes the api call to get the meta information without requiring to have a projectKey
|
||||||
@ -72,6 +72,7 @@ func (s *IssueService) GetCreateMetaWithOptions(options *GetQueryOptions) (*Crea
|
|||||||
|
|
||||||
return meta, resp, nil
|
return meta, resp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetProjectWithName returns a project with "name" from the meta information received. If not found, this returns nil.
|
// GetProjectWithName returns a project with "name" from the meta information received. If not found, this returns nil.
|
||||||
// The comparison of the name is case insensitive.
|
// The comparison of the name is case insensitive.
|
||||||
func (m *CreateMetaInfo) GetProjectWithName(name string) *MetaProject {
|
func (m *CreateMetaInfo) GetProjectWithName(name string) *MetaProject {
|
||||||
|
Reference in New Issue
Block a user