diff --git a/helpdesk/models.py b/helpdesk/models.py index d72e62ca..ec3f68f4 100644 --- a/helpdesk/models.py +++ b/helpdesk/models.py @@ -2049,6 +2049,14 @@ class Checklist(models.Model): return self.name +class ChecklistTaskQuerySet(models.QuerySet): + def todo(self): + return self.filter(completion_date__isnull=True) + + def completed(self): + return self.filter(completion_date__isnull=False) + + class ChecklistTask(models.Model): checklist = models.ForeignKey( Checklist, @@ -2066,6 +2074,8 @@ class ChecklistTask(models.Model): blank=True ) + objects = ChecklistTaskQuerySet.as_manager() + class Meta: verbose_name = _('Checklist Task') verbose_name_plural = _('Checklist Tasks') diff --git a/helpdesk/templates/helpdesk/ticket_desc_table.html b/helpdesk/templates/helpdesk/ticket_desc_table.html index ba980af5..8aa85c04 100644 --- a/helpdesk/templates/helpdesk/ticket_desc_table.html +++ b/helpdesk/templates/helpdesk/ticket_desc_table.html @@ -171,6 +171,62 @@ +