mirror of
				https://github.com/interviewstreet/go-jira.git
				synced 2025-10-30 23:47:46 +02:00 
			
		
		
		
	Add method to get project with key in metaissue
This commit is contained in:
		
							
								
								
									
										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 { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user