From df58d1e1c41515590d04be25d61625296adfa883 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Wed, 29 May 2019 17:57:19 +0530 Subject: [PATCH] fix(email): Search contacts by email_id as well Email auto suggest now performs lookup on contact name and email_id fields --- frappe/email/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/email/__init__.py b/frappe/email/__init__.py index 2875ba6c74..494a6e2bb3 100644 --- a/frappe/email/__init__.py +++ b/frappe/email/__init__.py @@ -23,7 +23,7 @@ def get_contact_list(txt, page_length=20): out = frappe.db.sql("""select email_id as value, concat(first_name, ifnull(concat(' ',last_name), '' )) as description from tabContact - where name like %(txt)s + where name like %(txt)s or email_id like %(txt)s %(condition)s limit %(page_length)s""", { 'txt': '%' + txt + '%',