Close tickets automatically through scheduler

This commit is contained in:
Nabin Hait
2014-01-07 16:18:41 +05:30
parent da282d405f
commit 10fd91c78e
3 changed files with 10 additions and 6 deletions

View File

@@ -52,11 +52,6 @@ Original Query:
subject = '['+cstr(d.name)+'] ' + cstr(d.subject), \
msg = cstr(response))
def auto_close_tickets(self):
webnotes.conn.sql("""update `tabSupport Ticket` set status = 'Closed'
where status = 'Replied'
and date_sub(curdate(),interval 15 Day) > modified""")
def get_support_mails():
if cint(webnotes.conn.get_value('Email Settings', None, 'sync_support_mails')):
SupportMailbox()

View File

@@ -66,4 +66,9 @@ class DocType(TransactionBase):
def set_status(name, status):
st = webnotes.bean("Support Ticket", name)
st.doc.status = status
st.save()
st.save()
def auto_close_tickets():
webnotes.conn.sql("""update `tabSupport Ticket` set status = 'Closed'
where status = 'Replied'
and date_sub(curdate(),interval 15 Day) > modified""")