changeset 4006:cdf10b3df899

Allow RhodeCode maintainers to specify a custom bug tracker. This allows people who maintain large RhodeCode installations to setup their own bug tracker and respond to requests against their specific installation. The maintainer is then free to forward problems with RhodeCode to the canonical issue tracker on bitbucket. If the config option "bugtracker" is present, its value will be used with the "Report a bug" button. If left blank, this disables the button. If no value is present, then the default is used. This is so that the new config option doesn't break installations of RhodeCode upgrading to a newer version and to allow easier installation for the common use case.
author Jonathan Sternberg <jonathansternberg@gmail.com>
date Mon, 17 Jun 2013 12:41:28 -0400
parents 266a3cbc0302
children 3e8f48ccca86
files development.ini production.ini rhodecode/config/deployment.ini_tmpl rhodecode/config/routing.py rhodecode/lib/base.py rhodecode/templates/base/base.html
diffstat 6 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/development.ini	Mon Jun 17 15:58:20 2013 +0200
+++ b/development.ini	Mon Jun 17 12:41:28 2013 -0400
@@ -171,6 +171,9 @@
 
 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
 
+## issue tracker RhodeCode (leave blank to disable, absent for default)
+#bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
+
 ## issue tracking mapping for commits messages
 ## comment out issue_pat, issue_server, issue_prefix to enable
 
--- a/production.ini	Mon Jun 17 15:58:20 2013 +0200
+++ b/production.ini	Mon Jun 17 12:41:28 2013 -0400
@@ -171,6 +171,9 @@
 
 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
 
+## issue tracker for RhodeCode (leave blank to disable, absent for default)
+#bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
+
 ## issue tracking mapping for commits messages
 ## comment out issue_pat, issue_server, issue_prefix to enable
 
--- a/rhodecode/config/deployment.ini_tmpl	Mon Jun 17 15:58:20 2013 +0200
+++ b/rhodecode/config/deployment.ini_tmpl	Mon Jun 17 12:41:28 2013 -0400
@@ -171,6 +171,9 @@
 
 #clone_uri = {scheme}://{user}{pass}{netloc}{path}
 
+## issue tracker for RhodeCode (leave blank to disable, absent for default)
+#bugtracker = http://bitbucket.org/marcinkuzminski/rhodecode/issues
+
 ## issue tracking mapping for commits messages
 ## comment out issue_pat, issue_server, issue_prefix to enable
 
--- a/rhodecode/config/routing.py	Mon Jun 17 15:58:20 2013 +0200
+++ b/rhodecode/config/routing.py	Mon Jun 17 12:41:28 2013 -0400
@@ -95,9 +95,6 @@
                  action='repo_switcher')
     rmap.connect('branch_tag_switcher', '/branches-tags/{repo_name:.*?}',
                  controller='home', action='branch_tag_switcher')
-    rmap.connect('bugtracker',
-                 "http://bitbucket.org/marcinkuzminski/rhodecode/issues",
-                 _static=True)
     rmap.connect('rst_help',
                  "http://docutils.sourceforge.net/docs/user/rst/quickref.html",
                  _static=True)
--- a/rhodecode/lib/base.py	Mon Jun 17 15:58:20 2013 +0200
+++ b/rhodecode/lib/base.py	Mon Jun 17 12:41:28 2013 -0400
@@ -262,6 +262,7 @@
         c.rhodecode_version = __version__
         c.rhodecode_instanceid = config.get('instance_id')
         c.rhodecode_name = config.get('rhodecode_title')
+        c.rhodecode_bugtracker = config.get('bugtracker', 'http://bitbucket.org/marcinkuzminski/rhodecode/issues')
         c.use_gravatar = str2bool(config.get('use_gravatar'))
         c.ga_code = config.get('rhodecode_ga_code')
         # Visual options
--- a/rhodecode/templates/base/base.html	Mon Jun 17 15:58:20 2013 +0200
+++ b/rhodecode/templates/base/base.html	Mon Jun 17 12:41:28 2013 -0400
@@ -49,7 +49,9 @@
                %endif
                </a>
                &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski and others
-               &ndash; <a href="${h.url('bugtracker')}">${_('Report a bug')}</a>
+               %if c.rhodecode_bugtracker:
+                   &ndash; <a href="${c.rhodecode_bugtracker}">${_('Report a bug')}</a>
+               %endif
            </p>
        </div>
    </div>