Close tickets automatically through scheduler
This commit is contained in:
parent
da282d405f
commit
10fd91c78e
@ -53,6 +53,10 @@ def execute_daily():
|
||||
# email digest
|
||||
from setup.doctype.email_digest.email_digest import send
|
||||
run_fn(send)
|
||||
|
||||
# auto close support tickets
|
||||
from support.doctype.support_ticket.support_ticket import auto_close_tickets
|
||||
run_fn(auto_close_tickets)
|
||||
|
||||
def execute_weekly():
|
||||
from setup.doctype.backup_manager.backup_manager import take_backups_weekly
|
||||
|
@ -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()
|
||||
|
@ -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""")
|
Loading…
x
Reference in New Issue
Block a user