diff --git a/taiga/projects/management/commands/sample_data.py b/taiga/projects/management/commands/sample_data.py index 3fca91db..22514293 100644 --- a/taiga/projects/management/commands/sample_data.py +++ b/taiga/projects/management/commands/sample_data.py @@ -286,6 +286,9 @@ class Command(BaseCommand): user__isnull=False)).user bug.save() + watching_user = self.sd.db_object_from_queryset(project.memberships.filter(user__isnull=False)).user + bug.watchers.add(watching_user) + take_snapshot(bug, comment=self.sd.paragraph(), user=bug.owner) @@ -334,6 +337,9 @@ class Command(BaseCommand): comment=self.sd.paragraph(), user=task.owner) + watching_user = self.sd.db_object_from_queryset(project.memberships.filter(user__isnull=False)).user + task.watchers.add(watching_user) + # Add history entry task.status=self.sd.db_object_from_queryset(project.task_statuses.all()) task.save() @@ -380,6 +386,9 @@ class Command(BaseCommand): us.assigned_to = self.sd.db_object_from_queryset(project.memberships.filter(user__isnull=False)).user us.save() + watching_user = self.sd.db_object_from_queryset(project.memberships.filter(user__isnull=False)).user + us.watchers.add(watching_user) + take_snapshot(us, comment=self.sd.paragraph(), user=us.owner)