Show Due date on public view ticket if it is set.

Also change default to empty string when a custom field value is None.
This commit is contained in:
bbe 2020-10-23 16:24:35 +02:00
parent 4ee74e6667
commit 58a5387779

View File

@ -15,6 +15,13 @@
<td>{{ ticket.created|date:"r" }} ({{ ticket.created|naturaltime }})</td> <td>{{ ticket.created|date:"r" }} ({{ ticket.created|naturaltime }})</td>
</tr> </tr>
{% if ticket.due_date %}
<tr>
<th>{% trans "Due On" %}</th>
<td>{{ ticket.due_date|date:"r" }} ({{ ticket.due_date|naturaltime }})</td>
</tr>
{% endif %}
<tr> <tr>
<th>{% trans "Submitter E-Mail" %}</th> <th>{% trans "Submitter E-Mail" %}</th>
<td>{{ ticket.submitter_email }}</td> <td>{{ ticket.submitter_email }}</td>
@ -26,10 +33,11 @@
</tr> </tr>
{% for customfield in ticket.ticketcustomfieldvalue_set.all %} {% for customfield in ticket.ticketcustomfieldvalue_set.all %}
<tr> <tr>
<th>{{ customfield.field.label }}</th> <th>{{ customfield.field.label }}</th>
<td>{{ customfield.value }}</td> <td>{{ customfield.value|default:"" }}</td>
</tr>{% endfor %} </tr>
{% endfor %}
{% if tags_enabled %} {% if tags_enabled %}
<tr> <tr>