[Rt-commit] rtir branch, 2.9-trunk, updated. 55c52d2fabec64a1fd69014109294b3be1882d29

Ruslan Zakirov ruz at bestpractical.com
Thu Mar 10 09:08:03 EST 2011


The branch, 2.9-trunk has been updated
       via  55c52d2fabec64a1fd69014109294b3be1882d29 (commit)
       via  354e4fa598ad6708cb23dec2ae51c1304377f8f8 (commit)
       via  3dc2003d98b76faf4920defe0b66ad4041558b4b (commit)
       via  700663fdb8b82aa159f84f2128b39eacd3abb733 (commit)
       via  dcaf304ece8114180cdf15acbde3a3be5e044a86 (commit)
       via  a8debfe0339d988cb9e0d2733b9800c3b70a8572 (commit)
       via  c7c329770e707fa8d252f0891417afee603ab1ee (commit)
       via  41a12f750e6cb0c49e01ea070284b8e6aae9f981 (commit)
       via  9964b0989f35d90743cbd13ec500949b282b424c (commit)
       via  c747036a6b6db402de1ff05cbdbae0fd0866c3da (commit)
      from  bfa976262cfd402d3d975289727c86a0b143c9d6 (commit)

Summary of changes:
 html/Callbacks/RTIR/Elements/Tabs/Privileged |   58 +++++++++++++++++++-------
 html/RTIR/Create.html                        |    7 +---
 html/RTIR/Display.html                       |   10 ++---
 html/RTIR/Split.html                         |    1 +
 inc/Module/Install/RTx.pm                    |    7 ++-
 lib/RT/IR/Test.pm                            |    6 ---
 lib/RT/IR/Test/Web.pm                        |   15 +++----
 t/021-gnupg-on-create.t                      |    2 -
 t/022-gnupg-on-update.t                      |    2 -
 t/023-gnupg-on-incident.t                    |    2 -
 t/constituency/basics.t                      |    2 -
 t/constituency/email_outgoing.t              |    2 -
 t/mail/skip_notification.t                   |    2 -
 13 files changed, 59 insertions(+), 57 deletions(-)

- Log -----------------------------------------------------------------
commit c747036a6b6db402de1ff05cbdbae0fd0866c3da
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Wed Jan 12 17:16:37 2011 +0300

    no need to setup mail catcher

diff --git a/t/021-gnupg-on-create.t b/t/021-gnupg-on-create.t
index baead0b..932aa32 100644
--- a/t/021-gnupg-on-create.t
+++ b/t/021-gnupg-on-create.t
@@ -7,8 +7,6 @@ use RT::IR::Test tests => 62;
 
 use File::Temp qw(tempdir);
 
-RT::Test->set_mail_catcher;
-
 RT->Config->Set( 'GnuPG',
                  Enable => 1,
                  OutgoingMessagesFormat => 'RFC' );
diff --git a/t/022-gnupg-on-update.t b/t/022-gnupg-on-update.t
index 7f8b6a5..cea66ed 100644
--- a/t/022-gnupg-on-update.t
+++ b/t/022-gnupg-on-update.t
@@ -6,8 +6,6 @@ use warnings;
 use RT::IR::Test tests => 69;
 use File::Temp qw(tempdir);
 
-RT::Test->set_mail_catcher;
-
 RT->Config->Set( 'GnuPG',
                  Enable => 1,
                  OutgoingMessagesFormat => 'RFC' );
diff --git a/t/023-gnupg-on-incident.t b/t/023-gnupg-on-incident.t
index 38754cd..eb542d7 100644
--- a/t/023-gnupg-on-incident.t
+++ b/t/023-gnupg-on-incident.t
@@ -8,8 +8,6 @@ use File::Temp qw(tempdir);
 
 my @rights_backup = RT::Test->store_rights;
 
-RT::Test->set_mail_catcher;
-
 RT->Config->Set( 'GnuPG',
                  Enable => 1,
                  OutgoingMessagesFormat => 'RFC' );
diff --git a/t/constituency/basics.t b/t/constituency/basics.t
index d96d3e8..079ce05 100644
--- a/t/constituency/basics.t
+++ b/t/constituency/basics.t
@@ -5,8 +5,6 @@ use warnings;
 
 use RT::IR::Test tests => 179;
 
-RT::Test->set_mail_catcher;
-
 use_ok('RT::IR');
 
 my ($baseurl) = RT::Test->started_ok;
diff --git a/t/constituency/email_outgoing.t b/t/constituency/email_outgoing.t
index 3b23598..461e968 100644
--- a/t/constituency/email_outgoing.t
+++ b/t/constituency/email_outgoing.t
@@ -50,8 +50,6 @@ ok( RT::Test->add_rights(
         Right => [qw(ShowTicket CreateTicket)] },
 ), 'added rights');
 
-RT::Test->set_mail_catcher;
-
 my ($baseurl) = RT::Test->started_ok;
 my $agent = default_agent();
 my $rtir_user = rtir_user();
diff --git a/t/mail/skip_notification.t b/t/mail/skip_notification.t
index b269423..36cb312 100644
--- a/t/mail/skip_notification.t
+++ b/t/mail/skip_notification.t
@@ -7,8 +7,6 @@ use RT::IR::Test tests => 23;
 
 RT->Config->Get('RTIR_CustomFieldsDefaults')->{'Constituency'} = 'EDUNET';
 
-RT::Test->set_mail_catcher;
-
 my ($baseurl) = RT::Test->started_ok;
 my $agent = default_agent();
 my $rtir_user = rtir_user();

commit 9964b0989f35d90743cbd13ec500949b282b424c
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Mar 10 16:24:21 2011 +0300

    now we load plugins in tests properly

diff --git a/lib/RT/IR/Test.pm b/lib/RT/IR/Test.pm
index 5cae126..b8a07e6 100644
--- a/lib/RT/IR/Test.pm
+++ b/lib/RT/IR/Test.pm
@@ -40,13 +40,7 @@ sub import {
     $class->SUPER::import( %args );
     $class->export_to_level(1);
 
-    RT->Config->LoadConfig( File => 'RTIR_Config.pm' );
     RT->Config->Set( 'rtirname' => 'regression_tests' );
-
-    require RT::Lifecycle;
-    RT::Lifecycle->FillCache;
-
-    require RT::IR;
 }
 
 our $RTIR_TEST_USER = "rtir_test_user";

commit 41a12f750e6cb0c49e01ea070284b8e6aae9f981
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Mar 10 16:24:47 2011 +0300

    update M::I::RTx

diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index 5480124..f027f78 100644
--- a/inc/Module/Install/RTx.pm
+++ b/inc/Module/Install/RTx.pm
@@ -8,7 +8,7 @@ no warnings 'once';
 
 use Module::Install::Base;
 use base 'Module::Install::Base';
-our $VERSION = '0.25';
+our $VERSION = '0.27';
 
 use FindBin;
 use File::Glob     ();
@@ -42,8 +42,8 @@ sub RTx {
         $INC{'RT.pm'} = "$RT::LocalPath/lib/RT.pm";
     } else {
         local @INC = (
-            @INC,
             $ENV{RTHOME} ? ( $ENV{RTHOME}, "$ENV{RTHOME}/lib" ) : (),
+            @INC,
             map { ( "$_/rt3/lib", "$_/lib/rt3", "$_/lib" ) } grep $_,
             @prefixes
         );
@@ -60,6 +60,7 @@ sub RTx {
     my $local_lib_path = "$RT::LocalPath/lib";
     print "Using RT configuration from $INC{'RT.pm'}:\n";
     unshift @INC, "$RT::LocalPath/lib" if $RT::LocalPath;
+    unshift @INC, $lib_path;
 
     $RT::LocalVarPath  ||= $RT::VarPath;
     $RT::LocalPoPath   ||= $RT::LocalLexiconPath;
@@ -189,4 +190,4 @@ sub RTxInit {
 
 __END__
 
-#line 303
+#line 304

commit c7c329770e707fa8d252f0891417afee603ab1ee
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Mar 10 16:27:23 2011 +0300

    without leading '/' URL would be relative

diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index 5d62b44..fe8ead0 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -98,13 +98,13 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update)\.html$}
         my $top = PageMenu();
         if ( my $t = $item_map->{$id}->{'prev'} ) {
             $top = $top->child(
-                previouse => path => "RTIR/Display.html?id=$id",
+                previouse => path => "/RTIR/Display.html?id=$id",
                 title => '< ' . loc('Prev')
             );
         }
         if ( my $t = $item_map->{'first'} ) {
             $top->child(
-                first => path  => "RTIR/Display.html?id=$t",
+                first => path  => "/RTIR/Display.html?id=$t",
                 title => '<< ' . loc('First')
             );
         }
@@ -112,13 +112,13 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update)\.html$}
         $top = PageMenu();
         if ( my $t = $item_map->{$id}->{'next'} ) {
             $top = $top->child(
-                next => path  => "RTIR/Display.html?id=$t",
+                next => path  => "/RTIR/Display.html?id=$t",
                 title => loc('Next') . ' >'
             );
         }
         if ( my $t = $item_map->{'last'} ) {
             $top->child(
-                last => path  => "RTIR/Display.html?id=$t",
+                last => path  => "/RTIR/Display.html?id=$t",
                 title => loc('Last') . ' >>'
             );
         }
@@ -207,7 +207,7 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update)\.html$}
     if ( $can->('ModifyTicket') || $can->('CommentOnTicket') ) {
         PageMenu()->child(
             comment => title => loc('Comment'),
-            path  => "RTIR/Update.html?Action=Comment&id=$id",
+            path  => "/RTIR/Update.html?Action=Comment&id=$id",
         );
     }
 
@@ -288,7 +288,7 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update)\.html$}
 
     PageMenu()->child(
         report => title => loc('Report'),
-        path => "RTIR/Report/Reporting.html?". $query_string->( %args ),
+        path => "/RTIR/Report/Reporting.html?". $query_string->( %args ),
     );
 
     if ( $type eq 'Incident' ) {
@@ -300,7 +300,7 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update)\.html$}
     elsif ( $type eq 'Report' ) {
         PageMenu()->child(
             reject => title => loc('Bulk Reject'),
-            path => "RTIR/Report/BulkReject.html?". $query_string->( %args ),
+            path => "/RTIR/Report/BulkReject.html?". $query_string->( %args ),
         );
     }
 }

commit a8debfe0339d988cb9e0d2733b9800c3b70a8572
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Mar 10 16:28:47 2011 +0300

    back to ticket link on split

diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index fe8ead0..ee19b89 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -303,6 +303,13 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update)\.html$}
             path => "/RTIR/Report/BulkReject.html?". $query_string->( %args ),
         );
     }
+} elsif ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?Split\.html$} ) {
+    my $id = $args->{'id'};
+
+    PageMenu()->child(
+        back => title => loc('Back to ticket #[_1]', $id),
+        path => "/RTIR/Display.html?id=$id",
+    );
 }
 
 

commit dcaf304ece8114180cdf15acbde3a3be5e044a86
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Mar 10 16:29:15 2011 +0300

    generic tabs on split html/RTIR/Create.html

diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 1ffcdd5..077eed9 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -25,12 +25,7 @@
 <& /RTIR/Elements/Header, Title => $Title &>
 % my $EscapedQueue = $m->comp('/Elements/QueryString', Queue => $Queue );
 % if ( $Split ) {
-<& '/RTIR/'.$Type.'/Elements/Tabs', 
-    Title          => $Title,
-    Ticket         => $TicketObj,
-    current_tab    => "RTIR/Split.html?Ticket=".$TicketObj->Id,
-    current_subtab => "RTIR/Split.html?Ticket=".$TicketObj->Id,
-&>
+<& /Elements/Tabs &>
 % } elsif ( $Incident ) {
 <& "/RTIR/Search/Elements/RefineTabs",
     Title          => $Title,

commit 700663fdb8b82aa159f84f2128b39eacd3abb733
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Mar 10 16:29:45 2011 +0300

    update id argument in case it's a merged ticket

diff --git a/html/RTIR/Split.html b/html/RTIR/Split.html
index a22616c..6c1bacb 100644
--- a/html/RTIR/Split.html
+++ b/html/RTIR/Split.html
@@ -45,6 +45,7 @@
 
 <%INIT>
 my $TicketObj = LoadTicket( $id );
+$ARGS{'id'} = $id = $TicketObj->id;
 
 $m->callback(CallbackName => 'Initial', %ARGS, Ticket => $TicketObj);
 

commit 3dc2003d98b76faf4920defe0b66ad4041558b4b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Mar 10 16:32:25 2011 +0300

    MaybeRedirect is now a function

diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index b43a36f..a920eec 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -214,14 +214,12 @@ unless ( $Ticket->CurrentUserHasRight('ShowTicket') ) {
 # update id argument in the case we took merged or created new
 $ARGS{'id'} = $id = $Ticket->Id;
 
-$m->comp(
-    '/Elements/MaybeRedirectForResults',
-    Path        => 'RTIR/Display.html',
-    id          => $id,
-    Actions     => \@results,
+MaybeRedirectForResults(
+    Path      => '/RTIR/Display.html',
+    Actions   => \@results,
+    Arguments => { id => $id },
 );
 
-
 if ( $Type eq 'Report' ) {
     $name = "Incident Report";
 } else {

commit 354e4fa598ad6708cb23dec2ae51c1304377f8f8
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Mar 10 16:53:14 2011 +0300

    add Create next to search link

diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index ee19b89..2f769ef 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -36,12 +36,37 @@ if ( $session{'CurrentSearchHash'} ) {
 
 }
 
-$root->child( incidents => title => loc('Incidents'), path => '/RTIR/Search/Results.html?Queue=Incidents' );
-$root->child( reports => title => loc('Incident Reports'), path => '/RTIR/Search/Results.html?Queue=Incident%20Reports' );
-$root->child( investigations => title => loc('Investigations'), path => '/RTIR/Search/Results.html?Queue=Investigations' );
+$root->child(
+    incidents => title => loc('Incidents'),
+    path => '/RTIR/Search/Results.html?Queue=Incidents'
+)->child(
+    create => title => loc('Create'),
+    path => '/RTIR/Create.html?Queue=Incidents',
+);
+$root->child(
+    reports => title => loc('Incident Reports'),
+    path => '/RTIR/Search/Results.html?Queue=Incident%20Reports'
+)->child(
+    create => title => loc('Create'),
+    path => '/RTIR/Create.html?Queue=Incident%20Reports',
+);
+$root->child(
+    investigations => title => loc('Investigations'),
+    path => '/RTIR/Search/Results.html?Queue=Investigations'
+)->child(
+    create => title => loc('Create'),
+    path => '/RTIR/Create.html?Queue=Investigations',
+);
 unless ( RT->Config->Get('RTIR_DisableBlocksQueue') ) {
-    $root->child( blocks => title => loc('Blocks'), path => '/RTIR/Search/Results.html?Queue=Blocks' );
+    $root->child(
+        blocks => title => loc('Blocks'),
+        path => '/RTIR/Search/Results.html?Queue=Blocks'
+    )->child(
+        create => title => loc('Create'),
+        path => '/RTIR/Create.html?Queue=Blocks',
+    );
 }
+
 my $tools = $root->child( tools => title => loc('Tools'), path => '/RTIR/Tools/' );
 $tools->child( lookup => title => loc('Lookup'), path => '/RTIR/Tools/Lookup.html' );
 $tools->child( reporting => title => loc('Reporting'), path => '/RTIR/Reporting/' );
@@ -281,10 +306,6 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update)\.html$}
             Queue => $queue,
         ),
     );
-    PageMenu()->child(
-        new => title => loc("New $type"),
-        path => "/RTIR/Create.html?". $query_string->( Queue => $queue ),
-    ) if $type;
 
     PageMenu()->child(
         report => title => loc('Report'),

commit 55c52d2fabec64a1fd69014109294b3be1882d29
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date:   Thu Mar 10 17:00:16 2011 +0300

    new ticket links are in different place now

diff --git a/lib/RT/IR/Test/Web.pm b/lib/RT/IR/Test/Web.pm
index c5fff42..9ecebff 100644
--- a/lib/RT/IR/Test/Web.pm
+++ b/lib/RT/IR/Test/Web.pm
@@ -25,17 +25,14 @@ sub goto_create_rtir_ticket {
     my $self = shift;
     my $queue = shift;
 
-    my %type = (
-        'Incident Reports' => 'Report',
-        'Investigations'   => 'Investigation',
-        'Blocks'           => 'Block',
-        'Incidents'        => 'Incident'
-    );
+    my $equeue = $queue;
+    $equeue =~ s/ /%20/;
 
     $self->get_ok("/RTIR/index.html", "Loaded home page");
-    $self->follow_link_ok({text => $queue, n => "1"}, "Followed '$queue' link");
-    $self->follow_link_ok({text => "New ". $type{ $queue }, n => "1"}, "Followed 'New $type{$queue}' link");
-    
+    $self->follow_link_ok(
+        {text => "Create", url_regex => qr{RTIR/Create\.html.*(?i:$equeue)} },
+        "Followed create in '$queue' link"
+    );
 
     # set the form
     $self->form_number(3);

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


More information about the Rt-commit mailing list