mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-24 05:32:46 +01:00
fix(support-settings): disable the auto-close tickets feature if close_issue_after_days is set to 0 (backport #53499) (#53504)
Co-authored-by: diptanilsaha <diptanil@frappe.io> fix(support-settings): disable the auto-close tickets feature if `close_issue_after_days` is set to 0 (#53499)
This commit is contained in:
@@ -227,10 +227,14 @@ def set_status(name, status):
|
||||
|
||||
|
||||
def auto_close_tickets():
|
||||
"""Auto-close replied support tickets after 7 days"""
|
||||
auto_close_after_days = (
|
||||
frappe.db.get_value("Support Settings", "Support Settings", "close_issue_after_days") or 7
|
||||
)
|
||||
"""
|
||||
Auto-close replied support tickets as defined on `close_issue_after_days` in Support Settings.
|
||||
Disables the feature if `close_issue_after_days` is set to 0.
|
||||
"""
|
||||
auto_close_after_days = frappe.db.get_single_value("Support Settings", "close_issue_after_days")
|
||||
|
||||
if not auto_close_after_days:
|
||||
return
|
||||
|
||||
table = frappe.qb.DocType("Issue")
|
||||
issues = (
|
||||
|
||||
@@ -37,9 +37,11 @@
|
||||
},
|
||||
{
|
||||
"default": "7",
|
||||
"description": "Set this value to 0 to disable the feature.",
|
||||
"fieldname": "close_issue_after_days",
|
||||
"fieldtype": "Int",
|
||||
"label": "Close Issue After Days"
|
||||
"label": "Close Issue After Days",
|
||||
"non_negative": 1
|
||||
},
|
||||
{
|
||||
"fieldname": "portal_sb",
|
||||
@@ -163,7 +165,7 @@
|
||||
],
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2021-10-14 13:08:38.473616",
|
||||
"modified": "2026-03-16 16:33:45.859541",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Support",
|
||||
"name": "Support Settings",
|
||||
|
||||
Reference in New Issue
Block a user