From 28717a82d0f70efe3c6b96a3f01b3fce48ed592e Mon Sep 17 00:00:00 2001 From: Ravi Dey Date: Fri, 8 Jul 2011 17:00:43 +0530 Subject: [PATCH] support ticket auto close --- support/doctype/support_ticket/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/support/doctype/support_ticket/__init__.py b/support/doctype/support_ticket/__init__.py index 959a751d474..931bb94f538 100644 --- a/support/doctype/support_ticket/__init__.py +++ b/support/doctype/support_ticket/__init__.py @@ -54,7 +54,7 @@ class SupportMailbox(POP3Mailbox): d.save(1) # update feed - update_feed(d) + update_feed(d) def get_support_mails(): @@ -62,3 +62,9 @@ def get_support_mails(): Gets new emails from support inbox and updates / creates Support Ticket records """ SupportMailbox().get_messages() + +def auto_close_tickets(): + """ + Auto Closes Waiting for Customer Support Ticket after 15 days + """ + webnotes.conn.sql("update `tabSupport Ticket` set status = 'Closed' where status = 'Waiting for Customer' and date_sub(curdate(),interval 15 Day) > modified")