diff --git a/taiga/projects/management/commands/sample_data.py b/taiga/projects/management/commands/sample_data.py index afd990ec..4af2c699 100644 --- a/taiga/projects/management/commands/sample_data.py +++ b/taiga/projects/management/commands/sample_data.py @@ -464,6 +464,7 @@ class Command(BaseCommand): total_milestones=self.sd.int(5,10), tags=self.sd.words(1, 10).split(" "), 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) project.is_kanban_activated = True diff --git a/taiga/projects/migrations/0034_project_looking_for_people_note.py b/taiga/projects/migrations/0034_project_looking_for_people_note.py new file mode 100644 index 00000000..b455a7b0 --- /dev/null +++ b/taiga/projects/migrations/0034_project_looking_for_people_note.py @@ -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=''), + ), + ] diff --git a/taiga/projects/models.py b/taiga/projects/models.py index f3367b78..89f8b5f9 100644 --- a/taiga/projects/models.py +++ b/taiga/projects/models.py @@ -219,6 +219,8 @@ class Project(ProjectDefaults, TaggedMixin, models.Model): is_looking_for_people = models.BooleanField(default=False, null=False, blank=True, 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, null=True, blank=True, @@ -298,6 +300,9 @@ class Project(ProjectDefaults, TaggedMixin, models.Model): if not self.videoconferences: self.videoconferences_extra_data = None + if not self.is_looking_for_people: + self.looking_for_people_note = "" + super().save(*args, **kwargs) def refresh_totals(self, save=True):