Adding watchers to sample_data

remotes/origin/enhancement/email-actions
Alejandro Alonso 2015-07-22 12:12:59 +02:00
parent c13dcb7757
commit 2a4ad10de9
1 changed files with 9 additions and 0 deletions

View File

@ -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)