Repository: fedora-infra/bodhi

Issue:
Mention the package along with the 'comment'/'feedback'
The list of feedback does not contain the information on which package the feedback was given to, see this picture:
![screenshot from 2015-08-20 08-57-23](https://cloud.githubusercontent.com/assets/303559/9377459/8720e6a2-4719-11e5-84e6-22f034cd7f35.png)

Instead this information is hidden in the link "23 days ago [...]".
Would it be possible to e.g. write the package name below the "23 days ago [...]"?

This would help a lot and one does not hove with the mouse to the link to see which package the feedback was given too.



Discussion:
Agreed!


Resolving patch:
diff --git a/bodhi/models/models.py b/bodhi/models/models.py
--- a/bodhi/models/models.py
+++ b/bodhi/models/models.py
@@ -25,6 +25,13 @@
 from datetime import datetime
 from collections import defaultdict
 
+try:
+    # python3
+    from urllib.parse import quote
+except ImportError:
+    from urllib import quote
+
+
 from sqlalchemy import Unicode, UnicodeText, Integer, Boolean
 from sqlalchemy import DateTime
 from sqlalchemy import Table, Column, ForeignKey
@@ -1178,14 +1185,20 @@ def send_update_notice(self):
 
     def get_url(self):
         """ Return the relative URL to this update """
-        path = []
+        path = ['updates']
         if self.alias:
-            path.append(self.release.name)
             path.append(self.alias)
         else:
-            path.append(self.get_title())
+            path.append(quote(self.title))
         return os.path.join(*path)
 
+    def abs_url(self):
+        """ Return the absolute URL to this update """
+        base = config['base_address']
+        return os.path.join(base, self.get_url())
+
+    url = abs_url
+
     def __str__(self):
         """
         Return a string representation of this update.


Test patch:
diff --git a/bodhi/tests/models/test_models.py b/bodhi/tests/models/test_models.py
--- a/bodhi/tests/models/test_models.py
+++ b/bodhi/tests/models/test_models.py
@@ -452,9 +452,10 @@ def test_anonymous_comment(self, publish):
         eq_(kwargs['msg']['comment']['author'], 'anonymous')
 
     def test_get_url(self):
-        eq_(self.obj.get_url(), u'TurboGears-1.0.8-3.fc11')
+        eq_(self.obj.get_url(), u'updates/TurboGears-1.0.8-3.fc11')
         self.obj.assign_alias()
-        eq_(self.obj.get_url(), u'F11/FEDORA-%s-0001' % time.localtime()[0])
+        expected = u'updates/FEDORA-%s-0001' % time.localtime()[0]
+        eq_(self.obj.get_url(), expected)
 
     def test_bug(self):
         bug = self.obj.bugs[0]
diff --git a/bodhi/tests/test_masher.py b/bodhi/tests/test_masher.py
--- a/bodhi/tests/test_masher.py
+++ b/bodhi/tests/test_masher.py
@@ -686,7 +686,7 @@ def test_absent_gating(self, cmd, publish, *args):
     @mock.patch('bodhi.bugs.bugtracker.on_qa')
     def test_modify_testing_bugs(self, on_qa, modified, *args):
         self.masher.consume(self.msg)
-        on_qa.assert_called_once_with(12345, u"bodhi-2.0-1.fc17 has been pushed to the Fedora 17 testing repository. If problems still persist, please make note of it in this bug report.\\nIf you want to test the update, you can install it with \\n su -c 'yum --enablerepo=updates-testing update bodhi'. You can provide feedback for this update here: http://0.0.0.0:6543/F17/FEDORA-%s-0001" % time.localtime().tm_year)
+        on_qa.assert_called_once_with(12345, u"bodhi-2.0-1.fc17 has been pushed to the Fedora 17 testing repository. If problems still persist, please make note of it in this bug report.\\nIf you want to test the update, you can install it with \\n su -c 'yum --enablerepo=updates-testing update bodhi'. You can provide feedback for this update here: http://0.0.0.0:6543/updates/FEDORA-%s-0001" % time.localtime().tm_year)
 
     @mock.patch(**mock_taskotron_results)
     @mock.patch('bodhi.masher.MasherThread.update_comps')