KB UX improvements

This commit is contained in:
Timothy Hobbs
2020-01-08 22:57:08 +01:00
parent c254336c57
commit b20f600db2
3 changed files with 21 additions and 6 deletions

View File

@ -1323,6 +1323,9 @@ class KBItem(models.Model):
from django.urls import reverse
return str(reverse('helpdesk:list')) + "?kbitem=" + str(self.pk)
def num_open_tickets(self):
return Ticket.objects.filter(kbitem=self, status__in=(1, 2)).count()
def get_markdown(self):
return get_markdown(self.answer)