[damned-lies] Fixes #93 - Removed unused bugzilla account field



commit 5e6b6b3777bc6336be7b3e157d0e6f1571ab6a3c
Author: Claude Paroz <claude 2xlibre net>
Date:   Sat Aug 18 15:31:30 2018 +0200

    Fixes #93 - Removed unused bugzilla account field
    
    Thanks Tim Sabsch for the report.

 people/forms.py                                          |  2 +-
 people/migrations/0006_remove_person_bugzilla_account.py | 15 +++++++++++++++
 people/models.py                                         |  5 -----
 stats/fixtures/sample_data.json                          |  7 ++-----
 stats/tests/tests.py                                     |  9 ++-------
 templates/people/person_overview.html                    | 13 ++++---------
 6 files changed, 24 insertions(+), 27 deletions(-)
---
diff --git a/people/forms.py b/people/forms.py
index e4688250..a3e159b8 100644
--- a/people/forms.py
+++ b/people/forms.py
@@ -87,7 +87,7 @@ class DetailForm(forms.ModelForm):
     class Meta:
         model = Person
         fields = ('username', 'first_name', 'last_name', 'email', 'image', 'avatar_service',
-                  'webpage_url', 'irc_nick', 'bugzilla_account')
+                  'webpage_url', 'irc_nick')
 
     def clean_image(self):
         url = self.cleaned_data['image']
diff --git a/people/migrations/0006_remove_person_bugzilla_account.py 
b/people/migrations/0006_remove_person_bugzilla_account.py
new file mode 100644
index 00000000..a469c8fa
--- /dev/null
+++ b/people/migrations/0006_remove_person_bugzilla_account.py
@@ -0,0 +1,15 @@
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('people', '0005_remove_person_use_gravatar'),
+    ]
+
+    operations = [
+        migrations.RemoveField(
+            model_name='person',
+            name='bugzilla_account',
+        ),
+    ]
diff --git a/people/models.py b/people/models.py
index e3e8beb4..41bd86c4 100644
--- a/people/models.py
+++ b/people/models.py
@@ -36,8 +36,6 @@ class Person(User):
     )
     webpage_url = models.URLField(_("Web page"), null=True, blank=True)
     irc_nick = models.SlugField(_("IRC nickname"), max_length=20, null=True, blank=True)
-    bugzilla_account = models.EmailField(_("Bugzilla account"), null=True, blank=True,
-                                         help_text=_("This should be an email address, useful if not equal 
to “E-mail address” field"))
     activation_key = models.CharField(max_length=40, null=True, blank=True)
 
     # Use UserManager to get the create_user method, etc.
@@ -107,9 +105,6 @@ class Person(User):
     def no_spam_email(self):
         return obfuscate_email(self.email)
 
-    def no_spam_bugzilla_account(self):
-        return obfuscate_email(self.bugzilla_account)
-
     @property
     def name(self):
         if self.first_name or self.last_name:
diff --git a/stats/fixtures/sample_data.json b/stats/fixtures/sample_data.json
index 7272ccc0..d658dbb6 100644
--- a/stats/fixtures/sample_data.json
+++ b/stats/fixtures/sample_data.json
@@ -55,7 +55,6 @@
 },
 {
  "fields": {
-  "bugzilla_account": null,
   "groups": [],
   "image": null,
   "activation_key": null,
@@ -70,7 +69,6 @@
 },
 {
  "fields": {
-  "bugzilla_account": null,
   "groups": [],
   "image": null,
   "activation_key": null,
@@ -85,7 +83,6 @@
 },
 {
  "fields": {
-  "bugzilla_account": null,
   "groups": [],
   "image": null,
   "activation_key": null,
@@ -205,7 +202,7 @@
   "ext_platform": "",
   "maintainers": [],
   "bugs_component": "test",
-  "bugs_base": "https://bugzilla.gnome.org";,
+  "bugs_base": "https://gitlab.gnome.org/GNOME/gnome-hello/issues";,
   "vcs_type": "git",
   "homepage": "",
   "description": ""
@@ -224,7 +221,7 @@
   "ext_platform": "",
   "maintainers": [],
   "bugs_component": "general",
-  "bugs_base": "https://bugzilla.gnome.org";,
+  "bugs_base": "https://gitlab.gnome.org/GNOME/zenity/issues";,
   "vcs_type": "git",
   "homepage": "",
   "description": ""
diff --git a/stats/tests/tests.py b/stats/tests/tests.py
index f13d1c6f..c9ce4212 100644
--- a/stats/tests/tests.py
+++ b/stats/tests/tests.py
@@ -89,13 +89,8 @@ class ModuleTestCase(TestCase):
         response = self.client.get(reverse('module', args=[self.mod.name]))
         self.assertContains(
             response,
-            'https://bugzilla.gnome.org/buglist.cgi?product=test&amp;keywords_type=anywords'
-            '&amp;keywords=I18N+L10N&amp;bug_status=UNCONFIRMED&amp;bug_status=NEW&amp;bug_status=ASSIGNED'
-            '&amp;bug_status=REOPENED&amp;bug_status=NEEDINFO'
-        )
-        self.assertContains(
-            response,
-            'https://bugzilla.gnome.org/enter_bug.cgi?product=test&amp;keywords=I18N+L10N&amp;component=test'
+            '<li><a href="https://gitlab.gnome.org/GNOME/gnome-hello/issues";>Report a bug</a></li>',
+            html=True
         )
         self.mod.bugs_base = ''
         self.mod.save()
diff --git a/templates/people/person_overview.html b/templates/people/person_overview.html
index 1fea5b42..85f35a7f 100644
--- a/templates/people/person_overview.html
+++ b/templates/people/person_overview.html
@@ -8,29 +8,24 @@
 
     <div class="txt">
         <a class="name" href="{{ person.get_absolute_url }}">{{ person.name }}</a>
-        <br />
+        <br>
 
         {% if person.webpage_url %}
             <strong>{% trans "Web:" %}</strong>
             <a class="url" href="{{ person.webpage_url }}">{{ person.webpage_url }}</a>
-            <br />
+            <br>
         {% endif %}
 
         {% if person.no_spam_email %}
             <strong>{% trans "Email address:" %}</strong>
             <a class="email" href="mailto:{{ person.no_spam_email }}">{{ person.no_spam_email }}</a>
-            <br />
+            <br>
         {% endif %}
 
         {% if person.irc_nick %}
             <strong>{% trans "IRC account:" %}</strong>
             <em>{{ person.irc_nick }}</em>
-            <br />
-        {% endif %}
-
-        {% if person.no_spam_bugzilla_account %}
-            <strong>{% trans "Bugzilla account:" %}</strong> {{ person.no_spam_bugzilla_account }}
-            <br />
+            <br>
         {% endif %}
 
     </div>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]