[Bps-public-commit] RT-BugTracker branch, master, updated. 0f99a7924c8b0c5a78264bbd042b7668da4c4a62

Thomas Sibley trs at bestpractical.com
Sat Jun 1 03:01:14 EDT 2013


The branch, master has been updated
       via  0f99a7924c8b0c5a78264bbd042b7668da4c4a62 (commit)
       via  0c9548f216a3e82a5dfd63cc3ca9117d7b138dd7 (commit)
      from  3e774a2a9760eaba350ad9aa770ac6390e731267 (commit)

Summary of changes:
 META.yml                                                |  4 ++--
 README                                                  | 15 +++++++++------
 .../Callbacks/BugTracker/Search/Simple.html/ModifyQuery | 17 +++++++++++------
 html/Callbacks/BugTracker/Search/Simple.html/PreForm    |  8 ++++++++
 4 files changed, 30 insertions(+), 14 deletions(-)
 create mode 100644 html/Callbacks/BugTracker/Search/Simple.html/PreForm

- Log -----------------------------------------------------------------
commit 0c9548f216a3e82a5dfd63cc3ca9117d7b138dd7
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri May 31 23:52:44 2013 -0700

    Generated file updates from previous POD tweaks

diff --git a/META.yml b/META.yml
index 4be00b4..a0ff461 100644
--- a/META.yml
+++ b/META.yml
@@ -1,7 +1,7 @@
 ---
 abstract: 'Adds a UI designed for bug-tracking for developers to RT'
 author:
-  - 'Kevin Riggle <kevinr at bestpractical.com>'
+  - 'Thomas Sibley <trs at bestpractical.com>'
 build_requires:
   ExtUtils::MakeMaker: 6.59
 configure_requires:
@@ -23,4 +23,4 @@ requires:
   perl: 5.8.3
 resources:
   license: http://opensource.org/licenses/gpl-license.php
-version: 0.06_01
+version: 4.0
diff --git a/README b/README
index 80c1312..15ecb98 100644
--- a/README
+++ b/README
@@ -3,24 +3,27 @@ NAME
     RT
 
 DESCRIPTION
-    This extension changes RT's UI to make more useful when you want to
+    This extension changes RT's interface to be more useful when you want to
     track bug reports in many distributions. This extension is a start for
     setups like <http://rt.cpan.org>. It's been developed to help authors of
-    perl modules.
+    Perl modules.
 
-    It follows several rules to achieve the goal:
+    It follows two basic rules to achieve the goal:
 
     Each queue associated with one package (distribution).
     Queue's AdminCc list is used for maintainers of the coresponding
     distribution.
-    Not everything was possible to implement using callbacks and other clean
-    extending methods, so some files have been overriden. We currently in
-    sync with RT 3.6.6.
 
 SEE ALSO
     RT::BugTracker::Public, RT::Extension::rt_cpan_org
 
 AUTHOR
+    Thomas Sibley <trs at bestpractical.com>
+
+    Ruslan Zaikarov <ruz at bestpractical.com>
+
+    sunnavy <sunnavy at bestpractical.com>
+
     Kevin Riggle <kevinr at bestpractical.com>
 
 LICENSE

commit 0f99a7924c8b0c5a78264bbd042b7668da4c4a62
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri May 31 23:59:23 2013 -0700

    Tone down the zealousness of the simple search behaviour changes
    
    This makes false positives on authors much less likely and all around
    operates with less surprise.

diff --git a/html/Callbacks/BugTracker/Search/Simple.html/ModifyQuery b/html/Callbacks/BugTracker/Search/Simple.html/ModifyQuery
index 4209012..7f5d452 100644
--- a/html/Callbacks/BugTracker/Search/Simple.html/ModifyQuery
+++ b/html/Callbacks/BugTracker/Search/Simple.html/ModifyQuery
@@ -51,25 +51,30 @@ $query => ''
 <%INIT>
 $query = $$query if $query;
 
-# fallback if digits (ticket id)
-return if $query =~ /^\d+$/;
+# fallback if digits (ticket id) or looks like email address or not a single word
+return if not $query or $query =~ /(^\d+$|\@|\s)/;
 
 # try to load a queue or a user; if found, redirect to the distribution page
 # instead of the search page
 
 my $queue = RT::Queue->new( $session{'CurrentUser'} );
 $queue->Load( $query );
+$queue->Load( $query ) if $query =~ s/::/-/g;
 if ( $queue->id ) {
     RT::Interface::Web::Redirect(
-        $RT::WebURL .'/Dist/Display.html?Queue='. $m->interp->apply_escapes( $query, 'u' )
+        $RT::WebURL .'/Dist/Display.html?Queue='. $m->interp->apply_escapes( $queue->Name, 'u' )
     );
 }
 
+# PAUSE ids are only alpha
+return if $query =~ /[^a-zA-Z]/;
+
 my $user = RT::User->new( $session{'CurrentUser'} );
-$user->Load( $query );
-if ( $user->id ) {
+$user->LoadByEmail( "$query\@cpan.org" );
+$user->LoadByCols( Name => $query ) unless $user->id;
+if ( $user->id and $user->Privileged ) {
     RT::Interface::Web::Redirect(
-        $RT::WebURL .'/Dist/ByMaintainer.html?Name='. $m->interp->apply_escapes( $query, 'u' )
+        $RT::WebURL .'/Dist/ByMaintainer.html?Name='. $m->interp->apply_escapes( $user->Name, 'u' )
     );
 }
 return;
diff --git a/html/Callbacks/BugTracker/Search/Simple.html/PreForm b/html/Callbacks/BugTracker/Search/Simple.html/PreForm
new file mode 100644
index 0000000..3a262d7
--- /dev/null
+++ b/html/Callbacks/BugTracker/Search/Simple.html/PreForm
@@ -0,0 +1,8 @@
+<p>For bug tracking, the simple search is customized with the following
+behaviour:</p>
+
+<p>Enter a <strong>distribution name</strong> to jump to the bug list or a
+<strong>PAUSE id</strong> to jump to the list of distributions maintained by
+that author.</p>
+
+<p>Otherwise, all rules below apply.</p>

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list