Re: [rt-users] Show tickets depending on creator and not owner
Hi Fabian, you could simplify you script as you don't need the principal stuff here. The scrip would then look like this: my $scrip = 'Script:AutoAddCreatorAsRequestor'; # Get Current Ticket my $Ticket = $self-TicketObj; # Get Current Ticket ID my $Id = $Ticket-id; # Get E-Mail-Address of creator my $EmailAddr = $self-TransactionObj-CreatorObj-EmailAddress; # Type of watch my $type = 'Requestor'; # Add the creator as a watcher of type $type (requestor) my ($ret, $msg) = $Ticket-AddWatcher(Type = $type, Email = $EmailAddr); # Check if adding was successful if ($ret) { $RT::Logger-info($scrip: New $type watcher added to ticket #$Id: $EmailAddr); } else { $RT::Logger-error($scrip: Failed to add new $type watcher to ticket #$Id: $EmailAddr - $msg); } return 1; But I don't understand why you need this scrip. How do you create your tickets? Email, WebUI, REST? If you create your ticket by email RT will automatic load the creator (From email address) as the requestor. If you create you ticket by WebUI, RT put the email address of the currently logged in user in the requestor field. -Chris Am 04.07.2011 12:02, schrieb Fabian Unfried: my $scrip = 'Script:AutoAddCreatorAsRequestor'; # Get Current Ticket my $Ticket = $self-TicketObj; # Get Current Ticket ID my $Id = $Ticket-id; # Get E-Mail-Address of creator my $EmailAddr = $self-TransactionObj-CreatorObj-EmailAddress; # Get user object of creator my $User = RT::User-new($RT::SystemUser); $User-LoadByEmail($EmailAddr); # Type of watch my $type = 'Requestor'; # Principal of user my $Principal = $User-PrincipalId; # Add the creator as a watcher of type $type (requestor) my ($ret, $msg) = $Ticket-AddWatcher(Type = $type, Email = $EmailAddr, PrincipalId = $Principal,); # Check if adding was successful if ($ret) { $RT::Logger-info($scrip: New $type watcher added to ticket #$Id: $EmailAddr (#$Principal)); } else { $RT::Logger-error($scrip: Failed to add new $type watcher to ticket #$Id: $EmailAddr (#$Principal) - $msg); } return 1; 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] RT error “Couldn't load user ''
Although now I can't set the new user a password, but can make them privileged. The password sections asked for the root users current password and won't let me set one for the normal user! In a standard RT4, there are 3 password fields Current Users's password New Password Retype Password You type your password in the first and then the user's password is typed twice to avoid typos. -kevin pgpu4XMx8n9rq.pgp Description: PGP signature 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Get ticket values at specific time
On Mon, Jul 04, 2011 at 12:50:02AM -0700, bennelli wrote: is there a way to get ticket values at a specific time (from the past)? I want to create a ticket history which depends on the time. You'll need to walk backwards through the Transactions for the ticket. -kevin pgpwPTxtJ1h2M.pgp Description: PGP signature 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] New install of RT4 crashes Internet Explorer 8
On Mon, Jul 04, 2011 at 11:16:55PM +0100, Gavin Henry wrote: On 1 July 2011 17:21, Kevin Falcone falc...@bestpractical.com wrote: On Fri, Jul 01, 2011 at 11:28:42AM +0100, Sean McDaid wrote: Yeah I can't recreate the issue there, perhaps I haven't created a large enough ticket. More likely though it is my configuration or data migration - I had to upgrade from 3.6 - 4.0 in one go. Is there some way to migrate a 3.6 database directly to 4.0 and then simply hook this into a RT 4.0 install? This was done manually which I'm skeptical about. Just read all the instructions in README and docs/UPGRADING-(3.6|3.8|4.0) and make sure you follow all them, there are mysql specific upgrades AND schema and content changes, all of which must be done. issues.bestpractical.com has been upgraded for many many years So it's OK to do this? We're on 3.8.10 and have a new 4.0.1 fresh install and are re-creating all queues/users etc. and leaving behind all tickets. Can we/should upgrade our 3.8.10 instead? Of course it's OK to keep your ticket data. We spent a lot of time working on upgrade scripts and documentation. -kevin pgpMwDpB8aFyj.pgp Description: PGP signature 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] New install of RT4 crashes Internet Explorer 8
On Mon, Jul 04, 2011 at 11:21:28AM +0100, Sean McDaid wrote: Hi, yes zooming also causes the same problem. When I turn off either scripting or CSS the problem disappears. I'm trying to figure out what IE is doing differently than Firefox/Chome. Unfortunately, I'm unable to replicate this with IE8 on issues.bestpractical.com. I can believe that IE has issues with zooming, but without being able to replicate it, it's hard to fix. Can you tell us more about your specific version of IE and windows versions. There are too many variables at play with IE -kevin On Sat, Jul 2, 2011 at 2:11 PM, Christopher Lasater [1]clasa...@taleo.com wrote: Hey Sean, Does zooming make the problem worse or do we have different issues? -Original Message- From: [2]rt-users-boun...@lists.bestpractical.com [mailto:[3]rt-users-boun...@lists.bestpractical.com] On Behalf Of Christopher Lasater Sent: Friday, July 01, 2011 3:20 PM To: [4]rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 It sounds dumb, but I think the issues I related to zooming in. If I have no zoom at 100% everything works fine. The second I try to zoom its freezes and if I am at 115%, which was my default, then it freezes when I get into rt at a glance. I can zoom in and out like crazy in Firefox without experiencing any problems. -Original Message- From: [5]rt-users-boun...@lists.bestpractical.com [mailto:[6]rt-users-boun...@lists.bestpractical.com] On Behalf Of Christopher Lasater Sent: Friday, July 01, 2011 3:04 PM To: [7]rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 Mod_perl2, External Auth to an LDAP server, LDAP Importer. Not sure what else you would be interested in. Problem occurs with or without IE compatibility mode. VirtualHost [8]server.example.com:80 AddDefaultCharset UTF-8 DocumentRoot /opt/rt4/share/html Location / Order allow,deny Allow from all SetHandler perl-script PerlResponseHandler Plack::Handler::Apache2 PerlSetVar psgi_app /opt/rt4/sbin/rt-server /Location Perl use Plack::Handler::Apache2; Plack::Handler::Apache2-preload(/opt/rt4/sbin/rt-server); /Perl /VirtualHost Set( $rtname, '[9]server.example.com'); Set ($WebPath , ); Set ($WebBaseUrl , [10]server.example.com:80); Set ($WebURL , [11]http://server.example.com/;); Set ($WebDomain, [12]server.example.com); Obviosly I changed my servername to [13]server.example.com all FQDN pgpzflmGDkV3f.pgp Description: PGP signature 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Certificate based access instead of username/pw
On 07/04/2011 08:11 AM, Adrian Stel wrote: Hi Thomas, I need help with this ;/ How can I configure Apache to put something to the REMOTE_USER ? Please keep replies to the list, not personal mail. The documentation for Apache is probably a good place to start for how to configure it. Thomas 2011 Training: http://bestpractical.com/services/training.html
[rt-users] Still issues with Nagios Autoclose - Commit dies
Hi all, I'm experimenting with the Nagios Autoclose. It seems I get an abort caused by a null pointer exception. [Tue Jul 5 14:47:02 2011] [info]: Extracted type, category, host, problem_type and problem_severity from subject with values RECOVERY, Service, sambadev2, sambadev2_root and OK (/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:35) [Tue Jul 5 14:47:02 2011] [error]: Scrip Commit 12 died. - Can't call method SetStatus on an undefined value at /opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm line 76. Stack: [/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:76] [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232] [/opt/rt4/sbin/../lib/RT/Scrip.pm:475] [/opt/rt4/sbin/../lib/RT/Scrips.pm:189] [/opt/rt4/sbin/../lib/RT/Transaction.pm:198] [/opt/rt4/sbin/../lib/RT/Record.pm:1450] [/opt/rt4/sbin/../lib/RT/Ticket.pm:669] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1495] [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61] (/opt/rt4/sbin/../lib/RT/Scrip.pm:483) [Tue Jul 5 14:47:02 2011] [info]: Ticket 306 created in queue 'Nagios' by gsollazz (/opt/rt4/sbin/../lib/RT/Ticket.pm:681) What is causing this? I have this as my reg exp: if ( my ( $type, $category, $host, $problem_type, $problem_severity ) = $subject =~ m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+(Service|Host) Alert: ([^/]+)/?(.*)\s+is\s+(\w+)}i ) #m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+alert\s+-\s+(Service|Host): ([^/]+)/?(.*)\s+is\s+(\w+)}i #qr{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+(Service|Host) Alert: ([^/]+)/?(.*)\s+is\s+(\w+)}i { $problem_type ||= ''; $RT::Logger-info( Extracted type, category, host, problem_type and problem_severity from subject with values $type, $category, $host, $problem_type and $problem_severity ); my $tickets = RT::Tickets-new( $self-CurrentUser ); $tickets-LimitQueue( VALUE = $new_ticket-Queue ) unless RT-Config-Get('NagiosSearchAllQueues'); $tickets-LimitSubject( VALUE = $category $host . ( $problem_type ? /$problem_type : '' ), OPERATOR = 'LIKE', ); my @active = RT::Queue-ActiveStatusArray(); for my $active (@active) { $tickets-LimitStatus( VALUE= $active, OPERATOR = '=', ); } However, line 78 is just this: my ( $ret, $msg ) = $merged_ticket-SetStatus($resolved); So I assume somewhat it doesn't manage to merge the tickets. But why does it fail here and not, say, when it calls MergeInto? Thanks to anyone who can help, Giuseppe -- Giuseppe Sollazzo Senior Systems Analyst Computing Services Information Services St. George's, University Of London Cranmer Terrace London SW17 0RE Email: gsoll...@sgul.ac.uk Direct Dial: +44 20 8725 5160 Fax: +44 20 8725 3583 2011 Training: http://bestpractical.com/services/training.html
[rt-users] What RT statistics/metrics do you report on?
Not a technical issue, but I was wondering what RT stats folks report on/review periodically? For 5+ years, our RT reports consisted of exporting to an Excel spreadsheet followed by copy/paste/update of formulas/etc. Mildly time consuming but the larger issues we had were that we were unable to report stats based on a user's Organization and we were unable to get a lot of detail on a per-engineer basis. When we upgraded to RT 4.0, I took the opportunity to add a couple of custom fields and wrote a Perl script to extract and report on various metrics instead of using Excel. This allows us to now report on Division/Site (stored in the Organization field) and get more detail for each support engineer. For example, we report monthly on the following (both overall and per support engineer): Tickets Created Tickets Resolved Hours recorded % of hours recorded (based on business days in month) Average minutes per ticket % Submitted via Phone % Submitted via Email Average days to resolve Resolved Same Day Resolved Next Day Resolved two or more days [A note on the Resolved calculations: I use date::manip to calculate business days instead of calendar days. Eg a ticket comes in at 4:30pm on Friday and is resolved by 9:00am Monday, that's resolved - same day - within 8 business hours. The old Excel reports would show that as resolved in 3 days, which to me wasn't fair.] Ticket count, hours and Avg min/ticket (% and total for each) for - Ticket Type (Issue, Request or Project) - Ticket Category (problem category and topic, eg. Workstation and then within that Application install/fix, hardware repair/upgrade, OS fix/rebuild, etc) - Division Then, Top Five by both ticket count and time recorded: - Category / Topic - Site One small issue is that ticket time is only allocated to the Owner of the ticket. So, if someone records 2 hours of time on a ticket they don't own, they don't get credit for it. But, in our group that's a fairly small occurrence. Also time recorded is only reported on tickets that were Resolved the previous month. So, if an engineer logged 40 hours on a ticket but didn't resolve it yet, that time doesn't show up until the next month (or whenever they resolve the ticket). I'd rather see actual time recorded in a month but, again, not yet worth the effort to adjust the report, especially since the time shows up sooner or later. One stat I'd like to add soon is Average Minutes per User (per Site). For example, if we have Site A with 50 users and Site B with 5 users and both have 10 hours of time, that might not stand out in the Top Five but would in Minutes/User, prompting me to wonder and research why we spend 10x more support for the smaller site etc. I realize with RT's infinite flexibility, there are a great many ways to use it. But, I am curious to see what else anyone might report on? Thanks! Steve 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Still issues with Nagios Autoclose - Commit dies
On Tue, Jul 05, 2011 at 04:07:40PM +0100, Giuseppe Sollazzo wrote: Hi all, I'm experimenting with the Nagios Autoclose. It seems I get an abort caused by a null pointer exception. Giuseppe This appears to be the same error you were seeing 2 weeks ago when sunnavy replied with a comment and possible solution. Have you implemented his code change? -kevin [Tue Jul 5 14:47:02 2011] [info]: Extracted type, category, host, problem_type and problem_severity from subject with values RECOVERY, Service, sambadev2, sambadev2_root and OK (/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:35) [Tue Jul 5 14:47:02 2011] [error]: Scrip Commit 12 died. - Can't call method SetStatus on an undefined value at /opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm line 76. Stack: [/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:76] [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232] [/opt/rt4/sbin/../lib/RT/Scrip.pm:475] [/opt/rt4/sbin/../lib/RT/Scrips.pm:189] [/opt/rt4/sbin/../lib/RT/Transaction.pm:198] [/opt/rt4/sbin/../lib/RT/Record.pm:1450] [/opt/rt4/sbin/../lib/RT/Ticket.pm:669] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1495] [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61] (/opt/rt4/sbin/../lib/RT/Scrip.pm:483) [Tue Jul 5 14:47:02 2011] [info]: Ticket 306 created in queue 'Nagios' by gsollazz (/opt/rt4/sbin/../lib/RT/Ticket.pm:681) What is causing this? I have this as my reg exp: if ( my ( $type, $category, $host, $problem_type, $problem_severity ) = $subject =~ m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+(Service|Host) Alert: ([^/]+)/?(.*)\s+is\s+(\w+)}i ) #m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+alert\s+-\s+(Service|Host): ([^/]+)/?(.*)\s+is\s+(\w+)}i #qr{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+(Service|Host) Alert: ([^/]+)/?(.*)\s+is\s+(\w+)}i { $problem_type ||= ''; $RT::Logger-info( Extracted type, category, host, problem_type and problem_severity from subject with values $type, $category, $host, $problem_type and $problem_severity ); my $tickets = RT::Tickets-new( $self-CurrentUser ); $tickets-LimitQueue( VALUE = $new_ticket-Queue ) unless RT-Config-Get('NagiosSearchAllQueues'); $tickets-LimitSubject( VALUE = $category $host . ( $problem_type ? /$problem_type : '' ), OPERATOR = 'LIKE', ); my @active = RT::Queue-ActiveStatusArray(); for my $active (@active) { $tickets-LimitStatus( VALUE= $active, OPERATOR = '=', ); } However, line 78 is just this: my ( $ret, $msg ) = $merged_ticket-SetStatus($resolved); So I assume somewhat it doesn't manage to merge the tickets. But why does it fail here and not, say, when it calls MergeInto? Thanks to anyone who can help, Giuseppe -- Giuseppe Sollazzo Senior Systems Analyst Computing Services Information Services St. George's, University Of London Cranmer Terrace London SW17 0RE Email: gsoll...@sgul.ac.uk Direct Dial: +44 20 8725 5160 Fax: +44 20 8725 3583 2011 Training: http://bestpractical.com/services/training.html pgp49SkyaloTB.pgp Description: PGP signature 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] New install of RT4 crashes Internet Explorer 8
Unfortunately I experience the problem with my local RT4.0.1 but not the issues.bestpractical.com. So its more than just what version of IE you have. When changing the zoom level I can even get it to lock up before logging in. Do you have any config changes on the apache side for issues.bestpractical.com? mod_perl or fastcgi? IE Version 8.0.7600.16385 both 32 and 64bit version Windows 7 x64 -Original Message- From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kevin Falcone Sent: Tuesday, July 05, 2011 9:24 AM To: rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 On Mon, Jul 04, 2011 at 11:21:28AM +0100, Sean McDaid wrote: Hi, yes zooming also causes the same problem. When I turn off either scripting or CSS the problem disappears. I'm trying to figure out what IE is doing differently than Firefox/Chome. Unfortunately, I'm unable to replicate this with IE8 on issues.bestpractical.com. I can believe that IE has issues with zooming, but without being able to replicate it, it's hard to fix. Can you tell us more about your specific version of IE and windows versions. There are too many variables at play with IE -kevin On Sat, Jul 2, 2011 at 2:11 PM, Christopher Lasater [1]clasa...@taleo.com wrote: Hey Sean, Does zooming make the problem worse or do we have different issues? -Original Message- From: [2]rt-users-boun...@lists.bestpractical.com [mailto:[3]rt-users-boun...@lists.bestpractical.com] On Behalf Of Christopher Lasater Sent: Friday, July 01, 2011 3:20 PM To: [4]rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 It sounds dumb, but I think the issues I related to zooming in. If I have no zoom at 100% everything works fine. The second I try to zoom its freezes and if I am at 115%, which was my default, then it freezes when I get into rt at a glance. I can zoom in and out like crazy in Firefox without experiencing any problems. -Original Message- From: [5]rt-users-boun...@lists.bestpractical.com [mailto:[6]rt-users-boun...@lists.bestpractical.com] On Behalf Of Christopher Lasater Sent: Friday, July 01, 2011 3:04 PM To: [7]rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 Mod_perl2, External Auth to an LDAP server, LDAP Importer. Not sure what else you would be interested in. Problem occurs with or without IE compatibility mode. VirtualHost [8]server.example.com:80 AddDefaultCharset UTF-8 DocumentRoot /opt/rt4/share/html Location / Order allow,deny Allow from all SetHandler perl-script PerlResponseHandler Plack::Handler::Apache2 PerlSetVar psgi_app /opt/rt4/sbin/rt-server /Location Perl use Plack::Handler::Apache2; Plack::Handler::Apache2-preload(/opt/rt4/sbin/rt-server); /Perl /VirtualHost Set( $rtname, '[9]server.example.com'); Set ($WebPath , ); Set ($WebBaseUrl , [10]server.example.com:80); Set ($WebURL , [11]http://server.example.com/;); Set ($WebDomain, [12]server.example.com); Obviosly I changed my servername to [13]server.example.com all FQDN PGP.sig Description: PGP signature 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] What RT statistics/metrics do you report on?
Steve, I believe the Time Worked report offered in the wiki has some of the answers for you. That code pulls up time reported from the TRANSACTION table. So whether or not a ticket is resolved bears doesn't matter, neither does the ticket owner. Anyone who reports time against a ticket creates a record in t he transaction file. Sooo, you might want to look at that code and borrow some of it for your own purposes. Kenn LBNL On Tue, Jul 5, 2011 at 9:07 AM, Hersker, Steve shers...@tngus.com wrote: Not a technical issue, but I was wondering what RT stats folks report on/review periodically? For 5+ years, our RT reports consisted of exporting to an Excel spreadsheet followed by copy/paste/update of formulas/etc. Mildly time consuming but the larger issues we had were that we were unable to report stats based on a user's Organization and we were unable to get a lot of detail on a per-engineer basis. When we upgraded to RT 4.0, I took the opportunity to add a couple of custom fields and wrote a Perl script to extract and report on various metrics instead of using Excel. This allows us to now report on Division/Site (stored in the Organization field) and get more detail for each support engineer. For example, we report monthly on the following (both overall and per support engineer): Tickets Created Tickets Resolved Hours recorded % of hours recorded (based on business days in month) Average minutes per ticket % Submitted via Phone % Submitted via Email Average days to resolve Resolved Same Day Resolved Next Day Resolved two or more days [A note on the Resolved calculations: I use date::manip to calculate business days instead of calendar days. Eg a ticket comes in at 4:30pm on Friday and is resolved by 9:00am Monday, that's resolved - same day - within 8 business hours. The old Excel reports would show that as resolved in 3 days, which to me wasn't fair.] Ticket count, hours and Avg min/ticket (% and total for each) for - Ticket Type (Issue, Request or Project) - Ticket Category (problem category and topic, eg. Workstation and then within that Application install/fix, hardware repair/upgrade, OS fix/rebuild, etc) - Division Then, Top Five by both ticket count and time recorded: - Category / Topic - Site One small issue is that ticket time is only allocated to the Owner of the ticket. So, if someone records 2 hours of time on a ticket they don't own, they don't get credit for it. But, in our group that's a fairly small occurrence. Also time recorded is only reported on tickets that were Resolved the previous month. So, if an engineer logged 40 hours on a ticket but didn't resolve it yet, that time doesn't show up until the next month (or whenever they resolve the ticket). I'd rather see actual time recorded in a month but, again, not yet worth the effort to adjust the report, especially since the time shows up sooner or later. One stat I'd like to add soon is Average Minutes per User (per Site). For example, if we have Site A with 50 users and Site B with 5 users and both have 10 hours of time, that might not stand out in the Top Five but would in Minutes/User, prompting me to wonder and research why we spend 10x more support for the smaller site etc. I realize with RT's infinite flexibility, there are a great many ways to use it. But, I am curious to see what else anyone might report on? Thanks! Steve 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] New install of RT4 crashes Internet Explorer 8
On Tue, Jul 05, 2011 at 12:56:16PM -0400, Christopher Lasater wrote: Unfortunately I experience the problem with my local RT4.0.1 but not the issues.bestpractical.com. So its more than just what version of IE you have. When changing the zoom level I can even get it to lock up before logging in. Do you have any config changes on the apache side for issues.bestpractical.com? mod_perl or fastcgi? We're running a very vanilla mod_fastcgi setup, based on the documentation we ship with RT. IE Version 8.0.7600.16385 both 32 and 64bit version Windows 7 x64 I'm on an older IE8 release, but with WinXP for my IE8 machine. Unfortunately, my Win7 machines are already running IE9 for testing. -kevin -Original Message- From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kevin Falcone Sent: Tuesday, July 05, 2011 9:24 AM To: rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 On Mon, Jul 04, 2011 at 11:21:28AM +0100, Sean McDaid wrote: Hi, yes zooming also causes the same problem. When I turn off either scripting or CSS the problem disappears. I'm trying to figure out what IE is doing differently than Firefox/Chome. Unfortunately, I'm unable to replicate this with IE8 on issues.bestpractical.com. I can believe that IE has issues with zooming, but without being able to replicate it, it's hard to fix. Can you tell us more about your specific version of IE and windows versions. There are too many variables at play with IE -kevin On Sat, Jul 2, 2011 at 2:11 PM, Christopher Lasater [1]clasa...@taleo.com wrote: Hey Sean, Does zooming make the problem worse or do we have different issues? -Original Message- From: [2]rt-users-boun...@lists.bestpractical.com [mailto:[3]rt-users-boun...@lists.bestpractical.com] On Behalf Of Christopher Lasater Sent: Friday, July 01, 2011 3:20 PM To: [4]rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 It sounds dumb, but I think the issues I related to zooming in. If I have no zoom at 100% everything works fine. The second I try to zoom its freezes and if I am at 115%, which was my default, then it freezes when I get into rt at a glance. I can zoom in and out like crazy in Firefox without experiencing any problems. -Original Message- From: [5]rt-users-boun...@lists.bestpractical.com [mailto:[6]rt-users-boun...@lists.bestpractical.com] On Behalf Of Christopher Lasater Sent: Friday, July 01, 2011 3:04 PM To: [7]rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 Mod_perl2, External Auth to an LDAP server, LDAP Importer. Not sure what else you would be interested in. Problem occurs with or without IE compatibility mode. VirtualHost [8]server.example.com:80 AddDefaultCharset UTF-8 DocumentRoot /opt/rt4/share/html Location / Order allow,deny Allow from all SetHandler perl-script PerlResponseHandler Plack::Handler::Apache2 PerlSetVar psgi_app /opt/rt4/sbin/rt-server /Location Perl use Plack::Handler::Apache2; Plack::Handler::Apache2-preload(/opt/rt4/sbin/rt-server); /Perl /VirtualHost Set( $rtname, '[9]server.example.com'); Set ($WebPath , ); Set ($WebBaseUrl , [10]server.example.com:80); Set ($WebURL , [11]http://server.example.com/;); Set ($WebDomain, [12]server.example.com); Obviosly I changed my servername to [13]server.example.com all FQDN -BEGIN PGP SIGNATURE- Version: 10.1.0 (Build 860) iQEVAwUBThNCMHUEnna91A87AQjh5wf/UDuwf+y+PcLFxlPrdOn9jYykKSzjfWKg qJZnBcc7DK+OM/XES0puVrfj5B6pKrOSc50kx22GQez0L8fyTbKxEHUcIzTpIrEK dq8sqgUDBPjSYXSGxDOBxkubvzelEKBdHhYsrVeYTpkNaha+UESd13cImn8ucnzS ywTKHGibrxc6oAk6xj8/IPQCZuaQcQyeGB/jB4M8PJjR93Tn7a/V/Cnyi3blvYHl eQxo9uKnTJPYXGEhtJd623HPWre45dJ9IHwtAMcmen5ik+5QeMVt898bh7kkdAbg eOSPOJkWcalITLChCUYgOqMp7sXqH53m1WaJcHz3nlhuHjZqZy70bw== =OSD3 -END PGP SIGNATURE- 2011 Training: http://bestpractical.com/services/training.html pgpgeO2nZ6d6b.pgp Description: PGP signature 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] New install of RT4 crashes Internet Explorer 8
Sort of unrelated to RT4, but I noticed one of my HR machines with IE8 quit working at http://www.openerp.com/products/hr. It would just crash the page (sit there loading forever, never finish). The page previously worked for them. Sounded similar to the problems I've seen reported here. I installed Chrome to get around the issue, I *assumed* some patch just came out for IE that caused this problem, but hadn't had time to look at the history of IE patches on the affected machine. On Tue, Jul 5, 2011 at 10:32 AM, Kevin Falcone falc...@bestpractical.comwrote: On Tue, Jul 05, 2011 at 12:56:16PM -0400, Christopher Lasater wrote: Unfortunately I experience the problem with my local RT4.0.1 but not the issues.bestpractical.com. So its more than just what version of IE you have. When changing the zoom level I can even get it to lock up before logging in. Do you have any config changes on the apache side for issues.bestpractical.com? mod_perl or fastcgi? We're running a very vanilla mod_fastcgi setup, based on the documentation we ship with RT. IE Version 8.0.7600.16385 both 32 and 64bit version Windows 7 x64 I'm on an older IE8 release, but with WinXP for my IE8 machine. Unfortunately, my Win7 machines are already running IE9 for testing. -kevin -Original Message- From: rt-users-boun...@lists.bestpractical.com [mailto: rt-users-boun...@lists.bestpractical.com] On Behalf Of Kevin Falcone Sent: Tuesday, July 05, 2011 9:24 AM To: rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 On Mon, Jul 04, 2011 at 11:21:28AM +0100, Sean McDaid wrote: Hi, yes zooming also causes the same problem. When I turn off either scripting or CSS the problem disappears. I'm trying to figure out what IE is doing differently than Firefox/Chome. Unfortunately, I'm unable to replicate this with IE8 on issues.bestpractical.com. I can believe that IE has issues with zooming, but without being able to replicate it, it's hard to fix. Can you tell us more about your specific version of IE and windows versions. There are too many variables at play with IE -kevin On Sat, Jul 2, 2011 at 2:11 PM, Christopher Lasater [1] clasa...@taleo.com wrote: Hey Sean, Does zooming make the problem worse or do we have different issues? -Original Message- From: [2]rt-users-boun...@lists.bestpractical.com [mailto:[3]rt-users-boun...@lists.bestpractical.com] On Behalf Of Christopher Lasater Sent: Friday, July 01, 2011 3:20 PM To: [4]rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 It sounds dumb, but I think the issues I related to zooming in. If I have no zoom at 100% everything works fine. The second I try to zoom its freezes and if I am at 115%, which was my default, then it freezes when I get into rt at a glance. I can zoom in and out like crazy in Firefox without experiencing any problems. -Original Message- From: [5]rt-users-boun...@lists.bestpractical.com [mailto:[6]rt-users-boun...@lists.bestpractical.com] On Behalf Of Christopher Lasater Sent: Friday, July 01, 2011 3:04 PM To: [7]rt-users@lists.bestpractical.com Subject: Re: [rt-users] New install of RT4 crashes Internet Explorer 8 Mod_perl2, External Auth to an LDAP server, LDAP Importer. Not sure what else you would be interested in. Problem occurs with or without IE compatibility mode. VirtualHost [8]server.example.com:80 AddDefaultCharset UTF-8 DocumentRoot /opt/rt4/share/html Location / Order allow,deny Allow from all SetHandler perl-script PerlResponseHandler Plack::Handler::Apache2 PerlSetVar psgi_app /opt/rt4/sbin/rt-server /Location Perl use Plack::Handler::Apache2; Plack::Handler::Apache2-preload(/opt/rt4/sbin/rt-server); /Perl /VirtualHost Set( $rtname, '[9]server.example.com'); Set ($WebPath , ); Set ($WebBaseUrl , [10]server.example.com:80); Set ($WebURL , [11]http://server.example.com/;); Set ($WebDomain, [12]server.example.com); Obviosly I changed my servername to [13]server.example.com all FQDN -BEGIN PGP SIGNATURE- Version: 10.1.0 (Build 860) iQEVAwUBThNCMHUEnna91A87AQjh5wf/UDuwf+y+PcLFxlPrdOn9jYykKSzjfWKg qJZnBcc7DK+OM/XES0puVrfj5B6pKrOSc50kx22GQez0L8fyTbKxEHUcIzTpIrEK dq8sqgUDBPjSYXSGxDOBxkubvzelEKBdHhYsrVeYTpkNaha+UESd13cImn8ucnzS ywTKHGibrxc6oAk6xj8/IPQCZuaQcQyeGB/jB4M8PJjR93Tn7a/V/Cnyi3blvYHl eQxo9uKnTJPYXGEhtJd623HPWre45dJ9IHwtAMcmen5ik+5QeMVt898bh7kkdAbg eOSPOJkWcalITLChCUYgOqMp7sXqH53m1WaJcHz3nlhuHjZqZy70bw== =OSD3 -END PGP SIGNATURE-
Re: [rt-users] Faking {$Transaction-Content()}
Mauricio, What is it you want to do? It sounds like you want to put the last correspondence of a ticket into an email/template when the owner of a ticket is changed. Is that right? Technically, there WAS a transaction record created, but since it only involved an owner change, that's the only info on the transaction record. If this is what you want to do, it CAN be done fairly easily with a scrip. What you want to do is pull up the *last comment transaction* entered for that ticket. You can do that IN a template. Hope this helps. Kenn LBNL On Thu, Jun 30, 2011 at 2:59 PM, Mauricio Tavares raubvo...@gmail.comwrote: From what I understand (thanks trs), in an on Owner Change event you cannot rely on using {$Transaction-Content()} to copy the last message/correspondence in a given ticket because no transaction was created. So, how can you fake it in an template? If the content was only a text file, it is not hard to do it, but what happens when you also have attachments? I wrote the following template, { my $thingie = Attachments:; my $Transactions = $Ticket-Transactions; $Transactions-Limit( FIELD = 'Type', VALUE = Correspond ); # $Rt::Logger-debug(Find Transaction); my $TransactionObj = $Transactions-Last; my $AttachmentsObj = RT::Attachments-new($TransactionObj-CurrentUser); $AttachmentsObj-Limit( FIELD = 'TransactionID', VALUE = $TransactionObj-id ); while ( my $a = $AttachmentsObj-Next ) { $thingie .= \nFound an attachment with encoding . $a-ContentType . and ID . $a-id; if ( $a-ContentType eq 'text/plain' || $a-ContentType eq 'text/html'){ $thingie .= \nContent:\n . $a-Content; } elseif ( $a-ContentType eq 'multipart/mixed') { } else { $thingie .= \n . $RT::WebURL ./Ticket/Attachment/. $a-TransactionId ./. $a-id ./. $a-Filename; $thingie .= \n; } } $thingie; } which finds the attachments and put links for the non-text (from http://requesttracker.wikia.com/wiki/AddAttachmentLinksToMail) attachments, but what I really want is, well, emulate {$Transaction-Content()}. Would anyone have any pointers? 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Still issues with Nagios Autoclose - Commit dies
Uhm... apologies to all. I'll head back to the archives, I must have done something weird with the codebase. Kevin Falcone falc...@bestpractical.com wrote: On Tue, Jul 05, 2011 at 04:07:40PM +0100, Giuseppe Sollazzo wrote: Hi all, I'm experimenting with the Nagios Autoclose. It seems I get an abort caused by a null pointer exception. Giuseppe This appears to be the same error you were seeing 2 weeks ago when sunnavy replied with a comment and possible solution. Have you implemented his code change? -kevin [Tue Jul 5 14:47:02 2011] [info]: Extracted type, category, host, problem_type and problem_severity from subject with values RECOVERY, Service, sambadev2, sambadev2_root and OK (/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:35) [Tue Jul 5 14:47:02 2011] [error]: Scrip Commit 12 died. - Can't call method SetStatus on an undefined value at /opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm line 76. Stack: [/opt/rt4/local/plugins/RT-Extension-Nagios/lib/RT/Action/UpdateNagiosTickets.pm:76] [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232] [/opt/rt4/sbin/../lib/RT/Scrip.pm:475] [/opt/rt4/sbin/../lib/RT/Scrips.pm:189] [/opt/rt4/sbin/../lib/RT/Transaction.pm:198] [/opt/rt4/sbin/../lib/RT/Record.pm:1450] [/opt/rt4/sbin/../lib/RT/Ticket.pm:669] [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1495] [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61] (/opt/rt4/sbin/../lib/RT/Scrip.pm:483) [Tue Jul 5 14:47:02 2011] [info]: Ticket 306 created in queue 'Nagios' by gsollazz (/opt/rt4/sbin/../lib/RT/Ticket.pm:681) What is causing this? I have this as my reg exp: if ( my ( $type, $category, $host, $problem_type, $problem_severity ) = $subject =~ m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+(Service|Host) Alert: ([^/]+)/?(.*)\s+is\s+(\w+)}i ) #m{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+alert\s+-\s+(Service|Host): ([^/]+)/?(.*)\s+is\s+(\w+)}i #qr{(PROBLEM|RECOVERY|ACKNOWLEDGEMENT)\s+(Service|Host) Alert: ([^/]+)/?(.*)\s+is\s+(\w+)}i { $problem_type ||= ''; $RT::Logger-info( Extracted type, category, host, problem_type and problem_severity from subject with values $type, $category, $host, $problem_type and $problem_severity ); my $tickets = RT::Tickets-new( $self-CurrentUser ); $tickets-LimitQueue( VALUE = $new_ticket-Queue ) unless RT-Config-Get('NagiosSearchAllQueues'); $tickets-LimitSubject( VALUE = $category $host . ( $problem_type ? /$problem_type : '' ), OPERATOR = 'LIKE', ); my @active = RT::Queue-ActiveStatusArray(); for my $active (@active) { $tickets-LimitStatus( VALUE= $active, OPERATOR = '=', ); } However, line 78 is just this: my ( $ret, $msg ) = $merged_ticket-SetStatus($resolved); So I assume somewhat it doesn't manage to merge the tickets. But why does it fail here and not, say, when it calls MergeInto? Thanks to anyone who can help, Giuseppe -- Giuseppe Sollazzo Senior Systems Analyst Computing Services Information Services St. George's, University Of London Cranmer Terrace London SW17 0RE Email: gsoll...@sgul.ac.uk Direct Dial: +44 20 8725 5160 Fax: +44 20 8725 3583 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html
[rt-users] Autocompletion of requestors - restrict to active users
Is it possible to have the Ajax autocomplete of users only show Privileged users in the autocomplete field? Right now, if I type in smith, it shows all of the Smiths in RT that we've ever had. I want it to just show Smiths that ...can be granted rights. (When a user is no longer active, we uncheck Let this user be granted rights. This still allows the inactive user's name to appear in searches and ticket details. Thanks, Steve 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] What RT statistics/metrics do you report on?
Steve, I believe the Time Worked report offered in the wiki has some of the answers for you. That code pulls up time reported from the TRANSACTION table. So whether or not a ticket is resolved bears doesn't matter, neither does the ticket owner. Anyone who reports time against a ticket creates a record in t he transaction file. Sooo, you might want to look at that code and borrow some of it for your own purposes. Kenn LBNL Thanks, Kenn! I'll take a look at that! Steve 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Faking {$Transaction-Content()}
On Tue, Jul 5, 2011 at 2:31 PM, Kenneth Crocker kfcroc...@lbl.gov wrote: Mauricio, What is it you want to do? It sounds like you want to put the last correspondence of a ticket into an email/template when the owner of a ticket is changed. Is that right? Technically, there WAS a transaction record created, but since it only involved an owner change, that's the only info on the transaction record. If this is what you want to do, it CAN be done fairly easily with a scrip. What you want to do is pull up the last comment transaction entered for that ticket. You can do that IN a template. Well, this what I want do do: If ticket owner changed Send the last correspondence of a ticket into an email/template (as correspondence) to the new ticket owner. When I mean last correspondence I do want to include every attachment (.zip files, jpg, etc) it came with (like what you would get by having RT-Attach-Message: yes), not only the textual content (which is what you would get by doing $Transaction-Content). From what I understand, $Transaction-Content (and RT-Attach-Message: yes) need the last Transaction to be a correspondence type to do their magic. But since the transaction associated with owner changing does not generate a correspondence, I cannot use them as they are. Well, as you pointed out, getting the text part of the last correspondence and creating a correspondence with that as the content is, quite easy. The non-text attachments are causing me problems. In my test script I grabbed only the transactions in that ticket with correspondence in them and am able to see which attachments the last correspondence had. That really does not do me any good but at least made me feel happy that I was able to find the attachments. :) Hope this helps. Kenn LBNL On Thu, Jun 30, 2011 at 2:59 PM, Mauricio Tavares raubvo...@gmail.com wrote: From what I understand (thanks trs), in an on Owner Change event you cannot rely on using {$Transaction-Content()} to copy the last message/correspondence in a given ticket because no transaction was created. So, how can you fake it in an template? If the content was only a text file, it is not hard to do it, but what happens when you also have attachments? I wrote the following template, { my $thingie = Attachments:; my $Transactions = $Ticket-Transactions; $Transactions-Limit( FIELD = 'Type', VALUE = Correspond ); # $Rt::Logger-debug(Find Transaction); my $TransactionObj = $Transactions-Last; my $AttachmentsObj = RT::Attachments-new($TransactionObj-CurrentUser); $AttachmentsObj-Limit( FIELD = 'TransactionID', VALUE = $TransactionObj-id ); while ( my $a = $AttachmentsObj-Next ) { $thingie .= \nFound an attachment with encoding . $a-ContentType . and ID . $a-id; if ( $a-ContentType eq 'text/plain' || $a-ContentType eq 'text/html'){ $thingie .= \nContent:\n . $a-Content; } elseif ( $a-ContentType eq 'multipart/mixed') { } else { $thingie .= \n . $RT::WebURL ./Ticket/Attachment/. $a-TransactionId ./. $a-id ./. $a-Filename; $thingie .= \n ; } } $thingie; } which finds the attachments and put links for the non-text (from http://requesttracker.wikia.com/wiki/AddAttachmentLinksToMail) attachments, but what I really want is, well, emulate {$Transaction-Content()}. Would anyone have any pointers? 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Autocompletion of requestors - restrict to active users
On Tue, Jul 05, 2011 at 03:01:52PM -0400, Hersker, Steve wrote: Is it possible to have the Ajax autocomplete of users only show Privileged users in the autocomplete field? Right now, if I type in smith, it shows all of the Smiths in RT that we've ever had. I want it to just show Smiths that ...can be granted rights. (When a user is no longer active, we uncheck Let this user be granted rights. This still allows the inactive user's name to appear in searches and ticket details. That is not currently a feature of RT4 but would be straightforward to add a user configuration option. -kevin pgpjHOJciReJt.pgp Description: PGP signature 2011 Training: http://bestpractical.com/services/training.html
[rt-users] Upgrade or migrate to RT4?
Hi, I've been following along with user's experience in moving to RT4. In order to see if I wanted to upgrade my RT3.8.4 I've been using at my work place for the last 2 years I installed a fresh virtual machine with a vanilla RT4 install. I like it and would like to use it for production. I would prefer to import the data into RT4 than upgrade the existing 3.8.4. I do nightly mysqldumps of the database and tar up the contents of*/usr/local/share/request-tracker3.8 *, */usr/share/request-tracker3.8* and */etc/request-tracker3.8 * My question is : It possible to run the upgrade scripts on the database and get the data in the new instance (RT4) without actually upgrading my 3.8.4? or do I have to run the upgrade process on my 3.8.4 instance? Maybe I missed it - is there a step by step guide for doing this? Thanks in advance. Paul 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Upgrade or migrate to RT4?
On Tue, Jul 05, 2011 at 01:45:54PM -0700, Paul O'Rorke wrote: Hi, I've been following along with user's experience in moving to RT4. In order to see if I wanted to upgrade my RT3.8.4 I've been using at my work place for the last 2 years I installed a fresh virtual machine with a vanilla RT4 install. I like it and would like to use it for production. I would prefer to import the data into RT4 than upgrade the existing 3.8.4. I do nightly mysqldumps of the database and tar up the contents of /usr/local/share/request-tracker3.8, /usr/share/request-tracker3.8 and /etc/request-tracker3.8 My question is : It possible to run the upgrade scripts on the database and get the data in the new instance (RT4) without actually upgrading my 3.8.4? or do I have to run the upgrade process on my 3.8.4 instance? Maybe I missed it - is there a step by step guide for doing this? Upgrading to RT4 means doing exactly what you want. Import your mysqldump on the fresh VM (into either rt4 or rt3) install RT4 and tell configure where to find your database. RT ships with a lot of documentation about installing and upgrade. You can find it in the README and docs/UPGRADING* -kevin pgpU725Ea0mmo.pgp Description: PGP signature 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Upgrade or migrate to RT4?
On Tue, Jul 5, 2011 at 4:50 PM, Kevin Falcone falc...@bestpractical.com wrote: On Tue, Jul 05, 2011 at 01:45:54PM -0700, Paul O'Rorke wrote: Hi, I've been following along with user's experience in moving to RT4. In order to see if I wanted to upgrade my RT3.8.4 I've been using at my work place for the last 2 years I installed a fresh virtual machine with a vanilla RT4 install. I like it and would like to use it for production. I would prefer to import the data into RT4 than upgrade the existing 3.8.4. I do nightly mysqldumps of the database and tar up the contents of /usr/local/share/request-tracker3.8, /usr/share/request-tracker3.8 and /etc/request-tracker3.8 My question is : It possible to run the upgrade scripts on the database and get the data in the new instance (RT4) without actually upgrading my 3.8.4? or do I have to run the upgrade process on my 3.8.4 instance? Maybe I missed it - is there a step by step guide for doing this? Upgrading to RT4 means doing exactly what you want. Import your mysqldump on the fresh VM (into either rt4 or rt3) install RT4 and tell configure where to find your database. RT ships with a lot of documentation about installing and upgrade. You can find it in the README and docs/UPGRADING* -kevin Kinda butting in, but that is exactly what I did when I went from 3.6.7 to 3.8.7 in Ubuntu: create vm, install RT, take dump, read dump, apply upgrades to the database (using the script provided in 3.8 to do that), adjust config as needed, and run it. I would expect 3.8 to 4 to be the same, but I will have to wait until ubuntu releases RT 4 as a package to do that. ;) 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Faking {$Transaction-Content()}
Mauricio, Who are you sending the email to? Kenn LBNL On Tue, Jul 5, 2011 at 12:35 PM, Mauricio Tavares raubvo...@gmail.comwrote: On Tue, Jul 5, 2011 at 2:31 PM, Kenneth Crocker kfcroc...@lbl.gov wrote: Mauricio, What is it you want to do? It sounds like you want to put the last correspondence of a ticket into an email/template when the owner of a ticket is changed. Is that right? Technically, there WAS a transaction record created, but since it only involved an owner change, that's the only info on the transaction record. If this is what you want to do, it CAN be done fairly easily with a scrip. What you want to do is pull up the last comment transaction entered for that ticket. You can do that IN a template. Well, this what I want do do: If ticket owner changed Send the last correspondence of a ticket into an email/template (as correspondence) to the new ticket owner. When I mean last correspondence I do want to include every attachment (.zip files, jpg, etc) it came with (like what you would get by having RT-Attach-Message: yes), not only the textual content (which is what you would get by doing $Transaction-Content). From what I understand, $Transaction-Content (and RT-Attach-Message: yes) need the last Transaction to be a correspondence type to do their magic. But since the transaction associated with owner changing does not generate a correspondence, I cannot use them as they are. Well, as you pointed out, getting the text part of the last correspondence and creating a correspondence with that as the content is, quite easy. The non-text attachments are causing me problems. In my test script I grabbed only the transactions in that ticket with correspondence in them and am able to see which attachments the last correspondence had. That really does not do me any good but at least made me feel happy that I was able to find the attachments. :) Hope this helps. Kenn LBNL On Thu, Jun 30, 2011 at 2:59 PM, Mauricio Tavares raubvo...@gmail.com wrote: From what I understand (thanks trs), in an on Owner Change event you cannot rely on using {$Transaction-Content()} to copy the last message/correspondence in a given ticket because no transaction was created. So, how can you fake it in an template? If the content was only a text file, it is not hard to do it, but what happens when you also have attachments? I wrote the following template, { my $thingie = Attachments:; my $Transactions = $Ticket-Transactions; $Transactions-Limit( FIELD = 'Type', VALUE = Correspond ); # $Rt::Logger-debug(Find Transaction); my $TransactionObj = $Transactions-Last; my $AttachmentsObj = RT::Attachments-new($TransactionObj-CurrentUser); $AttachmentsObj-Limit( FIELD = 'TransactionID', VALUE = $TransactionObj-id ); while ( my $a = $AttachmentsObj-Next ) { $thingie .= \nFound an attachment with encoding . $a-ContentType . and ID . $a-id; if ( $a-ContentType eq 'text/plain' || $a-ContentType eq 'text/html'){ $thingie .= \nContent:\n . $a-Content; } elseif ( $a-ContentType eq 'multipart/mixed') { } else { $thingie .= \n . $RT::WebURL ./Ticket/Attachment/. $a-TransactionId ./. $a-id ./. $a-Filename; $thingie .= \n; } } $thingie; } which finds the attachments and put links for the non-text (from http://requesttracker.wikia.com/wiki/AddAttachmentLinksToMail) attachments, but what I really want is, well, emulate {$Transaction-Content()}. Would anyone have any pointers? 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Faking {$Transaction-Content()}
On Tue, Jul 5, 2011 at 5:51 PM, Kenneth Crocker kfcroc...@lbl.gov wrote: Mauricio, Who are you sending the email to? The new ticket owner. Kenn LBNL On Tue, Jul 5, 2011 at 12:35 PM, Mauricio Tavares raubvo...@gmail.com wrote: On Tue, Jul 5, 2011 at 2:31 PM, Kenneth Crocker kfcroc...@lbl.gov wrote: Mauricio, What is it you want to do? It sounds like you want to put the last correspondence of a ticket into an email/template when the owner of a ticket is changed. Is that right? Technically, there WAS a transaction record created, but since it only involved an owner change, that's the only info on the transaction record. If this is what you want to do, it CAN be done fairly easily with a scrip. What you want to do is pull up the last comment transaction entered for that ticket. You can do that IN a template. Well, this what I want do do: If ticket owner changed Send the last correspondence of a ticket into an email/template (as correspondence) to the new ticket owner. When I mean last correspondence I do want to include every attachment (.zip files, jpg, etc) it came with (like what you would get by having RT-Attach-Message: yes), not only the textual content (which is what you would get by doing $Transaction-Content). From what I understand, $Transaction-Content (and RT-Attach-Message: yes) need the last Transaction to be a correspondence type to do their magic. But since the transaction associated with owner changing does not generate a correspondence, I cannot use them as they are. Well, as you pointed out, getting the text part of the last correspondence and creating a correspondence with that as the content is, quite easy. The non-text attachments are causing me problems. In my test script I grabbed only the transactions in that ticket with correspondence in them and am able to see which attachments the last correspondence had. That really does not do me any good but at least made me feel happy that I was able to find the attachments. :) Hope this helps. Kenn LBNL On Thu, Jun 30, 2011 at 2:59 PM, Mauricio Tavares raubvo...@gmail.com wrote: From what I understand (thanks trs), in an on Owner Change event you cannot rely on using {$Transaction-Content()} to copy the last message/correspondence in a given ticket because no transaction was created. So, how can you fake it in an template? If the content was only a text file, it is not hard to do it, but what happens when you also have attachments? I wrote the following template, { my $thingie = Attachments:; my $Transactions = $Ticket-Transactions; $Transactions-Limit( FIELD = 'Type', VALUE = Correspond ); # $Rt::Logger-debug(Find Transaction); my $TransactionObj = $Transactions-Last; my $AttachmentsObj = RT::Attachments-new($TransactionObj-CurrentUser); $AttachmentsObj-Limit( FIELD = 'TransactionID', VALUE = $TransactionObj-id ); while ( my $a = $AttachmentsObj-Next ) { $thingie .= \nFound an attachment with encoding . $a-ContentType . and ID . $a-id; if ( $a-ContentType eq 'text/plain' || $a-ContentType eq 'text/html'){ $thingie .= \nContent:\n . $a-Content; } elseif ( $a-ContentType eq 'multipart/mixed') { } else { $thingie .= \n . $RT::WebURL ./Ticket/Attachment/. $a-TransactionId ./. $a-id ./. $a-Filename; $thingie .= \n ; } } $thingie; } which finds the attachments and put links for the non-text (from http://requesttracker.wikia.com/wiki/AddAttachmentLinksToMail) attachments, but what I really want is, well, emulate {$Transaction-Content()}. Would anyone have any pointers? 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html 2011 Training: http://bestpractical.com/services/training.html
Re: [rt-users] Faking {$Transaction-Content()}
Mauricio, Why not just keep it simple and send them an email with some simple ticket info and the ticket id so they can just link to the ticket and see whatever info they need. They are going to need to go into the ticket anyway. Clicking a link to the ticket won't take anymore time than clicking any attachment in the email. AND if the ticket has several attachments (as many of ours do), this simplifies the process a great deal. Just a thought. Kenn On Tue, Jul 5, 2011 at 3:01 PM, Mauricio Tavares raubvo...@gmail.comwrote: On Tue, Jul 5, 2011 at 5:55 PM, Mauricio Tavares raubvo...@gmail.com wrote: On Tue, Jul 5, 2011 at 5:51 PM, Kenneth Crocker kfcroc...@lbl.gov wrote: Mauricio, Who are you sending the email to? The new ticket owner. Something on these lines (not claiming to be proper or correct) is what I am trying to do: { my $Transactions = $Ticket-Transactions; $RT::Logger-debug(Find Transaction); $Transactions-Limit( FIELD = 'Type', VALUE = Correspond ); $Transaction = $Transactions-Last; $RT::Logger-debug(Found Transaction : $Transaction); }To: { $Ticket-OwnerObj-EmailAddress } Subject: { $Ticket-Subject() } RT-Attach-Message: yes But I am not able to feed the $Transaction I want (the one I got above the headers) to RT-Attach-Message. Kenn LBNL On Tue, Jul 5, 2011 at 12:35 PM, Mauricio Tavares raubvo...@gmail.com wrote: On Tue, Jul 5, 2011 at 2:31 PM, Kenneth Crocker kfcroc...@lbl.gov wrote: Mauricio, What is it you want to do? It sounds like you want to put the last correspondence of a ticket into an email/template when the owner of a ticket is changed. Is that right? Technically, there WAS a transaction record created, but since it only involved an owner change, that's the only info on the transaction record. If this is what you want to do, it CAN be done fairly easily with a scrip. What you want to do is pull up the last comment transaction entered for that ticket. You can do that IN a template. Well, this what I want do do: If ticket owner changed Send the last correspondence of a ticket into an email/template (as correspondence) to the new ticket owner. When I mean last correspondence I do want to include every attachment (.zip files, jpg, etc) it came with (like what you would get by having RT-Attach-Message: yes), not only the textual content (which is what you would get by doing $Transaction-Content). From what I understand, $Transaction-Content (and RT-Attach-Message: yes) need the last Transaction to be a correspondence type to do their magic. But since the transaction associated with owner changing does not generate a correspondence, I cannot use them as they are. Well, as you pointed out, getting the text part of the last correspondence and creating a correspondence with that as the content is, quite easy. The non-text attachments are causing me problems. In my test script I grabbed only the transactions in that ticket with correspondence in them and am able to see which attachments the last correspondence had. That really does not do me any good but at least made me feel happy that I was able to find the attachments. :) Hope this helps. Kenn LBNL On Thu, Jun 30, 2011 at 2:59 PM, Mauricio Tavares raubvo...@gmail.com wrote: From what I understand (thanks trs), in an on Owner Change event you cannot rely on using {$Transaction-Content()} to copy the last message/correspondence in a given ticket because no transaction was created. So, how can you fake it in an template? If the content was only a text file, it is not hard to do it, but what happens when you also have attachments? I wrote the following template, { my $thingie = Attachments:; my $Transactions = $Ticket-Transactions; $Transactions-Limit( FIELD = 'Type', VALUE = Correspond ); # $Rt::Logger-debug(Find Transaction); my $TransactionObj = $Transactions-Last; my $AttachmentsObj = RT::Attachments-new($TransactionObj-CurrentUser); $AttachmentsObj-Limit( FIELD = 'TransactionID', VALUE = $TransactionObj-id ); while ( my $a = $AttachmentsObj-Next ) { $thingie .= \nFound an attachment with encoding . $a-ContentType . and ID . $a-id; if ( $a-ContentType eq 'text/plain' || $a-ContentType eq 'text/html'){ $thingie .= \nContent:\n . $a-Content; } elseif ( $a-ContentType eq 'multipart/mixed') { } else { $thingie .= \n . $RT::WebURL ./Ticket/Attachment/. $a-TransactionId ./. $a-id ./. $a-Filename; $thingie .= \n; } } $thingie; } which finds
Re: [rt-users] Faking {$Transaction-Content()}
On Tue, Jul 5, 2011 at 6:25 PM, Kenneth Crocker kfcroc...@lbl.gov wrote: Mauricio, Why not just keep it simple and send them an email with some simple ticket info and the ticket id so they can just link to the ticket and see whatever info they need. They are going to need to go into the ticket anyway. Clicking a link to the ticket won't take anymore time than clicking any attachment in the email. AND if the ticket has several attachments (as many of ours do), this simplifies the process a great deal. I agree; I actually have that working (well the text part of the comment is shown on the ticket and then the non-text attachments are provided as links). Problem is that is what they want is the new ticket owner to get a complete copy of the last ticket correspondence so he can reply to it and it will be sent to the requestor. New owner should not need to go to the RT web interface to do that. And that has turned out to be a bit more challenging than I originally expected. :) Just a thought. Kenn On Tue, Jul 5, 2011 at 3:01 PM, Mauricio Tavares raubvo...@gmail.com wrote: On Tue, Jul 5, 2011 at 5:55 PM, Mauricio Tavares raubvo...@gmail.com wrote: On Tue, Jul 5, 2011 at 5:51 PM, Kenneth Crocker kfcroc...@lbl.gov wrote: Mauricio, Who are you sending the email to? The new ticket owner. Something on these lines (not claiming to be proper or correct) is what I am trying to do: { my $Transactions = $Ticket-Transactions; $RT::Logger-debug(Find Transaction); $Transactions-Limit( FIELD = 'Type', VALUE = Correspond ); $Transaction = $Transactions-Last; $RT::Logger-debug(Found Transaction : $Transaction); }To: { $Ticket-OwnerObj-EmailAddress } Subject: { $Ticket-Subject() } RT-Attach-Message: yes But I am not able to feed the $Transaction I want (the one I got above the headers) to RT-Attach-Message. Kenn LBNL On Tue, Jul 5, 2011 at 12:35 PM, Mauricio Tavares raubvo...@gmail.com wrote: On Tue, Jul 5, 2011 at 2:31 PM, Kenneth Crocker kfcroc...@lbl.gov wrote: Mauricio, What is it you want to do? It sounds like you want to put the last correspondence of a ticket into an email/template when the owner of a ticket is changed. Is that right? Technically, there WAS a transaction record created, but since it only involved an owner change, that's the only info on the transaction record. If this is what you want to do, it CAN be done fairly easily with a scrip. What you want to do is pull up the last comment transaction entered for that ticket. You can do that IN a template. Well, this what I want do do: If ticket owner changed Send the last correspondence of a ticket into an email/template (as correspondence) to the new ticket owner. When I mean last correspondence I do want to include every attachment (.zip files, jpg, etc) it came with (like what you would get by having RT-Attach-Message: yes), not only the textual content (which is what you would get by doing $Transaction-Content). From what I understand, $Transaction-Content (and RT-Attach-Message: yes) need the last Transaction to be a correspondence type to do their magic. But since the transaction associated with owner changing does not generate a correspondence, I cannot use them as they are. Well, as you pointed out, getting the text part of the last correspondence and creating a correspondence with that as the content is, quite easy. The non-text attachments are causing me problems. In my test script I grabbed only the transactions in that ticket with correspondence in them and am able to see which attachments the last correspondence had. That really does not do me any good but at least made me feel happy that I was able to find the attachments. :) Hope this helps. Kenn LBNL On Thu, Jun 30, 2011 at 2:59 PM, Mauricio Tavares raubvo...@gmail.com wrote: From what I understand (thanks trs), in an on Owner Change event you cannot rely on using {$Transaction-Content()} to copy the last message/correspondence in a given ticket because no transaction was created. So, how can you fake it in an template? If the content was only a text file, it is not hard to do it, but what happens when you also have attachments? I wrote the following template, { my $thingie = Attachments:; my $Transactions = $Ticket-Transactions; $Transactions-Limit( FIELD = 'Type', VALUE = Correspond ); # $Rt::Logger-debug(Find Transaction); my $TransactionObj = $Transactions-Last; my $AttachmentsObj = RT::Attachments-new($TransactionObj-CurrentUser); $AttachmentsObj-Limit( FIELD = 'TransactionID', VALUE = $TransactionObj-id ); while
[rt-users] Creating a child ticket in a different queue?
The subject pretty much says it all. We are runing 3.8.10. When you create a child ticket, it is created in the same queue. The ticket creation page doesn't give you the opportunity to select a different queue. It is possible to remove that restriction and creaate a ticket in a different queue? 2011 Training: http://bestpractical.com/services/training.html