Assign KBItems to teams

This allows you to only show on the dashboard those tickets which belong to a
given user's team.
This commit is contained in:
Timothy Hobbs
2020-01-27 19:45:15 +01:00
parent eea76a5eb7
commit 5b0d44ec3a
7 changed files with 81 additions and 5 deletions

View File

@ -1343,6 +1343,9 @@ class KBItem(models.Model):
def num_open_tickets(self):
return Ticket.objects.filter(kbitem=self, status__in=(1, 2)).count()
def unassigned_tickets(self):
return Ticket.objects.filter(kbitem=self, status__in=(1, 2), assigned_to__isnull=True)
def get_markdown(self):
return get_markdown(self.answer)