[Rt-commit] r2126 - in rtir/branches/1.1-TESTING: .
html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap
html/RTIR/Elements html/RTIR/Report html/RTIR/Search/Elements
lib/RT lib/RT/Action lib/RT/Condition lib/t
jesse at bestpractical.com
jesse at bestpractical.com
Sat Jan 22 12:06:52 EST 2005
Author: jesse
Date: Sat Jan 22 12:06:50 2005
New Revision: 2126
Added:
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR.pm
rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR.pm
Modified:
rtir/branches/1.1-TESTING/ (props changed)
rtir/branches/1.1-TESTING/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/ColumnMap
rtir/branches/1.1-TESTING/html/RTIR/Elements/NewQuery
rtir/branches/1.1-TESTING/html/RTIR/Report/BulkReject.html
rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/ShowResults
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ChangeChildOwnership.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ChangeParentOwnership.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_OpenParent.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ResolveChildren.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetBlockState.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueBySLA.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueCorrespond.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueIncident.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueReopen.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueToNow.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetHowReported.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetIncidentReportState.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetIncidentState.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetInvestigationState.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsByBizHours.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsToNow.pm
rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_UnsetDue.pm
rtir/branches/1.1-TESTING/lib/RT/Condition/CustomerResponse.pm
rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_CloseTicket.pm
rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_CustomerResponse.pm
rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_ReopenTicket
rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_ReopenTicket.pm
rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_RequireDueChange.pm
rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_RequireStateChange.pm
rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_StaffResponse.pm
rtir/branches/1.1-TESTING/lib/RT/IR.pm
rtir/branches/1.1-TESTING/lib/t/02regression.t
Log:
r3908 at hualien: jesse | 2005-01-22T14:48:55.733374Z
Search fixes. Bulk Reject fixes. Scrip fixes.
Modified: rtir/branches/1.1-TESTING/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/ColumnMap
==============================================================================
--- rtir/branches/1.1-TESTING/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/ColumnMap (original)
+++ rtir/branches/1.1-TESTING/html/Callbacks/RTIR/Elements/RT__Ticket/ColumnMap/ColumnMap Sat Jan 22 12:06:50 2005
@@ -1,38 +1,47 @@
<%INIT>
+
+# This is scary and should totally be refactored -- jesse
my %args = $m->caller_args(4);
my $check;
$check = $args{'RTIRCheck'} if $args{'RTIRCheck'};
- $COLUMN_MAP->{'_RTIR_Check'} = {
- title => ' ',
- value => sub {
- my $selected = '';
- if ($check eq 'All') {
- $selected = 'CHECKED';
- } elsif ($check eq 'All') {
- $selected = '';
- } elsif ($check == $_[0]->id) {
- $selected = 'CHECKED';
- } elsif (ref($check) eq 'ARRAY') {
- foreach my $check (@$check) {
- if ($_[0]->id == $check) {
- $selected = 'CHECKED';
- }
- }
- }
- return (\'<input type="checkbox" name="UpdateTicket' , $_[0]->id , '" ' , $selected ,\'>') },
- };
+$COLUMN_MAP->{'_RTIR_Check'} = {
+ title => ' ',
+ value => sub {
+ my $selected = '';
+ if ( $check eq 'All' ) {
+ $selected = 'CHECKED';
+ }
+ elsif ( $check eq 'All' ) {
+ $selected = '';
+ }
+ elsif ( $check == $_[0]->id ) {
+ $selected = 'CHECKED';
+ }
+ elsif ( ref($check) eq 'ARRAY' ) {
+ foreach my $check (@$check) {
+ if ( $_[0]->id == $check ) {
+ $selected = 'CHECKED';
+ }
+ }
+ }
+ return ( \'<input type="checkbox" name="UpdateTicket',
+ $_[0]->id, \'" ', $selected, \'>' );
+ },
+};
- $COLUMN_MAP->{'_RTIR_Radio'} = {
- title => (\' '),
- value => sub {
- my $selected = '';
- if ($_[0]->id == $check) {
- $selected = 'CHECKED';
- }
- return \'<input type="radio" name="SelectedTicket" value="' . $_[0]->id . '" ' . $selected . '>' },
- };
+$COLUMN_MAP->{'_RTIR_Radio'} = {
+ title => ( \' ' ),
+ value => sub {
+ my $selected = '';
+ if ( $_[0]->id == $check ) {
+ $selected = 'CHECKED';
+ }
+ return ( \'<input type="radio" name="SelectedTicket" value="',
+ $_[0]->id, \'" ', $selected, \'>' );
+ },
+};
</%INIT>
<%ARGS>
Modified: rtir/branches/1.1-TESTING/html/RTIR/Elements/NewQuery
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Elements/NewQuery (original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Elements/NewQuery Sat Jan 22 12:06:50 2005
@@ -7,7 +7,7 @@
if ($states[0]) {
foreach my $state (@states) {
$Query .= " OR " if $Query;
- $Query .= "'CF.$Queue.{_RTIR_State}' = '$state'";
+ $Query .= "'CF.{_RTIR_State}' = '$state'";
}
}
@@ -15,6 +15,8 @@
return $Query;
+$RT::Logger->crit($Query);
+
</%INIT>
<%ARGS>
Modified: rtir/branches/1.1-TESTING/html/RTIR/Report/BulkReject.html
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Report/BulkReject.html (original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Report/BulkReject.html Sat Jan 22 12:06:50 2005
@@ -22,9 +22,6 @@
%#
%#
%# END LICENSE BLOCK
-<& /RTIR/Elements/Header,
- Title => $title,
- Refresh => $session{'tickets_refresh_interval'} &>
<& '/RTIR/Search/Elements/RefineTabs',
path => $path,
@@ -41,9 +38,9 @@
<& /Elements/ListActions, actions => \@results &>
-<form action="<%$RT::WebPath%>/RTIR/Report/BulkReject.html" method=get>
+<form action="<%$RT::WebPath%>/RTIR/Report/BulkReject.html" method="POST">
<input type=hidden name=Status value=<%$Status%>>
-<input type=hidden name=BulkReject value=1>
+<input type=hidden name=BulkReject value="1">
<& /RTIR/Search/Elements/ShowResults,
Queue => $Queue,
@@ -62,70 +59,105 @@
<%INIT>
$Format = $RT::RTIRSearchResultFormats->{'RejectReports'};
-
-my $title = loc("Reject Incident Reports");
+my $title = loc("Reject Incident Reports");
my $SubmitCaption = loc("Reject selected incident reports");
-my (@tempresults, @results);
-if ($ARGS{'BulkReject'}) {
+$m->comp(
+ '/RTIR/Elements/Header',
+ Title => $title,
+ Refresh => $session{'tickets_refresh_interval'}
+);
+
+my ( @results );
+
+if ( $ARGS{'BulkReject'} ) {
+
#Iterate through each ticket we've been handed
- while (my $t = $session{'tickets'}->Next) {
- $RT::Logger->debug( "Checking Ticket ".$t->Id ."\n");
- next unless ($ARGS{"UpdateTicket".$t->Id});
- my $State = $m->scomp("/RTIR/Elements/ShowRTIRField", Ticket => $t, Name => 'State');
- $State =~ s/\s+$//;
- if ($State eq 'new') {
- # If we don't own the thing we're linking to, change the owner
- if ($t->OwnerObj->id != $session{'CurrentUser'}->id &&
- $t->OwnerObj->id != $RT::Nobody->id) {
- @tempresults = loc("You may not reject tickets that belong to another user.");
- } else {
- @tempresults = ();
- if ($t->OwnerObj->id != $session{'CurrentUser'}->id &&
- $t->OwnerObj->id == $RT::Nobody->id) {
- $ARGS{'Action'} = 'Take';
- my $action = $ARGS{'Action'};
- push @tempresults, "Action: ".$ARGS{'Action'};
- my ($res, $msg)=$t->$action();
- push (@tempresults, $msg);
- }
- my ($oldstate, $newstate);
- $oldstate = $t->FirstCustomFieldValue('_RTIR_State');
- push @tempresults, ProcessTicketBasics(ARGSRef => \%ARGS, TicketObj=>$t);
- $newstate = $t->FirstCustomFieldValue('_RTIR_State');
- if ($newstate ne $oldstate) {
- push (@tempresults, loc("State changed from [_1] to [_2]", $oldstate, $newstate));
- }
- }
- } else {
- push @tempresults, loc("Cannot reject Incident Report #[_1]. Only new reports may be rejected.", $t->id);
- }
- @tempresults = map { loc("Ticket [_1]: [_2]",$t->Id,$_) } @tempresults;
- @results = (@results, @tempresults);
+ while ( my $t = $session{'tickets'}->Next ) {
+ my @tempresults;
+ $m->out('<!-- Processing <%$t->id%> -->');
+ next unless ( $ARGS{ "UpdateTicket" . $t->Id } );
+ my $State = $m->scomp(
+ "/RTIR/Elements/ShowRTIRField",
+ Ticket => $t,
+ Name => 'State'
+ );
+ $State =~ s/\s+$//;
+ if ( $State eq 'new' ) {
+
+ # If we don't own the thing we're linking to, change the owner
+ if ( $t->OwnerObj->id != $session{'CurrentUser'}->id
+ && $t->OwnerObj->id != $RT::Nobody->id )
+ {
+ @tempresults =
+ loc(
+ "You may not reject tickets that belong to another user.");
+ }
+ else {
+ @tempresults = ();
+ if ( $t->OwnerObj->id != $session{'CurrentUser'}->id
+ && $t->OwnerObj->id == $RT::Nobody->id )
+ {
+ $ARGS{'Action'} = 'Take';
+ my $action = $ARGS{'Action'};
+ push @tempresults, "Action: " . $ARGS{'Action'};
+ my ( $res, $msg ) = $t->$action();
+ push( @tempresults, $msg );
+ }
+ my ( $oldstate, $newstate );
+ $oldstate = $t->FirstCustomFieldValue('_RTIR_State');
+ push @tempresults,
+ ProcessTicketBasics( ARGSRef => \%ARGS, TicketObj => $t );
+ $newstate = $t->FirstCustomFieldValue('_RTIR_State');
+ if ( $newstate ne $oldstate ) {
+ push(
+ @tempresults,
+ loc(
+ "State changed from [_1] to [_2]", $oldstate,
+ $newstate
+ )
+ );
+ }
+ }
+ }
+ else {
+ push @tempresults,
+ loc(
+"Cannot reject Incident Report #[_1]. Only new reports may be rejected.",
+ $t->id
+ );
+ }
+ @tempresults =
+ map { loc( "Ticket [_1]: [_2]", $t->Id, $_ ) } @tempresults;
+ @results = ( @results, @tempresults );
}
}
# We can only reject new tickets, so set the states.
my @states = ['new'];
-if (!$Query) {
- $Query = $m->comp('/RTIR/Elements/NewQuery', Queue => $Queue, states => @states);
+if ( !$Query ) {
+ $Query =
+ $m->comp( '/RTIR/Elements/NewQuery', Queue => $Queue, states => @states );
}
-my $QueryString = "&".$m->comp('/Elements/QueryString',
- Query => $Query,
- Format => $Format,
- Rows => $Rows,
- OrderBy => $OrderBy,
- Order => $Order,
- Page => $Page);
+my $QueryString = $m->comp(
+ '/Elements/QueryString',
+ Query => $Query,
+ Format => $Format,
+ Rows => $Rows,
+ OrderBy => $OrderBy,
+ Order => $Order,
+ Page => $Page
+);
-if (!$BaseQuery) {
- $BaseQuery = $m->comp('/RTIR/Elements/BaseQuery', Queue => $Queue);
+if ( !$BaseQuery ) {
+ $BaseQuery = $m->comp( '/RTIR/Elements/BaseQuery', Queue => $Queue );
}
$Query = "$BaseQuery AND ( $Query )";
-my $path = "RTIR/Search/Refine.html?ResultPage=$BaseURL¤t_tab=$current_tab&Queue=$Queue$QueryString";
+my $path =
+"RTIR/Search/Refine.html?$QueryString&ResultPage=$BaseURL¤t_tab=$current_tab&Queue=$Queue";
</%INIT>
@@ -140,6 +172,6 @@
$Page => 1
$OrderBy => 'id'
$Order => 'ASC'
-$BaseURL => $RT::WebPath . "/RTIR/Report/BulkReject.html"
+$BaseURL => $RT::WebPath . "/RTIR/Report/BulkReject.html?"
$current_tab => 'RTIR/Report/BulkReject.html'
</%ARGS>
Modified: rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/ShowResults
==============================================================================
--- rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/ShowResults (original)
+++ rtir/branches/1.1-TESTING/html/RTIR/Search/Elements/ShowResults Sat Jan 22 12:06:50 2005
@@ -15,11 +15,11 @@
% if ($Queue eq 'Incident Reports') {
%# this would do well as a Callback
-<a href="<%$RT::WebPath%>/RTIR/Report/BulkReject.html?Queue=<%$Queue%><%$QueryString%>"><&|/l&>Bulk Reject</&></a><br>
+<a href="<%$RT::WebPath%>/RTIR/Report/BulkReject.html<%$QueryString%>&Queue=<%$Queue%>"><&|/l&>Bulk Reject</&></a><br>
% }
%if (0) {
-<a href="<%$BaseURL%>Queue=<%$Queue%><%$QueryString%>"><&|/l&>Bookmarkable link</&></a><br>
+<a href="<%$BaseURL%><%$QueryString%>&Queue=<%$Queue|u%>"><&|/l&>Bookmarkable link</&></a><br>
<a href="<%$RT::WebPath%>/Search/Results.tsv?Queue=<%$Queue%><%$QueryString%>"><&|/l&>spreadsheet</&></a> |
<a href="<%$RT::WebPath%>/Search/Results.rdf?Queue=<%$Queue%><%$QueryString%>"><&|/l&>RSS</&></a> |
Added: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR.pm
==============================================================================
--- (empty file)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR.pm Sat Jan 22 12:06:50 2005
@@ -0,0 +1,10 @@
+
+use warnings;
+use strict;
+use RT::IR;
+package RT::Action::RTIR;
+
+use base 'RT::Action::Generic';
+
+
+1;
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ChangeChildOwnership.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ChangeChildOwnership.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ChangeChildOwnership.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,8 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_ChangeChildOwnership;
-require RT::Action::Generic;
-
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ChangeParentOwnership.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ChangeParentOwnership.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ChangeParentOwnership.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,8 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_ChangeParentOwnership;
-require RT::Action::Generic;
-
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_OpenParent.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_OpenParent.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_OpenParent.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,9 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_OpenParent;
-require RT::Action::Generic;
-
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+use base 'RT::Action::RTIR';
+
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ResolveChildren.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ResolveChildren.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_ResolveChildren.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,8 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_ResolveChildren;
-require RT::Action::Generic;
-
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetBlockState.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetBlockState.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetBlockState.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,16 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetBlockState;
-require RT::Action::Generic;
+use strict;
+use base 'RT::Action::RTIR';
+
+
+
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueBySLA.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueBySLA.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueBySLA.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueBySLA;
-require RT::Action::Generic;
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+use warnings;
+use RT::Action::RTIR;
+use base qw'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueCorrespond.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueCorrespond.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueCorrespond.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueCorrespond;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueIncident.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueIncident.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueIncident.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueIncident;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueReopen.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueReopen.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueReopen.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueReopen;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueToNow.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueToNow.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetDueToNow.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetDueToNow;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetHowReported.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetHowReported.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetHowReported.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetHowReported;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetIncidentReportState.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetIncidentReportState.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetIncidentReportState.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetIncidentReportState;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetIncidentState.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetIncidentState.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetIncidentState.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetIncidentState;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetInvestigationState.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetInvestigationState.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetInvestigationState.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetInvestigationState;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsByBizHours.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsByBizHours.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsByBizHours.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetStartsByBizHours;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsToNow.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsToNow.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_SetStartsToNow.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_SetStartsToNow;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_UnsetDue.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_UnsetDue.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Action/RTIR_UnsetDue.pm Sat Jan 22 12:06:50 2005
@@ -45,11 +45,11 @@
# }}} END BPS TAGGED BLOCK
#
package RT::Action::RTIR_UnsetDue;
-require RT::Action::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Action::Generic);
+
+use base 'RT::Action::RTIR';
=head2 Prepare
Modified: rtir/branches/1.1-TESTING/lib/RT/Condition/CustomerResponse.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Condition/CustomerResponse.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Condition/CustomerResponse.pm Sat Jan 22 12:06:50 2005
@@ -47,11 +47,11 @@
package RT::Condition::RTIR_CustomerResponse;
-require RT::Condition::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Condition::Generic);
+
+use base 'RT::Condition::RTIR';
=head2 IsApplicable
Added: rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR.pm
==============================================================================
--- (empty file)
+++ rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR.pm Sat Jan 22 12:06:50 2005
@@ -0,0 +1,10 @@
+
+use warnings;
+use strict;
+use RT::IR;
+
+package RT::Condition::RTIR;
+
+use base 'RT::Condition::Generic';
+
+1;
Modified: rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_CloseTicket.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_CloseTicket.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_CloseTicket.pm Sat Jan 22 12:06:50 2005
@@ -47,11 +47,11 @@
package RT::Condition::RTIR_CloseTicket;
-require RT::Condition::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Condition::Generic);
+
+use base 'RT::Condition::RTIR';
=head2 IsApplicable
Modified: rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_CustomerResponse.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_CustomerResponse.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_CustomerResponse.pm Sat Jan 22 12:06:50 2005
@@ -47,11 +47,11 @@
package RT::Condition::RTIR_CustomerResponse;
-require RT::Condition::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Condition::Generic);
+
+use base 'RT::Condition::RTIR';
=head2 IsApplicable
Modified: rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_ReopenTicket
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_ReopenTicket (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_ReopenTicket Sat Jan 22 12:06:50 2005
@@ -47,11 +47,11 @@
package RT::Condition::RTIR_ReopenTicket;
-require RT::Condition::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Condition::Generic);
+
+use base 'RT::Condition::RTIR';
=head2 IsApplicable
Modified: rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_ReopenTicket.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_ReopenTicket.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_ReopenTicket.pm Sat Jan 22 12:06:50 2005
@@ -47,11 +47,11 @@
package RT::Condition::RTIR_ReopenTicket;
-require RT::Condition::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Condition::Generic);
+
+use base 'RT::Condition::RTIR';
=head2 IsApplicable
Modified: rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_RequireDueChange.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_RequireDueChange.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_RequireDueChange.pm Sat Jan 22 12:06:50 2005
@@ -47,11 +47,10 @@
package RT::Condition::RTIR_RequireDueChange;
-require RT::Condition::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Condition::Generic);
+use base 'RT::Condition::RTIR';
=head2 IsApplicable
Modified: rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_RequireStateChange.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_RequireStateChange.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_RequireStateChange.pm Sat Jan 22 12:06:50 2005
@@ -47,11 +47,11 @@
package RT::Condition::RTIR_RequireStateChange;
-require RT::Condition::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Condition::Generic);
+
+use base 'RT::Condition::RTIR';
=head2 IsApplicable
Modified: rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_StaffResponse.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_StaffResponse.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/Condition/RTIR_StaffResponse.pm Sat Jan 22 12:06:50 2005
@@ -47,11 +47,11 @@
package RT::Condition::RTIR_StaffResponse;
-require RT::Condition::Generic;
+
use strict;
-use vars qw/@ISA/;
- at ISA = qw(RT::Condition::Generic);
+
+use base 'RT::Condition::RTIR';
=head2 IsApplicable
Modified: rtir/branches/1.1-TESTING/lib/RT/IR.pm
==============================================================================
--- rtir/branches/1.1-TESTING/lib/RT/IR.pm (original)
+++ rtir/branches/1.1-TESTING/lib/RT/IR.pm Sat Jan 22 12:06:50 2005
@@ -45,6 +45,8 @@
# }}} END BPS TAGGED BLOCK
#
package RT::IR;
+use warnings;
+use strict;
use Business::Hours;
use Business::SLA;
Modified: rtir/branches/1.1-TESTING/lib/t/02regression.t
==============================================================================
--- rtir/branches/1.1-TESTING/lib/t/02regression.t (original)
+++ rtir/branches/1.1-TESTING/lib/t/02regression.t Sat Jan 22 12:06:50 2005
@@ -49,7 +49,7 @@
$agent->field("Subject", $subject) if $subject;
$agent->field("Content", $content) if $content;
- # TODO: this shouldn't be hardcoded
+ # TODO: this should not be hardcoded
SetFunction("IncidentCoord");
$agent->submit();
@@ -150,7 +150,7 @@
# set the content
$agent->field("Content", $args{'Content'});
- # TODO: this shouldn't be hardcoded
+ # TODO: this should not be hardcoded
SetFunction("IncidentCoord");
# Create it!
More information about the Rt-commit
mailing list