From cf4a1dbeb6d035ece0274878562d65a0b4730838 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Wed, 20 Nov 2024 14:33:04 +0100 Subject: [PATCH] Project/team help_text --- .../0009_alter_project_visibility.py | 22 +++++++++++++++++++ projects/models.py | 4 +++- .../migrations/0003_alter_team_visibility.py | 22 +++++++++++++++++++ teams/models.py | 4 +++- 4 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 projects/migrations/0009_alter_project_visibility.py create mode 100644 teams/migrations/0003_alter_team_visibility.py diff --git a/projects/migrations/0009_alter_project_visibility.py b/projects/migrations/0009_alter_project_visibility.py new file mode 100644 index 0000000..d853f1d --- /dev/null +++ b/projects/migrations/0009_alter_project_visibility.py @@ -0,0 +1,22 @@ +# Generated by Django 4.2.16 on 2024-11-20 13:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("projects", "0008_project_next_quota_check"), + ] + + operations = [ + migrations.AlterField( + model_name="project", + name="visibility", + field=models.IntegerField( + choices=[(1, "Joinable"), (10, "Discoverable"), (99, "Team Members")], + default=99, + help_text="Which users can see this project and its issues?", + ), + ), + ] diff --git a/projects/models.py b/projects/models.py index 3675da5..a789015 100644 --- a/projects/models.py +++ b/projects/models.py @@ -59,7 +59,9 @@ class Project(models.Model): alert_on_unmute = models.BooleanField(default=True) # visibility - visibility = models.IntegerField(choices=ProjectVisibility.choices, default=ProjectVisibility.TEAM_MEMBERS) + visibility = models.IntegerField( + choices=ProjectVisibility.choices, default=ProjectVisibility.TEAM_MEMBERS, + help_text="Which users can see this project and its issues?") # ingestion/digestion quota quota_exceeded_until = models.DateTimeField(null=True, blank=True) diff --git a/teams/migrations/0003_alter_team_visibility.py b/teams/migrations/0003_alter_team_visibility.py new file mode 100644 index 0000000..a671238 --- /dev/null +++ b/teams/migrations/0003_alter_team_visibility.py @@ -0,0 +1,22 @@ +# Generated by Django 4.2.16 on 2024-11-20 13:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("teams", "0002_initial"), + ] + + operations = [ + migrations.AlterField( + model_name="team", + name="visibility", + field=models.IntegerField( + choices=[(1, "Joinable"), (10, "Discoverable"), (99, "Hidden")], + default=10, + help_text="Which users can see this team and its issues?", + ), + ), + ] diff --git a/teams/models.py b/teams/models.py index d0e3d9b..dea8681 100644 --- a/teams/models.py +++ b/teams/models.py @@ -23,7 +23,9 @@ class Team(models.Model): name = models.CharField(max_length=255, blank=False, null=False, unique=True) slug = models.SlugField(max_length=50, blank=False, null=False) - visibility = models.IntegerField(choices=TeamVisibility.choices, default=TeamVisibility.DISCOVERABLE) + visibility = models.IntegerField( + choices=TeamVisibility.choices, default=TeamVisibility.DISCOVERABLE, + help_text="Which users can see this team and its issues?") def __str__(self): return self.name