Re: [rt-users] Fw: [rt-devel] Create a CustomField and Apply it Globally [Solved]
Thanks AddToObject solved my Problem ;) From: Kevin Falcone falc...@bestpractical.com To: rt-users@lists.bestpractical.com Sent: Thursday, October 25, 2012 5:28 AM Subject: Re: [rt-users] Fw: [rt-devel] Create a CustomField and Apply it Globally On Wed, Oct 24, 2012 at 05:09:44AM -0700, Red Pantyhose wrote: because I'm unable to understand how to deal with RT::CustomField-ApplyGlobally Check the docs for ApplyGlobally: http://bestpractical.com/rt/docs/latest/RT/CustomField.html#ApplyGlobally It does not apply a custom field globally, it tells you about the CF. I suspect you want http://bestpractical.com/rt/docs/latest/RT/CustomField.html#AddToObject-OBJECT and to look at how share/html/Admin/CustomFields/Objects.html does it -kevin Thanks sincerely, # --- MY CODE ---# my $cf = RT::CustomField-new( RT::SystemUser ); my ( $cf_val, $cf_msg ) = $cf-Create( Name = 'NAME_FROM_DB', TypeComposite = 'Freeform-1', LookupType = 'RT::Queue-RT::Ticket', Description = 'DESCRIPTION_RETRIVED_FROM_DB', Pattern = '', LinkValueTo = '', IncludeContentForValue = '', BasedOn = '', Disabled = 0, ); # Please help me here $cf = RT::CustomField-new( RT::SystemUser ); $cf-Load( Id = $cf_val ); $cf-ApplyGlobally; Final RT training for 2012 in Atlanta, GA - October 23 24 http://bestpractical.com/training We're hiring! http://bestpractical.com/jobs We're hiring! http://bestpractical.com/jobs
[rt-users] Write a Custom Action in rt4 as a Module/package ERROR
Dear rt-users I created the following ActionScrip Module below - the Module is registered. But i get the following Error: Oct 26 14:42:49 rt RT: Scrip Prepare 14 died. - Can't locate object method new via package RT::Action::OpenSystemCustomFields at /usr/share/request-tracker4/lib/RT/ScripAction.pm line 175.#012#012Stack:#012 [/usr/share/request-tracker4/lib/RT/ScripAction.pm:175]#012 [/usr/share/request-tracker4/lib/RT/Scrip.pm:443]#012 [/usr/share/request-tracker4/lib/RT/Scrips.pm:252]#012 [/usr/share/request-tracker4/lib/RT/Transaction.pm:179]#012 [/usr/share/request-tracker4/lib/RT/Record.pm:1459]#012 [/usr/share/request-tracker4/lib/RT/Ticket.pm:676]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:1711]#012 [/usr/share/request-tracker4/html/Ticket/Display.html:128]#012 [/usr/share/request-tracker4/html/Ticket/Create.html:444]#012 [/usr/share/request-tracker4/html/Ticket/autohandler:19]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:568]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:318]#012 [/usr/share/request-tracker4/html/autohandler:53] (/usr/share/request-tracker4/lib/RT/Scrip.pm:451) I'm using rt-4.0.5. What am I doing wrong ? Thanks Sincerely Denis #-OpenSystemCustomFields.init---# # To initialize the OpenSystemCustomFields ActionScrip: # rt-setup-database-4 --action insert --datafile OpenSystemCustomFields.init @ScripActions = ( { Name = 'OpenSystemCustomFields', Description = 'Create CustomFields from data retrieved out of the OpenSystem DB', ExecModule = 'OpenSystemCustomFields', Argument = '' }, ); #-OpenSystemCustomFields.pm---# use strict; use warnings; package RT::Action::OpenSystemCustomFields; #use base qw(RT::Action); #use base qw(RT::Action::Generic); sub Prepare { my $self = shift; return 1; } sub Commit { my $self = shift; return 1; } # ;) 1; We're hiring! http://bestpractical.com/jobs
Re: [rt-users] Write a Custom Action in rt4 as a Module/package ERROR
uncomment this line: #use base qw(RT::Action); Chris Am 26.10.2012 15:02, schrieb Red Pantyhose: Dear rt-users I created the following ActionScrip Module below - the Module is registered. But i get the following Error: Oct 26 14:42:49 rt RT: Scrip Prepare 14 died. - Can't locate object method new via package RT::Action::OpenSystemCustomFields at /usr/share/request-tracker4/lib/RT/ScripAction.pm line 175.#012#012Stack:#012 [/usr/share/request-tracker4/lib/RT/ScripAction.pm:175]#012 [/usr/share/request-tracker4/lib/RT/Scrip.pm:443]#012 [/usr/share/request-tracker4/lib/RT/Scrips.pm:252]#012 [/usr/share/request-tracker4/lib/RT/Transaction.pm:179]#012 [/usr/share/request-tracker4/lib/RT/Record.pm:1459]#012 [/usr/share/request-tracker4/lib/RT/Ticket.pm:676]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:1711]#012 [/usr/share/request-tracker4/html/Ticket/Display.html:128]#012 [/usr/share/request-tracker4/html/Ticket/Create.html:444]#012 [/usr/share/request-tracker4/html/Ticket/autohandler:19]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:568]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:318]#012 [/usr/share/request-tracker4/html/autohandler:53] (/usr/share/request-tracker4/lib/RT/Scrip.pm:451) I'm using rt-4.0.5. What am I doing wrong ? Thanks Sincerely Denis #-OpenSystemCustomFields.init---# # To initialize the OpenSystemCustomFields ActionScrip: # rt-setup-database-4 --action insert --datafile OpenSystemCustomFields.init @ScripActions = ( { Name= 'OpenSystemCustomFields', Description = 'Create CustomFields from data retrieved out of the OpenSystem DB', ExecModule = 'OpenSystemCustomFields', Argument= '' }, ); #-OpenSystemCustomFields.pm---# use strict; use warnings; package RT::Action::OpenSystemCustomFields; #use base qw(RT::Action); #use base qw(RT::Action::Generic); sub Prepare { my $self = shift; return 1; } sub Commit { my $self = shift; return 1; } # ;) 1; We're hiring! http://bestpractical.com/jobs We're hiring! http://bestpractical.com/jobs
Re: [rt-users] Write a Custom Action in rt4 as a Module/package ERROR
Dear Christian Thank you I applied some changes and I get still an error: Oct 26 13:56:15 rt RT: Scrip Prepare 14 died. - Can't locate object method new via package RT::Action::OpenSystemCustomFields at /usr/share/request-tracker4/lib/RT/ScripAction.pm line 175.#012#012Stack:#012 [/usr/share/request-tracker4/lib/RT/ScripAction.pm:175]#012 [/usr/share/request-tracker4/lib/RT/Scrip.pm:443]#012 [/usr/share/request-tracker4/lib/RT/Scrips.pm:252]#012 [/usr/share/request-tracker4/lib/RT/Transaction.pm:179]#012 [/usr/share/request-tracker4/lib/RT/Record.pm:1459]#012 [/usr/share/request-tracker4/lib/RT/Ticket.pm:676]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:1711]#012 [/usr/share/request-tracker4/html/Ticket/Display.html:128]#012 [/usr/share/request-tracker4/html/Ticket/Create.html:444]#012 [/usr/share/request-tracker4/html/Ticket/autohandler:19]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:568]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:318]#012 [/usr/share/request-tracker4/html/autohandler:53] (/usr/share/request-tracker4/lib/RT/Scrip.pm:451) What am I doing wrong ? Do I really need a sub new() ??? Thanks sincerely, Denis #-OpenSystemCustomFields-# package RT::Action::OpenSystemCustomFields; use strict; use warnings; use base qw(RT::Action); our $VERSION = '0.01'; sub Describe { my $self = shift; my $class = ref($self) || $self; return $class will retrive values from the OS database and create dynamic CustomFields.; } sub Prepare { my $self = shift; my $class = ref($self) || $self; return 1; } sub Commit { my $self = shift; my $class = ref($self) || $self; return 1; } RT::Base-_ImportOverlays(); # ;) 1; From: Christian Loos cl...@netcologne.de To: Red Pantyhose redpantyh...@yahoo.com Cc: rt-users@lists.bestpractical.com rt-users@lists.bestpractical.com Sent: Friday, October 26, 2012 3:17 PM Subject: Re: Write a Custom Action in rt4 as a Module/package ERROR uncomment this line: #use base qw(RT::Action); Chris Am 26.10.2012 15:02, schrieb Red Pantyhose: Dear rt-users I created the following ActionScrip Module below - the Module is registered. But i get the following Error: Oct 26 14:42:49 rt RT: Scrip Prepare 14 died. - Can't locate object method new via package RT::Action::OpenSystemCustomFields at /usr/share/request-tracker4/lib/RT/ScripAction.pm line 175.#012#012Stack:#012 [/usr/share/request-tracker4/lib/RT/ScripAction.pm:175]#012 [/usr/share/request-tracker4/lib/RT/Scrip.pm:443]#012 [/usr/share/request-tracker4/lib/RT/Scrips.pm:252]#012 [/usr/share/request-tracker4/lib/RT/Transaction.pm:179]#012 [/usr/share/request-tracker4/lib/RT/Record.pm:1459]#012 [/usr/share/request-tracker4/lib/RT/Ticket.pm:676]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:1711]#012 [/usr/share/request-tracker4/html/Ticket/Display.html:128]#012 [/usr/share/request-tracker4/html/Ticket/Create.html:444]#012 [/usr/share/request-tracker4/html/Ticket/autohandler:19]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:568]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:318]#012 [/usr/share/request-tracker4/html/autohandler:53] (/usr/share/request-tracker4/lib/RT/Scrip.pm:451) I'm using rt-4.0.5. What am I doing wrong ? Thanks Sincerely Denis #-OpenSystemCustomFields.init---# # To initialize the OpenSystemCustomFields ActionScrip: # rt-setup-database-4 --action insert --datafile OpenSystemCustomFields.init @ScripActions = ( { Name = 'OpenSystemCustomFields', Description = 'Create CustomFields from data retrieved out of the OpenSystem DB', ExecModule = 'OpenSystemCustomFields', Argument = '' }, ); #-OpenSystemCustomFields.pm---# use strict; use warnings; package RT::Action::OpenSystemCustomFields; #use base qw(RT::Action); #use base qw(RT::Action::Generic); sub Prepare { my $self = shift; return 1; } sub Commit { my $self = shift; return 1; } # ;) 1; We're hiring! http://bestpractical.com/jobs We're hiring! http://bestpractical.com/jobs
Re: [rt-users] Write a Custom Action in rt4 as a Module/package ERROR
Did you restart RT after making the change? Unless you're in development mode, it won't pick up the changes. You probably need to flush your mason cache as well, just to be safe. On Fri, Oct 26, 2012 at 9:40 AM, Red Pantyhose redpantyh...@yahoo.comwrote: Dear Christian Thank you I applied some changes and I get still an error: Oct 26 13:56:15 rt RT: Scrip Prepare 14 died. - Can't locate object method new via package RT::Action::OpenSystemCustomFields at /usr/share/request-tracker4/lib/RT/ScripAction.pm line 175.#012#012Stack:#012 [/usr/share/request-tracker4/lib/RT/ScripAction.pm:175]#012 [/usr/share/request-tracker4/lib/RT/Scrip.pm:443]#012 [/usr/share/request-tracker4/lib/RT/Scrips.pm:252]#012 [/usr/share/request-tracker4/lib/RT/Transaction.pm:179]#012 [/usr/share/request-tracker4/lib/RT/Record.pm:1459]#012 [/usr/share/request-tracker4/lib/RT/Ticket.pm:676]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:1711]#012 [/usr/share/request-tracker4/html/Ticket/Display.html:128]#012 [/usr/share/request-tracker4/html/Ticket/Create.html:444]#012 [/usr/share/request-tracker4/html/Ticket/autohandler:19]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:568]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:318]#012 [/usr/share/request-tracker4/html/autohandler:53] (/usr/share/request-tracker4/lib/RT/Scrip.pm:451) What am I doing wrong ? Do I really need a sub new() ??? Thanks sincerely, Denis #-OpenSystemCustomFields-# package RT::Action::OpenSystemCustomFields; use strict; use warnings; use base qw(RT::Action); our $VERSION = '0.01'; sub Describe { my $self = shift; my $class = ref($self) || $self; return $class will retrive values from the OS database and create dynamic CustomFields.; } sub Prepare { my $self = shift; my $class = ref($self) || $self; return 1; } sub Commit { my $self = shift; my $class = ref($self) || $self; return 1; } RT::Base-_ImportOverlays(); # ;) 1; -- *From:* Christian Loos cl...@netcologne.de *To:* Red Pantyhose redpantyh...@yahoo.com *Cc:* rt-users@lists.bestpractical.com rt-users@lists.bestpractical.com *Sent:* Friday, October 26, 2012 3:17 PM *Subject:* Re: Write a Custom Action in rt4 as a Module/package ERROR uncomment this line: #use base qw(RT::Action); Chris Am 26.10.2012 15:02, schrieb Red Pantyhose: Dear rt-users I created the following ActionScrip Module below - the Module is registered. But i get the following Error: Oct 26 14:42:49 rt RT: Scrip Prepare 14 died. - Can't locate object method new via package RT::Action::OpenSystemCustomFields at /usr/share/request-tracker4/lib/RT/ScripAction.pm line 175.#012#012Stack:#012 [/usr/share/request-tracker4/lib/RT/ScripAction.pm:175]#012 [/usr/share/request-tracker4/lib/RT/Scrip.pm:443]#012 [/usr/share/request-tracker4/lib/RT/Scrips.pm:252]#012 [/usr/share/request-tracker4/lib/RT/Transaction.pm:179]#012 [/usr/share/request-tracker4/lib/RT/Record.pm:1459]#012 [/usr/share/request-tracker4/lib/RT/Ticket.pm:676]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:1711]#012 [/usr/share/request-tracker4/html/Ticket/Display.html:128]#012 [/usr/share/request-tracker4/html/Ticket/Create.html:444]#012 [/usr/share/request-tracker4/html/Ticket/autohandler:19]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:568]#012 [/usr/share/request-tracker4/lib/RT/Interface/Web.pm:318]#012 [/usr/share/request-tracker4/html/autohandler:53] (/usr/share/request-tracker4/lib/RT/Scrip.pm:451) I'm using rt-4.0.5. What am I doing wrong ? Thanks Sincerely Denis #-OpenSystemCustomFields.init---# # To initialize the OpenSystemCustomFields ActionScrip: # rt-setup-database-4 --action insert --datafile OpenSystemCustomFields.init @ScripActions = ( { Name= 'OpenSystemCustomFields', Description = 'Create CustomFields from data retrieved out of the OpenSystem DB', ExecModule = 'OpenSystemCustomFields', Argument= '' }, ); #-OpenSystemCustomFields.pm---# use strict; use warnings; package RT::Action::OpenSystemCustomFields; #use base qw(RT::Action); #use base qw(RT::Action::Generic); sub Prepare { my $self = shift; return 1; } sub Commit { my $self = shift; return 1; } # ;) 1; We're hiring! http://bestpractical.com/jobs We're hiring! http://bestpractical.com/jobs -- http://www.linkedin.com/in/paultomblin http://careers.stackoverflow.com/ptomblin We're hiring! http://bestpractical.com/jobs
[rt-users] chgrp error during make upgrade
I'm attempting to upgrade RT 4.04 to 4.08 on CentOS 6.3 and running into a permissions problem since my webserver runs under the apache group as opposed to www which is the assumption of the upgrade script. Not a change to the install-sh script from 4.04 I see. Is there a switch I can run make upgrade with to specify the web group? Jim Pollard IT Coordinator Department of Biomedical Engineering University of Texas at Austin i...@bme.utexas.edumailto:i...@bme.utexas.edu 512.789.4345 The intelligent man is capable of overcoming problems and difficulties the wise man would have avoided in the first place. Rabbi Yusef Becher We're hiring! http://bestpractical.com/jobs
Re: [rt-users] chgrp error during make upgrade
On Fri, Oct 26, 2012 at 04:49:57PM +, Pollard, James R wrote: I'm attempting to upgrade RT 4.04 to 4.08 on CentOS 6.3 and running into a permissions problem since my webserver runs under the apache group as opposed to www which is the assumption of the upgrade script. Not a change to the install-sh script from 4.04 I see. Is there a switch I can run make upgrade with to specify the web group? If you look at the top of /opt/rt4/etc/RT_Config.pm you'll see your incants from when you installed which should show you which arguments you gave to ./configure. ./configure --help will list the arguments for changing the users/groups. -kevin pgpNoLY5z5Nxp.pgp Description: PGP signature We're hiring! http://bestpractical.com/jobs
Re: [rt-users] chgrp error during make upgrade
Odd, checking RT_Config.pm shows what I thought which was just straight ./configure with no arguments. More checks show I've never run httpd as anything but apache but the ./configure file from 4.04 release also assumes www. But it worked in my previous install. Here's what I did to get it going now, just for reference in case there are other CentOS users out there. perl -MCPAN -e 'install CPAN' yum install gd gd-devel service httpd stop ./configure --with-web-group=apache make upgrade make upgrade-database The upgrade changed permissions on /opt/rt4/var/mason_data/obj so I ended up having to run chown -R apache:apache /opt/rt4/var/mason_data/obj to fix that, then rm -fr /opt/rt4/var/mason_data/obj and service httpd restart -Original Message- From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kevin Falcone Sent: Friday, October 26, 2012 12:28 PM To: rt-users@lists.bestpractical.com Subject: Re: [rt-users] chgrp error during make upgrade On Fri, Oct 26, 2012 at 04:49:57PM +, Pollard, James R wrote: I'm attempting to upgrade RT 4.04 to 4.08 on CentOS 6.3 and running into a permissions problem since my webserver runs under the apache group as opposed to www which is the assumption of the upgrade script. Not a change to the install-sh script from 4.04 I see. Is there a switch I can run make upgrade with to specify the web group? If you look at the top of /opt/rt4/etc/RT_Config.pm you'll see your incants from when you installed which should show you which arguments you gave to ./configure. ./configure --help will list the arguments for changing the users/groups. -kevin We're hiring! http://bestpractical.com/jobs
[rt-users] Look up User by Attribute in Scrip
Hey folks, I'm writing a scrip to help us manage our voicemails in RT. The voicemails arrive via email as attachments and the extension of the recipient is the only distinguishing characteristic in the email. How can I load an RT user in a script given only their work telephone? thanks! ram We're hiring! http://bestpractical.com/jobs
[rt-users] Apache taking up too much CPU
Try dropping the number of worker threads that apache is running. If it runs out of memory you'll see things like mail gate failing to send emails. On our system we had to trim this down (sorry I can't remember the exact apache2.conf settings im on my phone) but the problem for us was that apache would sometimes try to allocate far more memory than the box had (far more than 613mb... But our system is also far busier). Dropping this number helped immediately and has been great ever since. You will possilbly also need to tune MySQL to use a limited memory footprint. Given the cost of memory its unusual to see a box with that little ram these days; rt (and indeed just apache / MySQL) will be far happier with more memory. Let me know if you want me to dig up the exact parameters we changed and I'll look for them later tonight. Chris Herrmann Far Edge +612 84251400 +614 03393309 http://www.faredge.com.au We're hiring! http://bestpractical.com/jobs
Re: [rt-users] Look up User by Attribute in Scrip
On 10/26/2012 04:52 PM, Ram wrote: Hey folks, I'm writing a scrip to help us manage our voicemails in RT. The voicemails arrive via email as attachments and the extension of the recipient is the only distinguishing characteristic in the email. How can I load an RT user in a script given only their work telephone? You want the LoadByCols method provided by DBIx::SearchBuilder::Record. my $user = RT::User-new( RT-SystemUser ); $user-LoadByCols( WorkPhone = 1234 ); if ($user-id) { # loaded! } else { # couldn't find that user... } Note that WorkPhone isn't forced to be unique, so you should make sure that you keep it unique if you're going to load by it. We're hiring! http://bestpractical.com/jobs