From 5b2441b9948e07e165f136a0eb3c067796f377d1 Mon Sep 17 00:00:00 2001 From: Georg Lehner Date: Fri, 17 May 2024 12:34:40 +0200 Subject: [PATCH] Add list of 'parent' tickets to ticket description table 'parent' tickets are all tickets on which the current ticket depends. The parent tickets can only be resolved if the current tickets is closed. This patch splits the current |Dependencies|Total time spent| table row in two rows. The table layout is now |Status |Total time spent| |Depends|Resolves | Status and Total time only have one line. Status was chosen as filler field, because I believe it should be moved out of the title to reduce visual distraction. Depends and Resolve will have a variable number of lines and are closely related. Depends was chosen instead of "Dependencies", to indicate directly what the listed tickets do and because it is shorter. The commit also simplifies the wording of the tooltips and harmonizes with the other tooltips in the same table: It indicates directly what happens when the button is clicked (or touched!). Notes: - The complete row could be omitted if now Depends or Resolves exists for a ticket. This would reduce visual distraction but was not implemented because it could lead to misled expectations. - No button for removing/adding parent tickets was added. If considered important this can be added any time. Currently a user has to go to the parent ticket and delete the dependency (easy) or remember the ticket id/title, search for the parent and add the ticket as dependency (difficult) --- .../templates/helpdesk/ticket_desc_table.html | 58 ++++++++++++------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/helpdesk/templates/helpdesk/ticket_desc_table.html b/helpdesk/templates/helpdesk/ticket_desc_table.html index 8cf00829..7b9e0295 100644 --- a/helpdesk/templates/helpdesk/ticket_desc_table.html +++ b/helpdesk/templates/helpdesk/ticket_desc_table.html @@ -117,24 +117,9 @@ - {% if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET != False and helpdesk_settings.HELPDESK_ENABLE_TIME_SPENT_ON_TICKET != False %} - - {% if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET %} - {% trans "Dependencies" %} - - - {% for dep in ticket.ticketdependency.all %} - {% if forloop.first %}

{% trans "This ticket cannot be resolved until the following ticket(s) are resolved" %}

{% endif %} - {% empty %} - {% trans "This ticket has no dependencies." %} - {% endfor %} - - {% else %} - - - {% endif %} + + {% trans "Status" %} + {{ ticket.get_status }} {% if helpdesk_settings.HELPDESK_ENABLE_TIME_SPENT_ON_TICKET %} {% trans "Total time spent" %} {{ ticket.time_spent_formated }} @@ -142,8 +127,41 @@ {% endif %} - - {% endif %} + + {% if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET != False %} + + {% trans "Depends" %} + + + + {% for dep in ticket.ticketdependency.all %} + {% if forloop.first %}{% endif %} + {% empty %} + {% trans "This ticket has no dependencies." %} + {% endfor %} + + {% trans "Resolves" %} + + {% for parent in ticket.depends_on.all %} + {% if forloop.first %}{% endif %} + {% empty %} + {% trans "This ticket does not resolve any other" %} + {% endfor %} + + + {% endif %} {% if ticket.kbitem %} {% trans "Knowlegebase item" %}