server: search template name and display text if keyword is passed (#9215)

This commit is contained in:
Wei Zhou 2024-06-11 16:05:43 +02:00 committed by GitHub
parent 2e3f76ec03
commit edf7394919
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}