[rt-users] Possible to downgrade DB from 3.8 to 3.6?
Hello, I am thinking of migrating an RT instance from a machine running RT 3.8.1 to a machine running 3.6, but I'm not sure if this is even possible? Is it possible to move the MySQL DBs straight across from 3.8 to 3.6 without any issues? If there are any tweaks to be done, are they major? I am trying to use a Redhat machine which only has the official EPEL RT packages which are currently only at 3.6. If I can't move the DBs across, is there perhaps a way I can perform a default install on 3.6, then export / import the old (3.8) data in? Thanks for any insight, Khusro
Re: [rt-users] Retrieving tickets with activities since a give date?
On Sat, Dec 11, 2010 at 11:07:22AM -0700, Thierry Thelliez wrote: I would like to retrieve all the tickets for which activities have happened after a give date (any correspondence, status change,...). Is there a way to do that from the UI? (actually I am interested in the REST interface). Or should some code code be written? Sounds like you want to search on LastUpdated -kevin pgp2Qv2HZLp5A.pgp Description: PGP signature
Re: [rt-users] Changing database connection options?
On Sat, Dec 11, 2010 at 11:40:17PM +0100, hubert depesz lubaczewski wrote: Hi, another question: is there any way to change database connections options from config? I.e. I want to change what's being passed as 4th argument to DBI-connect(). You'd need to patch DBIx::SearchBuilder to provide an option for RT to use and then patch RT to use that option. -kevin Reason for this is pretty simple: I'm using PostgreSQL, and DBD::Pg is choosing by default to use server side prepared statements. I don't like them, and would like to disable them, but I'd prefer not to modify RT source itself, so I was hoping for some way to make it happen from config. To show some example. When $dbh is created like this; $dbh = DBI-connect( 'dbi:Pg:dbname=xxx', 'yy', 'zz' ); DBD::Pg will use server side prepared statements. To disable this feature, one have to either: $dbh-{pg_server_prepare} = 0; or: $dbh = DBI-connect( 'dbi:Pg:dbname=xxx', 'yy', 'zz', { pg_server_prepare = 0 } ); In case you need to know why i want to disable server side prepared statements: 1. http://www.depesz.com/index.php/2008/05/10/prepared-statements-gotcha/ 2. it breaks connection pooling with pgbouncer (and I know I can use different pooling mode, but session pooling is pretty much useless) pgpcT8tVBTr3H.pgp Description: PGP signature
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
On Mon, Dec 13, 2010 at 01:50:44PM +, Khusro Jaleel wrote: I am thinking of migrating an RT instance from a machine running RT 3.8.1 to a machine running 3.6, but I'm not sure if this is even possible? Is it possible to move the MySQL DBs straight across from 3.8 to 3.6 without any issues? If there are any tweaks to be done, are they major? There are some pretty major schema differences, in particular encodings. I can't recommend against this enough. I am trying to use a Redhat machine which only has the official EPEL RT packages which are currently only at 3.6. If I can't move the DBs across, is there perhaps a way I can perform a default install on 3.6, then export / import the old (3.8) data in? Not really -kevin pgpoHwcTUsr7z.pgp Description: PGP signature
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
RedHat is god, ftw! On 12/13/10 10:59, Kevin Falcone wrote: On Mon, Dec 13, 2010 at 01:50:44PM +, Khusro Jaleel wrote: I am thinking of migrating an RT instance from a machine running RT 3.8.1 to a machine running 3.6, but I'm not sure if this is even possible? Is it possible to move the MySQL DBs straight across from 3.8 to 3.6 without any issues? If there are any tweaks to be done, are they major? There are some pretty major schema differences, in particular encodings. I can't recommend against this enough. I am trying to use a Redhat machine which only has the official EPEL RT packages which are currently only at 3.6. If I can't move the DBs across, is there perhaps a way I can perform a default install on 3.6, then export / import the old (3.8) data in? Not really -kevin
Re: [rt-users] associating customFields to QuickCalls?
Dear Kevin, thanks for the advice. I was thinking of using a scrip/template together with QuickCalls, but I'll also check about Quick Create on the mailing list. I'm trying to avoid customizing too heavily for the moment, until we move to a stable and tested situation. Best regards, Giuseppe On 10/12/10 16:58, Kevin Falcone wrote: ck Crea -- 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
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
I don't understand people's desire to use 3rd party RT packages. You're then at the mercy of the packager, and it makes it harder to fix problems and apply upgrades when new RT releases come out. It's better to learn the internals of RT and deal with its idiosyncrasies than to use a package you find somewhere. They're almost always extremely outdated, and require quite a bit of configuration. My RT setup has enough customizations that I keep track of separately that fighting with someone's RPM package would end up costing me far more time that it'd save. Don't get me wrong, I'd *LOVE* *LOVE* *LOVE it if Best Practical official had RPMs available and would use them in a heartbeat, it would make my life easier, and make me a happier person as well as make RT easier to maintain, but 3rd party RPMs are annoying. Don't use them, just install RT per the instructions. 3.8 is such an improvement over 3.6 if anyone made me go back I'd be very cranky about it. On 12/13/10 10:06 AM, Jacob Ritorto wrote: RedHat is god, ftw! On 12/13/10 10:59, Kevin Falcone wrote: On Mon, Dec 13, 2010 at 01:50:44PM +, Khusro Jaleel wrote: I am thinking of migrating an RT instance from a machine running RT 3.8.1 to a machine running 3.6, but I'm not sure if this is even possible? Is it possible to move the MySQL DBs straight across from 3.8 to 3.6 without any issues? If there are any tweaks to be done, are they major? There are some pretty major schema differences, in particular encodings. I can't recommend against this enough. I am trying to use a Redhat machine which only has the official EPEL RT packages which are currently only at 3.6. If I can't move the DBs across, is there perhaps a way I can perform a default install on 3.6, then export / import the old (3.8) data in? Not really -kevin -- John Arends jare...@illinois.edu Network Analyst College of ACES ITCS University of Illinois at Urbana-Champaign
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
On 13/12/2010 16:26, John Arends wrote: I don't understand people's desire to use 3rd party RT packages. You're then at the mercy of the packager, and it makes it harder to fix problems and apply upgrades when new RT releases come out. It's better to learn the internals of RT and deal with its idiosyncrasies than to use a package you find somewhere. They're almost always extremely outdated, and require quite a bit of configuration. My RT setup has enough customizations that I keep track of separately that fighting with someone's RPM package would end up costing me far more time that it'd save. Don't get me wrong, I'd *LOVE* *LOVE* *LOVE it if Best Practical official had RPMs available and would use them in a heartbeat, it would make my life easier, and make me a happier person as well as make RT easier to maintain, but 3rd party RPMs are annoying. Don't use them, just install RT per the instructions. 3.8 is such an improvement over 3.6 if anyone made me go back I'd be very cranky about it. I'm stuck between a rock and a hard place, then. The Redhat people are telling me to *avoid* CPAN like the plague, and most people [1] seem to have accomplished the install on CentOS systems using a combination of packages + CPAN, which is something else that is NOT recommended to do. I wish Best Practical did come up with their own packages, especially for Redhat, it would make things so much easier. [1] - http://requesttracker.wikia.com/wiki/CentOS5InstallPlusSome
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
CPAN makes me cranky, but trying to package all the perl modules as RPMs makes me crankier. It's like wrapping one packaging system around another one, and fighting with both of them. The reality is, every time RHEL updates perl, RT will break. I solve this by having an identical test system. I apply the updates, see what breaks, and then reinstall the perl modules in question using CPAN. Once I figure this out, I do the same process on the production RT system during a maintenance window. It actually works out pretty well now that I am used to this, but it is less than ideal. RHEL is a major platform, and I'd love it if BestPractical supported it in some official way so we don't have these kinds of problems we have to work around. Still, I love RT and praise it to anyone who will listen. On 12/13/10 11:04 AM, Khusro Jaleel wrote: I'm stuck between a rock and a hard place, then. The Redhat people are telling me to *avoid* CPAN like the plague, and most people [1] seem to have accomplished the install on CentOS systems using a combination of packages + CPAN, which is something else that is NOT recommended to do. I wish Best Practical did come up with their own packages, especially for Redhat, it would make things so much easier. [1] - http://requesttracker.wikia.com/wiki/CentOS5InstallPlusSome
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
On Mon, Dec 13, 2010 at 11:43:14AM -0600, John Arends wrote: CPAN makes me cranky, but trying to package all the perl modules as RPMs makes me crankier. It's like wrapping one packaging system around another one, and fighting with both of them. The reality is, every time RHEL updates perl, RT will break. I solve this by having an identical test system. I apply the updates, see what breaks, and then reinstall the perl modules in question using CPAN. Once I figure this out, I do the same process on the production RT system during a maintenance window. It actually works out pretty well now that I am used to this, but it is less than ideal. RHEL is a major platform, and I'd love it if BestPractical supported it in some official way so we don't have these kinds of problems we have to work around. Still, I love RT and praise it to anyone who will listen. On 12/13/10 11:04 AM, Khusro Jaleel wrote: I'm stuck between a rock and a hard place, then. The Redhat people are telling me to *avoid* CPAN like the plague, and most people [1] seem to have accomplished the install on CentOS systems using a combination of packages + CPAN, which is something else that is NOT recommended to do. I wish Best Practical did come up with their own packages, especially for Redhat, it would make things so much easier. [1] - http://requesttracker.wikia.com/wiki/CentOS5InstallPlusSome It is probably better to remove perl from the list of packages that are automatically updated and apply those manually, if they are needed. Cheers, Ken
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
RHEL is a major platform, and I'd love it if BestPractical supported it in some official way so we don't have these kinds of problems we have to work around. I try pretty hard not to push the commercial side of the business on the mailing lists, but BPS _is_ a business and we tend to spend our time on things that are most likely to benefit the folks who keep a roof over our heads and food on the table. We tend to spend the most effort on the things that our customers use and need. The best way to help us have the resources to focus on official RPMs is to buy a support contract. Best, Jesse
Re: [rt-users] notification
So here is the code that I am working with inside my template: Script: Condition: On Create Action: Notify Other Recipients Template: My Notify Stage: TransactionBatch 'My Notify' code --- { my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf = new RT::CustomField($RT::SystemUser); $cf-LoadByName(Queue = $ticket-QueueObj-id,Name = Building); return 0 unless $cf-id; my $cfvalue = $ticket-FirstCustomFieldValue('Building'); my $to_address = ; if ($cfvalue =~ /Sheldon/) { $to_address = sheldonhd; } elsif ($cfvalue =~ /North/) { $to_address = northhd; } elsif ($cfvalue =~ /South/) { $to_address = southhd; } elsif ($cfvalue =~ /Churchill/) { $to_address = churchillhd; } elsif ($cfvalue =~ /Kennedy/) { $to_address = kennedyhd; } elsif ($cfvalue =~ /Kelly/) { $to_address = kellyhd; } elsif ($cfvalue =~ /Computer/) { $to_address = engle; else { $to_address= rubble; } return 1; } To: {$to_addre...@4j.lane.edu} Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- In my debug log, I am not even seeing the script being called that contains this template. If I strip everything above the 'To:' field, the scrip and template gets called but the e-mail is not sent even when I hard code the e-mail address. Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 12:23:28 PM Subject: Re: [rt-users] notification On Fri, Dec 10, 2010 at 12:08:05PM -0800, Kenneth Crocker wrote: Kevin, The template would look like this: Kenn I'm perfectly able to write the scrip and template in question, but since Kurt has a half-working template I was curious what *he* was doing. Involving a CustomField seems like a bit of overkill. -kevin To: {$Ticket-FirstCustomFieldValue('ToOverride')}...@[1]lbl.gov Subject: Request Titled: {$Ticket-Subject} is ready to Migrate! A scrip based on whatever condition would do this: my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf_obj = new RT::CustomField($RT::SystemUser); my $cf_name = ToOverride; if condition is A $my $cf_value = the To address you want for A condition; elsif condition is B $my $cf_value = the To address you want for B condition; and on and on till you're thru. then, set the Custom Field as the last piece of action code: $cf_obj-LoadByName(Name=$cf_name); $RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue( Field=$cf_obj, Value=$cf_value, RecordTransaction=0 ); return 1; Then write a notification scrip to use the new template based on your conditions. Use TransactioBatch for both scrips. Hope this helps. Kenn LBNL On Fri, Dec 10, 2010 at 11:55 AM, Kevin Falcone [2]falc...@bestpractical.com wrote: On Fri, Dec 10, 2010 at 11:07:32AM -0800, Kurt Engle wrote: Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Where in the code is it set. It would really need to be in that template Here is my template code to construct the To: field: To: { $toAddress } Subject: Ticket #{ $Ticket-Id()} {$Ticket-Subject()} A new ticket has been created for you in the HelpDesk Queue. { $RT::WebURL } Ticket/Display.html?id={ $Ticket-Id() } However, I keep getting 'recipient not found'. In debug logging mode, RT will actually dump copies of the email being processed into the logs, which would show you the To: Please note that if To: is your email address and you're the actor on this ticket while testing, you may have told RT not to send you email in that case using $NotifyActor -kevin -- From: Kevin Falcone [3]falc...@bestpractical.com To: [4]rt-us...@lists.bestpractical.com Sent: Friday, December 10, 2010 10:03:04 AM Subject: Re: [rt-users] notification On Fri, Dec 10, 2010 at 09:55:07AM -0800, Kurt Engle wrote: That is correct. But how do I make use of the RT::Action::SendEmail module to send the notification incorporating my To: field. Or is there a better way to send out a custom notification? You use one of the standard Notify actions and a custom template. You don't write any code in the action and you don't call the action directly. -kevin From: Kevin Falcone [5]falc...@bestpractical.com To: [6]rt-us...@lists.bestpractical.com Sent: Friday, December 10, 2010 8:59:25 AM Subject: Re: [rt-users] notification On Thu, Dec 09, 2010 at 11:42:03AM -0800, Kurt Engle wrote: I am
Re: [rt-users] notification
I have removed the blank lines, thank you for that tip. I am sending in the 'ticket' as a user other than myself and I am trying to notify someone other than myself. I am still not seeing the scrip being run. But, if I put the following code in the template: - {my $to_address = username } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- The script that uses this template gets run but I get an error on the recipients. I am trying to create a simple test that will successfully sendout e-mail, then I can start trying to figure out why my code is broken. Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: Kurt Engle en...@4j.lane.edu Sent: Monday, December 13, 2010 11:34:58 AM Subject: Re: [rt-users] notification On Mon, Dec 13, 2010 at 11:15:33AM -0800, Kurt Engle wrote: So here is the code that I am working with inside my template: } To: {$to_addre...@4j.lane.edu} Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- In my debug log, I am not even seeing the script being called that contains this template. If I strip everything above the 'To:' field, the scrip and template gets called but the e-mail is not sent even when I hard code the e-mail address. You can't have blank lines above To: Headers need to be the first lines in the template (after your code) Having blank lines like that means that the To: is going in the body Also, I believe we asked about NotifyActor. If you're testing as yourself and emailing yourself RT will not notify you based on the setting of that variable -kevin
Re: [rt-users] RT Query - how to display last comment
Ruslan, Would this be the correct code: Comment = { title = 'Comment', # last comment attribute = 'Comment', value = sub { return $_[0]-TransObj-Id( $_[0]-id )-Field('Type')-Value('Comment') } }, Thanks. Kenn LBNL On Sun, Dec 12, 2010 at 6:13 AM, Ruslan Zakirov r...@bestpractical.comwrote: Hi, If you mean search results and thier format strings then there is no such column map, but it's possible to add. Look at share/html/Elements/RT__Ticket/ColumnMap. On Sat, Dec 11, 2010 at 1:44 AM, Kenneth Crocker kfcroc...@lbl.gov wrote: To List, Does anyone know how to get the last comment on a ticket to display in a Query? I can get it in a template, but it doesn't seem available in a Query. Kenn LBNL -- Best regards, Ruslan.
Re: [rt-users] notification
On Mon, Dec 13, 2010 at 11:50:53AM -0800, Kurt Engle wrote: I have removed the blank lines, thank you for that tip. I am sending in the 'ticket' as a user other than myself and I am trying to notify someone other than myself. I am still not seeing the scrip being run. But, if I put the following code in the template: - {my $to_address = username } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- The script that uses this template gets run but I get an error on the recipients. I am trying to create a simple test that will successfully sendout e-mail, then I can start trying to figure out why my code is broken. Please include the error pgpvqFqhX0d4X.pgp Description: PGP signature
Re: [rt-users] notification
Kurt, Not sure why you start the scrip with a { and end with one. Just start with the my $trans=. Your code should be in the Prep Action and you should add this at the end of the code you've got: else { $to_address= rubble; ### after the above line, the code should look like this: # copy value of To_Address to Custom Field Whatever you named it my $cf_name = Whatever it is; $cf_obj-LoadByName( Name = $cf_name ); $RT::Logger-debug( Loaded \$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue(Field=$cf_obj, Value=$to_address, RecordTransaction=0); return 1; Then make sure the Cleanup Action ends with a return 1; or the scrip doesn't finish. Also, not sure why you start the scrip with a { and end with one. Just start with the my $trans=. The Template should refer to the value in the CF you created for the To Address, like this: To: {$Ticket-FirstCustomFieldValue('To Address Value')}...@4j.lane.edu Subject: Request Titled: {$Ticket-Subject} is ready to Migrate or whatever That should do it. Kenn LBNL On Mon, Dec 13, 2010 at 11:15 AM, Kurt Engle en...@4j.lane.edu wrote: So here is the code that I am working with inside my template: Script: Condition: On Create Action: Notify Other Recipients Template: My Notify Stage: TransactionBatch 'My Notify' code --- { my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf = new RT::CustomField($RT::SystemUser); $cf-LoadByName(Queue = $ticket-QueueObj-id,Name = Building); return 0 unless $cf-id; my $cfvalue = $ticket-FirstCustomFieldValue('Building'); my $to_address = ; if ($cfvalue =~ /Sheldon/) { $to_address = sheldonhd; } elsif ($cfvalue =~ /North/) { $to_address = northhd; } elsif ($cfvalue =~ /South/) { $to_address = southhd; } elsif ($cfvalue =~ /Churchill/) { $to_address = churchillhd; } elsif ($cfvalue =~ /Kennedy/) { $to_address = kennedyhd; } elsif ($cfvalue =~ /Kelly/) { $to_address = kellyhd; } elsif ($cfvalue =~ /Computer/) { $to_address = engle; else { $to_address= rubble; } return 1; } To: {$to_addre...@4j.lane.edu to_address...@4j.lane.edu} Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- In my debug log, I am not even seeing the script being called that contains this template. If I strip everything above the 'To:' field, the scrip and template gets called but the e-mail is not sent even when I hard code the e-mail address. Kurt Engle -- *From: *Kevin Falcone falc...@bestpractical.com *To: *rt-us...@lists.bestpractical.com *Sent: *Friday, December 10, 2010 12:23:28 PM *Subject: *Re: [rt-users] notification On Fri, Dec 10, 2010 at 12:08:05PM -0800, Kenneth Crocker wrote: Kevin, The template would look like this: Kenn I'm perfectly able to write the scrip and template in question, but since Kurt has a half-working template I was curious what *he* was doing. Involving a CustomField seems like a bit of overkill. -kevin To: {$Ticket-FirstCustomFieldValue('ToOverride')}...@[1]lbl.gov Subject: Request Titled: {$Ticket-Subject} is ready to Migrate! A scrip based on whatever condition would do this: my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf_obj = new RT::CustomField($RT::SystemUser); my $cf_name = ToOverride; if condition is A $my $cf_value = the To address you want for A condition; elsif condition is B $my $cf_value = the To address you want for B condition; and on and on till you're thru. then, set the Custom Field as the last piece of action code: $cf_obj-LoadByName(Name=$cf_name); $RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue( Field=$cf_obj, Value=$cf_value, RecordTransaction=0 ); return 1; Then write a notification scrip to use the new template based on your conditions. Use TransactioBatch for both scrips. Hope this helps. Kenn LBNL On Fri, Dec 10, 2010 at 11:55 AM, Kevin Falcone [2] falc...@bestpractical.com wrote: On Fri, Dec 10, 2010 at 11:07:32AM -0800, Kurt Engle wrote: Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Where in the code is it set. It would really need to be in that template Here is my template code to construct the To: field: To: { $toAddress } Subject: Ticket #{ $Ticket-Id()} {$Ticket-Subject()} A new ticket has been created for you in the HelpDesk Queue. { $RT::WebURL } Ticket/Display.html?id={ $Ticket-Id() }
[rt-users] Possible? Canned replies with attachments for a Customer Service queue
Hello all! I have tried searching, and maybe my understanding is a bit behind when it comes to this, but I am trying to get a site setup for our customer service department. I need to see if RT is a possible solution for us… What I need is to be able to define a number of replies (80-100) that my CS department can choose from. So, for instance, if someone emails in an issue with a product, and we have an internal patch we want them to try, CS can select a canned response that has the attachment already in the email. This cannot be a link to the file to download… we want the actual file attached. I have been looking to see if I could answer this question myself, without luck… Thanks!
Re: [rt-users] Possible? Canned replies with attachments for a Customer Service queue
On Mon, Dec 13, 2010 at 12:20:36PM -0800, Steven Aranaga wrote: What I need is to be able to define a number of replies (80-100) that my CS department can choose from. So, for instance, if someone emails in an issue with a product, and we have an internal patch we want them to try, CS can select a canned response that has the attachment already in the email. This cannot be a link to the file to download we want the actual file attached. No, RTFM does not support this. -kevin pgpIkthFoJgVP.pgp Description: PGP signature
[rt-users] RT Slow to add and remove group members
Our production RT instance (3.6.3 - old, I know) takes a really, really long time to add and remove group members. Our database is MySQL and the CachedGroupMembers table has the index: KEY `CachedGroupMembers3` (`MemberId`,`ImmediateParentId`) What can we do to improve the situation (yes, I would be upgrading if that were possible at the moment)? Would running shrink_cgm_table.pl be a good idea? Thanks! -Todd
Re: [rt-users] Possible? Canned replies with attachments for a Customer Service queue
RTFM doesn't support this but it could be done with some custom code. On Mon, Dec 13, 2010 at 3:20 PM, Steven Aranaga saran...@nolo.com wrote: Hello all! I have tried searching, and maybe my understanding is a bit behind when it comes to this, but I am trying to get a site setup for our customer service department. I need to see if RT is a possible solution for us… What I need is to be able to define a number of replies (80-100) that my CS department can choose from. So, for instance, if someone emails in an issue with a product, and we have an internal patch we want them to try, CS can select a canned response that has the attachment already in the email. This cannot be a link to the file to download… we want the actual file attached. I have been looking to see if I could answer this question myself, without luck… Thanks!
Re: [rt-users] notification
This code was entered in a template not a script. I was trying Kevin's suggestion with doing it all in one go. I figure that if I can capture the CustomField in the template code and test on that value to return my $to_address, then I am pretty much set to create my outgoing e-mail at the same time. Kurt Engle Network Engineer Eugene 4J Schools From: Kenneth Crocker kfcroc...@lbl.gov To: rt-users@lists.bestpractical.com Sent: Monday, December 13, 2010 12:12:50 PM Subject: Re: [rt-users] notification Kurt, Not sure why you start the scrip with a { and end with one. Just start with the my $trans=. Your code should be in the Prep Action and you should add this at the end of the code you've got: else { $to_address= rubble; ### after the above line, the code should look like this: # copy value of To_Address to Custom Field Whatever you named it my $cf_name = Whatever it is; $cf_obj-LoadByName( Name = $cf_name ); $RT::Logger-debug( Loaded \$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue(Field=$cf_obj, Value=$to_address, RecordTransaction=0); return 1; Then make sure the Cleanup Action ends with a return 1; or the scrip doesn't finish. Also, not sure why you start the scrip with a { and end with one. Just start with the my $trans=. The Template should refer to the value in the CF you created for the To Address, like this: To: {$Ticket-FirstCustomFieldValue('To Address Value')}@ 4j.lane.edu Subject: Request Titled: {$Ticket-Subject} is ready to Migrate or whatever That should do it. Kenn LBNL On Mon, Dec 13, 2010 at 11:15 AM, Kurt Engle en...@4j.lane.edu wrote: So here is the code that I am working with inside my template: Script: Condition: On Create Action: Notify Other Recipients Template: My Notify Stage: TransactionBatch 'My Notify' code --- { my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf = new RT::CustomField($RT::SystemUser); $cf-LoadByName(Queue = $ticket-QueueObj-id,Name = Building); return 0 unless $cf-id; my $cfvalue = $ticket-FirstCustomFieldValue('Building'); my $to_address = ; if ($cfvalue =~ /Sheldon/) { $to_address = sheldonhd; } elsif ($cfvalue =~ /North/) { $to_address = northhd; } elsif ($cfvalue =~ /South/) { $to_address = southhd; } elsif ($cfvalue =~ /Churchill/) { $to_address = churchillhd; } elsif ($cfvalue =~ /Kennedy/) { $to_address = kennedyhd; } elsif ($cfvalue =~ /Kelly/) { $to_address = kellyhd; } elsif ($cfvalue =~ /Computer/) { $to_address = engle; else { $to_address= rubble; } return 1; } To: {$ to_addre...@4j.lane.edu } Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- In my debug log, I am not even seeing the script being called that contains this template. If I strip everything above the 'To:' field, the scrip and template gets called but the e-mail is not sent even when I hard code the e-mail address. Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Friday, December 10, 2010 12:23:28 PM Subject: Re: [rt-users] notification On Fri, Dec 10, 2010 at 12:08:05PM -0800, Kenneth Crocker wrote: Kevin, The template would look like this: Kenn I'm perfectly able to write the scrip and template in question, but since Kurt has a half-working template I was curious what *he* was doing. Involving a CustomField seems like a bit of overkill. -kevin To: {$Ticket-FirstCustomFieldValue('ToOverride')}...@[1] lbl.gov Subject: Request Titled: {$Ticket-Subject} is ready to Migrate! A scrip based on whatever condition would do this: my $trans = $self-TransactionObj; my $ticket = $self-TicketObj; my $cf_obj = new RT::CustomField($RT::SystemUser); my $cf_name = ToOverride; if condition is A $my $cf_value = the To address you want for A condition; elsif condition is B $my $cf_value = the To address you want for B condition; and on and on till you're thru. then, set the Custom Field as the last piece of action code: $cf_obj-LoadByName(Name=$cf_name); $RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n ); $ticket-AddCustomFieldValue( Field=$cf_obj, Value=$cf_value, RecordTransaction=0 ); return 1; Then write a notification scrip to use the new template based on your conditions. Use TransactioBatch for both scrips. Hope this helps. Kenn LBNL On Fri, Dec 10, 2010 at 11:55 AM, Kevin Falcone [2] falc...@bestpractical.com wrote: On Fri, Dec 10, 2010 at 11:07:32AM -0800, Kurt Engle wrote: Actually found a nice example of creating a template to send out an e-mail. RTFM However, I am having a bit of a problem constructing the To: field. Basically, I have a varialble '$toAddress' that is set to an e-mail address by some prior code. Where in the code is it set. It
Re: [rt-users] notification
The error that I am getting is: [Mon Dec 13 22:05:45 2010] [info]: rt-3.8.8-18199-1292277945-1004.587-2...@4j.lane.edu #587/7702 - Scrip 26 Email TSS from Template (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:300) [Mon Dec 13 22:05:45 2010] [info]: rt-3.8.8-18199-1292277945-1004.587-2...@4j.lane.edu No recipients found. Not sending. (/opt/rt3/bin/../lib/RT/Interface/Email.pm:352) Here are the details for scrip #26: Condition: On Create Action: Notify Other Recipients Template: My Notify Stage: TransactionBatch The code that generated this error in my template is: { my $to_address = rubble; } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work I really appreciate your help with this. Once I get this solved, RT will provide some much needed customization for our environment. Thanks, Kurt Engle From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Monday, December 13, 2010 12:11:12 PM Subject: Re: [rt-users] notification On Mon, Dec 13, 2010 at 11:50:53AM -0800, Kurt Engle wrote: I have removed the blank lines, thank you for that tip. I am sending in the 'ticket' as a user other than myself and I am trying to notify someone other than myself. I am still not seeing the scrip being run. But, if I put the following code in the template: - {my $to_address = username } To: {$to_addre...@4j.lane.edu Subject: New Ticket #{ $Ticket-Id() } has been created Time to go to work -- The script that uses this template gets run but I get an error on the recipients. I am trying to create a simple test that will successfully sendout e-mail, then I can start trying to figure out why my code is broken. Please include the error
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
CPAN makes me cranky, but trying to package all the perl modules as RPMs makes me crankier. It's like wrapping one packaging system around another one, and fighting with both of them. I've done this quite successfully. I've got RH distributed perl + packages plus those that I've manually packaged for RT to operate correctly living side by side. The reality is, every time RHEL updates perl, RT will break. I solve this by having an identical test system. I apply the updates, see what breaks, and then reinstall the perl modules in question using CPAN. I've not had a RH update break my RT system in over a year, and that was because one of my packages was badly done. You just have to figure out which packages are conflicting badly (CGI, Encode and File::Temp for instance) and make sure it's using vendor_perl instead of site_perl installation locations and sometimes relocate some man pages to avoid conflicts. I am used to this, but it is less than ideal. RHEL is a major platform, and I'd love it if BestPractical supported it in some official way so we don't have these kinds of problems we have to work around. Still, I love RT and praise it to anyone who will listen. Agreed :) Stuart
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
On 13/12/10 9:43 AM, John Arends jare...@illinois.edu wrote: CPAN makes me cranky, but trying to package all the perl modules as RPMs makes me crankier. It's like wrapping one packaging system around another one, and fighting with both of them. This is why I use cpan2rpm every time. The reality is, every time RHEL updates perl, RT will break. I solve this by having an identical test system. I apply the updates, see what breaks, and then reinstall the perl modules in question using CPAN. This ALSO can be avoided, if you know how to package your cpan2rpm packages in site instead of vendor locations. This allows that NONE of the issues that are endemic of RHEL's busted Perl packaging to cause long term headaches for me. Once I figure this out, I do the same process on the production RT system during a maintenance window. It actually works out pretty well now that I am used to this, but it is less than ideal. RHEL is a major platform, and I'd love it if BestPractical supported it in some official way so we don't have these kinds of problems we have to work around. Still, I love RT and praise it to anyone who will listen. On 12/13/10 11:04 AM, Khusro Jaleel wrote: I'm stuck between a rock and a hard place, then. The Redhat people are telling me to *avoid* CPAN like the plague, and most people [1] seem to have accomplished the install on CentOS systems using a combination of packages + CPAN, which is something else that is NOT recommended to do. I wish Best Practical did come up with their own packages, especially for Redhat, it would make things so much easier. [1] - http://requesttracker.wikia.com/wiki/CentOS5InstallPlusSome -- Gary L. Greene, Jr. IT Operations Minerva Networks, Inc. Cell: (650) 704-6633 Office: (408) 240-1239
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
On Dec 13, 2010, at 6:06 PM, Gary Greene wrote: On 13/12/10 9:43 AM, John Arends jare...@illinois.edu wrote: CPAN makes me cranky, but trying to package all the perl modules as RPMs makes me crankier. It's like wrapping one packaging system around another one, and fighting with both of them. This is why I use cpan2rpm every time. The reality is, every time RHEL updates perl, RT will break. I solve this by having an identical test system. I apply the updates, see what breaks, and then reinstall the perl modules in question using CPAN. This ALSO can be avoided, if you know how to package your cpan2rpm packages in site instead of vendor locations. This allows that NONE of the issues that are endemic of RHEL's busted Perl packaging to cause long term headaches for me. Do you know of a guide that explains how to do this?
Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?
I've been working on one for SuSE on the wiki. I'm still a little behind on getting it all done. On 13/12/10 4:14 PM, John Arends jare...@illinois.edu wrote: On Dec 13, 2010, at 6:06 PM, Gary Greene wrote: On 13/12/10 9:43 AM, John Arends jare...@illinois.edu wrote: CPAN makes me cranky, but trying to package all the perl modules as RPMs makes me crankier. It's like wrapping one packaging system around another one, and fighting with both of them. This is why I use cpan2rpm every time. The reality is, every time RHEL updates perl, RT will break. I solve this by having an identical test system. I apply the updates, see what breaks, and then reinstall the perl modules in question using CPAN. This ALSO can be avoided, if you know how to package your cpan2rpm packages in site instead of vendor locations. This allows that NONE of the issues that are endemic of RHEL's busted Perl packaging to cause long term headaches for me. Do you know of a guide that explains how to do this? -- Gary L. Greene, Jr. IT Operations Minerva Networks, Inc. Cell: (650) 704-6633 Office: (408) 240-1239
[rt-users] Exchange tip
Just thought I'd throw this tip out there if you are running Exchange in your environment. I have RT configured on my CentOS 5.5 box, help.domain.com. My /etc/alias file uses h...@help.domain.commailto:h...@help.domain.com for incoming requests into my main helpdesk queue. What I've done with Exchange, that hosts for domain.com, is to create the email h...@domain.commailto:h...@domain.com, and a contact for h...@help.domain.commailto:h...@help.domain.com. The newly created Exchange mailbox, h...@domain.commailto:h...@domain.com forwards to h...@help.domain.commailto:h...@help.domain.com. What this allows me to do is use delivery restrictions on the Exchange account to limit the help desk to authenticated users only, thus blocking outside requests. I know RT has it's own mechanism to do this, but this allows me to open it up easily if I need to, and I can use LDAP authentication alongside local users in RT. __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
Re: [rt-users] RT Slow to add and remove group members
On Tue, Dec 14, 2010 at 12:27 AM, Todd Chapman t...@chaka.net wrote: Our production RT instance (3.6.3 - old, I know) takes a really, really long time to add and remove group members. Our database is MySQL and the CachedGroupMembers table has the index: KEY `CachedGroupMembers3` (`MemberId`,`ImmediateParentId`) I recall that index on Via is relevant for the shredder, so may be it's also relevant for removing a member as it also means dropping records. Without full SQL log it's hard to say. It's better to write a script that adds a user to a group and deletes him right after. Use this script to collect all queries with hi-res timings. All queries required to see queries that are executed many times even if those are quite fast. What can we do to improve the situation (yes, I would be upgrading if that were possible at the moment)? Would running shrink_cgm_table.pl be a good idea? Shrinking would make lookups faster. Let's say 30% faster as table gets ~30% smaller. As far as I know there is no harm in running it on 3.6.x. Thanks! -Todd -- Best regards, Ruslan.
[rt-users] parallel requests from same user hang?
We are running 3.2.1. I am using Firefox 3 (but Safari shows the same issue) with several TABS open to the RT 'Home' page. When I start some operation (show a large ticket, search, update a ticket etc) and it takes a more than a second, and I then go to another TAB and do something else, both sessions will hang for a very long time (the first operation would normally finish in a few seconds. I am remote, so things are slower than across a LAN!). But by virtue of starting any second operation all my active sessions stop responding, sometimes for up to 20 minutes! Other users at the same time seem to have no problems accessing RT. While I know that I can avoid doing this by waiting for one session to finish, sometimes I forge to wait for it to complete, and then I am lost. The admins of the server have been trying to figure this out for a while but cannot find out what could be the cause. Has anyone else seen this or does anyone have a suggestion where to look? thanks