[Rt-commit] rtir branch, 2.9-trunk, updated. 399c3e5ac1e7e176262d10029159d5cc716c4f3b
Ruslan Zakirov
ruz at bestpractical.com
Thu Apr 21 00:36:53 EDT 2011
The branch, 2.9-trunk has been updated
via 399c3e5ac1e7e176262d10029159d5cc716c4f3b (commit)
via c9d962d330c7bd414678aad1867f5312e880c50e (commit)
via e00d1db39634c5b40b4fa8717dee5c4f77eef66d (commit)
via 9d0455d67f6faafc295e787c5ccea228efe9694e (commit)
via e3a0cad92f7d537c7696a2b23f0fa916605b5614 (commit)
from ef78713f937a08ba48ab6f30bfafd0933ee56035 (commit)
Summary of changes:
TODO.porting_over_RT4 | 1 +
html/RTIR/Create.html | 2 +-
html/RTIR/GnuPG.html | 7 +--
html/RTIR/Incident/BulkAbandon.html | 4 +-
html/RTIR/Incident/Edit.html | 7 +--
html/RTIR/Incident/LinkArticles.html | 7 +--
html/RTIR/Report/BulkReject.html | 4 +-
html/RTIR/Search/Elements/RefineTabs | 154 ---------------------------------
inc/Module/Install/RTx.pm | 6 +-
t/000-mason-syntax.t | 2 +-
t/015-make-clicky.t | 2 +-
t/016-date-started.t | 2 +-
t/019-watchers-on-create.t | 2 +-
t/constituency/acl.t | 2 +-
t/constituency/basics.t | 2 +-
t/constituency/email.t | 2 +-
t/constituency/email_outgoing.t | 2 +-
t/constituency/propagation-inherit.t | 2 +-
t/constituency/propagation-no.t | 2 +-
t/constituency/propagation-reject.t | 4 +-
t/custom-fields/defaults-config.t | 2 +-
t/custom-fields/defaults-on-linking.t | 2 +-
t/custom-fields/ip.t | 2 +-
t/mail/skip_notification.t | 2 +-
24 files changed, 28 insertions(+), 196 deletions(-)
delete mode 100644 html/RTIR/Search/Elements/RefineTabs
- Log -----------------------------------------------------------------
commit e3a0cad92f7d537c7696a2b23f0fa916605b5614
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Apr 21 06:54:14 2011 +0400
delete RefineTabs, we don't need them
diff --git a/html/RTIR/Search/Elements/RefineTabs b/html/RTIR/Search/Elements/RefineTabs
deleted file mode 100644
index 238cf66..0000000
--- a/html/RTIR/Search/Elements/RefineTabs
+++ /dev/null
@@ -1,154 +0,0 @@
-<& '/RTIR/' . $Type . '/Elements/Tabs',
- %ARGS,
- current_tab => $current_tab,
- appendtabs => $appendtabs,
- subtabs => $subtabs_in_parent,
- current_subtab => $current_subtab,
-&>
-
-<%INIT>
-my $split_uri = sub {
- my $path = shift;
- my @args;
- ($path, @args) = split /[?&=]/, $path;
- my %args;
- while( my $k = shift @args ) {
- my $v = shift @args;
- s/%([0-9A-Z][0-9A-Z])/chr(hex($1))/gei for ($k, $v);
- if ( exists $args{ $k } ) {
- $args{ $k } = [ $args{ $k } ] unless ref $args{ $k };
- push @{$args{ $k }}, $v;
- }
- else {
- $args{ $k } = $v;
- }
- }
- return $path, %args;
-};
-
-# if there is no args passed then parse them from URL
-unless( $id || $Ticket || $Queue ) {
- my ($path, %args) = $split_uri->($current_tab);
- ($id, $Queue) = @ARGS{'id', 'Queue'} = @args{'id', 'Queue'};
-}
-
-my $QueueType = RT::IR::TicketType( Queue => $Queue );
-my $TicketType = RT::IR::TicketType( Ticket => $Ticket || $id );
-my $Type = $TicketType || $QueueType;
-
-my %appendable_tab = (
- 'RTIR/Incident/ShowChildren.html' => {
- title => loc('Children: [_1]', $Queue),
- },
- 'RTIR/Incident/LinkChildren.html' => {
- title => loc('Link [_1]', $QueueType),
- },
- 'RTIR/Incident/LinkToIncident.html' => {
- title => loc('Link to Incident'),
- },
- 'RTIR/Incident/Reply.html' => {
- title => loc('Bulk reply'),
- },
- 'RTIR/Incident/LinkArticles.html' => {
- title => loc('Link article'),
- },
- 'RTIR/Create.html' => {
- title => loc('Create linked [_1]', $QueueType),
- },
-);
-
-my %with_subtab = (
- 'RTIR/Merge.html' => 1,
-);
-
-my $refine_path = '';
-if ( $current_subtab ) {
- $refine_path = "$current_subtab?$QueryString&";
- $refine_path .= $m->comp('/Elements/QueryString',
- BaseQuery => $BaseQuery,
- ResultPage => $current_tab,
- );
-}
-
-my ($current_tab_base, $current_tab_args) = split /\?/, $current_tab, 2;
-
-my ($appendtabs, $subtabs_in_parent);
-if ( $appendable_tab{ $current_tab_base } ) {
- # append tab and add refine subtab if needed
- my $path = $current_tab;
- if ( $QueryString ) {
- $path .= ($path =~ /\?/)? '&': '?';
- $path .= $QueryString;
- }
-
- $appendtabs->{'_I'} = {
- path => $path,
- title => $appendable_tab{ $current_tab_base }->{'title'},
- };
-
- if ( $current_subtab ) {
- $appendtabs->{'_I'}->{'current_subtab'}
- = $current_subtab_active? $refine_path : $path;
- $appendtabs->{'_I'}->{'subtabs'} = {
- %$subtabs,
- _a => {
- path => $path,
- title => loc('Results'),
- },
- _b => {
- path => $refine_path,
- title => loc('Refine'),
- },
- };
- }
- $current_subtab = $path;
-}
-elsif( $with_subtab{ $current_tab_base } ) {
- # add refine subtab only
- my $path = $current_tab;
- if ( $QueryString ) {
- $path .= ($path =~ /\?/)? '&': '?';
- $path .= $QueryString;
- }
- if ( $current_subtab ) {
-# XXX: there is no way to mark refine subtab active
-# $subtabs_in_parent->{'current_subtab'} = $refine_path
-# if $current_subtab_active;
-
- $subtabs_in_parent->{'_a'} = {
- path => $path,
- title => loc('Results'),
- };
- $subtabs_in_parent->{'_b'} = {
- path => $refine_path,
- title => loc('Refine'),
- };
- }
- $current_subtab = $path;
-} else {
- # don't add tabs or subtabs, but mark correct thing
- if ( $current_subtab_active ) {
- $current_tab_args ||= '';
- my $refine_path = "$current_subtab?$current_tab_args&$QueryString";
- $refine_path .= "&". $m->comp('/Elements/QueryString',
- BaseQuery => $BaseQuery,
- ResultPage => $current_tab,
- );
- $current_tab = $refine_path;
- }
-}
-
-</%INIT>
-<%ARGS>
-$Ticket => undef
-$id => $Ticket? $Ticket->Id: undef
-$Queue => undef
-
-$BaseQuery => undef
-$QueryString => undef
-
-$current_tab => undef
-$current_subtab => undef
-$subtabs => {}
-$current_subtab_active => 0
-</%ARGS>
commit 9d0455d67f6faafc295e787c5ccea228efe9694e
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Apr 21 06:54:58 2011 +0400
cleanup <& /Elements/Tabs &> calls
diff --git a/html/RTIR/Create.html b/html/RTIR/Create.html
index 5b0ef07..97cda5a 100644
--- a/html/RTIR/Create.html
+++ b/html/RTIR/Create.html
@@ -23,7 +23,7 @@
%#
%# END LICENSE BLOCK
<& /RTIR/Elements/Header, Title => $Title &>
-<& '/Elements/Tabs' &>
+<& /Elements/Tabs &>
% $m->callback(CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS, Ticket => $SplitObj);
<& /Elements/ListActions, actions => \@results &>
diff --git a/html/RTIR/GnuPG.html b/html/RTIR/GnuPG.html
index 3214c6b..f63af7b 100644
--- a/html/RTIR/GnuPG.html
+++ b/html/RTIR/GnuPG.html
@@ -1,10 +1,5 @@
<& /RTIR/Elements/Header, Title => $title &>
-<& "/RTIR/".$Type."/Elements/Tabs",
- Ticket => $ticket,
- current_tab => 'RTIR/Display.html?id='.$ticket->id,
- current_subtab => 'RTIR/Display.html?id='.$ticket->id,
- Title => $title,
-&>
+<& /Elements/Tabs &>
% $m->callback( CallbackName => 'BeforeActionList', %ARGS, Actions => \@results, ARGSRef => \%ARGS );
<& /Elements/ListActions, actions => \@results &>
diff --git a/html/RTIR/Incident/BulkAbandon.html b/html/RTIR/Incident/BulkAbandon.html
index c587bac..251a8b2 100644
--- a/html/RTIR/Incident/BulkAbandon.html
+++ b/html/RTIR/Incident/BulkAbandon.html
@@ -22,8 +22,8 @@
%#
%#
%# END LICENSE BLOCK
-<& '/RTIR/Elements/Header', Title => $title &>
-<& '/Elements/Tabs' &>
+<& /RTIR/Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
diff --git a/html/RTIR/Incident/Edit.html b/html/RTIR/Incident/Edit.html
index c84a7ad..048d481 100644
--- a/html/RTIR/Incident/Edit.html
+++ b/html/RTIR/Incident/Edit.html
@@ -23,12 +23,7 @@
%#
%# END LICENSE BLOCK
<& /RTIR/Elements/Header, Title => loc("Edit Incident #[_1]: [_2]", $Ticket->Id, $Ticket->Subject) &>
-<& /RTIR/Incident/Elements/Tabs,
- Ticket => $Ticket,
- current_tab => "RTIR/Display.html?id=".$Ticket->Id,
- current_subtab => "RTIR/Edit.html?id=".$Ticket->Id,
- Title => loc("Edit Incident #[_1]: [_2]",
- $Ticket->Id, $Ticket->Subject) &>
+<& /Elements/Tabs &>
% $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $Ticket);
<& /Elements/ListActions, actions => \@results &>
diff --git a/html/RTIR/Incident/LinkArticles.html b/html/RTIR/Incident/LinkArticles.html
index 02b3d77..acec7da 100644
--- a/html/RTIR/Incident/LinkArticles.html
+++ b/html/RTIR/Incident/LinkArticles.html
@@ -26,12 +26,7 @@
Title => $title,
Refresh => $session{'tickets_refresh_interval'},
&>
-
-<& /RTIR/Search/Elements/RefineTabs,
- Title => $title,
- Ticket => $IncidentObj,
- current_tab => "RTIR/Incident/LinkArticles.html?id=$id",
-&>
+<& /Elements/Tabs &>
<form action="LinkArticles.html" method="get">
<input type="hidden" name="id" value="<%$id%>" />
diff --git a/html/RTIR/Report/BulkReject.html b/html/RTIR/Report/BulkReject.html
index 4129ea3..b8d2ab1 100644
--- a/html/RTIR/Report/BulkReject.html
+++ b/html/RTIR/Report/BulkReject.html
@@ -22,8 +22,8 @@
%#
%#
%# END LICENSE BLOCK
-<& '/RTIR/Elements/Header', Title => $title &>
-<& '/Elements/Tabs' &>
+<& /RTIR/Elements/Header, Title => $title &>
+<& /Elements/Tabs &>
<& /Elements/ListActions, actions => \@results &>
commit e00d1db39634c5b40b4fa8717dee5c4f77eef66d
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Apr 21 06:56:10 2011 +0400
update tests, now we fail only two tests
diff --git a/t/000-mason-syntax.t b/t/000-mason-syntax.t
index d235636..0422c3c 100644
--- a/t/000-mason-syntax.t
+++ b/t/000-mason-syntax.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 7;
+use RT::IR::Test tests => 4;
my $ok = 1;
diff --git a/t/015-make-clicky.t b/t/015-make-clicky.t
index d1942ae..aa6f8d9 100644
--- a/t/015-make-clicky.t
+++ b/t/015-make-clicky.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 38;
+use RT::IR::Test tests => 33;
RT::Test->started_ok;
my $agent = default_agent();
diff --git a/t/016-date-started.t b/t/016-date-started.t
index 6344a96..b8e4cc3 100644
--- a/t/016-date-started.t
+++ b/t/016-date-started.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 76;
+use RT::IR::Test tests => 68;
RT::Test->started_ok;
my $agent = default_agent();
diff --git a/t/019-watchers-on-create.t b/t/019-watchers-on-create.t
index 034a130..0368811 100644
--- a/t/019-watchers-on-create.t
+++ b/t/019-watchers-on-create.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 54;
+use RT::IR::Test tests => 53;
RT::Test->started_ok;
my $agent = default_agent();
diff --git a/t/constituency/acl.t b/t/constituency/acl.t
index ebbdad0..49502a5 100644
--- a/t/constituency/acl.t
+++ b/t/constituency/acl.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 16;
+use RT::IR::Test tests => 13;
use_ok('RT::IR');
diff --git a/t/constituency/basics.t b/t/constituency/basics.t
index 079ce05..58cb831 100644
--- a/t/constituency/basics.t
+++ b/t/constituency/basics.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 179;
+use RT::IR::Test tests => 166;
use_ok('RT::IR');
diff --git a/t/constituency/email.t b/t/constituency/email.t
index 431129f..ff087c6 100644
--- a/t/constituency/email.t
+++ b/t/constituency/email.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 68;
+use RT::IR::Test tests => 67;
# Test must be run wtih RT_SiteConfig:
# Set(@MailPlugins, 'Auth::MailFrom');
diff --git a/t/constituency/email_outgoing.t b/t/constituency/email_outgoing.t
index 461e968..0d09032 100644
--- a/t/constituency/email_outgoing.t
+++ b/t/constituency/email_outgoing.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 40;
+use RT::IR::Test tests => 38;
RT->Config->Get('RTIR_CustomFieldsDefaults')->{'Constituency'} = 'EDUNET';
diff --git a/t/constituency/propagation-inherit.t b/t/constituency/propagation-inherit.t
index 01e5d28..6b62c96 100644
--- a/t/constituency/propagation-inherit.t
+++ b/t/constituency/propagation-inherit.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 203;
+use RT::IR::Test tests => 186;
use_ok('RT::IR');
RT->Config->Set('_RTIR_Constituency_Propagation' => 'inherit');
diff --git a/t/constituency/propagation-no.t b/t/constituency/propagation-no.t
index ea66770..9653487 100644
--- a/t/constituency/propagation-no.t
+++ b/t/constituency/propagation-no.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 116;
+use RT::IR::Test tests => 107;
use_ok('RT::IR');
RT->Config->Set('_RTIR_Constituency_Propagation' => 'no');
diff --git a/t/constituency/propagation-reject.t b/t/constituency/propagation-reject.t
index b6bfeb3..ecc9d18 100644
--- a/t/constituency/propagation-reject.t
+++ b/t/constituency/propagation-reject.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 207;
+use RT::IR::Test tests => 187;
use_ok('RT::IR');
RT->Config->Set('_RTIR_Constituency_Propagation' => 'reject');
@@ -206,7 +206,7 @@ diag "create an IR create an Incident with different constituency"
'EDUNET', 'correct value';
}
$agent->get_ok(
- $agent->rt_base_url ."/RTIR/Incident/LinkChildren.html?id=$inc_id&"
+ $agent->rt_base_url ."/RTIR/Link/ToIncident/?id=$inc_id&"
."Queue=Incident%20Reports&Query=id%3D$ir_id"
);
$agent->content_unlike(qr/incident report #$ir_id/, 'no IR on the page');
diff --git a/t/custom-fields/defaults-config.t b/t/custom-fields/defaults-config.t
index 1cbab9d..76daa15 100644
--- a/t/custom-fields/defaults-config.t
+++ b/t/custom-fields/defaults-config.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 84;
+use RT::IR::Test tests => 71;
my $defaults = RT->Config->Get('RTIR_CustomFieldsDefaults');
$defaults->{'How Reported'} = 'Telephone'; # IRs
diff --git a/t/custom-fields/defaults-on-linking.t b/t/custom-fields/defaults-on-linking.t
index ea41ee0..ab09d58 100644
--- a/t/custom-fields/defaults-on-linking.t
+++ b/t/custom-fields/defaults-on-linking.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 25;
+use RT::IR::Test tests => 23;
my $cf_name = 'test';
{
diff --git a/t/custom-fields/ip.t b/t/custom-fields/ip.t
index 6c09d25..5cb83df 100644
--- a/t/custom-fields/ip.t
+++ b/t/custom-fields/ip.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 489;
+use RT::IR::Test tests => 449;
RT::Test->started_ok;
my $agent = default_agent();
diff --git a/t/mail/skip_notification.t b/t/mail/skip_notification.t
index 36cb312..1cc060b 100644
--- a/t/mail/skip_notification.t
+++ b/t/mail/skip_notification.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use RT::IR::Test tests => 23;
+use RT::IR::Test tests => 20;
RT->Config->Get('RTIR_CustomFieldsDefaults')->{'Constituency'} = 'EDUNET';
commit c9d962d330c7bd414678aad1867f5312e880c50e
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Apr 21 06:57:16 2011 +0400
update M::I
diff --git a/inc/Module/Install/RTx.pm b/inc/Module/Install/RTx.pm
index f027f78..726b3fb 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.27';
+our $VERSION = '0.28';
use FindBin;
use File::Glob ();
@@ -44,8 +44,8 @@ sub RTx {
local @INC = (
$ENV{RTHOME} ? ( $ENV{RTHOME}, "$ENV{RTHOME}/lib" ) : (),
@INC,
- map { ( "$_/rt3/lib", "$_/lib/rt3", "$_/lib" ) } grep $_,
- @prefixes
+ map { ( "$_/rt4/lib", "$_/lib/rt4", "$_/rt3/lib", "$_/lib/rt3", "$_/lib" )
+ } grep $_, @prefixes
);
until ( eval { require RT; $RT::LocalPath } ) {
warn
commit 399c3e5ac1e7e176262d10029159d5cc716c4f3b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Apr 21 08:36:03 2011 +0400
update todo
diff --git a/TODO.porting_over_RT4 b/TODO.porting_over_RT4
index caea060..132e2ac 100644
--- a/TODO.porting_over_RT4
+++ b/TODO.porting_over_RT4
@@ -66,3 +66,4 @@
* merge all RT::IR->*Query methods into one, they all equivalent,
small differences
+* move html/RTIR/Incident/LinkArticles.html -> html/RTIR/Link/Articles.html
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list