[Rt-commit] rtir branch, 2.9-trunk, updated. 2.6.1rc1-375-g1e27969
Ruslan Zakirov
ruz at bestpractical.com
Tue Sep 6 05:28:19 EDT 2011
The branch, 2.9-trunk has been updated
via 1e27969b79e8ffb2a3b4b16d66cfdb77916ac96f (commit)
via 452a4f6d3d0bc0d2145cd82d7313735335e9d43f (commit)
from e7b267a55514e165b1651b898af8d14fbf0abd22 (commit)
Summary of changes:
TODO.porting_over_RT4 | 4 --
html/Callbacks/RTIR/Elements/Tabs/Privileged | 39 ++++++++++++++++++--
html/RTIR/Incident/Reply/Refine.html | 18 +++++++++
.../RTIR/Incident/{Reply.html => Reply/index.html} | 6 ++--
t/rtfm/on-update.t | 2 +
5 files changed, 58 insertions(+), 11 deletions(-)
create mode 100644 html/RTIR/Incident/Reply/Refine.html
rename html/RTIR/Incident/{Reply.html => Reply/index.html} (98%)
- Log -----------------------------------------------------------------
commit 452a4f6d3d0bc0d2145cd82d7313735335e9d43f
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Tue Sep 6 00:23:00 2011 +0400
rename /Incident/Reply.html to add refine page
diff --git a/html/RTIR/Incident/Reply.html b/html/RTIR/Incident/Reply/index.html
similarity index 100%
rename from html/RTIR/Incident/Reply.html
rename to html/RTIR/Incident/Reply/index.html
commit 1e27969b79e8ffb2a3b4b16d66cfdb77916ac96f
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Tue Sep 6 01:09:37 2011 +0400
add query refine page for Incident/Reply.html
diff --git a/TODO.porting_over_RT4 b/TODO.porting_over_RT4
index 6368282..c58f46c 100644
--- a/TODO.porting_over_RT4
+++ b/TODO.porting_over_RT4
@@ -26,10 +26,6 @@
* tranasaction custom fields
-=== FIXES
-
-* /Incident/Reply.html needs refine query page
-
=== DOCS
* document why maps are required
diff --git a/html/Callbacks/RTIR/Elements/Tabs/Privileged b/html/Callbacks/RTIR/Elements/Tabs/Privileged
index 5255f15..2f34464 100644
--- a/html/Callbacks/RTIR/Elements/Tabs/Privileged
+++ b/html/Callbacks/RTIR/Elements/Tabs/Privileged
@@ -92,7 +92,7 @@ my $search_arguments = sub {
return %res;
};
-if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update|Reply)\.html$} ) {
+if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update)\.html$} ) {
my $id = $args->{'id'};
# we'll never get here unless ticket is there and it's rtir's type
@@ -177,11 +177,11 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update|Reply)\.
if ( $type eq 'Incident' ) {
$actions_tab->child(
reply_reporters => title => loc('Reply to Reporters'),
- path => "/RTIR/Incident/Reply.html?id=$id&SelectAllTickets=1",
+ path => "/RTIR/Incident/Reply/?id=$id&SelectAllTickets=1",
);
$actions_tab->child(
reply_all => title => loc('Reply to All'),
- path => "/RTIR/Incident/Reply.html?id=$id&SelectAllTickets=1&All=1",
+ path => "/RTIR/Incident/Reply/?id=$id&SelectAllTickets=1&All=1",
);
} else {
$actions_tab->child(
@@ -211,7 +211,7 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update|Reply)\.
my $path = '/RTIR/';
$path .= 'Incident/' if $type eq 'Incident';
if ( my $update = $info->{'update'} ) {
- $path .= $type eq 'Incident'? 'Reply.html' : 'Update.html';
+ $path .= $type eq 'Incident'? 'Reply/' : 'Update.html';
$path .= "?". $m->comp(
'/Elements/QueryString',
%args,
@@ -347,6 +347,37 @@ if ( $request_path =~ m{^/RTIR/(?:$re_rtir_types/)?(Display|Edit|Update|Reply)\.
back => title => loc('Back to ticket #[_1]', $id),
path => "/RTIR/Display.html?id=$id",
);
+} elsif ( $request_path =~ m{^/RTIR/Incident/Reply/} ) {
+ my $ticket = RT::Ticket->new( $session{'CurrentUser'} );
+ $ticket->Load( $args->{'id'} );
+ my $id = $ticket->id;
+
+ my %args = (
+ $search_arguments->(),
+ id => $id,
+ All => $args->{'All'},
+ Status => $args->{'Status'},
+ Action => $args->{'Action'},
+ );
+
+ PageMenu()->child(
+ link => title => loc('Reply'),
+ path => "/RTIR/Incident/Reply/?". $query_string->( %args ),
+ );
+ PageMenu()->child(
+ edit_search => title => loc('Edit Search'),
+ path => "/RTIR/Incident/Reply/Refine.html?". $query_string->( %args ),
+ );
+ PageMenu()->child(
+ new_search => title => loc('New Search'),
+ path => "/RTIR/Incident/Reply/Refine.html?". $query_string->(
+ NewQuery => 1, id => $id,
+ ),
+ );
+ PageMenu()->child(
+ back => title => loc('Back to ticket #[_1]', $id),
+ path => "/RTIR/Display.html?id=$id",
+ );
} elsif ( $request_path =~ m{^/RTIR/(Search/|Incident/BulkAbandon\.html$|Report/BulkReject\.html$)} ) {
my $queue = $args->{'Queue'} || '';
unless ( $queue ) {
diff --git a/html/RTIR/Incident/Reply/Refine.html b/html/RTIR/Incident/Reply/Refine.html
new file mode 100644
index 0000000..5d06776
--- /dev/null
+++ b/html/RTIR/Incident/Reply/Refine.html
@@ -0,0 +1,18 @@
+<%INIT>
+my @queues = ('Incident Reports');
+push @queues, 'Investigations' if $ARGS{'All'};
+push @queues, 'Blocks' if $ARGS{'All'} && !RT->Config->Get('RTIR_DisableBlocksQueue');
+
+return $m->comp(
+ '/RTIR/Search/Elements/RefinePage',
+ %ARGS,
+ ResultPage => 'RTIR/Incident/Reply/?'. $m->comp('/Elements/QueryString',
+ id => $ARGS{'id'}, All => $ARGS{'All'},
+ Status => $ARGS{'Status'}, Action => $ARGS{'Action'},
+ ),
+ BaseQuery => RT::IR->Query(
+ Queue => \@queues,
+ MemberOf => $ARGS{'id'},
+ ),
+);
+</%INIT>
\ No newline at end of file
diff --git a/html/RTIR/Incident/Reply/index.html b/html/RTIR/Incident/Reply/index.html
index efa5832..1fbc0de 100644
--- a/html/RTIR/Incident/Reply/index.html
+++ b/html/RTIR/Incident/Reply/index.html
@@ -28,7 +28,7 @@
% $m->callback(CallbackName => 'BeforeActionList', Actions => \@results, ARGSRef => \%ARGS, Ticket => $IncidentObj);
<& /Elements/ListActions, actions => \@results &>
-<form action="Reply.html" name="TicketUpdate" method="get">
+<form action="index.html" name="TicketUpdate" method="get">
<input type="hidden" name="id" value="<% $id %>" />
<input type="hidden" name="Status" value="<% $Status %>" />
<input type="hidden" name="All" value="<% $All %>" />
@@ -84,7 +84,7 @@
<h2 class="no-recipients">Warning: no recipients!</h2>
% }
-<& Elements/ReplyForm, %ARGS,
+<& ../Elements/ReplyForm, %ARGS,
TicketObj => $IncidentObj,
Status => $Status,
GnuPGWidget => $gnupg_widget,
@@ -214,7 +214,7 @@ push @queues, 'Blocks' unless RT->Config->Get('RTIR_DisableBlocksQueue');
$Query ||= RT::IR->ActiveQuery( Queue => \@queues );
-my $BaseURL = "RTIR/Incident/Reply.html?".
+my $BaseURL = "RTIR/Incident/Reply/?".
$m->comp('/Elements/QueryString',
id => $id,
All => $All,
diff --git a/t/rtfm/on-update.t b/t/rtfm/on-update.t
index ab5ec75..aab452e 100644
--- a/t/rtfm/on-update.t
+++ b/t/rtfm/on-update.t
@@ -52,6 +52,7 @@ foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks'
$agent->form_name('TicketUpdate');
like( $agent->field('UpdateContent'), qr/this is a content/ );
+ $agent->goto_ticket( $id );
$agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
$agent->form_name('TicketUpdate');
is( $agent->field('UpdateContent'), '' );
@@ -60,6 +61,7 @@ foreach my $queue ( 'Incidents', 'Incident Reports', 'Investigations', 'Blocks'
$agent->form_name('TicketUpdate');
like( $agent->field('UpdateContent'), qr/this is a content/ );
+ $agent->goto_ticket( $id );
$agent->follow_link_ok({text => "$reply_text"}, "followed '$reply_text' link");
$agent->form_name('TicketUpdate');
is( $agent->field('UpdateContent'), '' );
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list