diff --git a/html/Callbacks/BugTracker/Elements/Header/Head b/html/Callbacks/BugTracker/Elements/Header/Head
new file mode 100644
index 0000000..8638838
--- /dev/null
+++ b/html/Callbacks/BugTracker/Elements/Header/Head
@@ -0,0 +1 @@
+<link rel="stylesheet" href="<%RT->Config->Get('WebPath')%>/NoAuth/BugTracker/css/bugtracker.css" type="text/css" media="all" />
diff --git a/html/Callbacks/BugTracker/Ticket/Create.html/FormStart b/html/Callbacks/BugTracker/Ticket/Create.html/FormStart
index e8073a5..f68d289 100644
--- a/html/Callbacks/BugTracker/Ticket/Create.html/FormStart
+++ b/html/Callbacks/BugTracker/Ticket/Create.html/FormStart
@@ -2,5 +2,7 @@
$QueueObj
</%ARGS>
+<& /Dist/Elements/ShowBugtracker, Queue => $QueueObj &>
+
<& /Dist/Elements/ShowNotes, Queue => $QueueObj &>
diff --git a/html/Callbacks/BugTracker/Ticket/Display.html/BeforeActionList b/html/Callbacks/BugTracker/Ticket/Display.html/BeforeActionList
new file mode 100644
index 0000000..8b8d82f
--- /dev/null
+++ b/html/Callbacks/BugTracker/Ticket/Display.html/BeforeActionList
@@ -0,0 +1,8 @@
+<%ARGS>
+$Ticket
+</%ARGS>
+
+<& /Dist/Elements/ShowBugtracker, Queue => $Ticket->QueueObj &>
+
+<& /Dist/Elements/ShowNotes, Queue => $Ticket->QueueObj &>
+
diff --git a/html/Callbacks/BugTracker/Ticket/Modify.html/BeforeActionList b/html/Callbacks/BugTracker/Ticket/Modify.html/BeforeActionList
new file mode 100644
index 0000000..8b8d82f
--- /dev/null
+++ b/html/Callbacks/BugTracker/Ticket/Modify.html/BeforeActionList
@@ -0,0 +1,8 @@
+<%ARGS>
+$Ticket
+</%ARGS>
+
+<& /Dist/Elements/ShowBugtracker, Queue => $Ticket->QueueObj &>
+
+<& /Dist/Elements/ShowNotes, Queue => $Ticket->QueueObj &>
+
diff --git a/html/Callbacks/BugTracker/Ticket/Update.html/BeforeActionList b/html/Callbacks/BugTracker/Ticket/Update.html/BeforeActionList
new file mode 100644
index 0000000..51854cc
--- /dev/null
+++ b/html/Callbacks/BugTracker/Ticket/Update.html/BeforeActionList
@@ -0,0 +1,6 @@
+<%ARGS>
+$Ticket
+</%ARGS>
+
+<& /Dist/Elements/ShowBugtracker, Queue => $Ticket->QueueObj &>
+
diff --git a/html/Dist/Display.html b/html/Dist/Display.html
index 0e4c329..9107dc9 100755
--- a/html/Dist/Display.html
+++ b/html/Dist/Display.html
@@ -57,6 +57,8 @@
Title => $title,
&>
+<& /Dist/Elements/ShowBugtracker, Queue => $QueueObj &>
+
<& /Dist/Elements/ShowNotes, Queue => $QueueObj &>
<& /Dist/Elements/ShowMaintainers, Queue => $QueueObj &>
diff --git a/html/Dist/Elements/ShowBugtracker b/html/Dist/Elements/ShowBugtracker
new file mode 100644
index 0000000..1c9a434
--- /dev/null
+++ b/html/Dist/Elements/ShowBugtracker
@@ -0,0 +1,24 @@
+% if ( defined $bugtracker ) {
+<div id="external_bugtracker">
+<h3><% loc("Alternative bug tracker") %></h3>
+%
+% if ( defined $bugtracker->{mailto} ) {
+<p>
+<div>Please email the <a href="mailto:<% $bugtracker->{mailto} %>">alternative bug tracker</a> to report your issue.</div>
+</p>
+% }
+%
+% if ( defined $bugtracker->{web} ) {
+<p>
+<div>Please visit the <a href="<% $bugtracker->{web} %>">alternative bug tracker</a> to report your issue.</div>
+</p>
+% }
+</div>
+% }
+%
+<%ARGS>
+$Queue
+</%ARGS>
+<%INIT>
+my $bugtracker = $Queue->DistributionBugtracker;
+</%INIT>
diff --git a/html/NoAuth/BugTracker/autohandler b/html/NoAuth/BugTracker/autohandler
new file mode 100644
index 0000000..dabe704
--- /dev/null
+++ b/html/NoAuth/BugTracker/autohandler
@@ -0,0 +1,60 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%#
+%# COPYRIGHT:
+%#
+%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+%# <sales@bestpractical.com>
+%#
+%# (Except where explicitly superseded by other copyright notices)
+%#
+%#
+%# LICENSE:
+%#
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%#
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+%# General Public License for more details.
+%#
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%#
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%#
+%#
+%# CONTRIBUTION SUBMISSION POLICY:
+%#
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%#
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%#
+%# END BPS TAGGED BLOCK }}}
+<%init>
+my $file = $m->base_comp->source_file;
+
+if ($file =~ /\.(gif|png|jpe?g)$/i) {
+ my $relfile = $m->base_comp->path;
+ RT::Interface::Web->SendStaticFile( File => $file, RelativeFile => $relfile );
+} else {
+ RT::Interface::Web::StaticFileHeaders();
+ $r->content_type('text/css') ;
+ $m->call_next();
+ return();
+}
+</%init>
diff --git a/html/NoAuth/BugTracker/css/bugtracker.css b/html/NoAuth/BugTracker/css/bugtracker.css
new file mode 100644
index 0000000..3aea179
--- /dev/null
+++ b/html/NoAuth/BugTracker/css/bugtracker.css
@@ -0,0 +1,12 @@
+#external_bugtracker {
+ width: 50%;
+ border: 1px solid #666;
+ background: #ffffaa url(<%RT->Config->Get('WebPath')%>/NoAuth/BugTracker/images/warn.png) 8px 15px no-repeat;
+ padding: 0px 10px 10px 60px;
+ margin: 20px auto;
+ min-height: 30px;
+ -webkit-box-shadow: inset 2px 2px 2px 2px #999;
+ box-shadow: inset 2px 2px 2px 2px #999;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+}
diff --git a/html/NoAuth/BugTracker/images/dhandler b/html/NoAuth/BugTracker/images/dhandler
new file mode 100644
index 0000000..6ec9dea
--- /dev/null
+++ b/html/NoAuth/BugTracker/images/dhandler
@@ -0,0 +1,8 @@
+<%INIT>
+use File::Basename;
+my $arg = $m->dhandler_arg;
+my $file = dirname($m->current_comp->source_file) . '/source/'. $arg;
+RT::Interface::Web->SendStaticFile( File => $file );
+
+$m->abort;
+</%INIT>
diff --git a/html/NoAuth/BugTracker/images/source/warn.png b/html/NoAuth/BugTracker/images/source/warn.png
new file mode 100644
index 0000000..db0529d
Binary files /dev/null and b/html/NoAuth/BugTracker/images/source/warn.png differ
diff --git a/lib/RT/BugTracker.pm b/lib/RT/BugTracker.pm
index 7ce1781..a7ec89e 100644
--- a/lib/RT/BugTracker.pm
+++ b/lib/RT/BugTracker.pm
@@ -85,6 +85,67 @@ overriden. We currently in sync with RT 3.6.6.
require RT::Queue;
package RT::Queue;
+sub DistributionBugtracker {
+ return (shift)->_AttributeBasedField(
+ DistributionBugtracker => @_
+ );
+}
+
+
+sub SetDistributionBugtracker {
+ my ($self, $value) = (shift, shift);
+
+ my $bugtracker = {};
+ my $update = 0;
+
+ # Validate and set the mail to - we don't care if this is rt.cpan.org
+ if(defined($value->{mailto}) && !($value->{mailto} =~ m/rt\.cpan\.org/)) {
+ if(Email::Address->parse($value->{mailto})) {
+ $bugtracker->{mailto} = $value->{mailto};
+ $update = 1;
+ }
+ }
+
+ # Hash of supported URI schemes for validation
+ my $supported_schemes = {
+ http => 1,
+ https => 1,
+ };
+
+ # Validate and set the web - we don't care if this is rt.cpan.org
+ if(defined($value->{web}) && !($value->{web} =~ m/rt\.cpan\.org/)) {
+ if(my $uri = URI->new($value->{web})) {
+
+ # Check that this is a supported scheme
+ if(defined($supported_schemes->{$uri->scheme()})) {
+ $bugtracker->{web} = $value->{web};
+ $update = 1;
+ }
+
+ else {
+ my $error_msg = "Failed to set external bugtracker website";
+ $error_msg .= " on distribution (" . $self->Name() . ").";
+ $error_msg .= " Unsupported scheme (" . $uri->scheme() . ").";
+ $RT::Logger->error($error_msg);
+ }
+ }
+ else {
+ my $error_msg = "Failed to set external bugtracker website";
+ $error_msg .= " on distribution (" . $self->Name() . ")";
+ $error_msg .= " Unable to parse (" . $value->{web} . ") with URI.";
+ $RT::Logger->error($error_msg);
+ }
+ }
+
+ if($update) {
+ return $self->_SetAttributeBasedField( DistributionBugtracker => $bugtracker );
+ }
+
+ else {
+ return $self->_SetAttributeBasedField( DistributionBugtracker => undef );
+ }
+}
+
sub DistributionNotes {
return (shift)->_AttributeBasedField(
DistributionNotes => @_