From 2ecfd9be5de8d9550f33b03655a50c1d90451dea Mon Sep 17 00:00:00 2001 From: mbauskar Date: Tue, 14 Feb 2017 08:40:46 +0530 Subject: [PATCH] [minor] fetched tickets to closed using sql instead of get_all --- erpnext/support/doctype/issue/issue.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/erpnext/support/doctype/issue/issue.py b/erpnext/support/doctype/issue/issue.py index e5c6ee1aac..2798f70226 100644 --- a/erpnext/support/doctype/issue/issue.py +++ b/erpnext/support/doctype/issue/issue.py @@ -81,10 +81,9 @@ def set_status(name, status): st.save() def auto_close_tickets(): - issues = frappe.db.get_all("Issue", filters={ - "status": "Replied", - "modified": ("<", "date_sub(curdate(),interval 7 Day)") - }, fields=["name"]) + """ auto close the replied support tickets after 7 days """ + issues = frappe.db.sql(""" select name from tabIssue where status='Replied' and + modified