[IMP] search : search also in the branch name and not only in dest, because when the branch name is too long, we cannot retrieve own commit because trigram has been replaced by build number

This commit is contained in:
Jeremy Kersten 2014-10-13 17:30:15 +02:00
parent fffa893b4d
commit 1f0f1cd1ba

View File

@ -1003,7 +1003,7 @@ class RunbotController(http.Controller):
domain = [('repo_id','=',repo.id)]
domain += [('state', '!=', key) for key, value in filters.iteritems() if value == '0']
if search:
domain += ['|', ('dest', 'ilike', search), ('subject', 'ilike', search)]
domain += ['|', '|', ('dest', 'ilike', search), ('subject', 'ilike', search), ('branch_id.branch_name', 'ilike', search)]
build_ids = build_obj.search(cr, uid, domain, limit=int(limit))
branch_ids, build_by_branch_ids = [], {}