From 7e65e3d36764af9dcc943d78bcacc8c2d1fd3d97 Mon Sep 17 00:00:00 2001 From: Sam Splunks <72095718+samsplunks@users.noreply.github.com> Date: Wed, 14 Feb 2024 13:23:15 +0000 Subject: [PATCH] Renamed setting to HELPDESK_FOLLOWUP_TIME_SPENT_EXCLUDE_STATUSES --- docs/settings.rst | 6 +++--- helpdesk/models.py | 2 +- helpdesk/settings.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index 2085c39e..e332a7ad 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -327,13 +327,13 @@ Time Tracking Options "12-25", "12-31",) -- **HELPDESK_FOLLOWUP_TIME_CALCULATION_EXCLUDE_STATUSES** List of ticket statuses to exclude from automatic follow-up 'time_spent' calculation. +- **HELPDESK_FOLLOWUP_TIME_SPENT_EXCLUDE_STATUSES** List of ticket statuses to exclude from automatic follow-up 'time_spent' calculation. - **Default:** ``HELPDESK_FOLLOWUP_TIME_CALCULATION_EXCLUDE_STATUSES = ()`` + **Default:** ``HELPDESK_FOLLOWUP_TIME_SPENT_EXCLUDE_STATUSES = ()`` This example will have follow-ups to resolved ticket status not to be counted in:: - HELPDESK_FOLLOWUP_TIME_CALCULATION_EXCLUDE_STATUSES = (HELPDESK_TICKET_RESOLVED_STATUS,) + HELPDESK_FOLLOWUP_TIME_SPENT_EXCLUDE_STATUSES = (HELPDESK_TICKET_RESOLVED_STATUS,) Staff Ticket Creation Settings ------------------------------ diff --git a/helpdesk/models.py b/helpdesk/models.py index 4231b8e8..9d07ce71 100644 --- a/helpdesk/models.py +++ b/helpdesk/models.py @@ -1026,7 +1026,7 @@ class FollowUp(models.Model): time_spent_seconds = 0 open_hours = helpdesk_settings.FOLLOWUP_TIME_SPENT_OPENING_HOURS holidays = helpdesk_settings.FOLLOWUP_TIME_SPENT_EXCLUDE_HOLIDAYS - exclude_statuses = helpdesk_settings.FOLLOWUP_TIME_CALCULATION_EXCLUDE_STATUSES + exclude_statuses = helpdesk_settings.FOLLOWUP_TIME_SPENT_EXCLUDE_STATUSES # split time interval by days days = latest.toordinal() - earliest.toordinal() diff --git a/helpdesk/settings.py b/helpdesk/settings.py index 1df0fe4f..a74ef3fa 100644 --- a/helpdesk/settings.py +++ b/helpdesk/settings.py @@ -172,8 +172,8 @@ FOLLOWUP_TIME_SPENT_EXCLUDE_HOLIDAYS = getattr(settings, ()) # Time doesn't count for listed ticket statuses -FOLLOWUP_TIME_CALCULATION_EXCLUDE_STATUSES = getattr(settings, - 'HELPDESK_FOLLOWUP_TIME_CALCULATION_EXCLUDE_STATUSES', +FOLLOWUP_TIME_SPENT_EXCLUDE_STATUSES = getattr(settings, + 'HELPDESK_FOLLOWUP_TIME_SPENT_EXCLUDE_STATUSES', ()) ############################