mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-08-17 19:31:18 +02:00
Show a form to create a new checklist, with the possibility to use a preset template
This commit is contained in:
@@ -2028,6 +2028,12 @@ class ChecklistTemplate(models.Model):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
def create_checklist_for_ticket(self, ticket):
|
||||
checklist = ticket.checklists.create(name=self.name)
|
||||
for task in self.task_list:
|
||||
checklist.tasks.create(description=task)
|
||||
return checklist
|
||||
|
||||
|
||||
class Checklist(models.Model):
|
||||
ticket = models.ForeignKey(
|
||||
|
Reference in New Issue
Block a user