Re: [rt-users] RTx::BecomeUser extension working in RT4?

2011-11-10 Thread Allen Lee
 Would be interested to know if you make any progress with this one -
 BecomeUser was a useful debugging tool in 3.xx

I got it working today and submitted it back to the CPAN maintainer. I
will give the code to anyone who asks but maybe you want to wait first
to see if he packages it up for us properly.

What I did was install the latest 1.10_2 version of the extension that
worked fine for RT3.8, and then just hacked the files under the local
plugin directory in a running instance of RT4 until it was working
again.

Allen

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Barcelona, Spain  November 28  29, 2011


Re: [rt-users] Contributed script: A time worked reporting tool

2009-08-21 Thread Allen Lee
$ perl -e 'use lib /usr/share/request-tracker3.8/lib; use
RT::Transaction; print $RT::VERSION'
3.8.4

I think you are right that the warning is due to comparing string
against what is in the DB as NULL.

This fixed it for me:

Line 273:

- if (($tr-TimeTaken != 0) || ($tr-Field eq 'TimeWorked')) {
+ if (($tr-TimeTaken != 0) || ($tr-Field  $tr-Field eq 'TimeWorked')) {


Thank you again!


Allen Lee
Crystalfontz America, Incorporated
12412 East Saltese Avenue
Spokane Valley, WA 99216-0357
Twitter @Crystalfontz al...@crystalfontz.com http://www.crystalfontz.com
voice (509) 892-1200 fax (509) 892-1203 US toll-free (888) 206-9720



On Fri, Aug 21, 2009 at 1:09 PM, Fran Fabriziof...@cis.uab.edu wrote:

 Ok so it is complaining about an uninitialized value in the eq comparison
 $tr-Field eq TimeWorked.  Some transactions have NULL in the Field field
 in the database.  The question is when there is NULL in the database, what
 does RT::Transaction object return?  Maybe it's trying undef eq TimeWorked
 and throwing the warning.  The question is, why don't I see those?  What
 version of RT.pm are you using?

 What does:

  perl -e 'use lib /usr/local/rt/lib; use RT::Transaction; print
 $RT::VERSION'

 show?  (Of course, updating the /usr/local/rt/lib path).

 Maybe (off the wall, but) an older version of the RT::Transaction
 returns undef when NULL is read from the database, but the one I am using
 (3.8.2) returns '' or something?

 Allen Lee wrote:

 Hi,

 The script still worked fine.

 It looked like it was throwing that warning for every iteration of the
 loop. Below, it finds 1 tickets with Time Worked filled in, but more
 than 24 warnings are thrown:

 # rt-timeworked.pl --startdate 2009-08-15 --enddate 2009-08-22 --queues
 testy
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273)
 [Fri Aug 21 19:54:28 2009] [warning]: Use of uninitialized value in
 string eq at /usr/sbin/rt-timeworked.pl line 273.
 (/usr/sbin/rt-timeworked.pl:273

Re: [rt-users] RT Email config for Google Apps

2009-05-01 Thread Allen Lee
   1. RT Email config for Google Apps (Vincent Beau)

You could use Google Apps to create a mailbox (like rt) on Google's
servers. Then the RT's email address would be r...@yourdomain. Then
login to that mailbox on G-Apps and create some filters so that mail
sent to different queues would be labelled differently. If you have a
support queue, for example, set a filter at Google so that all mail
sent to rt+supp...@yourdomain will have the actions Skip Inbox and
Label : Support. Mail sent to rt+support-comm...@yourdomain will
have the actions Skip Inbox and Label : Support-Comment.

Then go into the Settings of the rt user's G-Apps account and enable
IMAP service.

Then run fetchmail as a daemon on your linux server where RT is
installed. Your /etc/fetchmailrc file might look like this:

set daemon 60
set invisible
set no bouncemail
set no syslog
set logfile /var/log/fetchmail

poll imap.gmail.com
proto IMAP service 993 user r...@yourdomain pass YOURPASSWORD
folder Support ssl
mda /usr/bin/rt-mailgate --url http://YOUR-RT-URL/rt --queue
Support --action correspond

poll imap.gmail.com
proto IMAP service 993 user r...@youdomain pass YOURPASSWORD
folder Support-Comment ssl
mda /usr/bin/rt-mailgate --url http://YOUR-RT-URL/rt --queue
Support --action comment

You would have a pair of poll config lines like that above for each
Queue. Those lines would be for your Support queue and you replace
the things in ALLCAPS with your appropriate things.

Doing this way lets all the mail pile up at Google, then your RT just
goes and sucks down the appropriate unread messages into each queue
every minute, creating a ticket for each one and leaving the read
messages on the G-Apps servers.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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


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