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:
mergify[bot]
2026-03-16 12:12:04 +00:00
committed by GitHub
parent b63b5320f2
commit 30fe711c44
2 changed files with 12 additions and 6 deletions

View File

@@ -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 = (

View File

@@ -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",