[Rt-commit] r4329 - in rtir/branches/1.9-EXPERIMENTAL: .
html/RTIR/Report html/RTIR/Search
ruz at bestpractical.com
ruz at bestpractical.com
Sat Dec 17 21:16:11 EST 2005
Author: ruz
Date: Sat Dec 17 21:16:11 2005
New Revision: 4329
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Report/BulkReject.html
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Refine.html
rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Results.html
Log:
r583 at cubic-pc: cubic | 2005-12-18 05:18:34 +0300
r575 at cubic-pc: cubic | 2005-12-18 03:34:18 +0300
* minor
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Report/BulkReject.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Report/BulkReject.html (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Report/BulkReject.html Sat Dec 17 21:16:11 2005
@@ -63,10 +63,14 @@
</form>
<%INIT>
-$Format ||= $RT::RTIRSearchResultFormats->{'RejectReports'};
my $title = loc("Reject Incident Reports");
my $SubmitCaption = loc("Reject selected incident reports");
+$Format ||= $RT::RTIRSearchResultFormats->{'RejectReports'};
+unless( $Format =~ /__RTIR_Check__/ ) {
+ $Format = "___RTIR_Check__,$Format";
+}
+
my ( @results );
if ( $ARGS{'BulkReject'} ) {
my @tempresults;
@@ -85,12 +89,6 @@
}
$id = $t->id;
- unless( $t->FirstCustomFieldValue('_RTIR_State') eq 'new' ) {
- push @tempresults, [ $id, loc("Only new reports may be rejected.") ];
- push @tempresults, [ $id, loc("Skipped.") ];
- next;
- }
-
# If we don't own the thing we're linking to, change the owner
if ( $t->Owner != $session{'CurrentUser'}->id
&& $t->Owner != $RT::Nobody->id )
@@ -103,6 +101,8 @@
next;
}
+ my $oldstate = $t->FirstCustomFieldValue('_RTIR_State');
+
if ( $t->Owner != $session{'CurrentUser'}->id &&
$t->Owner == $RT::Nobody->id )
{
@@ -114,8 +114,6 @@
}
}
- my $oldstate = $t->FirstCustomFieldValue('_RTIR_State');
-
push @tempresults, ProcessTicketBasics( ARGSRef => \%ARGS, TicketObj => $t );
my $newstate = $t->FirstCustomFieldValue('_RTIR_State');
@@ -130,13 +128,6 @@
$session{'tickets'}->RedoSearch;
}
-# FIXME: Doesn't work as expected with refined search.
-# also is not clear should it use Query from
-# /RTIR/Search/Results.html?Queue=Incident%20Reports or
-# own? and can it be refined at all?
-$BaseQuery ||= $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue );
-$Query ||= $m->comp( '/RTIR/Elements/NewQuery', Queue => $Queue, states => 'new' );
-
my $QueryString = $m->comp(
'/Elements/QueryString',
BaseQuery => $BaseQuery,
@@ -158,17 +149,22 @@
</%INIT>
<%ARGS>
-$Status => 'rejected'
-$RTIRCheck => 'None'
-$Query => undef
-$BaseQuery => undef
-$Queue => 'Incident Reports'
-$Format => undef
-$Rows => 50
-$Page => 1
-$OrderBy => 'id'
-$Order => 'ASC'
-$BaseURL => $RT::WebPath . "/RTIR/Report/BulkReject.html?"
-$current_tab => 'RTIR/Report/BulkReject.html'
+$Queue => 'Incident Reports'
+
+# FIXME: Doesn't work as expected with refined search.
+# also is not clear should it use Query from
+# /RTIR/Search/Results.html?Queue=Incident%20Reports or
+# own? and can it be refined at all?
+$BaseQuery => $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue )
+$Query => $m->comp( '/RTIR/Elements/NewQuery', Queue => $Queue )
+$Status => 'rejected'
+$RTIRCheck => 'None'
+$Format => undef
+$Rows => 50
+$Page => 1
+$OrderBy => 'id'
+$Order => 'ASC'
+$BaseURL => $RT::WebPath . "/RTIR/Report/BulkReject.html?"
+$current_tab => 'RTIR/Report/BulkReject.html'
@SelectedTickets => ()
</%ARGS>
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Refine.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Refine.html (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Refine.html Sat Dec 17 21:16:11 2005
@@ -140,7 +140,7 @@
%ARGS);
# {{{ Build a querystring for the tabs
-$QueryString = $m->comp('/Elements/QueryString',
+my $QueryString = $m->comp('/Elements/QueryString',
Query => $Query,
Format => $Format,
Order => $Order,
@@ -172,7 +172,6 @@
$Queue => ''
$BaseQuery => ''
$Query => ''
-$QueryString => undef
$Format => undef
$Rows => 50
$Page => 1
Modified: rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Results.html
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Results.html (original)
+++ rtir/branches/1.9-EXPERIMENTAL/html/RTIR/Search/Results.html Sat Dec 17 21:16:11 2005
@@ -45,13 +45,13 @@
%# }}} END BPS TAGGED BLOCK
<& /Elements/Header, Title => $title, Refresh => $session{'tickets_refresh_interval'} &>
<& '/RTIR/'.$Type.'/Elements/Tabs',
- current_tab => "RTIR/Search/Results.html?Queue=$Queue&$QueryString",
- Title => $title,
- Format => $Format,
- Query => $Query,
- Rows => $Rows,
- OrderBy => $OrderBy,
- Order => $Order,
+ current_tab => "RTIR/Search/Results.html?$EscapedQueue&$QueryString",
+ Title => $title,
+ Format => $Format,
+ Query => $Query,
+ Rows => $Rows,
+ OrderBy => $OrderBy,
+ Order => $Order,
QueryString => $QueryString,
&>
@@ -59,41 +59,44 @@
<& Elements/ShowResults,
%ARGS,
- Query => $Query,
- QueryString => $QueryString,
- Format => $Format,
+ Queue => $Queue,
+ BaseQuery => $BaseQuery,
+ Query => $Query,
+ Format => $Format,
+ Rows => $Rows,
+ Page => $Page,
+ OrderBy => $OrderBy,
+ Order => $Order,
+ QueryString => $QueryString,
&>
<%INIT>
my $title = loc("Results");
-my ($Type) = $m->comp( "/RTIR/Elements/Type", Queue => $Queue );
+my ($Type) = $m->comp( '/RTIR/Elements/Type', Queue => $Queue );
$Format ||= $RT::RTIRSearchResultFormats->{ $Type . 'Default' };
-$BaseQuery ||= $m->comp('/RTIR/Elements/BaseQuery', Queue => $Queue);
-$Query ||= $m->comp('/RTIR/Elements/NewQuery', Queue => $Queue);
my $QueryString = $m->comp( '/Elements/QueryString',
BaseQuery => $BaseQuery,
- Query => $Query,
- Format => $Format,
- Rows => $Rows,
- OrderBy => $OrderBy,
- Order => $Order,
- Page => $Page
+ Query => $Query,
+ Format => $Format,
+ Rows => $Rows,
+ OrderBy => $OrderBy,
+ Order => $Order,
+ Page => $Page,
);
-
-$Query = "($BaseQuery) AND ( $Query )";
+my $EscapedQueue = $m->comp( '/Elements/QueryString', Queue => $Queue );
</%INIT>
<%ARGS>
-$BaseQuery => undef
-$Query => undef
-$Format => undef
-$Rows => 50
-$Page => 1
-$OrderBy => 'id'
-$Order => 'ASC'
-$Queue => ''
- at results => ()
+$Queue => ''
+$BaseQuery => $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue )
+$Query => $m->comp( '/RTIR/Elements/NewQuery', Queue => $Queue )
+$Format => undef
+$Rows => 50
+$Page => 1
+$OrderBy => 'id'
+$Order => 'ASC'
+ at results => ()
</%ARGS>
More information about the Rt-commit
mailing list