Re: [rt-users] Status change scrip action

2008-01-20 Thread Steve Cochran
Well, with the help of the book and the wiki, I have the code to  
change the user back to nobody on a reopened ticket at least trying to  
do what it's supposed to. Unfortunately, it got the following error:


[Mon Jan 21 05:38:47 2008] [error]: Failed changing owner to Nobody on  
ticket reopen: You can only reassign tickets that you own or that are  
unowned ((eval 831):10)


is there some way to force the scrip to reassign the ticket by acting  
as a user with more controls?


Steve


On Jan 21, 2008, at 12:03 AM, Steve Cochran wrote:



I'm trying to write a scrip that runs on a status change. I'm trying  
to change the owner to Nobody if a ticket is reopened, and I have  
the following code in the action prep area:


my $oldStatus = $self->TransactionObj->OldValue;
my $newStatus = $self->TicketObj->status;

if (($oldStatus eq 'resolved') and ($newStatus eq 'open') {
  $self->TicketObj->OwnerObj = RT::Nobody()->id();
}

I've run a couple tests through, but nothing seems to be happening.  
First, what's the best way to debug custom action code? Second, if  
anyone seems what I'm doing wrong, feel free to point it out.


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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


[rt-users] Status change scrip action

2008-01-20 Thread Steve Cochran


I'm trying to write a scrip that runs on a status change. I'm trying  
to change the owner to Nobody if a ticket is reopened, and I have the  
following code in the action prep area:


my $oldStatus = $self->TransactionObj->OldValue;
my $newStatus = $self->TicketObj->status;

if (($oldStatus eq 'resolved') and ($newStatus eq 'open') {
   $self->TicketObj->OwnerObj = RT::Nobody()->id();
}

I've run a couple tests through, but nothing seems to be happening.  
First, what's the best way to debug custom action code? Second, if  
anyone seems what I'm doing wrong, feel free to point it out.


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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] rt-mailgate HTTPS

2008-01-20 Thread Ruslan Zakirov
This output suggest me that you've disabled mason for /NoAuth/... paph.

On Jan 20, 2008 8:06 PM, Roy Sowa <[EMAIL PROTECTED]> wrote:
> Thanks James,
>i have provided the info below, and while still stuggling, I have tried to 
> set things up to use either HTTPS or HTTP
>Ihave that going now, and either one works fine with the GUI.
>Still cannot get an email through .
>That is why you will see one http alias in the list.
>   So I am still working my way backwards...
>Thanks for  your time
>If you need more info just ask ( also this is all new to me so I might not 
> always know how to get what you ask for )
>
> Error from  a bounce;
>
> RT server error.
>
> The RT server which handled your email did not behave as expected. It
> said:
>
> %# BEGIN BPS TAGGED BLOCK {{{
> <%flags>
> inherit => undef # inhibit UTF8 conversion done in /autohandler
> 
> <%ARGS>
> $queue => 1
> $action => "correspond"
> $ticket => undef
> 
> <%init>
> $m->comp('/Elements/Callback', _CallbackName => 'Pre', %ARGS);
> use RT::Interface::Email ();# It's an exporter, but we don't care
> $r->content_type('text/plain; charset=utf-8');
> $m->error_format('text');
> my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway( \%ARGS );
> if ( $status == 1 ) {
>   $m->out('ok');
>   if ( $Ticket->Id ) {
> $m->out( 'Ticket: '  . ($Ticket->Id || '') );
> $m->out( 'Queue: '   . ($Ticket->QueueObj->Name || '') );
> $m->out( 'Owner: '   . ($Ticket->OwnerObj->Name || '') );
> $m->out( 'Status: '  . ($Ticket->Status || '') );
> $m->out( 'Subject: ' . ($Ticket->Subject|| '') );
> $m->out(
>   'Requestor: ' . ($Ticket->Requestors->MemberEmailAddressesAsString || 
> '') );
>   }
> }
> else {
>   $RT::Logger->error( "Could not record email: " . $error );
>   if ( $status == -75 ) {
> $m->out( "temporary failure - " . $error );
>   }
>   else {
> $m->out( 'not ok - ' . $error );
>   }
> }
> $m->abort();
> 
>
> "|/opt/rt3/bin/rt-mailgate --queue 'X' --action correspond --url 
> https://XXX/";... Deferred: prog mailer (/bin/sh) exited with 
> EX_TEMPFAIL
> Warning: message still undelivered after 4 hours
>
> +
> I saw that about the Crypt::SSLeay , so I installed
> Crypt-SSLeay-0.57
> stop started everything this did not help
>
> Aliases:
> Ticket_ELS: "|/opt/rt3/bin/rt-mailgate --queue 'NAME1' --action 
> correspond --url https://xxx/";
> ELS_MSG:"|/opt/rt3/bin/rt-mailgate --queue 'Name2' --action 
> correspond --url https:///";
> Ticket_EHIVE:   "|/opt/rt3/bin/rt-mailgate --queue 'Name3' --action 
> correspond --url http://xx/";
>
>
>
> >>> James Moseley <[EMAIL PROTECTED]> 2008-01-20 11:24 >>>
>
> First of all, what error messages were generated when you tried to send
> email to the RT address via bounced emails or from RT/mail logs?
>
> Secondly, rt-mailgate works just fine with HTTPS only installs - you've got
> to make sure that all your SSL related PERL modules have been installed,
> namely Crypt::SSLeay
>
> Lastly, what do your aliases look like?
>
>
> James Moseley
>
>
>
>
>
>  "Roy Sowa"
>  <[EMAIL PROTECTED]
>  c.gc.ca>   To
>  Sent by:  
>  rt-users-bounces@  cc
>  lists.bestpractic
>  al.comSubject
>[rt-users] rt-mailgate HTTPS
>
>  01/20/2008 08:11
>  AM
>
>
>
>
>
>
>
> I have seen list reference to email tickets not working with HTTPS
> configurations.
> Some indicate that a local http connection must exist for the rt-mailgate
> to work
>
> my current install is 3.6.5 using Lighttpd
>
> Everything is working fine using the GUI.
> but I cannot get emails to open tickets.
> I have verified that I can actually receive smtp mail sent to a user on the
> box.
>
> -  I redirect my http to https
> - my /etc/aliases point to the https url
> -my lighttpd.conf is below;
>
> $SERVER["socket"] == "xx.xx.xx.xx:80" {
> #server.document-root= "/"
> server.document-root= "/opt/rt3/share/html/"
>   url.redirect = (
>  "^/(.*)" => "https://mysite/$1";
>   )
> }
>
>
> $SERVER["socket"] == "xx.xx.xx.xx:443" {
> server.document-root= "/opt/rt3/share/html/"
> url.rewrite = (
>   "^(.*)/Ticket/Attachment/(.*)" => "/$1/Ticket/Attachment/$2/"
> )
>
>
> fastcgi.map-extensions  = ( ".css" => ".html", ".js" => ".html",
> "/" => ".html" )
> ssl.engine = "enable"
> ssl.pemfile = "/etc/lighttpd/ssl/domain.com/server.pem"
> $HTTP["useragent"] =~ ".*MSIE.*" {server.max-keep-alive-requests = 0 }
> }
>
>
> I do not know where best to try and resolve this  ...( web config or
> rt-mailgate )
>
> I would be very grateful if someone cou

[rt-users] Re: Ticket forward,custom field and reporting

2008-01-20 Thread R Wahyudi
Hi All,


I've setup RT ticketing system to track product warranty and complaint
for a small retail business.
So far their response has been very positive and within 2 weeks of
implementing RT we've receive
few positive feedback from customer. Thank you RT !!!

My next task is to setup a reporting system so that we can forward and
provide evidence to the supplier
of faulty items.

Here is what I've setup :

Customer is entering their details via web form :
http://cms.atomik.com.au/fault.
This information then sent via email to gmail account. Every 5 minutes
I have a fetchmail running of crontab to
fetch email from gmail and pass it to RT. I am using RT 3.6.5.

Information sent is in text format, so we can only search for customer
email address and customer name (which get displayed on the subject).

1. Do you guys have any suggestion, example, or pointers on how to
setup RT so it recognize some field (eg phone number or invoice number
)
so that we can search it ?

2. How do I customize the field in : "More about " window.
currently its only showing tickets thats have new or open status. I
want to list 10 of user ticket no matter what the ticket status. How
can I do this ?

3. What is the best way to send a report to manufacturer including the
history of what we did ? Different product comes from different
manufacturer.

Any help or pointer will be much appreciated !!


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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] rt-mailgate HTTPS

2008-01-20 Thread James Moseley
The aliases appear to be correct.  Do you have the following required RT
Mailgate Perl modules installed:

MAILGATE dependencies:
Pod::Usage...found
HTML::TreeBuilder...found
Getopt::Long...found
HTML::FormatText...found
LWP::UserAgent...found

You've also forced Lighty to redirect port 80 requests over to 443.  Why
don't you back out of that and try to get this working via port 80 first
and take SSL out of the mix?

Lastly, I remember from last week this was a new install and you were
switching from Apache to Lighty.  I might be worth your while to get this
working with Apache and then move on to the Lighty.  At least then you know
RT is fine and any errors that crop up are due to the Lighty config or
issues between RT and Lighty.  You've introduced quite a few variables into
the equation...



James Moseley




   
 "Roy Sowa"
 <[EMAIL PROTECTED] 
 c.gc.ca>   To 
   <[EMAIL PROTECTED]> 
 01/20/2008 11:06   cc 
 AM, 
   <[EMAIL PROTECTED] 
   al.com> 
   Subject 
   Re: [rt-users] rt-mailgate HTTPS
   
   
   
   
   
   




Thanks James,
   i have provided the info below, and while still stuggling, I have tried
to set things up to use either HTTPS or HTTP
   Ihave that going now, and either one works fine with the GUI.
   Still cannot get an email through .
   That is why you will see one http alias in the list.
  So I am still working my way backwards...
   Thanks for  your time
   If you need more info just ask ( also this is all new to me so I might
not always know how to get what you ask for )

Error from  a bounce;

RT server error.

The RT server which handled your email did not behave as expected. It
said:

%# BEGIN BPS TAGGED BLOCK {{{
<%flags>
inherit => undef # inhibit UTF8 conversion done in /autohandler

<%ARGS>
$queue => 1
$action => "correspond"
$ticket => undef

<%init>
$m->comp('/Elements/Callback', _CallbackName => 'Pre', %ARGS);
use RT::Interface::Email ();# It's an exporter, but we don't care
$r->content_type('text/plain; charset=utf-8');
$m->error_format('text');
my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway( \%ARGS );
if ( $status == 1 ) {
  $m->out('ok');
  if ( $Ticket->Id ) {
$m->out( 'Ticket: '  . ($Ticket->Id || '') );
$m->out( 'Queue: '   . ($Ticket->QueueObj->Name || '') );
$m->out( 'Owner: '   . ($Ticket->OwnerObj->Name || '') );
$m->out( 'Status: '  . ($Ticket->Status || '') );
$m->out( 'Subject: ' . ($Ticket->Subject|| '') );
$m->out(
  'Requestor: ' . ($Ticket->Requestors->MemberEmailAddressesAsString ||
'') );
  }
}
else {
  $RT::Logger->error( "Could not record email: " . $error );
  if ( $status == -75 ) {
$m->out( "temporary failure - " . $error );
  }
  else {
$m->out( 'not ok - ' . $error );
  }
}
$m->abort();


"|/opt/rt3/bin/rt-mailgate --queue 'X' --action correspond --url
https://XXX/";... Deferred: prog mailer (/bin/sh) exited with
EX_TEMPFAIL
Warning: message still undelivered after 4 hours

+
I saw that about the Crypt::SSLeay , so I installed
Crypt-SSLeay-0.57
stop started everything this did not help

Aliases:
Ticket_ELS: "|/opt/rt3/bin/rt-mailgate --queue 'NAME1' --action
correspond --url https://xxx/";
ELS_MSG:"|/opt/rt3/bin/rt-mailgate --queue 'Name2' --action
correspond --url https:///";
Ticket_EHIVE:   "|/opt/rt3/bin/rt-mailgate --queue 'Name3' --action
correspond --url http://xx/";



>>> James Moseley <[EMAIL PROTECTED]> 2008-01-20 11:24 >>>
First of all, what error messages were generated when you tried to send
email to the RT address via bounced emails or from RT/mail logs?

Secondly, rt-mailgate works just fine with HTTPS only installs - you've got
to make sure that all your SSL related PERL modules have been installed,
namely Crypt::SSLeay

Lastly, what do your aliases look like?


James Moseley





 "Roy Sowa"

Re: [rt-users] rt-mailgate HTTPS

2008-01-20 Thread Roy Sowa
more info...
 I saw this on the list ...
same  scenario ... I am moving to new hardware/versions and trying to do SSL   
so I tried this as well... my error:   Connecting to 
http://x/REST/1.0/NoAuth/mail-gateway at /opt/rt3/bin/rt-mailgate line 
102, <> line 1.

---from
 the list below ( not me)
  
 tried to move our RT installation to a new server (New: Debian Etch. Old: 
Debian Sarge). Copied the DB content and RT_SiteConfig. 
Everything looks fine, but the mailgate does not work. When testing rt-mailgate 
manually I get the error: 

cat mail | /usr/local/rt3/bin/rt-mailgate --debug --queue RT_Test --action 
correspond --url https://rt.ponton.local/ 
Connecting to https://rt.ponton.local//REST/1.0/NoAuth/mail-gateway at 
/usr/local/rt3/bin/rt-mailgate line 100, <> line 1. 
Segmentation fault 


The file mail contains: 
From: foo[at]bar.com 
To: rt[at]ponton 
Subject: Test 

Test 



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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] rt-mailgate HTTPS

2008-01-20 Thread Roy Sowa
Thanks James, 
   i have provided the info below, and while still stuggling, I have tried to 
set things up to use either HTTPS or HTTP
   Ihave that going now, and either one works fine with the GUI.
   Still cannot get an email through .
   That is why you will see one http alias in the list.
  So I am still working my way backwards...
   Thanks for  your time
   If you need more info just ask ( also this is all new to me so I might not 
always know how to get what you ask for )
   
Error from  a bounce; 

RT server error.

The RT server which handled your email did not behave as expected. It
said:

%# BEGIN BPS TAGGED BLOCK {{{
<%flags>
inherit => undef # inhibit UTF8 conversion done in /autohandler

<%ARGS>
$queue => 1
$action => "correspond"
$ticket => undef

<%init>
$m->comp('/Elements/Callback', _CallbackName => 'Pre', %ARGS);
use RT::Interface::Email ();# It's an exporter, but we don't care
$r->content_type('text/plain; charset=utf-8');
$m->error_format('text');
my ( $status, $error, $Ticket ) = RT::Interface::Email::Gateway( \%ARGS );
if ( $status == 1 ) {
  $m->out('ok');
  if ( $Ticket->Id ) {
$m->out( 'Ticket: '  . ($Ticket->Id || '') );
$m->out( 'Queue: '   . ($Ticket->QueueObj->Name || '') );
$m->out( 'Owner: '   . ($Ticket->OwnerObj->Name || '') );
$m->out( 'Status: '  . ($Ticket->Status || '') );
$m->out( 'Subject: ' . ($Ticket->Subject|| '') );
$m->out(
  'Requestor: ' . ($Ticket->Requestors->MemberEmailAddressesAsString || '') 
);
  }
}
else {
  $RT::Logger->error( "Could not record email: " . $error );
  if ( $status == -75 ) {
$m->out( "temporary failure - " . $error );
  }
  else {
$m->out( 'not ok - ' . $error );
  }
}
$m->abort();


"|/opt/rt3/bin/rt-mailgate --queue 'X' --action correspond --url 
https://XXX/";... Deferred: prog mailer (/bin/sh) exited with EX_TEMPFAIL
Warning: message still undelivered after 4 hours

+
I saw that about the Crypt::SSLeay , so I installed 
Crypt-SSLeay-0.57 
stop started everything this did not help 

Aliases:
Ticket_ELS: "|/opt/rt3/bin/rt-mailgate --queue 'NAME1' --action correspond 
--url https://xxx/"; 
ELS_MSG:"|/opt/rt3/bin/rt-mailgate --queue 'Name2' --action correspond 
--url https:///"; 
Ticket_EHIVE:   "|/opt/rt3/bin/rt-mailgate --queue 'Name3' --action correspond 
--url http://xx/"; 



>>> James Moseley <[EMAIL PROTECTED]> 2008-01-20 11:24 >>>
First of all, what error messages were generated when you tried to send
email to the RT address via bounced emails or from RT/mail logs?

Secondly, rt-mailgate works just fine with HTTPS only installs - you've got
to make sure that all your SSL related PERL modules have been installed,
namely Crypt::SSLeay

Lastly, what do your aliases look like?


James Moseley




   
 "Roy Sowa"
 <[EMAIL PROTECTED] 
 c.gc.ca>   To 
 Sent by:
 rt-users-bounces@  cc 
 lists.bestpractic 
 al.comSubject 
   [rt-users] rt-mailgate HTTPS
   
 01/20/2008 08:11  
 AM
   
   
   




I have seen list reference to email tickets not working with HTTPS
configurations.
Some indicate that a local http connection must exist for the rt-mailgate
to work

my current install is 3.6.5 using Lighttpd

Everything is working fine using the GUI.
but I cannot get emails to open tickets.
I have verified that I can actually receive smtp mail sent to a user on the
box.

-  I redirect my http to https
- my /etc/aliases point to the https url
-my lighttpd.conf is below;

$SERVER["socket"] == "xx.xx.xx.xx:80" {
#server.document-root= "/"
server.document-root= "/opt/rt3/share/html/"
  url.redirect = (
 "^/(.*)" => "https://mysite/$1";
  )
}


$SERVER["socket"] == "xx.xx.xx.xx:443" {
server.document-root= "/opt/rt3/share/html/"
url.rewrite = (
  "^(.*)/Ticket/Attachment/(.*)" => "/$1/Ticket/Attachment/$2/"
)


fastcgi.map-extensions  = ( ".css" => ".html", ".js" => ".html",
"/" => ".html" )
ssl.engine = "enable"
ssl.pemfile = "/etc/

Re: [rt-users] rt-mailgate HTTPS

2008-01-20 Thread James Moseley
First of all, what error messages were generated when you tried to send
email to the RT address via bounced emails or from RT/mail logs?

Secondly, rt-mailgate works just fine with HTTPS only installs - you've got
to make sure that all your SSL related PERL modules have been installed,
namely Crypt::SSLeay

Lastly, what do your aliases look like?


James Moseley




   
 "Roy Sowa"
 <[EMAIL PROTECTED] 
 c.gc.ca>   To 
 Sent by:
 rt-users-bounces@  cc 
 lists.bestpractic 
 al.comSubject 
   [rt-users] rt-mailgate HTTPS
   
 01/20/2008 08:11  
 AM
   
   
   




I have seen list reference to email tickets not working with HTTPS
configurations.
Some indicate that a local http connection must exist for the rt-mailgate
to work

my current install is 3.6.5 using Lighttpd

Everything is working fine using the GUI.
but I cannot get emails to open tickets.
I have verified that I can actually receive smtp mail sent to a user on the
box.

-  I redirect my http to https
- my /etc/aliases point to the https url
-my lighttpd.conf is below;

$SERVER["socket"] == "xx.xx.xx.xx:80" {
#server.document-root= "/"
server.document-root= "/opt/rt3/share/html/"
  url.redirect = (
 "^/(.*)" => "https://mysite/$1";
  )
}


$SERVER["socket"] == "xx.xx.xx.xx:443" {
server.document-root= "/opt/rt3/share/html/"
url.rewrite = (
  "^(.*)/Ticket/Attachment/(.*)" => "/$1/Ticket/Attachment/$2/"
)


fastcgi.map-extensions  = ( ".css" => ".html", ".js" => ".html",
"/" => ".html" )
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/domain.com/server.pem"
$HTTP["useragent"] =~ ".*MSIE.*" {server.max-keep-alive-requests = 0 }
}


I do not know where best to try and resolve this  ...( web config or
rt-mailgate )

I would be very grateful if someone could point me in the right direction
on what or where to go from here.

Thanks
Roy








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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


[rt-users] rt-mailgate HTTPS

2008-01-20 Thread Roy Sowa
I have seen list reference to email tickets not working with HTTPS 
configurations.
Some indicate that a local http connection must exist for the rt-mailgate to 
work

my current install is 3.6.5 using Lighttpd

Everything is working fine using the GUI.
but I cannot get emails to open tickets.
I have verified that I can actually receive smtp mail sent to a user on the box.

-  I redirect my http to https  
- my /etc/aliases point to the https url
-my lighttpd.conf is below;

$SERVER["socket"] == "xx.xx.xx.xx:80" {
#server.document-root= "/"
server.document-root= "/opt/rt3/share/html/"
  url.redirect = (
 "^/(.*)" => "https://mysite/$1";
  )
}


$SERVER["socket"] == "xx.xx.xx.xx:443" {
server.document-root= "/opt/rt3/share/html/"
url.rewrite = (
  "^(.*)/Ticket/Attachment/(.*)" => "/$1/Ticket/Attachment/$2/"
)


fastcgi.map-extensions  = ( ".css" => ".html", ".js" => ".html", "/" => 
".html" )
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/domain.com/server.pem"
$HTTP["useragent"] =~ ".*MSIE.*" {server.max-keep-alive-requests = 0 }
}


I do not know where best to try and resolve this  ...( web config or 
rt-mailgate )

I would be very grateful if someone could point me in the right direction on 
what or where to go from here.

Thanks
Roy








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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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