Show kbitem categories in kbitem string representation

This commit is contained in:
Timothy Hobbs 2020-02-11 15:20:16 +01:00
parent f8c652d506
commit 2a3272914c
2 changed files with 2 additions and 2 deletions

View File

@ -1325,7 +1325,7 @@ class KBItem(models.Model):
score = property(_score)
def __str__(self):
return '%s' % self.title
return '%s: %s' % (self.category.title, self.title)
class Meta:
ordering = ('title',)

View File

@ -71,7 +71,7 @@
{% if ticket.kbitem %}
<tr>
<th class="table-active">{% trans "Knowlegebase item" %}</th>
<td> <a href ="{{ticket.kbitem.query_url}}"> {{ticket.kbitem.title}} </a> </td>
<td> <a href ="{{ticket.kbitem.query_url}}"> {{ticket.kbitem}} </a> </td>
</tr>
{% endif %}
<tr>