diff mbox series

[layerindex-web,2/2] templates: link to Bugzilla for reporting bugs

Message ID 20261025020646.89376-2-tim.orling@konsulko.com
State New
Headers show
Series [layerindex-web,1/2] dockersetup: trust the site's own origin for CSRF | expand

Commit Message

Tim Orling Oct. 25, 2026, 2:06 a.m. UTC
The site gave no hint of where to report problems with it. Add a
"report a bug" link to the footer and a line on the About page, both
pointing to the Layer Index product in the Yocto Project Bugzilla.

[YOCTO #15039]

AI-Generated: Claude Opus 5.5
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 templates/base.html             |  1 +
 templates/layerindex/about.html |  2 ++
 tests/test_bug_report_link.py   | 23 +++++++++++++++++++++++
 3 files changed, 26 insertions(+)
 create mode 100644 tests/test_bug_report_link.py
diff mbox series

Patch

diff --git a/templates/base.html b/templates/base.html
index e31238c..acf0a9f 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -130,6 +130,7 @@ 
             <a href="{% url 'history_list' %}">change history</a>
             &bull; <a href="{% url 'about' %}">about this site</a>
             &bull; <a href="https://www.openembedded.org/wiki/Layers_FAQ">FAQ</a>
+            &bull; <a href="https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Layer%20Index">report a bug</a>
         </div>
 
         {% endblock %}
diff --git a/templates/layerindex/about.html b/templates/layerindex/about.html
index a2055fb..5acba08 100644
--- a/templates/layerindex/about.html
+++ b/templates/layerindex/about.html
@@ -57,6 +57,8 @@ 
 
 <p>The code is Open Source and can be found on <a href="https://git.yoctoproject.org/layerindex-web/">git.yoctoproject.org</a>. Patches welcome!</p>
 
+<p>If you find a problem with this site, please <a href="https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Layer%20Index">report it</a> in the Yocto Project Bugzilla under the "Layer Index" product.</p>
+
 {% endautoescape %}
 {% endblock %}
 
diff --git a/tests/test_bug_report_link.py b/tests/test_bug_report_link.py
new file mode 100644
index 0000000..d4d1027
--- /dev/null
+++ b/tests/test_bug_report_link.py
@@ -0,0 +1,23 @@ 
+# layerindex-web - tests for the bug report link
+#
+# Licensed under the MIT license, see COPYING.MIT for details
+#
+# SPDX-License-Identifier: MIT
+
+import pytest
+from django.test import TestCase
+from django.urls import reverse
+
+BUG_URL = 'https://bugzilla.yoctoproject.org/enter_bug.cgi?product=Layer%20Index'
+
+
+@pytest.mark.django_db
+class TestBugReportLink(TestCase):
+
+    def test_footer_links_to_bugzilla(self):
+        response = self.client.get(reverse('history_list'))
+        self.assertContains(response, '<a href="%s">report a bug</a>' % BUG_URL)
+
+    def test_about_page_links_to_bugzilla(self):
+        response = self.client.get(reverse('about'))
+        self.assertContains(response, '<a href="%s">report it</a>' % BUG_URL)