On Queue Change

I have a custom scrip that were trying to get to fire on a Queue Change to
Round Robin the owner assignment.

Description: QueueChangeHCAutoAssign
Condition: On Queue Change
Action: user Defined
Template: Global Template Transaction
Stage: Transaction Complete

Custom Condition: return 1;
Custom Action Preperation Code: return 1;
Custom Action Cleanup Code:
my $QueueName = “HealthCheck/Follow-up”;
return 1 unless $self->TicketObj->QueueObj->Name eq $QueueName;
my %hash = (
‘0’ => ‘user0’,
‘1’ => ‘user1’,
‘2’ => ‘user2’,
‘3’ => ‘user3’,
‘4’ => ‘user4’,
‘5’ => ‘user5’,
‘6’ => ‘user6’,
‘7’ => ‘user7’);

my $user = $hash{int(rand(8))};

$RT::Logger->info(“Auto assigning ticket #”. $self->TicketObj->id ." to user
$user" );

my ($status, $msg) = $self->TicketObj->SetOwner( $user );

unless( $status ) {
$RT::Logger->warning( “Impossible to assign the ticket to $user: $msg” );
return undef;
}

1;

Looking at the log, it seems as if this Global Scrip is never firing? Is
there a problem with the On Queue Change, or Do I have something Borked up
here?

Thanks,

Rodney

Maybe “return 1 unless” should be “return 1 if”?

-ToddOn Tue, Apr 11, 2006 at 02:13:21PM -0600, Rodney Rindels wrote:

I have a custom scrip that were trying to get to fire on a Queue Change to
Round Robin the owner assignment.

Description: QueueChangeHCAutoAssign
Condition: On Queue Change
Action: user Defined
Template: Global Template Transaction
Stage: Transaction Complete

Custom Condition: return 1;
Custom Action Preperation Code: return 1;
Custom Action Cleanup Code:
my $QueueName = “HealthCheck/Follow-up”;
return 1 unless $self->TicketObj->QueueObj->Name eq $QueueName;
my %hash = (
‘0’ => ‘user0’,
‘1’ => ‘user1’,
‘2’ => ‘user2’,
‘3’ => ‘user3’,
‘4’ => ‘user4’,
‘5’ => ‘user5’,
‘6’ => ‘user6’,
‘7’ => ‘user7’);

my $user = $hash{int(rand(8))};

$RT::Logger->info(“Auto assigning ticket #”. $self->TicketObj->id ." to user
$user" );

my ($status, $msg) = $self->TicketObj->SetOwner( $user );

unless( $status ) {
$RT::Logger->warning( “Impossible to assign the ticket to $user: $msg” );
return undef;
}

1;

Looking at the log, it seems as if this Global Scrip is never firing? Is
there a problem with the On Queue Change, or Do I have something Borked up
here?

Thanks,

Rodney


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

We’re hiring! Come hack Perl for Best Practical: http://bestpractical.com/about/jobs.html

Maybe “return 1 unless” should be “return 1 if”?

-Todd

Tried both ways, seems as if the scrip never fires even…Like it can’t
detect on “On Change Queue”

Thanks Anyway :slight_smile:
Rodney

Tried both ways, seems as if the scrip never fires even…Like it can’t
detect on “On Change Queue”

try the following :slight_smile:

Custom Action Cleanup Code:

my $QueueName = “HealthCheck/Follow-up”;
$RT::Logger->info("scrip fired with queue name: ".$self->blabla->Name);

Custom Action Cleanup Code:

my $QueueName = “HealthCheck/Follow-up”;
$RT::Logger->info("scrip fired with queue name: ".$self->blabla->Name);

Nope, never fires…ug. I dont get it…

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Today, we upgraded our perl to a new version (from 5.8.6 to 5.8.8). We
then rebuilt RT (3.4.2). RT still works, except for the following:

(1) Every time we access an RT web page, these messages appear in the
httpd-error.log:

FastCGI: server "/usr/local/rt3/bin/mason_handler.fcgi" stderr: Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Resolver/File.pm line 51.

FastCGI: server "/usr/local/rt3/bin/mason_handler.fcgi" stderr: Use of uninitialized value in length at /usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Resolver/File.pm line 52.

(2) The BrandedQueues extension that was running before is not being
picked up by RT. I tried reinstalling it, but am told it already exists,
so the install doesn’t seem to complete cleanly. When I try to uninstall
it (make uninstall), I’m told that the ‘uninstall’ target is deprecated
and to delete the two perl module files manually. I did that, but
reinstalling behaves the same way and RT is not picking up the Extension.

Any ideas?

Thanks.

Mike

Mike Friedman System and Network Security
mikef@ack.Berkeley.EDU 2484 Shattuck Avenue
1-510-642-1410 University of California at Berkeley
http://ack.Berkeley.EDU/~mikef http://security.berkeley.edu

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBRDx8Uq0bf1iNr4mCEQJY7wCg7K8DRf3/lZfy0m3ieLZiclNS9RUAoNgQ
uZs8i+InK0r02QXLjWG95+um
=rzim
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

OK, I’m still having a problem getting RT::Extension::BrandedQueues to
work, even though it was working before.

All the pieces seem to be installed in the right places. And
QueueObj->Tag is recognized by my scripts. But when I go to the web page
to configure a queue, the place where you’re supposed to enter the queue
brand value is not there.

I looked at the modules installed by the Extension and I can see where the
Callback should be inserting the correct piece of html on that page.
Yet, it’s not happening!

I’ve restarted Apache many times, after cleaning out the Mason cache, with
no luck.

Any suggestions on how I should go about figuring this out? Also, do you
think the following error messages that appear in my httpd-error.log whenever
I do ANY web access on an RT page:

FastCGI: server "/usr/local/rt3/bin/mason_handler.fcgi" stderr: Use of 

uninitialized value in concatenation (.) or string at
/usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Resolver/File.pm line 51.

FastCGI: server "/usr/local/rt3/bin/mason_handler.fcgi" stderr: Use of 

uninitialized value in length at
/usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Resolver/File.pm line 52.

are related to my problem with the Queue Branding extension?

Thanks in advance for any helpful suggestions.

Mike

Mike Friedman System and Network Security
mikef@ack.Berkeley.EDU 2484 Shattuck Avenue
1-510-642-1410 University of California at Berkeley
http://ack.Berkeley.EDU/~mikef http://security.berkeley.edu

  • ---------- Forwarded message ----------Date: Tue, 11 Apr 2006 21:04:28 -0700 (PDT)
    From: Mike Friedman mikef@ack.berkeley.edu
    Subject: [rt-users] RT 3.4.2 problem after upgrading perl

Today, we upgraded our perl to a new version (from 5.8.6 to 5.8.8). We
then rebuilt RT (3.4.2). RT still works, except for the following:

(1) Every time we access an RT web page, these messages appear in the
httpd-error.log:

FastCGI: server "/usr/local/rt3/bin/mason_handler.fcgi" stderr: Use of 

uninitialized value in concatenation (.) or string at
/usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Resolver/File.pm line 51.

FastCGI: server "/usr/local/rt3/bin/mason_handler.fcgi" stderr: Use of 

uninitialized value in length at
/usr/local/lib/perl5/site_perl/5.8.8/HTML/Mason/Resolver/File.pm line 52.

(2) The BrandedQueues extension that was running before is not being
picked up by RT. I tried reinstalling it, but am told it already exists,
so the install doesn’t seem to complete cleanly. When I try to uninstall
it (make uninstall), I’m told that the ‘uninstall’ target is deprecated
and to delete the two perl module files manually. I did that, but
reinstalling behaves the same way and RT is not picking up the Extension.

Any ideas?

Thanks.

Mike

-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8

iQA/AwUBRD3MdK0bf1iNr4mCEQIcywCeKoG96RoRp4y2mf8dhYf9zmC0rnIAn2bL
SnVs+tud/G/FFHM7W1GsbVhM
=1xgY
-----END PGP SIGNATURE-----