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

Bug#963762: reportbug: querybts by source package launches incorrect url



Package: reportbug
Version: 7.6.0
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu groovy ubuntu-patch

Dear Maintainer,

I was using querybts to browse bugs about the source package
jinja2-time (querybts -s jinja2-time), however when I choose 'b' to
launch a browser the url loaded was about the binary package not the
source package. This patch fixes it.

An appropriate changelog entry might be the following:

  * After viewing a list of source package bugs and choosing to view them in a
    browser pass the fact that it is a source package to the bug tracker.

Thanks for considering the patch.
diff -Nru reportbug-7.6.0ubuntu1/reportbug/ui/text_ui.py reportbug-7.6.0ubuntu2/reportbug/ui/text_ui.py
--- reportbug-7.6.0ubuntu1/reportbug/ui/text_ui.py	2019-12-14 13:19:18.000000000 -0800
+++ reportbug-7.6.0ubuntu2/reportbug/ui/text_ui.py	2020-06-26 09:29:49.000000000 -0700
@@ -598,8 +598,8 @@
             ewrite('%d bug reports found:\n\n', count)
 
         return browse_bugs(hierarchy, count, bugs, bts, queryonly,
-                           mirrors, http_proxy, timeout, screen, title, package,
-                           mbox_reader_cmd)
+                           mirrors, http_proxy, timeout, screen, title,
+                           package, source, mbox_reader_cmd)
 
     except NoPackage:
         long_message('No record of this package found.')
@@ -607,7 +607,8 @@
 
 
 def browse_bugs(hierarchy, count, bugs, bts, queryonly, mirrors,
-                http_proxy, timeout, screen, title, package, mbox_reader_cmd):
+                http_proxy, timeout, screen, title, package,
+                source, mbox_reader_cmd):
     try:
         output_encoding = locale.getpreferredencoding()
     except locale.Error as msg:
@@ -687,7 +688,10 @@
                         lastpage = []
                         break
                     elif x == 'b':
-                        launch_browser('https://bugs.debian.org/%s' % package)
+                        if source:
+                            launch_browser('https://bugs.debian.org/src:%s' % package)
+                        else:
+                            launch_browser('https://bugs.debian.org/%s' % package)
                         continue
                     elif x == 'r':
                         continue

Reply to: