fix: retain Hold status

This commit is contained in:
Rucha Mahabal 2020-06-04 15:56:59 +05:30
parent 94d03c6100
commit 3f08350181
2 changed files with 2 additions and 19 deletions

View File

@ -78,23 +78,6 @@ def execute():
frappe.delete_doc('DocType', 'Service Level') frappe.delete_doc('DocType', 'Service Level')
# set issue status as Replied since Hold status is removed
if frappe.db.exists('DocType', 'Issue'):
issues_on_hold = frappe.db.get_all('Issue', {'status': 'Hold'})
issues = [entry.name for entry in issues_on_hold]
if not issues:
return
frappe.reload_doc('support', 'doctype', 'issue')
frappe.db.sql("""
UPDATE
`tabIssue`
SET
status='Replied'
WHERE
name IN %(issues)s
""", {'issues': issues})
def convert_to_seconds(value, unit): def convert_to_seconds(value, unit):
seconds = 0 seconds = 0

View File

@ -120,7 +120,7 @@
"no_copy": 1, "no_copy": 1,
"oldfieldname": "status", "oldfieldname": "status",
"oldfieldtype": "Select", "oldfieldtype": "Select",
"options": "Open\nReplied\nResolved\nClosed", "options": "Open\nReplied\nHold\nResolved\nClosed",
"search_index": 1 "search_index": 1
}, },
{ {
@ -420,7 +420,7 @@
"icon": "fa fa-ticket", "icon": "fa fa-ticket",
"idx": 7, "idx": 7,
"links": [], "links": [],
"modified": "2020-05-26 12:12:59.343559", "modified": "2020-06-04 15:53:38.322514",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "Support", "module": "Support",
"name": "Issue", "name": "Issue",