[Rt-commit] rtir branch, rt-3.9, updated. d9d4fe8cddeb17feaa2c294edfdb630d8e3c25e1
? sunnavy
sunnavy at bestpractical.com
Mon Sep 27 01:03:59 EDT 2010
The branch, rt-3.9 has been updated
via d9d4fe8cddeb17feaa2c294edfdb630d8e3c25e1 (commit)
via 74fdc0c9c6a54218c519477f32352ba10e0cfa96 (commit)
via ad04ef89cc27951da29ed1455d0d40983a634108 (commit)
via a359cf99292bf387151d201f17d9b1e599272039 (commit)
from f2cc9a2b0c21ae012c8b8c33e50ca60d237729bd (commit)
Summary of changes:
Makefile.PL | 3 ---
lib/RT/IR.pm | 26 +++++++++++++++++++++++++-
t/constituency/basics.t | 8 ++++----
t/constituency/email.t | 4 ++--
t/constituency/email_outgoing.t | 4 ++--
5 files changed, 33 insertions(+), 12 deletions(-)
- Log -----------------------------------------------------------------
commit a359cf99292bf387151d201f17d9b1e599272039
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Sep 27 11:19:56 2010 +0800
need to explicitly logout for relogin
diff --git a/t/constituency/basics.t b/t/constituency/basics.t
index a123ed6..d96d3e8 100644
--- a/t/constituency/basics.t
+++ b/t/constituency/basics.t
@@ -246,7 +246,7 @@ ok($from =~ /govnet/, "The from address pciked up the gov address");
diag "check defaults";
{
- $agent->login('eduhandler', 'eduhandler');
+ $agent->login('eduhandler', 'eduhandler', logout => 1 );
my $ir_id = $agent->create_ir(
{ Subject => "test" },
);
@@ -257,7 +257,7 @@ diag "check defaults";
diag "check defaults";
{
- $agent->login('govhandler', 'govhandler');
+ $agent->login('govhandler', 'govhandler', logout => 1);
my $ir_id = $agent->create_ir(
{ Subject => "test" },
);
@@ -268,7 +268,7 @@ diag "check defaults";
diag "check defaults when creating inc with inv";
{
- $agent->login('govhandler', 'govhandler');
+ $agent->login('govhandler', 'govhandler', logout => 1);
my ($inc_id, $inv_id) = $agent->create_incident_and_investigation(
{
Subject => "Incident",
@@ -289,7 +289,7 @@ diag "check defaults when creating inc with inv";
diag "check defaults when creating inc with inv";
{
- $agent->login('eduhandler', 'eduhandler');
+ $agent->login('eduhandler', 'eduhandler', logout => 1);
my ($inc_id, $inv_id) = $agent->create_incident_and_investigation(
{
Subject => "Incident",
commit ad04ef89cc27951da29ed1455d0d40983a634108
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Sep 27 12:09:21 2010 +0800
we need send_via_mailgate_and_http
diff --git a/t/constituency/email.t b/t/constituency/email.t
index efaa2dc..235cba1 100644
--- a/t/constituency/email.t
+++ b/t/constituency/email.t
@@ -41,7 +41,7 @@ Subject: This is a test of constituency functionality
Foob!
EOF
- my ($status, $id) = RT::Test->send_via_mailgate($text, queue => $queue);
+ my ($status, $id) = RT::Test->send_via_mailgate_and_http($text, queue => $queue);
is $status >> 8, 0, "The mail gateway exited ok";
ok $id, "created ticket $id";
@@ -76,7 +76,7 @@ Subject: This is a test of constituency functionality
Foob!
EOF
local $ENV{'EXTENSION'} = $val;
- my ($status, $id) = RT::Test->send_via_mailgate($text, queue => $queue);
+ my ($status, $id) = RT::Test->send_via_mailgate_and_http($text, queue => $queue);
is $status >> 8, 0, "The mail gateway exited ok";
ok $id, "created ticket $id";
$incident_id = $id if $queue eq 'Incidents';
diff --git a/t/constituency/email_outgoing.t b/t/constituency/email_outgoing.t
index dda7e33..3866cb2 100644
--- a/t/constituency/email_outgoing.t
+++ b/t/constituency/email_outgoing.t
@@ -68,7 +68,7 @@ Subject: This is a test of constituency functionality
Foob!
EOF
- my ($status, $id) = RT::Test->send_via_mailgate($text, queue => 'Incident Reports');
+ my ($status, $id) = RT::Test->send_via_mailgate_and_http($text, queue => 'Incident Reports');
is $status >> 8, 0, "The mail gateway exited ok";
ok $id, "created ticket $id";
@@ -103,7 +103,7 @@ Subject: This is a test of constituency functionality
Foob!
EOF
- my ($status, $id) = RT::Test->send_via_mailgate($text, queue => 'Incident Reports', extension => 'GOVNET');
+ my ($status, $id) = RT::Test->send_via_mailgate_and_http($text, queue => 'Incident Reports', extension => 'GOVNET');
is $status >> 8, 0, "The mail gateway exited ok";
ok $id, "created ticket $id";
commit 74fdc0c9c6a54218c519477f32352ba10e0cfa96
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Sep 27 12:58:40 2010 +0800
not set Started if changed from open
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 9d7fa11..eb4c807 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -371,11 +371,35 @@ if ( RT::IR->HasConstituency ) {
};
}
+require RT::Ticket;
+{
+ no warnings 'redefine';
+ my $set_status = RT::Ticket->can('SetStatus');
+ *RT::Ticket::SetStatus = sub {
+ my $self = shift;
+ my %args;
+ if ( @_ == 1 ) {
+
+ # it's called like $ticket->SetStatus('new')
+ $args{Status} = $_[0];
+ }
+ else {
+ %args = @_;
+ }
+
+ my $old = $self->__Value('Status');
+ # if old status is open, we don't want to SetStarted
+ if ( $old eq 'open' ) {
+ $args{SetStarted} = 0;
+ }
+
+ $self->$set_status(%args);
+ };
+}
if ( RT::IR->HasConstituency ) {
# Queue {Comment,Correspond}Address for multiple constituencies
- require RT::Ticket;
wrap 'RT::Ticket::QueueObj', pre => sub {
my $queue = RT::Queue->new($_[0]->CurrentUser);
$queue->Load($_[0]->__Value('Queue'));
commit d9d4fe8cddeb17feaa2c294edfdb630d8e3c25e1
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Sep 27 13:00:37 2010 +0800
remove CIDR dependencies since we have those in rt
diff --git a/Makefile.PL b/Makefile.PL
index 7736a43..5a61528 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -33,9 +33,6 @@ requires('Net::Whois::RIPE');
# IP searching
requires('Hook::LexWrap');
requires('Regexp::Common');
-# CIDR parsing and converting
-requires('Net::CIDR');
-requires('Regexp::Common::net::CIDR');
# for tests
build_requires('Test::More');
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list