Task #3623: Add looking_for_people_note field

remotes/origin/logger
David Barragán Merino 2015-12-07 19:09:59 +01:00
parent ab56f1a772
commit c280898642
3 changed files with 25 additions and 0 deletions

View File

@ -464,6 +464,7 @@ class Command(BaseCommand):
total_milestones=self.sd.int(5,10), total_milestones=self.sd.int(5,10),
tags=self.sd.words(1, 10).split(" "), tags=self.sd.words(1, 10).split(" "),
is_looking_for_people=counter in LOOKING_FOR_PEOPLE_PROJECTS_POSITIONS, is_looking_for_people=counter in LOOKING_FOR_PEOPLE_PROJECTS_POSITIONS,
looking_for_people_note=self.sd.short_sentence(),
is_featured=counter in FEATURED_PROJECTS_POSITIONS) is_featured=counter in FEATURED_PROJECTS_POSITIONS)
project.is_kanban_activated = True project.is_kanban_activated = True

View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0033_text_search_indexes'),
]
operations = [
migrations.AddField(
model_name='project',
name='looking_for_people_note',
field=models.TextField(blank=True, verbose_name='loking for people note', default=''),
),
]

View File

@ -219,6 +219,8 @@ class Project(ProjectDefaults, TaggedMixin, models.Model):
is_looking_for_people = models.BooleanField(default=False, null=False, blank=True, is_looking_for_people = models.BooleanField(default=False, null=False, blank=True,
verbose_name=_("is looking for people")) verbose_name=_("is looking for people"))
looking_for_people_note = models.TextField(default="", null=False, blank=True,
verbose_name=_("loking for people note"))
userstories_csv_uuid = models.CharField(max_length=32, editable=False, userstories_csv_uuid = models.CharField(max_length=32, editable=False,
null=True, blank=True, null=True, blank=True,
@ -298,6 +300,9 @@ class Project(ProjectDefaults, TaggedMixin, models.Model):
if not self.videoconferences: if not self.videoconferences:
self.videoconferences_extra_data = None self.videoconferences_extra_data = None
if not self.is_looking_for_people:
self.looking_for_people_note = ""
super().save(*args, **kwargs) super().save(*args, **kwargs)
def refresh_totals(self, save=True): def refresh_totals(self, save=True):