Repository: fedora-infra/bodhi

Issue:
Comment permalinks use the update URL with all the package names in it, which can be ridiculously long
Go to https://bodhi.fedoraproject.org/updates/FEDORA-2018-85d637c544 . Observe the URL for the comment permalinks. Here's one:

    https://bodhi.fedoraproject.org/updates/abattis-cantarell-fonts-0.111-1.fc29%20adwaita-icon-theme-3.30.0-1.fc29%20aisleriot-3.22.6-1.fc29%20amtk-5.0.0-2.fc29%20anjuta-3.28.0-7.fc29%20at-spi2-atk-2.30.0-1.fc29%20at-spi2-core-2.30.0-2.fc29%20atk-2.30.0-1.fc29%20atomix-3.30.0.1-1.fc29%20baobab-3.30.0-1.fc29%20bijiben-3.30.0-1.fc29%20cheese-3.30.0-2.fc29%20dconf-0.30.0-1.fc29%20dconf-editor-3.30.0-1.fc29%20devhelp-3.30.0-2.fc29%20epiphany-3.30.0-1.fc29%20evince-3.30.0-2.fc29%20file-roller-3.30.0-1.fc29%20five-or-more-3.30.0-1.fc29%20gdk-pixbuf2-2.38.0-4.fc29%20gdm-3.30.0-3.fc29%20gedit-3.30.0-2.fc29%20gedit-plugins-3.30.0-1.fc29%20gjs-1.54.0-2.fc29%20glib-networking-2.58.0-2.fc29%20glib2-2.58.0-1.fc29%20gnome-2048-3.30.0-1.fc29%20gnome-backgrounds-3.30.0-1.fc29%20gnome-boxes-3.30.0-2.fc29%20gnome-builder-3.30.0-2.fc29%20gnome-calculator-3.30.0-1.fc29%20gnome-calendar-3.30.0-1.fc29%20gnome-characters-3.29.91-1.fc29%20gnome-chess-3.30.0-1.fc29%20gnome-clocks-3.30.0-2.fc29%20gnome-color-manager-3.30.0-1.fc29%20gnome-contacts-3.30-1.fc29%20gnome-control-center-3.30.0-1.fc29%20gnome-desktop3-3.30.0-2.fc29%20gnome-disk-utility-3.30.0-1.fc29%20gnome-font-viewer-3.30.0-1.fc29%20gnome-getting-started-docs-3.30.0-1.fc29%20gnome-initial-setup-3.29.92-1.fc29%20gnome-logs-3.30.0-1.fc29%20gnome-maps-3.30.0-1.fc29%20gnome-mines-3.30.0-1.fc29%20gnome-multi-writer-3.30.0-1.fc29%20gnome-music-3.30.0-1.fc29%20gnome-nibbles-3.24.1-1.fc29%20gnome-online-accounts-3.30.0-3.fc29%20gnome-online-miners-3.30.0-1.fc29%20gnome-packagekit-3.30.0-1.fc29%20gnome-photos-3.30.0-1.fc29%20gnome-power-manager-3.30.0-1.fc29%20gnome-screenshot-3.30.0-1.fc29%20gnome-session-3.30.0-1.fc29%20gnome-settings-daemon-3.30.0-1.fc29%20gnome-shell-3.30.0-1.fc29%20gnome-shell-extensions-3.30.0-1.fc29%20gnome-software-3.30.0-1.fc29%20gnome-sudoku-3.30.0-2.fc29%20gnome-taquin-3.30.0-1.fc29%20gnome-tweaks-3.30.0-1.fc29%20gnome-user-docs-3.30.0-1.fc29%20gobject-introspection-1.58.0-2.fc29%20gpaste-3.30.1-1.fc29%20gsettings-desktop-schemas-3.28.1-2.fc29%20gtk-doc-1.29-1.fc29%20gtk3-3.24.0-3.fc29%20gtksourceview3-3.24.9-4.fc29%20gtksourceview4-4.0.3-2.fc29%20gucharmap-11.0.2-2.fc29%20gvfs-1.38.0-1.fc29%20iagno-3.30.0-1.fc29%20jsonrpc-glib-3.30.0-2.fc29%20libdazzle-3.30.0-1.fc29%20librsvg2-2.44.2-2.fc29%20libsoup-2.64.0-2.fc29%20lightsoff-3.30.0-1.fc29%20mozjs60-60.1.0-1.fc29%20mutter-3.30.0-1.fc29%20nautilus-3.30.0-2.fc29%20orca-3.29.92-1.fc29%20polari-3.30.0-1.fc29%20pyatspi-2.30.0-1.fc29%20pygobject3-3.30.0-1.fc29%20rygel-0.36.2-2.fc29%20seahorse-3.30-1.fc29%20shotwell-0.29.92-1.fc29%20simple-scan-3.30.0-1.fc29%20sushi-3.30.0-1.fc29%20swell-foop-3.30.0-1.fc29%20sysprof-3.30.0-1.fc29%20template-glib-3.30.0-2.fc29%20tracker-2.1.4-3.fc29%20tracker-miners-2.1.4-2.fc29%20vala-0.42.0-1.fc29%20webkit2gtk3-2.22.0-3.fc29%20yelp-3.30.0-1.fc29%20yelp-xsl-3.30.0-1.fc29#comment-832479

why is it not:

    https://bodhi.fedoraproject.org/updates/FEDORA-2018-85d637c544#comment-832479

?


Discussion:

Resolving patch:
diff --git a/bodhi/server/models.py b/bodhi/server/models.py
--- a/bodhi/server/models.py
+++ b/bodhi/server/models.py
@@ -3973,7 +3973,7 @@ def url(self):
         Returns:
             basestring: A URL to this comment.
         """
-        url = '/updates/' + self.update.title + '#comment-' + str(self.id)
+        url = self.update.get_url() + '#comment-' + str(self.id)
         return url
 
     @property


Test patch: