mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-01-24 03:16:18 +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
|
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.
|
// GetIssueWithName returns an IssueType with name from a given MetaProject. If not found, this returns nil.
|
||||||
// The comparision of the name is case insensitive
|
// The comparision of the name is case insensitive
|
||||||
func (p *MetaProject) GetIssueTypeWithName(name string) *MetaIssueType {
|
func (p *MetaProject) GetIssueTypeWithName(name string) *MetaIssueType {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user