Merge pull request #7595 from adityahase/fix-email-autosuggest-develop

fix(email): Search contacts by email_id as well
This commit is contained in:
Shivam Mishra 2019-05-29 20:03:12 +05:30 committed by GitHub
commit 37283e4e84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 + '%',