[support ticket] clear assign to on closing ticket
This commit is contained in:
parent
fe5fb33cc2
commit
fe9c1eb5df
@ -29,17 +29,13 @@ $.extend(cur_frm.cscript, {
|
|||||||
erpnext.hide_naming_series();
|
erpnext.hide_naming_series();
|
||||||
cur_frm.cscript.make_listing(doc);
|
cur_frm.cscript.make_listing(doc);
|
||||||
if(!doc.__islocal) {
|
if(!doc.__islocal) {
|
||||||
if(in_list(user_roles,'System Manager')) {
|
if(user_roles.indexOf("Support Manager")!==-1) {
|
||||||
if(doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cur_frm.cscript['Close Ticket']);
|
if(doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cur_frm.cscript['Close Ticket']);
|
||||||
if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket', cur_frm.cscript['Re-Open Ticket']);
|
if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket', cur_frm.cscript['Re-Open Ticket']);
|
||||||
}else if(doc.allocated_to) {
|
|
||||||
cur_frm.set_df_property('status','read_only', 1);
|
|
||||||
if(user==doc.allocated_to && doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cur_frm.cscript['Close Ticket']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.set_df_property('subject','read_only', 1);
|
cur_frm.toggle_enable(["subject", "raised_by"], false);
|
||||||
cur_frm.set_df_property('description','hidden', 1);
|
cur_frm.toggle_display("description", false);
|
||||||
cur_frm.set_df_property('raised_by','read_only', 1);
|
|
||||||
}
|
}
|
||||||
refresh_field('status');
|
refresh_field('status');
|
||||||
},
|
},
|
||||||
|
@ -45,6 +45,10 @@ class DocType(TransactionBase):
|
|||||||
def validate(self):
|
def validate(self):
|
||||||
self.update_status()
|
self.update_status()
|
||||||
|
|
||||||
|
if self.doc.status == "Closed":
|
||||||
|
from webnotes.widgets.form.assign_to import clear
|
||||||
|
clear(self.doc.doctype, self.doc.name)
|
||||||
|
|
||||||
def on_communication_sent(self, comm):
|
def on_communication_sent(self, comm):
|
||||||
webnotes.conn.set(self.doc, 'status', 'Waiting for Customer')
|
webnotes.conn.set(self.doc, 'status', 'Waiting for Customer')
|
||||||
if comm.lead and not self.doc.lead:
|
if comm.lead and not self.doc.lead:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user