Adding history entries to sample data

remotes/origin/enhancement/email-actions
Alejandro Alonso 2014-11-20 07:48:02 +01:00
parent 9b8f4cfb48
commit bc68f9a092
1 changed files with 28 additions and 0 deletions

View File

@ -223,6 +223,13 @@ class Command(BaseCommand):
comment=self.sd.paragraph(),
user=wiki_page.owner)
# Add history entry
wiki_page.content=self.sd.paragraphs(3,15)
wiki_page.save()
take_snapshot(wiki_page,
comment=self.sd.paragraph(),
user=wiki_page.owner)
return wiki_page
def create_bug(self, project):
@ -253,6 +260,13 @@ class Command(BaseCommand):
comment=self.sd.paragraph(),
user=bug.owner)
# Add history entry
bug.status=self.sd.db_object_from_queryset(IssueStatus.objects.filter(project=project))
bug.save()
take_snapshot(bug,
comment=self.sd.paragraph(),
user=bug.owner)
return bug
def create_task(self, project, milestone, us, min_date, max_date, closed=False):
@ -284,6 +298,13 @@ class Command(BaseCommand):
comment=self.sd.paragraph(),
user=task.owner)
# Add history entry
task.status=self.sd.db_object_from_queryset(project.task_statuses.all())
task.save()
take_snapshot(task,
comment=self.sd.paragraph(),
user=task.owner)
return task
def create_us(self, project, milestone=None, computable_project_roles=[]):
@ -318,6 +339,13 @@ class Command(BaseCommand):
comment=self.sd.paragraph(),
user=us.owner)
# Add history entry
us.status=self.sd.db_object_from_queryset(project.us_statuses.filter(is_closed=False))
us.save()
take_snapshot(us,
comment=self.sd.paragraph(),
user=us.owner)
return us
def create_milestone(self, project, start_date, end_date):