mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-01-07 23:01:48 +02:00
Add method to get project with key in metaissue
This commit is contained in:
parent
ba52ec9209
commit
a9ba34697b
11
metaissue.go
11
metaissue.go
@ -71,6 +71,17 @@ func (m *CreateMetaInfo) GetProjectWithName(name string) *MetaProject {
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetProjectWithName returns a project with "name" from the meta information recieved. If not found, this returns nil.
|
||||
// The comparision of the name is case insensitive.
|
||||
func (m *CreateMetaInfo) GetProjectWithKey(key string) *MetaProject {
|
||||
for _, m := range m.Projects {
|
||||
if strings.ToLower(m.Key) == strings.ToLower(key) {
|
||||
return m
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetIssueWithName returns an IssueType with name from a given MetaProject. If not found, this returns nil.
|
||||
// The comparision of the name is case insensitive
|
||||
func (p *MetaProject) GetIssueTypeWithName(name string) *MetaIssueType {
|
||||
|
Loading…
Reference in New Issue
Block a user