diff --git a/docs/settings.rst b/docs/settings.rst index 362241ad..d8f5f7af 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -94,6 +94,14 @@ These changes are visible throughout django-helpdesk **Default:** ``HELPDESK_ANON_ACCESS_RAISES_404 = False`` +- **HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET** If False, disable the dependencies fields on ticket. + + **Default:** ``HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET = True`` + +- **HELPDESK_ENABLE_TIME_SPENT_ON_TICKET** If False, disable the time spent fields on ticket. + + **Default:** ``HELPDESK_ENABLE_TIME_SPENT_ON_TICKET = True`` + - **HELPDESK_TICKETS_TIMELINE_ENABLED** If False, remove from the dashboard the Timeline view for tickets. **Default:** ``HELPDESK_TICKETS_TIMELINE_ENABLED = True`` diff --git a/helpdesk/settings.py b/helpdesk/settings.py index 31a1f742..4b5fb7bb 100644 --- a/helpdesk/settings.py +++ b/helpdesk/settings.py @@ -41,6 +41,16 @@ HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT = getattr(settings, 'HELPDESK_REDIRECT_TO_LOGIN_BY_DEFAULT', False) +# Enable the Dependencies field on ticket view +HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET = getattr(settings, + 'HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET', + True) + +# Enable the Time spent on field on ticket view +HELPDESK_ENABLE_TIME_SPENT_ON_TICKET = getattr(settings, + 'HELPDESK_ENABLE_TIME_SPENT_ON_TICKET', + True) + # raises a 404 to anon users. It's like it was invisible HELPDESK_ANON_ACCESS_RAISES_404 = getattr(settings, 'HELPDESK_ANON_ACCESS_RAISES_404', diff --git a/helpdesk/templates/helpdesk/followup_edit.html b/helpdesk/templates/helpdesk/followup_edit.html index e74e3203..af61e6e1 100644 --- a/helpdesk/templates/helpdesk/followup_edit.html +++ b/helpdesk/templates/helpdesk/followup_edit.html @@ -46,8 +46,10 @@
If the status was changed, what was it changed to?
+ {% if helpdesk_settings.HELPDESK_ENABLE_TIME_SPENT_ON_TICKET %}{% if followup.comment %} @@ -156,12 +156,14 @@