44 "fmt"
55 "strings"
66
7- "github.com/trivago/tgo/tcontainer"
87 "github.com/google/go-querystring/query"
8+ "github.com/trivago/tgo/tcontainer"
99)
1010
1111// CreateMetaInfo contains information about fields and their attributed to create a ticket.
@@ -37,14 +37,14 @@ type MetaIssueType struct {
3737 Description string `json:"description,omitempty"`
3838 IconUrl string `json:"iconurl,omitempty"`
3939 Name string `json:"name,omitempty"`
40- Subtasks bool `json:"subtask,omitempty"`
40+ Subtasks bool `json:"subtask,omitempty"`
4141 Expand string `json:"expand,omitempty"`
4242 Fields tcontainer.MarshalMap `json:"fields,omitempty"`
4343}
4444
4545// GetCreateMeta makes the api call to get the meta information required to create a ticket
46- func (s * IssueService ) GetCreateMeta (projectkey string ) (* CreateMetaInfo , * Response , error ) {
47- return s .GetCreateMetaWithOptions (& GetQueryOptions {ProjectKey : projectkey , Expand : "projects.issuetypes.fields" })
46+ func (s * IssueService ) GetCreateMeta (projectkeys string ) (* CreateMetaInfo , * Response , error ) {
47+ return s .GetCreateMetaWithOptions (& GetQueryOptions {ProjectKeys : projectkeys , Expand : "projects.issuetypes.fields" })
4848}
4949
5050// GetCreateMetaWithOptions makes the api call to get the meta information without requiring to have a projectKey
@@ -58,7 +58,7 @@ func (s *IssueService) GetCreateMetaWithOptions(options *GetQueryOptions) (*Crea
5858 if options != nil {
5959 q , err := query .Values (options )
6060 if err != nil {
61- return nil , nil , err
61+ return nil , nil , err
6262 }
6363 req .URL .RawQuery = q .Encode ()
6464 }
@@ -72,6 +72,7 @@ func (s *IssueService) GetCreateMetaWithOptions(options *GetQueryOptions) (*Crea
7272
7373 return meta , resp , nil
7474}
75+
7576// GetProjectWithName returns a project with "name" from the meta information received. If not found, this returns nil.
7677// The comparison of the name is case insensitive.
7778func (m * CreateMetaInfo ) GetProjectWithName (name string ) * MetaProject {
0 commit comments