mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	server: search template name and display text if keyword is passed (#9215)
This commit is contained in:
		
							parent
							
								
									2e3f76ec03
								
							
						
					
					
						commit
						edf7394919
					
				| @ -4637,8 +4637,12 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q | ||||
|         // other criteria | ||||
| 
 | ||||
|         if (keyword != null) { | ||||
|             sc.addAnd("name", SearchCriteria.Op.LIKE, "%" + keyword + "%"); | ||||
|         } else if (name != null) { | ||||
|             SearchCriteria<TemplateJoinVO> scc = _templateJoinDao.createSearchCriteria(); | ||||
|             scc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%"); | ||||
|             scc.addOr("displayText", SearchCriteria.Op.LIKE, "%" + keyword + "%"); | ||||
|             sc.addAnd("name", SearchCriteria.Op.SC, scc); | ||||
|         } | ||||
|         if (name != null) { | ||||
|             sc.addAnd("name", SearchCriteria.Op.EQ, name); | ||||
|         } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user