support ticket auto close

This commit is contained in:
Ravi Dey 2011-07-08 17:00:43 +05:30
parent b6e2488847
commit 28717a82d0

View File

@ -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")